diff --git a/.gitignore b/.gitignore index 43c787b47..563278bde 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,8 @@ # Godot 4+ specific ignores .godot/ .DS_Store -/.build -/.index-build +.build/ +.index-build/ /Packages /*.xcodeproj xcuserdata/ @@ -17,6 +17,5 @@ build-docs.log \#* /libgodot.xcframework/ Package.resolved -/.vscode +.vscode .swiftpm/xcode/xcshareddata/xcschemes -GeneratedForDebug/ diff --git a/Generator/Generator/main.swift b/Generator/Generator/main.swift index e1c504a13..3e070d567 100644 --- a/Generator/Generator/main.swift +++ b/Generator/Generator/main.swift @@ -27,13 +27,13 @@ var defaultExtensionApiJsonUrl: URL { var defaultGeneratorOutputlUrl: URL { rootUrl - .appendingPathComponent("GeneratedForDebug") - .appendingPathComponent("Sources") + .appending(path: "Sources") + .appending(path: "SwiftGodot") + .appending(path: "Generated") } var defaultDocRootUrl: URL { rootUrl - .appendingPathComponent("GeneratedForDebug") .appendingPathComponent("Docs") } @@ -138,8 +138,8 @@ for mo in jsonApi.builtinClassMemberOffsets { } } -let generatedBuiltinDir: String? = singleFile ? nil : (outputDir + "/generated-builtin/") -let generatedDir: String? = singleFile ? nil : (outputDir + "/generated/") +let generatedBuiltinDir: String? = singleFile ? nil : (outputDir + "/Builtin/") +let generatedDir: String? = singleFile ? nil : (outputDir + "/Api/") if singleFile { try! FileManager.default.createDirectory(atPath: outputDir, withIntermediateDirectories: true) diff --git a/Package.swift b/Package.swift index 3313fa0e2..5e85f3d34 100644 --- a/Package.swift +++ b/Package.swift @@ -34,7 +34,6 @@ var products: [Product] = [ "ExtensionApi", "ExtensionApiJson" ]), - .plugin(name: "CodeGeneratorPlugin", targets: ["CodeGeneratorPlugin"]), .plugin(name: "EntryPointGeneratorPlugin", targets: ["EntryPointGeneratorPlugin"]) ] @@ -93,14 +92,6 @@ var targets: [Target] = [ ] ), - // This is a build-time plugin that invokes the generator and produces - // the bindings that are compiled into SwiftGodot - .plugin( - name: "CodeGeneratorPlugin", - capability: .buildTool(), - dependencies: ["Generator"] - ), - .plugin( name: "EntryPointGeneratorPlugin", capability: .buildTool(), @@ -112,8 +103,6 @@ var targets: [Target] = [ name: "GDExtension"), ] -var swiftGodotPlugins: [Target.PluginUsage] = ["CodeGeneratorPlugin"] - // Macros aren't supported on Windows before 5.9.1 #if !(os(Windows) && swift(<5.9.1)) targets.append(contentsOf: [ @@ -133,7 +122,6 @@ targets.append(contentsOf: [ exclude: ["SwiftSprite.gdextension", "README.md"]), //linkerSettings: linkerSettings), ]) -swiftGodotPlugins.append("SwiftGodotMacroLibrary") #endif // Macro tests don't work on Windows yet @@ -214,7 +202,7 @@ targets.append(contentsOf: [ swiftSettings: [ .define("CUSTOM_BUILTIN_IMPLEMENTATIONS") ], - plugins: swiftGodotPlugins + plugins: ["SwiftGodotMacroLibrary"] ), // General purpose cross-platform tests diff --git a/Plugins/CodeGeneratorPlugin/plugin.swift b/Plugins/CodeGeneratorPlugin/plugin.swift deleted file mode 100644 index 2dca817d3..000000000 --- a/Plugins/CodeGeneratorPlugin/plugin.swift +++ /dev/null @@ -1,1015 +0,0 @@ -// -// Generator's Plugin definition.swift -// -// -// Created by Miguel de Icaza on 4/4/23. -// - -import Foundation -import PackagePlugin - -/// Generates the API for the SwiftGodot from the Godot exported Json API -@main struct SwiftCodeGeneratorPlugin: BuildToolPlugin { - func createBuildCommands(context: PluginContext, target: Target) throws -> [Command] { - var commands: [Command] = [] - // Configure the commands to write to a "GeneratedSources" directory. - let genSourcesDir = context.pluginWorkDirectory.appending("GeneratedSources") - - // We only generate commands for source targets. - let generator: Path = try context.tool(named: "Generator").path - - let api = context.package.directory.appending(["Sources", "ExtensionApi", "extension_api.json"]) - - var arguments: [CustomStringConvertible] = [ api, genSourcesDir ] - var outputFiles: [Path] = [] - #if os(Windows) - // Windows has 32K limit on CreateProcess argument length, SPM currently doesn't handle it well - outputFiles.append(genSourcesDir.appending(subpath: "Generated.swift")) - arguments.append(context.package.directory.appending(subpath: "doc")) - arguments.append("--singlefile") - commands.append(Command.prebuildCommand( - displayName: "Generating Swift API from \(api) to \(genSourcesDir)", - executable: generator, - arguments: arguments, - outputFilesDirectory: genSourcesDir)) - #else - outputFiles.append (contentsOf: knownBuiltin.map { genSourcesDir.appending(["generated-builtin", $0])}) - outputFiles.append (contentsOf: known.map { genSourcesDir.appending(["generated", $0])}) - #endif - - // For Windows with Swift 5.10 both prebuildCommand and buildCommand are needed - #if !os(Windows) || swift(>=5.10) - commands.append(Command.buildCommand( - displayName: "Generating Swift API from \(api) to \(genSourcesDir)", - executable: generator, - arguments: arguments, - inputFiles: [api], - outputFiles: outputFiles)) - #endif - - return commands - } -} - -let knownBuiltin = [ - "AABB.swift", - "Array.swift", - "Basis.swift", - "Callable.swift", - "Color.swift", - "core-defs.swift", - "Dictionary.swift", - "NodePath.swift", - "PackedByteArray.swift", - "PackedColorArray.swift", - "PackedFloat32Array.swift", - "PackedFloat64Array.swift", - "PackedInt32Array.swift", - "PackedInt64Array.swift", - "PackedStringArray.swift", - "PackedVector2Array.swift", - "PackedVector3Array.swift", - "PackedVector4Array.swift", - "Plane.swift", - "Projection.swift", - "Quaternion.swift", - "Rect2.swift", - "Rect2i.swift", - "RID.swift", - "Signal.swift", - "String.swift", - "StringName.swift", - "Transform2D.swift", - "Transform3D.swift", - "utility.swift", - "Vector2.swift", - "Vector2i.swift", - "Vector3.swift", - "Vector3i.swift", - "Vector4.swift", - "Vector4i.swift", -] - -let known = [ - "AcceptDialog.swift", - "AESContext.swift", - "AnimatableBody2D.swift", - "AnimatableBody3D.swift", - "AnimatedSprite2D.swift", - "AnimatedSprite3D.swift", - "AnimatedTexture.swift", - "Animation.swift", - "AnimationLibrary.swift", - "AnimationMixer.swift", - "AnimationNode.swift", - "AnimationNodeAdd2.swift", - "AnimationNodeAdd3.swift", - "AnimationNodeAnimation.swift", - "AnimationNodeBlend2.swift", - "AnimationNodeBlend3.swift", - "AnimationNodeBlendSpace1D.swift", - "AnimationNodeBlendSpace2D.swift", - "AnimationNodeBlendTree.swift", - "AnimationNodeOneShot.swift", - "AnimationNodeOutput.swift", - "AnimationNodeStateMachine.swift", - "AnimationNodeStateMachinePlayback.swift", - "AnimationNodeStateMachineTransition.swift", - "AnimationNodeSub2.swift", - "AnimationNodeSync.swift", - "AnimationNodeTimeScale.swift", - "AnimationNodeTimeSeek.swift", - "AnimationNodeTransition.swift", - "AnimationPlayer.swift", - "AnimationRootNode.swift", - "AnimationTree.swift", - "Area2D.swift", - "Area3D.swift", - "ArrayMesh.swift", - "ArrayOccluder3D.swift", - "AspectRatioContainer.swift", - "AStar2D.swift", - "AStar3D.swift", - "AStarGrid2D.swift", - "AtlasTexture.swift", - "AudioBusLayout.swift", - "AudioEffect.swift", - "AudioEffectAmplify.swift", - "AudioEffectBandLimitFilter.swift", - "AudioEffectBandPassFilter.swift", - "AudioEffectCapture.swift", - "AudioEffectChorus.swift", - "AudioEffectCompressor.swift", - "AudioEffectDelay.swift", - "AudioEffectDistortion.swift", - "AudioEffectEQ.swift", - "AudioEffectEQ6.swift", - "AudioEffectEQ10.swift", - "AudioEffectEQ21.swift", - "AudioEffectFilter.swift", - "AudioEffectHardLimiter.swift", - "AudioEffectHighPassFilter.swift", - "AudioEffectHighShelfFilter.swift", - "AudioEffectInstance.swift", - "AudioEffectLimiter.swift", - "AudioEffectLowPassFilter.swift", - "AudioEffectLowShelfFilter.swift", - "AudioEffectNotchFilter.swift", - "AudioEffectPanner.swift", - "AudioEffectPhaser.swift", - "AudioEffectPitchShift.swift", - "AudioEffectRecord.swift", - "AudioEffectReverb.swift", - "AudioEffectSpectrumAnalyzer.swift", - "AudioEffectSpectrumAnalyzerInstance.swift", - "AudioEffectStereoEnhance.swift", - "AudioListener2D.swift", - "AudioListener3D.swift", - "AudioSample.swift", - "AudioSamplePlayback.swift", - "AudioServer.swift", - "AudioStream.swift", - "AudioStreamGenerator.swift", - "AudioStreamGeneratorPlayback.swift", - "AudioStreamInteractive.swift", - "AudioStreamMicrophone.swift", - "AudioStreamMP3.swift", - "AudioStreamOggVorbis.swift", - "AudioStreamPlayback.swift", - "AudioStreamPlaybackInteractive.swift", - "AudioStreamPlaybackOggVorbis.swift", - "AudioStreamPlaybackPlaylist.swift", - "AudioStreamPlaybackPolyphonic.swift", - "AudioStreamPlaybackResampled.swift", - "AudioStreamPlaybackSynchronized.swift", - "AudioStreamPlayer.swift", - "AudioStreamPlayer2D.swift", - "AudioStreamPlayer3D.swift", - "AudioStreamPlaylist.swift", - "AudioStreamPolyphonic.swift", - "AudioStreamRandomizer.swift", - "AudioStreamSynchronized.swift", - "AudioStreamWAV.swift", - "BackBufferCopy.swift", - "BaseButton.swift", - "BaseMaterial3D.swift", - "BitMap.swift", - "Bone2D.swift", - "BoneAttachment3D.swift", - "BoneMap.swift", - "BoxContainer.swift", - "BoxMesh.swift", - "BoxOccluder3D.swift", - "BoxShape3D.swift", - "Button.swift", - "ButtonGroup.swift", - "CallbackTweener.swift", - "Camera2D.swift", - "Camera3D.swift", - "CameraAttributes.swift", - "CameraAttributesPhysical.swift", - "CameraAttributesPractical.swift", - "CameraFeed.swift", - "CameraServer.swift", - "CameraTexture.swift", - "CanvasGroup.swift", - "CanvasItem.swift", - "CanvasItemMaterial.swift", - "CanvasLayer.swift", - "CanvasModulate.swift", - "CanvasTexture.swift", - "CapsuleMesh.swift", - "CapsuleShape2D.swift", - "CapsuleShape3D.swift", - "CenterContainer.swift", - "CharacterBody2D.swift", - "CharacterBody3D.swift", - "CharFXTransform.swift", - "CheckBox.swift", - "CheckButton.swift", - "CircleShape2D.swift", - "ClassDB.swift", - "CodeEdit.swift", - "CodeHighlighter.swift", - "CollisionObject2D.swift", - "CollisionObject3D.swift", - "CollisionPolygon2D.swift", - "CollisionPolygon3D.swift", - "CollisionShape2D.swift", - "CollisionShape3D.swift", - "ColorPicker.swift", - "ColorPickerButton.swift", - "ColorRect.swift", - "Compositor.swift", - "CompositorEffect.swift", - "CompressedCubemap.swift", - "CompressedCubemapArray.swift", - "CompressedTexture2D.swift", - "CompressedTexture2DArray.swift", - "CompressedTexture3D.swift", - "CompressedTextureLayered.swift", - "ConcavePolygonShape2D.swift", - "ConcavePolygonShape3D.swift", - "ConeTwistJoint3D.swift", - "ConfigFile.swift", - "ConfirmationDialog.swift", - "Container.swift", - "Control.swift", - "ConvexPolygonShape2D.swift", - "ConvexPolygonShape3D.swift", - "CPUParticles2D.swift", - "CPUParticles3D.swift", - "Crypto.swift", - "CryptoKey.swift", - "CSGBox3D.swift", - "CSGCombiner3D.swift", - "CSGCylinder3D.swift", - "CSGMesh3D.swift", - "CSGPolygon3D.swift", - "CSGPrimitive3D.swift", - "CSGShape3D.swift", - "CSGSphere3D.swift", - "CSGTorus3D.swift", - "Cubemap.swift", - "CubemapArray.swift", - "Curve.swift", - "Curve2D.swift", - "Curve3D.swift", - "CurveTexture.swift", - "CurveXYZTexture.swift", - "CylinderMesh.swift", - "CylinderShape3D.swift", - "DampedSpringJoint2D.swift", - "Decal.swift", - "DirAccess.swift", - "DirectionalLight2D.swift", - "DirectionalLight3D.swift", - "DisplayServer.swift", - "DTLSServer.swift", - "EditorCommandPalette.swift", - "EditorDebuggerPlugin.swift", - "EditorDebuggerSession.swift", - "EditorExportPlatform.swift", - "EditorExportPlatformAndroid.swift", - "EditorExportPlatformIOS.swift", - "EditorExportPlatformLinuxBSD.swift", - "EditorExportPlatformMacOS.swift", - "EditorExportPlatformPC.swift", - "EditorExportPlatformWeb.swift", - "EditorExportPlatformWindows.swift", - "EditorExportPlugin.swift", - "EditorFeatureProfile.swift", - "EditorFileDialog.swift", - "EditorFileSystem.swift", - "EditorFileSystemDirectory.swift", - "EditorFileSystemImportFormatSupportQuery.swift", - "EditorImportPlugin.swift", - "EditorInspector.swift", - "EditorInspectorPlugin.swift", - "EditorInterface.swift", - "EditorNode3DGizmo.swift", - "EditorNode3DGizmoPlugin.swift", - "EditorPaths.swift", - "EditorPlugin.swift", - "EditorProperty.swift", - "EditorResourceConversionPlugin.swift", - "EditorResourcePicker.swift", - "EditorResourcePreview.swift", - "EditorResourcePreviewGenerator.swift", - "EditorResourceTooltipPlugin.swift", - "EditorSceneFormatImporter.swift", - "EditorSceneFormatImporterBlend.swift", - "EditorSceneFormatImporterFBX2GLTF.swift", - "EditorSceneFormatImporterGLTF.swift", - "EditorSceneFormatImporterUFBX.swift", - "EditorScenePostImport.swift", - "EditorScenePostImportPlugin.swift", - "EditorScript.swift", - "EditorScriptPicker.swift", - "EditorSelection.swift", - "EditorSettings.swift", - "EditorSpinSlider.swift", - "EditorSyntaxHighlighter.swift", - "EditorTranslationParserPlugin.swift", - "EditorUndoRedoManager.swift", - "EditorVCSInterface.swift", - "EncodedObjectAsID.swift", - "ENetConnection.swift", - "ENetMultiplayerPeer.swift", - "ENetPacketPeer.swift", - "Engine.swift", - "EngineDebugger.swift", - "EngineProfiler.swift", - "Environment.swift", - "Expression.swift", - "FastNoiseLite.swift", - "FBXDocument.swift", - "FBXState.swift", - "FileAccess.swift", - "FileDialog.swift", - "FileSystemDock.swift", - "FlowContainer.swift", - "FogMaterial.swift", - "FogVolume.swift", - "Font.swift", - "FontFile.swift", - "FontVariation.swift", - "FramebufferCacheRD.swift", - "GDExtension.swift", - "GDExtensionManager.swift", - "GDScript.swift", - "Generic6DOFJoint3D.swift", - "Geometry2D.swift", - "Geometry3D.swift", - "GeometryInstance3D.swift", - "GLTFAccessor.swift", - "GLTFAnimation.swift", - "GLTFBufferView.swift", - "GLTFCamera.swift", - "GLTFDocument.swift", - "GLTFDocumentExtension.swift", - "GLTFDocumentExtensionConvertImporterMesh.swift", - "GLTFLight.swift", - "GLTFMesh.swift", - "GLTFNode.swift", - "GLTFPhysicsBody.swift", - "GLTFPhysicsShape.swift", - "GLTFSkeleton.swift", - "GLTFSkin.swift", - "GLTFSpecGloss.swift", - "GLTFState.swift", - "GLTFTexture.swift", - "GLTFTextureSampler.swift", - "GPUParticles2D.swift", - "GPUParticles3D.swift", - "GPUParticlesAttractor3D.swift", - "GPUParticlesAttractorBox3D.swift", - "GPUParticlesAttractorSphere3D.swift", - "GPUParticlesAttractorVectorField3D.swift", - "GPUParticlesCollision3D.swift", - "GPUParticlesCollisionBox3D.swift", - "GPUParticlesCollisionHeightField3D.swift", - "GPUParticlesCollisionSDF3D.swift", - "GPUParticlesCollisionSphere3D.swift", - "Gradient.swift", - "GradientTexture1D.swift", - "GradientTexture2D.swift", - "GraphEdit.swift", - "GraphElement.swift", - "GraphFrame.swift", - "GraphNode.swift", - "GridContainer.swift", - "GridMap.swift", - "GrooveJoint2D.swift", - "HashingContext.swift", - "HBoxContainer.swift", - "HeightMapShape3D.swift", - "HFlowContainer.swift", - "HingeJoint3D.swift", - "HMACContext.swift", - "HScrollBar.swift", - "HSeparator.swift", - "HSlider.swift", - "HSplitContainer.swift", - "HTTPClient.swift", - "HTTPRequest.swift", - "Image.swift", - "ImageFormatLoader.swift", - "ImageFormatLoaderExtension.swift", - "ImageTexture.swift", - "ImageTexture3D.swift", - "ImageTextureLayered.swift", - "ImmediateMesh.swift", - "ImporterMesh.swift", - "ImporterMeshInstance3D.swift", - "Input.swift", - "InputEvent.swift", - "InputEventAction.swift", - "InputEventFromWindow.swift", - "InputEventGesture.swift", - "InputEventJoypadButton.swift", - "InputEventJoypadMotion.swift", - "InputEventKey.swift", - "InputEventMagnifyGesture.swift", - "InputEventMIDI.swift", - "InputEventMouse.swift", - "InputEventMouseButton.swift", - "InputEventMouseMotion.swift", - "InputEventPanGesture.swift", - "InputEventScreenDrag.swift", - "InputEventScreenTouch.swift", - "InputEventShortcut.swift", - "InputEventWithModifiers.swift", - "InputMap.swift", - "InstancePlaceholder.swift", - "IntervalTweener.swift", - "IP.swift", - "ItemList.swift", - "JavaClass.swift", - "JavaClassWrapper.swift", - "JavaScriptBridge.swift", - "JavaScriptObject.swift", - "JNISingleton.swift", - "Joint2D.swift", - "Joint3D.swift", - "JSON.swift", - "JSONRPC.swift", - "KinematicCollision2D.swift", - "KinematicCollision3D.swift", - "Label.swift", - "Label3D.swift", - "LabelSettings.swift", - "Light2D.swift", - "Light3D.swift", - "LightmapGI.swift", - "LightmapGIData.swift", - "Lightmapper.swift", - "LightmapperRD.swift", - "LightmapProbe.swift", - "LightOccluder2D.swift", - "Line2D.swift", - "LineEdit.swift", - "LinkButton.swift", - "MainLoop.swift", - "MarginContainer.swift", - "Marker2D.swift", - "Marker3D.swift", - "Marshalls.swift", - "Material.swift", - "MenuBar.swift", - "MenuButton.swift", - "Mesh.swift", - "MeshConvexDecompositionSettings.swift", - "MeshDataTool.swift", - "MeshInstance2D.swift", - "MeshInstance3D.swift", - "MeshLibrary.swift", - "MeshTexture.swift", - "MethodTweener.swift", - "MissingNode.swift", - "MissingResource.swift", - "MobileVRInterface.swift", - "MovieWriter.swift", - "MultiMesh.swift", - "MultiMeshInstance2D.swift", - "MultiMeshInstance3D.swift", - "MultiplayerAPI.swift", - "MultiplayerAPIExtension.swift", - "MultiplayerPeer.swift", - "MultiplayerPeerExtension.swift", - "MultiplayerSpawner.swift", - "MultiplayerSynchronizer.swift", - "Mutex.swift", - "NativeMenu.swift", - "NavigationAgent2D.swift", - "NavigationAgent3D.swift", - "NavigationLink2D.swift", - "NavigationLink3D.swift", - "NavigationMesh.swift", - "NavigationMeshGenerator.swift", - "NavigationMeshSourceGeometryData2D.swift", - "NavigationMeshSourceGeometryData3D.swift", - "NavigationObstacle2D.swift", - "NavigationObstacle3D.swift", - "NavigationPathQueryParameters2D.swift", - "NavigationPathQueryParameters3D.swift", - "NavigationPathQueryResult2D.swift", - "NavigationPathQueryResult3D.swift", - "NavigationPolygon.swift", - "NavigationRegion2D.swift", - "NavigationRegion3D.swift", - "NavigationServer2D.swift", - "NavigationServer3D.swift", - "NinePatchRect.swift", - "Node.swift", - "Node2D.swift", - "Node3D.swift", - "Node3DGizmo.swift", - "Noise.swift", - "NoiseTexture2D.swift", - "NoiseTexture3D.swift", - "Object.swift", - "Occluder3D.swift", - "OccluderInstance3D.swift", - "OccluderPolygon2D.swift", - "OfflineMultiplayerPeer.swift", - "OggPacketSequence.swift", - "OggPacketSequencePlayback.swift", - "OmniLight3D.swift", - "OpenXRAction.swift", - "OpenXRActionMap.swift", - "OpenXRActionSet.swift", - "OpenXRAPIExtension.swift", - "OpenXRCompositionLayer.swift", - "OpenXRCompositionLayerCylinder.swift", - "OpenXRCompositionLayerEquirect.swift", - "OpenXRCompositionLayerQuad.swift", - "OpenXRExtensionWrapperExtension.swift", - "OpenXRHand.swift", - "OpenXRInteractionProfile.swift", - "OpenXRInteractionProfileMetadata.swift", - "OpenXRInterface.swift", - "OpenXRIPBinding.swift", - "OptimizedTranslation.swift", - "OptionButton.swift", - "ORMMaterial3D.swift", - "OS.swift", - "PackedDataContainer.swift", - "PackedDataContainerRef.swift", - "PackedScene.swift", - "PacketPeer.swift", - "PacketPeerDTLS.swift", - "PacketPeerExtension.swift", - "PacketPeerStream.swift", - "PacketPeerUDP.swift", - "Panel.swift", - "PanelContainer.swift", - "PanoramaSkyMaterial.swift", - "Parallax2D.swift", - "ParallaxBackground.swift", - "ParallaxLayer.swift", - "ParticleProcessMaterial.swift", - "Path2D.swift", - "Path3D.swift", - "PathFollow2D.swift", - "PathFollow3D.swift", - "PCKPacker.swift", - "Performance.swift", - "PhysicalBone2D.swift", - "PhysicalBone3D.swift", - "PhysicalBoneSimulator3D.swift", - "PhysicalSkyMaterial.swift", - "PhysicsBody2D.swift", - "PhysicsBody3D.swift", - "PhysicsDirectBodyState2D.swift", - "PhysicsDirectBodyState2DExtension.swift", - "PhysicsDirectBodyState3D.swift", - "PhysicsDirectBodyState3DExtension.swift", - "PhysicsDirectSpaceState2D.swift", - "PhysicsDirectSpaceState2DExtension.swift", - "PhysicsDirectSpaceState3D.swift", - "PhysicsDirectSpaceState3DExtension.swift", - "PhysicsMaterial.swift", - "PhysicsPointQueryParameters2D.swift", - "PhysicsPointQueryParameters3D.swift", - "PhysicsRayQueryParameters2D.swift", - "PhysicsRayQueryParameters3D.swift", - "PhysicsServer2D.swift", - "PhysicsServer2DExtension.swift", - "PhysicsServer2DManager.swift", - "PhysicsServer3D.swift", - "PhysicsServer3DExtension.swift", - "PhysicsServer3DManager.swift", - "PhysicsServer3DRenderingServerHandler.swift", - "PhysicsShapeQueryParameters2D.swift", - "PhysicsShapeQueryParameters3D.swift", - "PhysicsTestMotionParameters2D.swift", - "PhysicsTestMotionParameters3D.swift", - "PhysicsTestMotionResult2D.swift", - "PhysicsTestMotionResult3D.swift", - "PinJoint2D.swift", - "PinJoint3D.swift", - "PlaceholderCubemap.swift", - "PlaceholderCubemapArray.swift", - "PlaceholderMaterial.swift", - "PlaceholderMesh.swift", - "PlaceholderTexture2D.swift", - "PlaceholderTexture2DArray.swift", - "PlaceholderTexture3D.swift", - "PlaceholderTextureLayered.swift", - "PlaneMesh.swift", - "PointLight2D.swift", - "PointMesh.swift", - "Polygon2D.swift", - "PolygonOccluder3D.swift", - "PolygonPathFinder.swift", - "Popup.swift", - "PopupMenu.swift", - "PopupPanel.swift", - "PortableCompressedTexture2D.swift", - "PrimitiveMesh.swift", - "PrismMesh.swift", - "ProceduralSkyMaterial.swift", - "ProgressBar.swift", - "ProjectSettings.swift", - "PropertyTweener.swift", - "QuadMesh.swift", - "QuadOccluder3D.swift", - "RandomNumberGenerator.swift", - "Range.swift", - "RayCast2D.swift", - "RayCast3D.swift", - "RDAttachmentFormat.swift", - "RDFramebufferPass.swift", - "RDPipelineColorBlendState.swift", - "RDPipelineColorBlendStateAttachment.swift", - "RDPipelineDepthStencilState.swift", - "RDPipelineMultisampleState.swift", - "RDPipelineRasterizationState.swift", - "RDPipelineSpecializationConstant.swift", - "RDSamplerState.swift", - "RDShaderFile.swift", - "RDShaderSource.swift", - "RDShaderSPIRV.swift", - "RDTextureFormat.swift", - "RDTextureView.swift", - "RDUniform.swift", - "RDVertexAttribute.swift", - "RectangleShape2D.swift", - "RefCounted.swift", - "ReferenceRect.swift", - "ReflectionProbe.swift", - "RegEx.swift", - "RegExMatch.swift", - "RemoteTransform2D.swift", - "RemoteTransform3D.swift", - "RenderData.swift", - "RenderDataExtension.swift", - "RenderDataRD.swift", - "RenderingDevice.swift", - "RenderingServer.swift", - "RenderSceneBuffers.swift", - "RenderSceneBuffersConfiguration.swift", - "RenderSceneBuffersExtension.swift", - "RenderSceneBuffersRD.swift", - "RenderSceneData.swift", - "RenderSceneDataExtension.swift", - "RenderSceneDataRD.swift", - "Resource.swift", - "ResourceFormatLoader.swift", - "ResourceFormatSaver.swift", - "ResourceImporter.swift", - "ResourceImporterBitMap.swift", - "ResourceImporterBMFont.swift", - "ResourceImporterCSVTranslation.swift", - "ResourceImporterDynamicFont.swift", - "ResourceImporterImage.swift", - "ResourceImporterImageFont.swift", - "ResourceImporterLayeredTexture.swift", - "ResourceImporterMP3.swift", - "ResourceImporterOBJ.swift", - "ResourceImporterOggVorbis.swift", - "ResourceImporterScene.swift", - "ResourceImporterShaderFile.swift", - "ResourceImporterTexture.swift", - "ResourceImporterTextureAtlas.swift", - "ResourceImporterWAV.swift", - "ResourceLoader.swift", - "ResourcePreloader.swift", - "ResourceSaver.swift", - "ResourceUID.swift", - "RibbonTrailMesh.swift", - "RichTextEffect.swift", - "RichTextLabel.swift", - "RigidBody2D.swift", - "RigidBody3D.swift", - "RootMotionView.swift", - "SceneMultiplayer.swift", - "SceneReplicationConfig.swift", - "SceneState.swift", - "SceneTree.swift", - "SceneTreeTimer.swift", - "Script.swift", - "ScriptCreateDialog.swift", - "ScriptEditor.swift", - "ScriptEditorBase.swift", - "ScriptExtension.swift", - "ScriptLanguage.swift", - "ScriptLanguageExtension.swift", - "ScrollBar.swift", - "ScrollContainer.swift", - "SegmentShape2D.swift", - "Semaphore.swift", - "SeparationRayShape2D.swift", - "SeparationRayShape3D.swift", - "Separator.swift", - "Shader.swift", - "ShaderGlobalsOverride.swift", - "ShaderInclude.swift", - "ShaderMaterial.swift", - "Shape2D.swift", - "Shape3D.swift", - "ShapeCast2D.swift", - "ShapeCast3D.swift", - "Shortcut.swift", - "Skeleton2D.swift", - "Skeleton3D.swift", - "SkeletonIK3D.swift", - "SkeletonModification2D.swift", - "SkeletonModification2DCCDIK.swift", - "SkeletonModification2DFABRIK.swift", - "SkeletonModification2DJiggle.swift", - "SkeletonModification2DLookAt.swift", - "SkeletonModification2DPhysicalBones.swift", - "SkeletonModification2DStackHolder.swift", - "SkeletonModification2DTwoBoneIK.swift", - "SkeletonModificationStack2D.swift", - "SkeletonModifier3D.swift", - "SkeletonProfile.swift", - "SkeletonProfileHumanoid.swift", - "Skin.swift", - "SkinReference.swift", - "Sky.swift", - "Slider.swift", - "SliderJoint3D.swift", - "SoftBody3D.swift", - "SphereMesh.swift", - "SphereOccluder3D.swift", - "SphereShape3D.swift", - "SpinBox.swift", - "SplitContainer.swift", - "SpotLight3D.swift", - "SpringArm3D.swift", - "Sprite2D.swift", - "Sprite3D.swift", - "SpriteBase3D.swift", - "SpriteFrames.swift", - "StandardMaterial3D.swift", - "StaticBody2D.swift", - "StaticBody3D.swift", - "StatusIndicator.swift", - "StreamPeer.swift", - "StreamPeerBuffer.swift", - "StreamPeerExtension.swift", - "StreamPeerGZIP.swift", - "StreamPeerTCP.swift", - "StreamPeerTLS.swift", - "StyleBox.swift", - "StyleBoxEmpty.swift", - "StyleBoxFlat.swift", - "StyleBoxLine.swift", - "StyleBoxTexture.swift", - "SubViewport.swift", - "SubViewportContainer.swift", - "SurfaceTool.swift", - "SyntaxHighlighter.swift", - "SystemFont.swift", - "TabBar.swift", - "TabContainer.swift", - "TCPServer.swift", - "TextEdit.swift", - "TextLine.swift", - "TextMesh.swift", - "TextParagraph.swift", - "TextServer.swift", - "TextServerAdvanced.swift", - "TextServerDummy.swift", - "TextServerExtension.swift", - "TextServerManager.swift", - "Texture.swift", - "Texture2D.swift", - "Texture2DArray.swift", - "Texture2DArrayRD.swift", - "Texture2DRD.swift", - "Texture3D.swift", - "Texture3DRD.swift", - "TextureButton.swift", - "TextureCubemapArrayRD.swift", - "TextureCubemapRD.swift", - "TextureLayered.swift", - "TextureLayeredRD.swift", - "TextureProgressBar.swift", - "TextureRect.swift", - "Theme.swift", - "ThemeDB.swift", - "Thread.swift", - "TileData.swift", - "TileMap.swift", - "TileMapLayer.swift", - "TileMapPattern.swift", - "TileSet.swift", - "TileSetAtlasSource.swift", - "TileSetScenesCollectionSource.swift", - "TileSetSource.swift", - "Time.swift", - "Timer.swift", - "TLSOptions.swift", - "TorusMesh.swift", - "TouchScreenButton.swift", - "Translation.swift", - "TranslationServer.swift", - "Tree.swift", - "TreeItem.swift", - "TriangleMesh.swift", - "TubeTrailMesh.swift", - "Tween.swift", - "Tweener.swift", - "UDPServer.swift", - "UndoRedo.swift", - "UniformSetCacheRD.swift", - "UPNP.swift", - "UPNPDevice.swift", - "VBoxContainer.swift", - "VehicleBody3D.swift", - "VehicleWheel3D.swift", - "VFlowContainer.swift", - "VideoStream.swift", - "VideoStreamPlayback.swift", - "VideoStreamPlayer.swift", - "VideoStreamTheora.swift", - "Viewport.swift", - "ViewportTexture.swift", - "VisibleOnScreenEnabler2D.swift", - "VisibleOnScreenEnabler3D.swift", - "VisibleOnScreenNotifier2D.swift", - "VisibleOnScreenNotifier3D.swift", - "VisualInstance3D.swift", - "VisualShader.swift", - "VisualShaderNode.swift", - "VisualShaderNodeBillboard.swift", - "VisualShaderNodeBooleanConstant.swift", - "VisualShaderNodeBooleanParameter.swift", - "VisualShaderNodeClamp.swift", - "VisualShaderNodeColorConstant.swift", - "VisualShaderNodeColorFunc.swift", - "VisualShaderNodeColorOp.swift", - "VisualShaderNodeColorParameter.swift", - "VisualShaderNodeComment.swift", - "VisualShaderNodeCompare.swift", - "VisualShaderNodeConstant.swift", - "VisualShaderNodeCubemap.swift", - "VisualShaderNodeCubemapParameter.swift", - "VisualShaderNodeCurveTexture.swift", - "VisualShaderNodeCurveXYZTexture.swift", - "VisualShaderNodeCustom.swift", - "VisualShaderNodeDerivativeFunc.swift", - "VisualShaderNodeDeterminant.swift", - "VisualShaderNodeDistanceFade.swift", - "VisualShaderNodeDotProduct.swift", - "VisualShaderNodeExpression.swift", - "VisualShaderNodeFaceForward.swift", - "VisualShaderNodeFloatConstant.swift", - "VisualShaderNodeFloatFunc.swift", - "VisualShaderNodeFloatOp.swift", - "VisualShaderNodeFloatParameter.swift", - "VisualShaderNodeFrame.swift", - "VisualShaderNodeFresnel.swift", - "VisualShaderNodeGlobalExpression.swift", - "VisualShaderNodeGroupBase.swift", - "VisualShaderNodeIf.swift", - "VisualShaderNodeInput.swift", - "VisualShaderNodeIntConstant.swift", - "VisualShaderNodeIntFunc.swift", - "VisualShaderNodeIntOp.swift", - "VisualShaderNodeIntParameter.swift", - "VisualShaderNodeIs.swift", - "VisualShaderNodeLinearSceneDepth.swift", - "VisualShaderNodeMix.swift", - "VisualShaderNodeMultiplyAdd.swift", - "VisualShaderNodeOuterProduct.swift", - "VisualShaderNodeOutput.swift", - "VisualShaderNodeParameter.swift", - "VisualShaderNodeParameterRef.swift", - "VisualShaderNodeParticleAccelerator.swift", - "VisualShaderNodeParticleBoxEmitter.swift", - "VisualShaderNodeParticleConeVelocity.swift", - "VisualShaderNodeParticleEmit.swift", - "VisualShaderNodeParticleEmitter.swift", - "VisualShaderNodeParticleMeshEmitter.swift", - "VisualShaderNodeParticleMultiplyByAxisAngle.swift", - "VisualShaderNodeParticleOutput.swift", - "VisualShaderNodeParticleRandomness.swift", - "VisualShaderNodeParticleRingEmitter.swift", - "VisualShaderNodeParticleSphereEmitter.swift", - "VisualShaderNodeProximityFade.swift", - "VisualShaderNodeRandomRange.swift", - "VisualShaderNodeRemap.swift", - "VisualShaderNodeReroute.swift", - "VisualShaderNodeResizableBase.swift", - "VisualShaderNodeRotationByAxis.swift", - "VisualShaderNodeSample3D.swift", - "VisualShaderNodeScreenNormalWorldSpace.swift", - "VisualShaderNodeScreenUVToSDF.swift", - "VisualShaderNodeSDFRaymarch.swift", - "VisualShaderNodeSDFToScreenUV.swift", - "VisualShaderNodeSmoothStep.swift", - "VisualShaderNodeStep.swift", - "VisualShaderNodeSwitch.swift", - "VisualShaderNodeTexture.swift", - "VisualShaderNodeTexture2DArray.swift", - "VisualShaderNodeTexture2DArrayParameter.swift", - "VisualShaderNodeTexture2DParameter.swift", - "VisualShaderNodeTexture3D.swift", - "VisualShaderNodeTexture3DParameter.swift", - "VisualShaderNodeTextureParameter.swift", - "VisualShaderNodeTextureParameterTriplanar.swift", - "VisualShaderNodeTextureSDF.swift", - "VisualShaderNodeTextureSDFNormal.swift", - "VisualShaderNodeTransformCompose.swift", - "VisualShaderNodeTransformConstant.swift", - "VisualShaderNodeTransformDecompose.swift", - "VisualShaderNodeTransformFunc.swift", - "VisualShaderNodeTransformOp.swift", - "VisualShaderNodeTransformParameter.swift", - "VisualShaderNodeTransformVecMult.swift", - "VisualShaderNodeUIntConstant.swift", - "VisualShaderNodeUIntFunc.swift", - "VisualShaderNodeUIntOp.swift", - "VisualShaderNodeUIntParameter.swift", - "VisualShaderNodeUVFunc.swift", - "VisualShaderNodeUVPolarCoord.swift", - "VisualShaderNodeVarying.swift", - "VisualShaderNodeVaryingGetter.swift", - "VisualShaderNodeVaryingSetter.swift", - "VisualShaderNodeVec2Constant.swift", - "VisualShaderNodeVec2Parameter.swift", - "VisualShaderNodeVec3Constant.swift", - "VisualShaderNodeVec3Parameter.swift", - "VisualShaderNodeVec4Constant.swift", - "VisualShaderNodeVec4Parameter.swift", - "VisualShaderNodeVectorBase.swift", - "VisualShaderNodeVectorCompose.swift", - "VisualShaderNodeVectorDecompose.swift", - "VisualShaderNodeVectorDistance.swift", - "VisualShaderNodeVectorFunc.swift", - "VisualShaderNodeVectorLen.swift", - "VisualShaderNodeVectorOp.swift", - "VisualShaderNodeVectorRefract.swift", - "VisualShaderNodeWorldPositionFromDepth.swift", - "VoxelGI.swift", - "VoxelGIData.swift", - "VScrollBar.swift", - "VSeparator.swift", - "VSlider.swift", - "VSplitContainer.swift", - "WeakRef.swift", - "WebRTCDataChannel.swift", - "WebRTCDataChannelExtension.swift", - "WebRTCMultiplayerPeer.swift", - "WebRTCPeerConnection.swift", - "WebRTCPeerConnectionExtension.swift", - "WebSocketMultiplayerPeer.swift", - "WebSocketPeer.swift", - "WebXRInterface.swift", - "Window.swift", - "WorkerThreadPool.swift", - "World2D.swift", - "World3D.swift", - "WorldBoundaryShape2D.swift", - "WorldBoundaryShape3D.swift", - "WorldEnvironment.swift", - "X509Certificate.swift", - "XMLParser.swift", - "XRAnchor3D.swift", - "XRBodyModifier3D.swift", - "XRBodyTracker.swift", - "XRCamera3D.swift", - "XRController3D.swift", - "XRControllerTracker.swift", - "XRFaceModifier3D.swift", - "XRFaceTracker.swift", - "XRHandModifier3D.swift", - "XRHandTracker.swift", - "XRInterface.swift", - "XRInterfaceExtension.swift", - "XRNode3D.swift", - "XROrigin3D.swift", - "XRPose.swift", - "XRPositionalTracker.swift", - "XRServer.swift", - "XRTracker.swift", - "XRVRS.swift", - "ZIPPacker.swift", - "ZIPReader.swift", - -] diff --git a/Sources/SwiftGodot/Generated/Api/AESContext.swift b/Sources/SwiftGodot/Generated/Api/AESContext.swift new file mode 100644 index 000000000..219968efe --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AESContext.swift @@ -0,0 +1,155 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to AES encryption/decryption of raw data. +/// +/// This class holds the context information required for encryption and decryption operations with AES (Advanced Encryption Standard). Both AES-ECB and AES-CBC modes are supported. +/// +open class AESContext: RefCounted { + override open class var godotClassName: StringName { "AESContext" } + public enum Mode: Int64, CaseIterable, CustomDebugStringConvertible { + /// AES electronic codebook encryption mode. + case ecbEncrypt = 0 // MODE_ECB_ENCRYPT + /// AES electronic codebook decryption mode. + case ecbDecrypt = 1 // MODE_ECB_DECRYPT + /// AES cipher blocker chaining encryption mode. + case cbcEncrypt = 2 // MODE_CBC_ENCRYPT + /// AES cipher blocker chaining decryption mode. + case cbcDecrypt = 3 // MODE_CBC_DECRYPT + /// Maximum value for the mode enum. + case max = 4 // MODE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ecbEncrypt: return ".ecbEncrypt" + case .ecbDecrypt: return ".ecbDecrypt" + case .cbcEncrypt: return ".cbcEncrypt" + case .cbcDecrypt: return ".cbcDecrypt" + case .max: return ".max" + } + + } + + } + + /* Methods */ + fileprivate static var method_start: GDExtensionMethodBindPtr = { + let methodName = StringName("start") + return withUnsafePointer(to: &AESContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3122411423)! + } + + } + + }() + + /// Start the AES context in the given `mode`. A `key` of either 16 or 32 bytes must always be provided, while an `iv` (initialization vector) of exactly 16 bytes, is only needed when `mode` is either ``Mode/cbcEncrypt`` or ``Mode/cbcDecrypt``. + public final func start(mode: AESContext.Mode, key: PackedByteArray, iv: PackedByteArray = PackedByteArray()) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: iv.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AESContext.method_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &AESContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 527836100)! + } + + } + + }() + + /// Run the desired operation for this AES context. Will return a ``PackedByteArray`` containing the result of encrypting (or decrypting) the given `src`. See ``start(mode:key:iv:)`` for mode of operation. + /// + /// > Note: The size of `src` must be a multiple of 16. Apply some padding if needed. + /// + public final func update(src: PackedByteArray) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: src.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AESContext.method_update, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_iv_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_iv_state") + return withUnsafePointer(to: &AESContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + /// Get the current IV state for this context (IV gets updated when calling ``update(src:)``). You normally don't need this function. + /// + /// > Note: This function only makes sense when the context is started with ``Mode/cbcEncrypt`` or ``Mode/cbcDecrypt``. + /// + public final func getIvState() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(AESContext.method_get_iv_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_finish: GDExtensionMethodBindPtr = { + let methodName = StringName("finish") + return withUnsafePointer(to: &AESContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Close this AES context so it can be started again. See ``start(mode:key:iv:)``. + public final func finish() { + gi.object_method_bind_ptrcall(AESContext.method_finish, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AStar2D.swift b/Sources/SwiftGodot/Generated/Api/AStar2D.swift new file mode 100644 index 000000000..56ca2cb27 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AStar2D.swift @@ -0,0 +1,717 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An implementation of A* for finding the shortest path between two vertices on a connected graph in 2D space. +/// +/// An implementation of the A* algorithm, used to find the shortest path between two vertices on a connected graph in 2D space. +/// +/// See ``AStar3D`` for a more thorough explanation on how to use this class. ``AStar2D`` is a wrapper for ``AStar3D`` that enforces 2D coordinates. +/// +open class AStar2D: RefCounted { + override open class var godotClassName: StringName { "AStar2D" } + /* Methods */ + /// Called when estimating the cost between a point and the path's ending point. + /// + /// Note that this function is hidden in the default ``AStar2D`` class. + /// + @_documentation(visibility: public) + open func _estimateCost(fromId: Int, toId: Int) -> Double { + return 0.0 + } + + /// Called when computing the cost between two connected points. + /// + /// Note that this function is hidden in the default ``AStar2D`` class. + /// + @_documentation(visibility: public) + open func _computeCost(fromId: Int, toId: Int) -> Double { + return 0.0 + } + + fileprivate static var method_get_available_point_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_available_point_id") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next available point ID with no point associated to it. + public final func getAvailablePointId() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar2D.method_get_available_point_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4074201818)! + } + + } + + }() + + /// Adds a new point at the given position with the given identifier. The `id` must be 0 or larger, and the `weightScale` must be 0.0 or greater. + /// + /// The `weightScale` is multiplied by the result of ``_computeCost(fromId:toId:)`` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower `weightScale`s to form a path. + /// + /// If there already exists a point for the given `id`, its position and weight scale are updated to the given values. + /// + public final func addPoint(id: Int, position: Vector2, weightScale: Double = 1.0) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: weightScale) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the point associated with the given `id`. + public final func getPointPosition(id: Int) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_position") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the `position` for the point with the given `id`. + public final func setPointPosition(id: Int, position: Vector2) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_set_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_weight_scale") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the weight scale of the point associated with the given `id`. + public final func getPointWeightScale(id: Int) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_weight_scale") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the `weightScale` for the point with the given `id`. The `weightScale` is multiplied by the result of ``_computeCost(fromId:toId:)`` when determining the overall cost of traveling across a segment from a neighboring point to this point. + public final func setPointWeightScale(id: Int, weightScale: Double) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: weightScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_set_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point associated with the given `id` from the points pool. + public final func removePoint(id: Int) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_point: GDExtensionMethodBindPtr = { + let methodName = StringName("has_point") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether a point associated with the given `id` exists. + public final func hasPoint(id: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_has_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_connections") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2865087369)! + } + + } + + }() + + /// Returns an array with the IDs of the points that form the connection with the given point. + /// + public final func getPointConnections(id: Int) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_point_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_ids") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3851388692)! + } + + } + + }() + + /// Returns an array of all point IDs. + public final func getPointIds() -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + gi.object_method_bind_ptrcall(AStar2D.method_get_point_ids, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_point_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_disabled") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 972357352)! + } + + } + + }() + + /// Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. + public final func setPointDisabled(id: Int, disabled: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_set_point_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_point_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_disabled") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. + public final func isPointDisabled(id: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_is_point_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_connect_points: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_points") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3710494224)! + } + + } + + }() + + /// Creates a segment between the given points. If `bidirectional` is `false`, only movement from `id` to `toId` is allowed, not the reverse direction. + /// + public final func connectPoints(id: Int, toId: Int, bidirectional: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_connect_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_disconnect_points: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_points") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3710494224)! + } + + } + + }() + + /// Deletes the segment between the given points. If `bidirectional` is `false`, only movement from `id` to `toId` is prevented, and a unidirectional segment possibly remains. + public final func disconnectPoints(id: Int, toId: Int, bidirectional: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_disconnect_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_are_points_connected: GDExtensionMethodBindPtr = { + let methodName = StringName("are_points_connected") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2288175859)! + } + + } + + }() + + /// Returns whether there is a connection/segment between the given points. If `bidirectional` is `false`, returns whether movement from `id` to `toId` is possible through this segment. + public final func arePointsConnected(id: Int, toId: Int, bidirectional: Bool = true) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_are_points_connected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of points currently in the points pool. + public final func getPointCount() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar2D.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_point_capacity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_capacity") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the capacity of the structure backing the points, useful in conjunction with ``reserveSpace(numNodes:)``. + public final func getPointCapacity() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar2D.method_get_point_capacity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_reserve_space: GDExtensionMethodBindPtr = { + let methodName = StringName("reserve_space") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Reserves space internally for `numNodes` points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. + public final func reserveSpace(numNodes: Int) { + withUnsafePointer(to: numNodes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_reserve_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all the points and segments. + public final func clear() { + gi.object_method_bind_ptrcall(AStar2D.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2300324924)! + } + + } + + }() + + /// Returns the ID of the closest point to `toPosition`, optionally taking disabled points into account. Returns `-1` if there are no points in the points pool. + /// + /// > Note: If several points are the closest to `toPosition`, the one with the smallest ID will be returned, ensuring a deterministic result. + /// + public final func getClosestPoint(toPosition: Vector2, includeDisabled: Bool = false) -> Int { + var _result: Int = 0 + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: includeDisabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_closest_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_position_in_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_position_in_segment") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Returns the closest position to `toPosition` that resides inside a segment between two connected points. + /// + /// The result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point. + /// + public final func getClosestPositionInSegment(toPosition: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_closest_position_in_segment, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_path") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3427490392)! + } + + } + + }() + + /// Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + /// > Note: This method is not thread-safe. If called from a ``Thread``, it will return an empty array and will print an error message. + /// + public final func getPointPath(fromId: Int, toId: Int, allowPartialPath: Bool = false) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_point_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_id_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_id_path") + return withUnsafePointer(to: &AStar2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3136199648)! + } + + } + + }() + + /// Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + /// If you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + /// + public final func getIdPath(fromId: Int, toId: Int, allowPartialPath: Bool = false) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar2D.method_get_id_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_compute_cost": + return _AStar2D_proxy_compute_cost + case "_estimate_cost": + return _AStar2D_proxy_estimate_cost + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AStar2D_proxy_compute_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._computeCost (fromId: args [0]!.assumingMemoryBound (to: Int.self).pointee, toId: args [1]!.assumingMemoryBound (to: Int.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AStar2D_proxy_estimate_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._estimateCost (fromId: args [0]!.assumingMemoryBound (to: Int.self).pointee, toId: args [1]!.assumingMemoryBound (to: Int.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AStar3D.swift b/Sources/SwiftGodot/Generated/Api/AStar3D.swift new file mode 100644 index 000000000..ea2d21ee3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AStar3D.swift @@ -0,0 +1,723 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An implementation of A* for finding the shortest path between two vertices on a connected graph in 3D space. +/// +/// A* (A star) is a computer algorithm used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in 3D space and Euclidean distances by default. +/// +/// You must add points manually with ``addPoint(id:position:weightScale:)`` and create segments manually with ``connectPoints(id:toId:bidirectional:)``. Once done, you can test if there is a path between two points with the ``arePointsConnected(id:toId:bidirectional:)`` function, get a path containing indices by ``getIdPath(fromId:toId:allowPartialPath:)``, or one containing actual coordinates with ``getPointPath(fromId:toId:allowPartialPath:)``. +/// +/// It is also possible to use non-Euclidean distances. To do so, create a class that extends ``AStar3D`` and override methods ``_computeCost(fromId:toId:)`` and ``_estimateCost(fromId:toId:)``. Both take two indices and return a length, as is shown in the following example. +/// +/// ``_estimateCost(fromId:toId:)`` should return a lower bound of the distance, i.e. `_estimate_cost(u, v) <= _compute_cost(u, v)`. This serves as a hint to the algorithm because the custom ``_computeCost(fromId:toId:)`` might be computation-heavy. If this is not the case, make ``_estimateCost(fromId:toId:)`` return the same value as ``_computeCost(fromId:toId:)`` to provide the algorithm with the most accurate information. +/// +/// If the default ``_estimateCost(fromId:toId:)`` and ``_computeCost(fromId:toId:)`` methods are used, or if the supplied ``_estimateCost(fromId:toId:)`` method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the ``_computeCost(fromId:toId:)`` results of all segments in the path multiplied by the `weight_scale`s of the endpoints of the respective segments. If the default methods are used and the `weight_scale`s of all points are set to `1.0`, then this equals the sum of Euclidean distances of all segments in the path. +/// +open class AStar3D: RefCounted { + override open class var godotClassName: StringName { "AStar3D" } + /* Methods */ + /// Called when estimating the cost between a point and the path's ending point. + /// + /// Note that this function is hidden in the default ``AStar3D`` class. + /// + @_documentation(visibility: public) + open func _estimateCost(fromId: Int, toId: Int) -> Double { + return 0.0 + } + + /// Called when computing the cost between two connected points. + /// + /// Note that this function is hidden in the default ``AStar3D`` class. + /// + @_documentation(visibility: public) + open func _computeCost(fromId: Int, toId: Int) -> Double { + return 0.0 + } + + fileprivate static var method_get_available_point_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_available_point_id") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next available point ID with no point associated to it. + public final func getAvailablePointId() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar3D.method_get_available_point_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1038703438)! + } + + } + + }() + + /// Adds a new point at the given position with the given identifier. The `id` must be 0 or larger, and the `weightScale` must be 0.0 or greater. + /// + /// The `weightScale` is multiplied by the result of ``_computeCost(fromId:toId:)`` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower `weightScale`s to form a path. + /// + /// If there already exists a point for the given `id`, its position and weight scale are updated to the given values. + /// + public final func addPoint(id: Int, position: Vector3, weightScale: Double = 1.0) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: weightScale) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the point associated with the given `id`. + public final func getPointPosition(id: Int) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_position") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the `position` for the point with the given `id`. + public final func setPointPosition(id: Int, position: Vector3) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_set_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_weight_scale") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the weight scale of the point associated with the given `id`. + public final func getPointWeightScale(id: Int) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_weight_scale") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the `weightScale` for the point with the given `id`. The `weightScale` is multiplied by the result of ``_computeCost(fromId:toId:)`` when determining the overall cost of traveling across a segment from a neighboring point to this point. + public final func setPointWeightScale(id: Int, weightScale: Double) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: weightScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_set_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point associated with the given `id` from the points pool. + public final func removePoint(id: Int) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_point: GDExtensionMethodBindPtr = { + let methodName = StringName("has_point") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether a point associated with the given `id` exists. + public final func hasPoint(id: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_has_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_connections") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2865087369)! + } + + } + + }() + + /// Returns an array with the IDs of the points that form the connection with the given point. + /// + public final func getPointConnections(id: Int) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_point_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_ids") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3851388692)! + } + + } + + }() + + /// Returns an array of all point IDs. + public final func getPointIds() -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + gi.object_method_bind_ptrcall(AStar3D.method_get_point_ids, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_point_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_disabled") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 972357352)! + } + + } + + }() + + /// Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. + public final func setPointDisabled(id: Int, disabled: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_set_point_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_point_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_disabled") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. + public final func isPointDisabled(id: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_is_point_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_connect_points: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_points") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3710494224)! + } + + } + + }() + + /// Creates a segment between the given points. If `bidirectional` is `false`, only movement from `id` to `toId` is allowed, not the reverse direction. + /// + public final func connectPoints(id: Int, toId: Int, bidirectional: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_connect_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_disconnect_points: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_points") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3710494224)! + } + + } + + }() + + /// Deletes the segment between the given points. If `bidirectional` is `false`, only movement from `id` to `toId` is prevented, and a unidirectional segment possibly remains. + public final func disconnectPoints(id: Int, toId: Int, bidirectional: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_disconnect_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_are_points_connected: GDExtensionMethodBindPtr = { + let methodName = StringName("are_points_connected") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2288175859)! + } + + } + + }() + + /// Returns whether the two given points are directly connected by a segment. If `bidirectional` is `false`, returns whether movement from `id` to `toId` is possible through this segment. + public final func arePointsConnected(id: Int, toId: Int, bidirectional: Bool = true) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: bidirectional) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_are_points_connected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of points currently in the points pool. + public final func getPointCount() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar3D.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_point_capacity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_capacity") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the capacity of the structure backing the points, useful in conjunction with ``reserveSpace(numNodes:)``. + public final func getPointCapacity() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AStar3D.method_get_point_capacity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_reserve_space: GDExtensionMethodBindPtr = { + let methodName = StringName("reserve_space") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Reserves space internally for `numNodes` points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. + public final func reserveSpace(numNodes: Int) { + withUnsafePointer(to: numNodes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_reserve_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all the points and segments. + public final func clear() { + gi.object_method_bind_ptrcall(AStar3D.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3241074317)! + } + + } + + }() + + /// Returns the ID of the closest point to `toPosition`, optionally taking disabled points into account. Returns `-1` if there are no points in the points pool. + /// + /// > Note: If several points are the closest to `toPosition`, the one with the smallest ID will be returned, ensuring a deterministic result. + /// + public final func getClosestPoint(toPosition: Vector3, includeDisabled: Bool = false) -> Int { + var _result: Int = 0 + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: includeDisabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_closest_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_position_in_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_position_in_segment") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 192990374)! + } + + } + + }() + + /// Returns the closest position to `toPosition` that resides inside a segment between two connected points. + /// + /// The result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point. + /// + public final func getClosestPositionInSegment(toPosition: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_closest_position_in_segment, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_path") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1562654675)! + } + + } + + }() + + /// Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + /// > Note: This method is not thread-safe. If called from a ``Thread``, it will return an empty array and will print an error message. + /// + public final func getPointPath(fromId: Int, toId: Int, allowPartialPath: Bool = false) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_point_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_id_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_id_path") + return withUnsafePointer(to: &AStar3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3136199648)! + } + + } + + }() + + /// Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + /// If you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + /// + public final func getIdPath(fromId: Int, toId: Int, allowPartialPath: Bool = false) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStar3D.method_get_id_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_compute_cost": + return _AStar3D_proxy_compute_cost + case "_estimate_cost": + return _AStar3D_proxy_estimate_cost + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AStar3D_proxy_compute_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._computeCost (fromId: args [0]!.assumingMemoryBound (to: Int.self).pointee, toId: args [1]!.assumingMemoryBound (to: Int.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AStar3D_proxy_estimate_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._estimateCost (fromId: args [0]!.assumingMemoryBound (to: Int.self).pointee, toId: args [1]!.assumingMemoryBound (to: Int.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AStarGrid2D.swift b/Sources/SwiftGodot/Generated/Api/AStarGrid2D.swift new file mode 100644 index 000000000..4ca29c6d2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AStarGrid2D.swift @@ -0,0 +1,1066 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An implementation of A* for finding the shortest path between two points on a partial 2D grid. +/// +/// ``AStarGrid2D`` is a variant of ``AStar2D`` that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations. +/// +/// To use ``AStarGrid2D``, you only need to set the ``region`` of the grid, optionally set the ``cellSize``, and then call the ``update()`` method: +/// +/// To remove a point from the pathfinding grid, it must be set as "solid" with ``setPointSolid(_:solid:)``. +/// +open class AStarGrid2D: RefCounted { + override open class var godotClassName: StringName { "AStarGrid2D" } + public enum Heuristic: Int64, CaseIterable, CustomDebugStringConvertible { + /// The Euclidean heuristic to be used for the pathfinding using the following formula: + /// + /// > Note: This is also the internal heuristic used in ``AStar3D`` and ``AStar2D`` by default (with the inclusion of possible z-axis coordinate). + /// + case euclidean = 0 // HEURISTIC_EUCLIDEAN + /// The Manhattan heuristic to be used for the pathfinding using the following formula: + /// + /// > Note: This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the ``diagonalMode`` to ``DiagonalMode/never``. + /// + case manhattan = 1 // HEURISTIC_MANHATTAN + /// The Octile heuristic to be used for the pathfinding using the following formula: + /// + case octile = 2 // HEURISTIC_OCTILE + /// The Chebyshev heuristic to be used for the pathfinding using the following formula: + /// + case chebyshev = 3 // HEURISTIC_CHEBYSHEV + /// Represents the size of the ``AStarGrid2D/Heuristic`` enum. + case max = 4 // HEURISTIC_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .euclidean: return ".euclidean" + case .manhattan: return ".manhattan" + case .octile: return ".octile" + case .chebyshev: return ".chebyshev" + case .max: return ".max" + } + + } + + } + + public enum DiagonalMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals. + case always = 0 // DIAGONAL_MODE_ALWAYS + /// The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal. + case never = 1 // DIAGONAL_MODE_NEVER + /// The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment. + case atLeastOneWalkable = 2 // DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE + /// The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment. + case onlyIfNoObstacles = 3 // DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES + /// Represents the size of the ``AStarGrid2D/DiagonalMode`` enum. + case max = 4 // DIAGONAL_MODE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .always: return ".always" + case .never: return ".never" + case .atLeastOneWalkable: return ".atLeastOneWalkable" + case .onlyIfNoObstacles: return ".onlyIfNoObstacles" + case .max: return ".max" + } + + } + + } + + public enum CellShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Rectangular cell shape. + case square = 0 // CELL_SHAPE_SQUARE + /// Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. + case isometricRight = 1 // CELL_SHAPE_ISOMETRIC_RIGHT + /// Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. + case isometricDown = 2 // CELL_SHAPE_ISOMETRIC_DOWN + /// Represents the size of the ``AStarGrid2D/CellShape`` enum. + case max = 3 // CELL_SHAPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .square: return ".square" + case .isometricRight: return ".isometricRight" + case .isometricDown: return ".isometricDown" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// The region of grid cells available for pathfinding. If changed, ``update()`` needs to be called before finding the next path. + final public var region: Rect2i { + get { + return get_region () + } + + set { + set_region (newValue) + } + + } + + /// The size of the grid (number of cells of size ``cellSize`` on each axis). If changed, ``update()`` needs to be called before finding the next path. + final public var size: Vector2i { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The offset of the grid which will be applied to calculate the resulting point position returned by ``getPointPath(fromId:toId:allowPartialPath:)``. If changed, ``update()`` needs to be called before finding the next path. + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The size of the point cell which will be applied to calculate the resulting point position returned by ``getPointPath(fromId:toId:allowPartialPath:)``. If changed, ``update()`` needs to be called before finding the next path. + final public var cellSize: Vector2 { + get { + return get_cell_size () + } + + set { + set_cell_size (newValue) + } + + } + + /// The cell shape. Affects how the positions are placed in the grid. If changed, ``update()`` needs to be called before finding the next path. + final public var cellShape: AStarGrid2D.CellShape { + get { + return get_cell_shape () + } + + set { + set_cell_shape (newValue) + } + + } + + /// Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. + /// + /// > Note: Currently, toggling it on disables the consideration of weight scaling in pathfinding. + /// + final public var jumpingEnabled: Bool { + get { + return is_jumping_enabled () + } + + set { + set_jumping_enabled (newValue) + } + + } + + /// The default ``AStarGrid2D/Heuristic`` which will be used to calculate the cost between two points if ``_computeCost(fromId:toId:)`` was not overridden. + final public var defaultComputeHeuristic: AStarGrid2D.Heuristic { + get { + return get_default_compute_heuristic () + } + + set { + set_default_compute_heuristic (newValue) + } + + } + + /// The default ``AStarGrid2D/Heuristic`` which will be used to calculate the cost between the point and the end point if ``_estimateCost(fromId:toId:)`` was not overridden. + final public var defaultEstimateHeuristic: AStarGrid2D.Heuristic { + get { + return get_default_estimate_heuristic () + } + + set { + set_default_estimate_heuristic (newValue) + } + + } + + /// A specific ``AStarGrid2D/DiagonalMode`` mode which will force the path to avoid or accept the specified diagonals. + final public var diagonalMode: AStarGrid2D.DiagonalMode { + get { + return get_diagonal_mode () + } + + set { + set_diagonal_mode (newValue) + } + + } + + /* Methods */ + /// Called when estimating the cost between a point and the path's ending point. + /// + /// Note that this function is hidden in the default ``AStarGrid2D`` class. + /// + @_documentation(visibility: public) + open func _estimateCost(fromId: Vector2i, toId: Vector2i) -> Double { + return 0.0 + } + + /// Called when computing the cost between two connected points. + /// + /// Note that this function is hidden in the default ``AStarGrid2D`` class. + /// + @_documentation(visibility: public) + open func _computeCost(fromId: Vector2i, toId: Vector2i) -> Double { + return 0.0 + } + + fileprivate static var method_set_region: GDExtensionMethodBindPtr = { + let methodName = StringName("set_region") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1763793166)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_region(_ region: Rect2i) { + withUnsafePointer(to: region) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_region: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 410525958)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_region() -> Rect2i { + var _result: Rect2i = Rect2i () + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_region, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_size(_ cellSize: Vector2) { + withUnsafePointer(to: cellSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_size") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_shape") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4130591146)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_shape(_ cellShape: AStarGrid2D.CellShape) { + withUnsafePointer(to: cellShape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_cell_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_shape") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3293463634)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_shape() -> AStarGrid2D.CellShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_cell_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AStarGrid2D.CellShape (rawValue: _result)! + } + + fileprivate static var method_is_in_bounds: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_bounds") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Returns `true` if the `x` and `y` is a valid grid coordinate (id), i.e. if it is inside ``region``. Equivalent to `region.has_point(Vector2i(x, y))`. + public final func isInBounds(x: Int32, y: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_is_in_bounds, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_in_boundsv: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_boundsv") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3900751641)! + } + + } + + }() + + /// Returns `true` if the `id` vector is a valid grid coordinate, i.e. if it is inside ``region``. Equivalent to `region.has_point(id)`. + public final func isInBoundsv(id: Vector2i) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_is_in_boundsv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_dirty: GDExtensionMethodBindPtr = { + let methodName = StringName("is_dirty") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Indicates that the grid parameters were changed and ``update()`` needs to be called. + public final func isDirty() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AStarGrid2D.method_is_dirty, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like ``region``, ``cellSize`` or ``offset`` are changed. ``isDirty()`` will return `true` if this is the case and this needs to be called. + /// + /// > Note: All point data (solidity and weight scale) will be cleared. + /// + public final func update() { + gi.object_method_bind_ptrcall(AStarGrid2D.method_update, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_jumping_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_jumping_enabled") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_jumping_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_jumping_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_jumping_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_jumping_enabled") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_jumping_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AStarGrid2D.method_is_jumping_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_diagonal_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_diagonal_mode") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1017829798)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_diagonal_mode(_ mode: AStarGrid2D.DiagonalMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_diagonal_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_diagonal_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_diagonal_mode") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3129282674)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_diagonal_mode() -> AStarGrid2D.DiagonalMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_diagonal_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AStarGrid2D.DiagonalMode (rawValue: _result)! + } + + fileprivate static var method_set_default_compute_heuristic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_compute_heuristic") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1044375519)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_default_compute_heuristic(_ heuristic: AStarGrid2D.Heuristic) { + withUnsafePointer(to: heuristic.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_default_compute_heuristic, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_compute_heuristic: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_compute_heuristic") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074731422)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_default_compute_heuristic() -> AStarGrid2D.Heuristic { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_default_compute_heuristic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AStarGrid2D.Heuristic (rawValue: _result)! + } + + fileprivate static var method_set_default_estimate_heuristic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_estimate_heuristic") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1044375519)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_default_estimate_heuristic(_ heuristic: AStarGrid2D.Heuristic) { + withUnsafePointer(to: heuristic.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_default_estimate_heuristic, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_estimate_heuristic: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_estimate_heuristic") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074731422)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_default_estimate_heuristic() -> AStarGrid2D.Heuristic { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_default_estimate_heuristic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AStarGrid2D.Heuristic (rawValue: _result)! + } + + fileprivate static var method_set_point_solid: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_solid") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1765703753)! + } + + } + + }() + + /// Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. + /// + /// > Note: Calling ``update()`` is not needed after the call of this function. + /// + public final func setPointSolid(id: Vector2i, solid: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: solid) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_point_solid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_point_solid: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_solid") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3900751641)! + } + + } + + }() + + /// Returns `true` if a point is disabled for pathfinding. By default, all points are enabled. + public final func isPointSolid(id: Vector2i) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_is_point_solid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_weight_scale") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2262553149)! + } + + } + + }() + + /// Sets the `weightScale` for the point with the given `id`. The `weightScale` is multiplied by the result of ``_computeCost(fromId:toId:)`` when determining the overall cost of traveling across a segment from a neighboring point to this point. + /// + /// > Note: Calling ``update()`` is not needed after the call of this function. + /// + public final func setPointWeightScale(id: Vector2i, weightScale: Double) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: weightScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_set_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_weight_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_weight_scale") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 719993801)! + } + + } + + }() + + /// Returns the weight scale of the point associated with the given `id`. + public final func getPointWeightScale(id: Vector2i) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_point_weight_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_fill_solid_region: GDExtensionMethodBindPtr = { + let methodName = StringName("fill_solid_region") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2261970063)! + } + + } + + }() + + /// Fills the given `region` on the grid with the specified value for the solid flag. + /// + /// > Note: Calling ``update()`` is not needed after the call of this function. + /// + public final func fillSolidRegion(_ region: Rect2i, solid: Bool = true) { + withUnsafePointer(to: region) { pArg0 in + withUnsafePointer(to: solid) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_fill_solid_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_fill_weight_scale_region: GDExtensionMethodBindPtr = { + let methodName = StringName("fill_weight_scale_region") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2793244083)! + } + + } + + }() + + /// Fills the given `region` on the grid with the specified value for the weight scale. + /// + /// > Note: Calling ``update()`` is not needed after the call of this function. + /// + public final func fillWeightScaleRegion(_ region: Rect2i, weightScale: Double) { + withUnsafePointer(to: region) { pArg0 in + withUnsafePointer(to: weightScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_fill_weight_scale_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the grid and sets the ``region`` to `Rect2i(0, 0, 0, 0)`. + public final func clear() { + gi.object_method_bind_ptrcall(AStarGrid2D.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 108438297)! + } + + } + + }() + + /// Returns the position of the point associated with the given `id`. + public final func getPointPosition(id: Vector2i) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_path") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1641925693)! + } + + } + + }() + + /// Returns an array with the points that are in the path found by ``AStarGrid2D`` between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + /// > Note: This method is not thread-safe. If called from a ``Thread``, it will return an empty array and will print an error message. + /// + public final func getPointPath(fromId: Vector2i, toId: Vector2i, allowPartialPath: Bool = false) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_point_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_id_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_id_path") + return withUnsafePointer(to: &AStarGrid2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1918132273)! + } + + } + + }() + + /// Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + /// + /// If there is no valid path to the target, and `allowPartialPath` is `true`, returns a path to the point closest to the target that can be reached. + /// + public final func getIdPath(fromId: Vector2i, toId: Vector2i, allowPartialPath: Bool = false) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: fromId) { pArg0 in + withUnsafePointer(to: toId) { pArg1 in + withUnsafePointer(to: allowPartialPath) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AStarGrid2D.method_get_id_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_compute_cost": + return _AStarGrid2D_proxy_compute_cost + case "_estimate_cost": + return _AStarGrid2D_proxy_estimate_cost + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AStarGrid2D_proxy_compute_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._computeCost (fromId: args [0]!.assumingMemoryBound (to: Vector2i.self).pointee, toId: args [1]!.assumingMemoryBound (to: Vector2i.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AStarGrid2D_proxy_estimate_cost (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._estimateCost (fromId: args [0]!.assumingMemoryBound (to: Vector2i.self).pointee, toId: args [1]!.assumingMemoryBound (to: Vector2i.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AcceptDialog.swift b/Sources/SwiftGodot/Generated/Api/AcceptDialog.swift new file mode 100644 index 000000000..86a293ad6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AcceptDialog.swift @@ -0,0 +1,602 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A base dialog used for user notification. +/// +/// The default use of ``AcceptDialog`` is to allow it to only be accepted or closed, with the same result. However, the [signal confirmed] and [signal canceled] signals allow to make the two actions different, and the ``addButton(text:right:action:)`` method allows to add custom buttons and actions. +/// +/// +/// This object emits the following signals: +/// +/// - ``confirmed`` +/// - ``canceled`` +/// - ``customAction`` +open class AcceptDialog: Window { + override open class var godotClassName: StringName { "AcceptDialog" } + + /* Properties */ + + /// The text displayed by the OK button (see ``getOkButton()``). + final public var okButtonText: String { + get { + return get_ok_button_text () + } + + set { + set_ok_button_text (newValue) + } + + } + + /// The text displayed by the dialog. + final public var dialogText: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// If `true`, the dialog is hidden when the OK button is pressed. You can set it to `false` if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. + /// + /// > Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example ``FileDialog`` defaults to `false`, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in ``FileDialog`` to disable hiding the dialog when pressing OK. + /// + final public var dialogHideOnOk: Bool { + get { + return get_hide_on_ok () + } + + set { + set_hide_on_ok (newValue) + } + + } + + /// If `true`, the dialog will be hidden when the escape key (``Key/escape``) is pressed. + final public var dialogCloseOnEscape: Bool { + get { + return get_close_on_escape () + } + + set { + set_close_on_escape (newValue) + } + + } + + /// Sets autowrapping for the text in the dialog. + final public var dialogAutowrap: Bool { + get { + return has_autowrap () + } + + set { + set_autowrap (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_ok_button: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ok_button") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1856205918)! + } + + } + + }() + + /// Returns the OK ``Button`` instance. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getOkButton() -> Button? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AcceptDialog.method_get_ok_button, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_label") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 566733104)! + } + + } + + }() + + /// Returns the label used for built-in text. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getLabel() -> Label? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AcceptDialog.method_get_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_hide_on_ok: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hide_on_ok") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hide_on_ok(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_set_hide_on_ok, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_hide_on_ok: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hide_on_ok") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_hide_on_ok() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AcceptDialog.method_get_hide_on_ok, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_close_on_escape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_close_on_escape") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_close_on_escape(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_set_close_on_escape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_close_on_escape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_close_on_escape") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_close_on_escape() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AcceptDialog.method_get_close_on_escape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_button: GDExtensionMethodBindPtr = { + let methodName = StringName("add_button") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3328440682)! + } + + } + + }() + + /// Adds a button with label `text` and a custom `action` to the dialog and returns the created button. `action` will be passed to the [signal custom_action] signal when pressed. + /// + /// If `true`, `right` will place the button to the right of any sibling buttons. + /// + /// You can use ``removeButton(_:)`` method to remove a button created with this method from the dialog. + /// + public final func addButton(text: String, right: Bool = false, action: String = "") -> Button? { + var _result = UnsafeRawPointer (bitPattern: 0) + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: right) { pArg1 in + let action = GString(action) + withUnsafePointer(to: action.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_add_button, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_cancel_button: GDExtensionMethodBindPtr = { + let methodName = StringName("add_cancel_button") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 242045556)! + } + + } + + }() + + /// Adds a button with label `name` and a cancel action to the dialog and returns the created button. + /// + /// You can use ``removeButton(_:)`` method to remove a button created with this method from the dialog. + /// + public final func addCancelButton(name: String) -> Button? { + var _result = UnsafeRawPointer (bitPattern: 0) + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_add_cancel_button, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_button: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_button") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2068354942)! + } + + } + + }() + + /// Removes the `button` from the dialog. Does NOT free the `button`. The `button` must be a ``Button`` added with ``addButton(text:right:action:)`` or ``addCancelButton(name:)`` method. After removal, pressing the `button` will no longer emit this dialog's [signal custom_action] or [signal canceled] signals. + public final func removeButton(_ button: Button?) { + withUnsafePointer(to: button?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_remove_button, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_register_text_enter: GDExtensionMethodBindPtr = { + let methodName = StringName("register_text_enter") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3714008017)! + } + + } + + }() + + /// Registers a ``LineEdit`` in the dialog. When the enter key is pressed, the dialog will be accepted. + public final func registerTextEnter(lineEdit: LineEdit?) { + withUnsafePointer(to: lineEdit?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_register_text_enter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AcceptDialog.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_autowrap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autowrap") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autowrap(_ autowrap: Bool) { + withUnsafePointer(to: autowrap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_set_autowrap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_autowrap: GDExtensionMethodBindPtr = { + let methodName = StringName("has_autowrap") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_autowrap() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AcceptDialog.method_has_autowrap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ok_button_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ok_button_text") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ok_button_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AcceptDialog.method_set_ok_button_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ok_button_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ok_button_text") + return withUnsafePointer(to: &AcceptDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ok_button_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AcceptDialog.method_get_ok_button_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + // Signals + /// Emitted when the dialog is accepted, i.e. the OK button is pressed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.confirmed.connect { + /// print ("caught signal") + /// } + /// ``` + public var confirmed: SimpleSignal { SimpleSignal (target: self, signalName: "confirmed") } + + /// Emitted when the dialog is closed or the button created with ``addCancelButton(name:)`` is pressed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.canceled.connect { + /// print ("caught signal") + /// } + /// ``` + public var canceled: SimpleSignal { SimpleSignal (target: self, signalName: "canceled") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ action: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a custom button is pressed. See ``addButton(text:right:action:)``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.customAction.connect { action in + /// print ("caught signal") + /// } + /// ``` + public var customAction: Signal1 { Signal1 (target: self, signalName: "custom_action") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimatableBody2D.swift b/Sources/SwiftGodot/Generated/Api/AnimatableBody2D.swift new file mode 100644 index 000000000..5eed05f2f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimatableBody2D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. +/// +/// An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, ``AnimationMixer``s (with ``AnimationMixer/callbackModeProcess`` set to ``AnimationMixer/AnimationCallbackModeProcess/physics``), and ``RemoteTransform2D``. +/// +/// When ``AnimatableBody2D`` is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. +/// +open class AnimatableBody2D: StaticBody2D { + override open class var godotClassName: StringName { "AnimatableBody2D" } + + /* Properties */ + + /// If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via ``AnimationPlayer``, for example on moving platforms. Do **not** use together with ``PhysicsBody2D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:)``. + final public var syncToPhysics: Bool { + get { + return is_sync_to_physics_enabled () + } + + set { + set_sync_to_physics (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sync_to_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sync_to_physics") + return withUnsafePointer(to: &AnimatableBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sync_to_physics(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatableBody2D.method_set_sync_to_physics, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sync_to_physics_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sync_to_physics_enabled") + return withUnsafePointer(to: &AnimatableBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sync_to_physics_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatableBody2D.method_is_sync_to_physics_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimatableBody3D.swift b/Sources/SwiftGodot/Generated/Api/AnimatableBody3D.swift new file mode 100644 index 000000000..3de6fff1b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimatableBody3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. +/// +/// An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, ``AnimationMixer``s (with ``AnimationMixer/callbackModeProcess`` set to ``AnimationMixer/AnimationCallbackModeProcess/physics``), and ``RemoteTransform3D``. +/// +/// When ``AnimatableBody3D`` is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects. +/// +open class AnimatableBody3D: StaticBody3D { + override open class var godotClassName: StringName { "AnimatableBody3D" } + + /* Properties */ + + /// If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via ``AnimationPlayer``, for example on moving platforms. Do **not** use together with ``PhysicsBody3D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:maxCollisions:)``. + final public var syncToPhysics: Bool { + get { + return is_sync_to_physics_enabled () + } + + set { + set_sync_to_physics (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sync_to_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sync_to_physics") + return withUnsafePointer(to: &AnimatableBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sync_to_physics(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatableBody3D.method_set_sync_to_physics, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sync_to_physics_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sync_to_physics_enabled") + return withUnsafePointer(to: &AnimatableBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sync_to_physics_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatableBody3D.method_is_sync_to_physics_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimatedSprite2D.swift b/Sources/SwiftGodot/Generated/Api/AnimatedSprite2D.swift new file mode 100644 index 000000000..4179a0334 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimatedSprite2D.swift @@ -0,0 +1,865 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Sprite node that contains multiple textures as frames to play for animation. +/// +/// ``AnimatedSprite2D`` is similar to the ``Sprite2D`` node, except it carries multiple textures as animation frames. Animations are created using a ``SpriteFrames`` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The ``SpriteFrames`` resource can be configured in the editor via the SpriteFrames bottom panel. +/// +/// +/// This object emits the following signals: +/// +/// - ``spriteFramesChanged`` +/// - ``animationChanged`` +/// - ``frameChanged`` +/// - ``animationLooped`` +/// - ``animationFinished`` +open class AnimatedSprite2D: Node2D { + override open class var godotClassName: StringName { "AnimatedSprite2D" } + + /* Properties */ + + /// The ``SpriteFrames`` resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the ``SpriteFrames`` resource. + final public var spriteFrames: SpriteFrames? { + get { + return get_sprite_frames () + } + + set { + set_sprite_frames (newValue) + } + + } + + /// The current animation from the ``spriteFrames`` resource. If this value is changed, the ``frame`` counter and the ``frameProgress`` are reset. + final public var animation: StringName { + get { + return get_animation () + } + + set { + set_animation (newValue) + } + + } + + /// The key of the animation to play when the scene loads. + final public var autoplay: String { + get { + return get_autoplay () + } + + set { + set_autoplay (newValue) + } + + } + + /// The displayed animation frame's index. Setting this property also resets ``frameProgress``. If this is not desired, use ``setFrameAndProgress(frame:progress:)``. + final public var frame: Int32 { + get { + return get_frame () + } + + set { + set_frame (newValue) + } + + } + + /// The progress value between `0.0` and `1.0` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from `1.0` to `0.0`. + final public var frameProgress: Double { + get { + return get_frame_progress () + } + + set { + set_frame_progress (newValue) + } + + } + + /// The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + /// + /// If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + /// + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// If `true`, texture will be centered. + /// + /// > Note: For games with a pixel art aesthetic, textures may appear deformed when centered. This is caused by their position being between pixels. To prevent this, set this property to `false`, or consider enabling ``ProjectSettings/rendering/2d/snap/snap2dVerticesToPixel`` and ``ProjectSettings/rendering/2d/snap/snap2dTransformsToPixel``. + /// + final public var centered: Bool { + get { + return is_centered () + } + + set { + set_centered (newValue) + } + + } + + /// The texture's drawing offset. + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// If `true`, texture is flipped horizontally. + final public var flipH: Bool { + get { + return is_flipped_h () + } + + set { + set_flip_h (newValue) + } + + } + + /// If `true`, texture is flipped vertically. + final public var flipV: Bool { + get { + return is_flipped_v () + } + + set { + set_flip_v (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sprite_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sprite_frames") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 905781144)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sprite_frames(_ spriteFrames: SpriteFrames?) { + withUnsafePointer(to: spriteFrames?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_sprite_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sprite_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sprite_frames") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3804851214)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sprite_frames() -> SpriteFrames? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_sprite_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animation") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_animation(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_animation() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autoplay") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autoplay() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_autoplay, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if an animation is currently playing (even if ``speedScale`` and/or `custom_speed` are `0`). + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2372066587)! + } + + } + + }() + + /// Plays the animation with key `name`. If `customSpeed` is negative and `fromEnd` is `true`, the animation will play backwards (which is equivalent to calling ``playBackwards(name:)``). + /// + /// If this method is called with that same animation `name`, or with no `name` parameter, the assigned animation will resume playing if it was paused. + /// + public final func play(name: StringName = StringName (""), customSpeed: Double = 1.0, fromEnd: Bool = false) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: customSpeed) { pArg1 in + withUnsafePointer(to: fromEnd) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_play_backwards: GDExtensionMethodBindPtr = { + let methodName = StringName("play_backwards") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1421762485)! + } + + } + + }() + + /// Plays the animation with key `name` in reverse. + /// + /// This method is a shorthand for ``play(name:customSpeed:fromEnd:)`` with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + /// + public final func playBackwards(name: StringName = StringName ("")) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_play_backwards, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("pause") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Pauses the currently playing animation. The ``frame`` and ``frameProgress`` will be kept and calling ``play(name:customSpeed:fromEnd:)`` or ``playBackwards(name:)`` without arguments will resume the animation from the current playback position. + /// + /// See also ``stop()``. + /// + public final func pause() { + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_pause, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also ``pause()``. + public final func stop() { + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_centered: GDExtensionMethodBindPtr = { + let methodName = StringName("set_centered") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_centered(_ centered: Bool) { + withUnsafePointer(to: centered) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_centered, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_centered: GDExtensionMethodBindPtr = { + let methodName = StringName("is_centered") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_centered() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_is_centered, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flip_h: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flip_h") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flip_h(_ flipH: Bool) { + withUnsafePointer(to: flipH) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_flip_h, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flipped_h: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flipped_h") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flipped_h() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_is_flipped_h, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flip_v: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flip_v") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flip_v(_ flipV: Bool) { + withUnsafePointer(to: flipV) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_flip_v, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flipped_v: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flipped_v") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flipped_v() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_is_flipped_v, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frame(_ frame: Int32) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frame() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_frame, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_progress") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frame_progress(_ progress: Double) { + withUnsafePointer(to: progress) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_frame_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frame_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_progress") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frame_progress() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_frame_progress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame_and_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_and_progress") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// The setter of ``frame`` resets the ``frameProgress`` to `0.0` implicitly, but this method avoids that. + /// + /// This is useful when you want to carry over the current ``frameProgress`` to another ``frame``. + /// + /// **Example:** + /// + public final func setFrameAndProgress(frame: Int32, progress: Double) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: progress) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_frame_and_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ speedScale: Double) { + withUnsafePointer(to: speedScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playing_speed") + return withUnsafePointer(to: &AnimatedSprite2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the actual playing speed of current animation or `0` if not playing. This speed is the ``speedScale`` property multiplied by `custom_speed` argument specified when calling the ``play(name:customSpeed:fromEnd:)`` method. + /// + /// Returns a negative value if the current animation is playing backwards. + /// + public final func getPlayingSpeed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite2D.method_get_playing_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when ``spriteFrames`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.spriteFramesChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var spriteFramesChanged: SimpleSignal { SimpleSignal (target: self, signalName: "sprite_frames_changed") } + + /// Emitted when ``animation`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationChanged: SimpleSignal { SimpleSignal (target: self, signalName: "animation_changed") } + + /// Emitted when ``frame`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.frameChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var frameChanged: SimpleSignal { SimpleSignal (target: self, signalName: "frame_changed") } + + /// Emitted when the animation loops. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationLooped.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationLooped: SimpleSignal { SimpleSignal (target: self, signalName: "animation_looped") } + + /// Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. + /// + /// > Note: This signal is not emitted if an animation is looping. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationFinished: SimpleSignal { SimpleSignal (target: self, signalName: "animation_finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimatedSprite3D.swift b/Sources/SwiftGodot/Generated/Api/AnimatedSprite3D.swift new file mode 100644 index 000000000..3a5b15eee --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimatedSprite3D.swift @@ -0,0 +1,638 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// 2D sprite node in 3D world, that can use multiple 2D textures for animation. +/// +/// ``AnimatedSprite3D`` is similar to the ``Sprite3D`` node, except it carries multiple textures as animation ``spriteFrames``. Animations are created using a ``SpriteFrames`` resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The ``SpriteFrames`` resource can be configured in the editor via the SpriteFrames bottom panel. +/// +/// +/// This object emits the following signals: +/// +/// - ``spriteFramesChanged`` +/// - ``animationChanged`` +/// - ``frameChanged`` +/// - ``animationLooped`` +/// - ``animationFinished`` +open class AnimatedSprite3D: SpriteBase3D { + override open class var godotClassName: StringName { "AnimatedSprite3D" } + + /* Properties */ + + /// The ``SpriteFrames`` resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the ``SpriteFrames`` resource. + final public var spriteFrames: SpriteFrames? { + get { + return get_sprite_frames () + } + + set { + set_sprite_frames (newValue) + } + + } + + /// The current animation from the ``spriteFrames`` resource. If this value is changed, the ``frame`` counter and the ``frameProgress`` are reset. + final public var animation: StringName { + get { + return get_animation () + } + + set { + set_animation (newValue) + } + + } + + /// The key of the animation to play when the scene loads. + final public var autoplay: String { + get { + return get_autoplay () + } + + set { + set_autoplay (newValue) + } + + } + + /// The displayed animation frame's index. Setting this property also resets ``frameProgress``. If this is not desired, use ``setFrameAndProgress(frame:progress:)``. + final public var frame: Int32 { + get { + return get_frame () + } + + set { + set_frame (newValue) + } + + } + + /// The progress value between `0.0` and `1.0` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from `1.0` to `0.0`. + final public var frameProgress: Double { + get { + return get_frame_progress () + } + + set { + set_frame_progress (newValue) + } + + } + + /// The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + /// + /// If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + /// + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sprite_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sprite_frames") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 905781144)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sprite_frames(_ spriteFrames: SpriteFrames?) { + withUnsafePointer(to: spriteFrames?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_sprite_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sprite_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sprite_frames") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3804851214)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sprite_frames() -> SpriteFrames? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_sprite_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animation") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_animation(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_animation() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autoplay") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autoplay() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_autoplay, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if an animation is currently playing (even if ``speedScale`` and/or `custom_speed` are `0`). + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2372066587)! + } + + } + + }() + + /// Plays the animation with key `name`. If `customSpeed` is negative and `fromEnd` is `true`, the animation will play backwards (which is equivalent to calling ``playBackwards(name:)``). + /// + /// If this method is called with that same animation `name`, or with no `name` parameter, the assigned animation will resume playing if it was paused. + /// + public final func play(name: StringName = StringName (""), customSpeed: Double = 1.0, fromEnd: Bool = false) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: customSpeed) { pArg1 in + withUnsafePointer(to: fromEnd) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_play_backwards: GDExtensionMethodBindPtr = { + let methodName = StringName("play_backwards") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1421762485)! + } + + } + + }() + + /// Plays the animation with key `name` in reverse. + /// + /// This method is a shorthand for ``play(name:customSpeed:fromEnd:)`` with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + /// + public final func playBackwards(name: StringName = StringName ("")) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_play_backwards, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("pause") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Pauses the currently playing animation. The ``frame`` and ``frameProgress`` will be kept and calling ``play(name:customSpeed:fromEnd:)`` or ``playBackwards(name:)`` without arguments will resume the animation from the current playback position. + /// + /// See also ``stop()``. + /// + public final func pause() { + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_pause, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also ``pause()``. + public final func stop() { + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frame(_ frame: Int32) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frame() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_frame, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_progress") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frame_progress(_ progress: Double) { + withUnsafePointer(to: progress) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_frame_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frame_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_progress") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frame_progress() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_frame_progress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame_and_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_and_progress") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// The setter of ``frame`` resets the ``frameProgress`` to `0.0` implicitly, but this method avoids that. + /// + /// This is useful when you want to carry over the current ``frameProgress`` to another ``frame``. + /// + /// **Example:** + /// + public final func setFrameAndProgress(frame: Int32, progress: Double) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: progress) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_frame_and_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ speedScale: Double) { + withUnsafePointer(to: speedScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playing_speed") + return withUnsafePointer(to: &AnimatedSprite3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the actual playing speed of current animation or `0` if not playing. This speed is the ``speedScale`` property multiplied by `custom_speed` argument specified when calling the ``play(name:customSpeed:fromEnd:)`` method. + /// + /// Returns a negative value if the current animation is playing backwards. + /// + public final func getPlayingSpeed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedSprite3D.method_get_playing_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when ``spriteFrames`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.spriteFramesChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var spriteFramesChanged: SimpleSignal { SimpleSignal (target: self, signalName: "sprite_frames_changed") } + + /// Emitted when ``animation`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationChanged: SimpleSignal { SimpleSignal (target: self, signalName: "animation_changed") } + + /// Emitted when ``frame`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.frameChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var frameChanged: SimpleSignal { SimpleSignal (target: self, signalName: "frame_changed") } + + /// Emitted when the animation loops. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationLooped.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationLooped: SimpleSignal { SimpleSignal (target: self, signalName: "animation_looped") } + + /// Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. + /// + /// > Note: This signal is not emitted if an animation is looping. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationFinished: SimpleSignal { SimpleSignal (target: self, signalName: "animation_finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimatedTexture.swift b/Sources/SwiftGodot/Generated/Api/AnimatedTexture.swift new file mode 100644 index 000000000..fc66f6a84 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimatedTexture.swift @@ -0,0 +1,438 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Proxy texture for simple frame-based animations. +/// +/// ``AnimatedTexture`` is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike ``AnimationPlayer`` or ``AnimatedSprite2D``, it isn't a ``Node``, but has the advantage of being usable anywhere a ``Texture2D`` resource can be used, e.g. in a ``TileSet``. +/// +/// The playback of the animation is controlled by the ``speedScale`` property, as well as each frame's duration (see ``setFrameDuration(frame:duration:)``). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. +/// +/// ``AnimatedTexture`` currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. +/// +/// > Note: AnimatedTexture doesn't support using ``AtlasTexture``s. Each frame needs to be a separate ``Texture2D``. +/// +/// > Warning: The current implementation is not efficient for the modern renderers. +/// +open class AnimatedTexture: Texture2D { + override open class var godotClassName: StringName { "AnimatedTexture" } + /* Constants */ + /// The maximum number of frames supported by ``AnimatedTexture``. If you need more frames in your animation, use ``AnimationPlayer`` or ``AnimatedSprite2D``. + public static let maxFrames = 256 + + /* Properties */ + + /// Number of frames to use in the animation. While you can create the frames independently with ``setFrameTexture(frame:texture:)``, you need to set this value for the animation to take new frames into account. The maximum number of frames is ``maxFrames``. + final public var frames: Int32 { + get { + return get_frames () + } + + set { + set_frames (newValue) + } + + } + + /// Sets the currently visible frame of the texture. Setting this frame while playing resets the current frame time, so the newly selected frame plays for its whole configured frame duration. + final public var currentFrame: Int32 { + get { + return get_current_frame () + } + + set { + set_current_frame (newValue) + } + + } + + /// If `true`, the animation will pause where it currently is (i.e. at ``currentFrame``). The animation will continue from where it was paused when changing this property to `false`. + final public var pause: Bool { + get { + return get_pause () + } + + set { + set_pause (newValue) + } + + } + + /// If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set ``pause`` to `true`. + final public var oneShot: Bool { + get { + return get_one_shot () + } + + set { + set_one_shot (newValue) + } + + } + + /// The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frames") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frames(_ frames: Int32) { + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frames") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_current_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_frame") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_frame(_ frame: Int32) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_current_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_current_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_frame") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_frame() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_current_frame, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pause") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pause(_ pause: Bool) { + withUnsafePointer(to: pause) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_pause, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pause") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pause() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_pause, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_shot") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_shot(_ oneShot: Bool) { + withUnsafePointer(to: oneShot) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_one_shot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_shot") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_shot() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_one_shot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frame_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_texture") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Assigns a ``Texture2D`` to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID ``frames`` - 1. + /// + /// You can define any number of textures up to ``maxFrames``, but keep in mind that only frames from 0 to ``frames`` - 1 will be part of the animation. + /// + public final func setFrameTexture(frame: Int32, texture: Texture2D?) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_frame_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_frame_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_texture") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the given frame's ``Texture2D``. + public final func getFrameTexture(frame: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_frame_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_frame_duration: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frame_duration") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the duration of any given `frame`. The final duration is affected by the ``speedScale``. If set to `0`, the frame is skipped during playback. + public final func setFrameDuration(frame: Int32, duration: Double) { + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: duration) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_set_frame_duration, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_frame_duration: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_duration") + return withUnsafePointer(to: &AnimatedTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the given `frame`'s duration, in seconds. + public final func getFrameDuration(frame: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimatedTexture.method_get_frame_duration, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Animation.swift b/Sources/SwiftGodot/Generated/Api/Animation.swift new file mode 100644 index 000000000..2d8a698b5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Animation.swift @@ -0,0 +1,2418 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds data that can be used to animate anything in the engine. +/// +/// This resource holds data that can be used to animate anything in the engine. Animations are divided into tracks and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. +/// +/// Animations are just data containers, and must be added to nodes such as an ``AnimationPlayer`` to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check ``Animation/TrackType`` to see available types. +/// +/// > Note: For 3D position/rotation/scale, using the dedicated ``TrackType/position3d``, ``TrackType/rotation3d`` and ``TrackType/scale3d`` track types instead of ``TrackType/value`` is recommended for performance reasons. +/// +open class Animation: Resource { + override open class var godotClassName: StringName { "Animation" } + public enum TrackType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated ``TrackType/position3d``, ``TrackType/rotation3d`` and ``TrackType/scale3d`` track types instead of ``TrackType/value`` is recommended for performance reasons. + case value = 0 // TYPE_VALUE + /// 3D position track (values are stored in ``Vector3``s). + case position3d = 1 // TYPE_POSITION_3D + /// 3D rotation track (values are stored in ``Quaternion``s). + case rotation3d = 2 // TYPE_ROTATION_3D + /// 3D scale track (values are stored in ``Vector3``s). + case scale3d = 3 // TYPE_SCALE_3D + /// Blend shape track. + case blendShape = 4 // TYPE_BLEND_SHAPE + /// Method tracks call functions with given arguments per key. + case method = 5 // TYPE_METHOD + /// Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a ``Color``). + case bezier = 6 // TYPE_BEZIER + /// Audio tracks are used to play an audio stream with either type of ``AudioStreamPlayer``. The stream can be trimmed and previewed in the animation. + case audio = 7 // TYPE_AUDIO + /// Animation tracks play animations in other ``AnimationPlayer`` nodes. + case animation = 8 // TYPE_ANIMATION + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .value: return ".value" + case .position3d: return ".position3d" + case .rotation3d: return ".rotation3d" + case .scale3d: return ".scale3d" + case .blendShape: return ".blendShape" + case .method: return ".method" + case .bezier: return ".bezier" + case .audio: return ".audio" + case .animation: return ".animation" + } + + } + + } + + public enum InterpolationType: Int64, CaseIterable, CustomDebugStringConvertible { + /// No interpolation (nearest value). + case nearest = 0 // INTERPOLATION_NEAREST + /// Linear interpolation. + case linear = 1 // INTERPOLATION_LINEAR + /// Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to ``InterpolationType/linear`` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. + case cubic = 2 // INTERPOLATION_CUBIC + /// Linear interpolation with shortest path rotation. + /// + /// > Note: The result value is always normalized and may not match the key value. + /// + case linearAngle = 3 // INTERPOLATION_LINEAR_ANGLE + /// Cubic interpolation with shortest path rotation. + /// + /// > Note: The result value is always normalized and may not match the key value. + /// + case cubicAngle = 4 // INTERPOLATION_CUBIC_ANGLE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .linear: return ".linear" + case .cubic: return ".cubic" + case .linearAngle: return ".linearAngle" + case .cubicAngle: return ".cubicAngle" + } + + } + + } + + public enum UpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Update between keyframes and hold the value. + case continuous = 0 // UPDATE_CONTINUOUS + /// Update at the keyframes. + case discrete = 1 // UPDATE_DISCRETE + /// Same as ``UpdateMode/continuous`` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also ``AnimationMixer/capture(name:duration:transType:easeType:)``, ``AnimationPlayer/playbackAutoCapture``, and ``AnimationPlayer/playWithCapture(name:duration:customBlend:customSpeed:fromEnd:transType:easeType:)``. + case capture = 2 // UPDATE_CAPTURE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .continuous: return ".continuous" + case .discrete: return ".discrete" + case .capture: return ".capture" + } + + } + + } + + public enum LoopMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// At both ends of the animation, the animation will stop playing. + case none = 0 // LOOP_NONE + /// At both ends of the animation, the animation will be repeated without changing the playback direction. + case linear = 1 // LOOP_LINEAR + /// Repeats playback and reverse playback at both ends of the animation. + case pingpong = 2 // LOOP_PINGPONG + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .linear: return ".linear" + case .pingpong: return ".pingpong" + } + + } + + } + + public enum LoopedFlag: Int64, CaseIterable, CustomDebugStringConvertible { + /// This flag indicates that the animation proceeds without any looping. + case none = 0 // LOOPED_FLAG_NONE + /// This flag indicates that the animation has reached the end of the animation and just after loop processed. + case end = 1 // LOOPED_FLAG_END + /// This flag indicates that the animation has reached the start of the animation and just after loop processed. + case start = 2 // LOOPED_FLAG_START + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .end: return ".end" + case .start: return ".start" + } + + } + + } + + public enum FindMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Finds the nearest time key. + case nearest = 0 // FIND_MODE_NEAREST + /// Finds only the key with approximating the time. + case approx = 1 // FIND_MODE_APPROX + /// Finds only the key with matching the time. + case exact = 2 // FIND_MODE_EXACT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .approx: return ".approx" + case .exact: return ".exact" + } + + } + + } + + + /* Properties */ + + /// The total length of the animation (in seconds). + /// + /// > Note: Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + /// + final public var length: Double { + get { + return get_length () + } + + set { + set_length (newValue) + } + + } + + /// Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. + final public var loopMode: Animation.LoopMode { + get { + return get_loop_mode () + } + + set { + set_loop_mode (newValue) + } + + } + + /// The animation step value. + final public var step: Double { + get { + return get_step () + } + + set { + set_step (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_track: GDExtensionMethodBindPtr = { + let methodName = StringName("add_track") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3843682357)! + } + + } + + }() + + /// Adds a track to the Animation. + public final func addTrack(type: Animation.TrackType, atPosition: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: atPosition) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_add_track, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_remove_track: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_track") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes a track by specifying the track index. + public final func removeTrack(trackIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_remove_track, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_track_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_track_count") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the amount of tracks in the animation. + public final func getTrackCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Animation.method_get_track_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_track_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_type") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3445944217)! + } + + } + + }() + + /// Gets the type of a track. + public final func trackGetType(trackIdx: Int32) -> Animation.TrackType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Animation.TrackType (rawValue: _result)! + } + + fileprivate static var method_track_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_path") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Gets the path of a track. For more information on the path format, see ``trackSetPath(trackIdx:path:)``. + public final func trackGetPath(trackIdx: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_track_set_path: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_path") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761262315)! + } + + } + + }() + + /// Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by `":"`. + /// + /// For example, `"character/skeleton:ankle"` or `"character/mesh:transform/local"`. + /// + public final func trackSetPath(trackIdx: Int32, path: NodePath) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_find_track: GDExtensionMethodBindPtr = { + let methodName = StringName("find_track") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 245376003)! + } + + } + + }() + + /// Returns the index of the specified track. If the track is not found, return -1. + public final func findTrack(path: NodePath, type: Animation.TrackType) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_find_track, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_move_up: GDExtensionMethodBindPtr = { + let methodName = StringName("track_move_up") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Moves a track up. + public final func trackMoveUp(trackIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_move_up, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_track_move_down: GDExtensionMethodBindPtr = { + let methodName = StringName("track_move_down") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Moves a track down. + public final func trackMoveDown(trackIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_move_down, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_track_move_to: GDExtensionMethodBindPtr = { + let methodName = StringName("track_move_to") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Changes the index position of track `trackIdx` to the one defined in `toIdx`. + public final func trackMoveTo(trackIdx: Int32, toIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: toIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_move_to, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_swap: GDExtensionMethodBindPtr = { + let methodName = StringName("track_swap") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Swaps the track `trackIdx`'s index position with the track `withIdx`. + public final func trackSwap(trackIdx: Int32, withIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: withIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_swap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_set_imported: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_imported") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the given track as imported or not. + public final func trackSetImported(trackIdx: Int32, imported: Bool) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: imported) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_imported, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_is_imported: GDExtensionMethodBindPtr = { + let methodName = StringName("track_is_imported") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the given track is imported. Else, return `false`. + public final func trackIsImported(trackIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_is_imported, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_track_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_enabled") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Enables/disables the given track. Tracks are enabled by default. + public final func trackSetEnabled(trackIdx: Int32, enabled: Bool) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("track_is_enabled") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the track at index `trackIdx` is enabled. + public final func trackIsEnabled(trackIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_is_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_position_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("position_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2540608232)! + } + + } + + }() + + /// Inserts a key in a given 3D position track. Returns the key index. + public final func positionTrackInsertKey(trackIdx: Int32, time: Double, position: Vector3) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_position_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_rotation_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("rotation_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4165004800)! + } + + } + + }() + + /// Inserts a key in a given 3D rotation track. Returns the key index. + public final func rotationTrackInsertKey(trackIdx: Int32, time: Double, rotation: Quaternion) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: rotation) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_rotation_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_scale_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("scale_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2540608232)! + } + + } + + }() + + /// Inserts a key in a given 3D scale track. Returns the key index. + public final func scaleTrackInsertKey(trackIdx: Int32, time: Double, scale: Vector3) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: scale) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_scale_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_blend_shape_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_shape_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1534913637)! + } + + } + + }() + + /// Inserts a key in a given blend shape track. Returns the key index. + public final func blendShapeTrackInsertKey(trackIdx: Int32, time: Double, amount: Double) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: amount) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_blend_shape_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_position_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("position_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3530011197)! + } + + } + + }() + + /// Returns the interpolated position value at the given time (in seconds). The `trackIdx` must be the index of a 3D position track. + public final func positionTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: timeSec) { pArg1 in + withUnsafePointer(to: backward) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_position_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_rotation_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("rotation_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915876792)! + } + + } + + }() + + /// Returns the interpolated rotation value at the given time (in seconds). The `trackIdx` must be the index of a 3D rotation track. + public final func rotationTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Quaternion { + var _result: Quaternion = Quaternion () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: timeSec) { pArg1 in + withUnsafePointer(to: backward) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_rotation_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_scale_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("scale_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3530011197)! + } + + } + + }() + + /// Returns the interpolated scale value at the given time (in seconds). The `trackIdx` must be the index of a 3D scale track. + public final func scaleTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: timeSec) { pArg1 in + withUnsafePointer(to: backward) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_scale_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_blend_shape_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_shape_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2482365182)! + } + + } + + }() + + /// Returns the interpolated blend shape value at the given time (in seconds). The `trackIdx` must be the index of a blend shape track. + public final func blendShapeTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: timeSec) { pArg1 in + withUnsafePointer(to: backward) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_blend_shape_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 808952278)! + } + + } + + }() + + /// Inserts a generic key in a given track. Returns the key index. + public final func trackInsertKey(trackIdx: Int32, time: Double, key: Variant?, transition: Double = 1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: key.content) { pArg2 in + withUnsafePointer(to: transition) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_remove_key: GDExtensionMethodBindPtr = { + let methodName = StringName("track_remove_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Removes a key by index in a given track. + public final func trackRemoveKey(trackIdx: Int32, keyIdx: Int32) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_remove_key, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_remove_key_at_time: GDExtensionMethodBindPtr = { + let methodName = StringName("track_remove_key_at_time") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Removes a key at `time` in a given track. + public final func trackRemoveKeyAtTime(trackIdx: Int32, time: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_remove_key_at_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_set_key_value: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_key_value") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2060538656)! + } + + } + + }() + + /// Sets the value of an existing key. + public final func trackSetKeyValue(trackIdx: Int32, key: Int32, value: Variant?) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: key) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_key_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_track_set_key_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_key_transition") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the transition curve (easing) for a specific key (see the built-in math function ``@GlobalScope.ease``). + public final func trackSetKeyTransition(trackIdx: Int32, keyIdx: Int32, transition: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: transition) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_key_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_track_set_key_time: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_key_time") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the time of an existing key. + public final func trackSetKeyTime(trackIdx: Int32, keyIdx: Int32, time: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: time) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_key_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_track_get_key_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_key_transition") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the transition curve (easing) for a specific key (see the built-in math function ``@GlobalScope.ease``). + public final func trackGetKeyTransition(trackIdx: Int32, keyIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_key_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_get_key_count: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_key_count") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of keys in a given track. + public final func trackGetKeyCount(trackIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_key_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_track_get_key_value: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_key_value") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 678354945)! + } + + } + + }() + + /// Returns the value of a given key in a given track. + public final func trackGetKeyValue(trackIdx: Int32, keyIdx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_key_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_track_get_key_time: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_key_time") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the time at which the key is located. + public final func trackGetKeyTime(trackIdx: Int32, keyIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_key_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_find_key: GDExtensionMethodBindPtr = { + let methodName = StringName("track_find_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4230953007)! + } + + } + + }() + + /// Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. + /// + /// If `limit` is `true`, it does not return keys outside the animation range. + /// + /// If `backward` is `true`, the direction is reversed in methods that rely on one directional processing. + /// + /// For example, in case `findMode` is ``FindMode/nearest``, if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if `backward` is `true`, the first key found is retrieved after the position. + /// + public final func trackFindKey(trackIdx: Int32, time: Double, findMode: Animation.FindMode = .nearest, limit: Bool = false, backward: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: findMode.rawValue) { pArg2 in + withUnsafePointer(to: limit) { pArg3 in + withUnsafePointer(to: backward) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_find_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_track_set_interpolation_type: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_interpolation_type") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4112932513)! + } + + } + + }() + + /// Sets the interpolation type of a given track. + public final func trackSetInterpolationType(trackIdx: Int32, interpolation: Animation.InterpolationType) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: interpolation.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_interpolation_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_get_interpolation_type: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_interpolation_type") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530756894)! + } + + } + + }() + + /// Returns the interpolation type of a given track. + public final func trackGetInterpolationType(trackIdx: Int32) -> Animation.InterpolationType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_interpolation_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Animation.InterpolationType (rawValue: _result)! + } + + fileprivate static var method_track_set_interpolation_loop_wrap: GDExtensionMethodBindPtr = { + let methodName = StringName("track_set_interpolation_loop_wrap") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, the track at `trackIdx` wraps the interpolation loop. + public final func trackSetInterpolationLoopWrap(trackIdx: Int32, interpolation: Bool) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: interpolation) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_set_interpolation_loop_wrap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_track_get_interpolation_loop_wrap: GDExtensionMethodBindPtr = { + let methodName = StringName("track_get_interpolation_loop_wrap") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the track at `trackIdx` wraps the interpolation loop. New tracks wrap the interpolation loop by default. + public final func trackGetInterpolationLoopWrap(trackIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_get_interpolation_loop_wrap, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_track_is_compressed: GDExtensionMethodBindPtr = { + let methodName = StringName("track_is_compressed") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the track is compressed, `false` otherwise. See also ``compress(pageSize:fps:splitTolerance:)``. + public final func trackIsCompressed(trackIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_track_is_compressed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_value_track_set_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("value_track_set_update_mode") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2854058312)! + } + + } + + }() + + /// Sets the update mode (see ``Animation/UpdateMode``) of a value track. + public final func valueTrackSetUpdateMode(trackIdx: Int32, mode: Animation.UpdateMode) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_value_track_set_update_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_value_track_get_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("value_track_get_update_mode") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1440326473)! + } + + } + + }() + + /// Returns the update mode of a value track. + public final func valueTrackGetUpdateMode(trackIdx: Int32) -> Animation.UpdateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_value_track_get_update_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Animation.UpdateMode (rawValue: _result)! + } + + fileprivate static var method_value_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("value_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 747269075)! + } + + } + + }() + + /// Returns the interpolated value at the given time (in seconds). The `trackIdx` must be the index of a value track. + /// + /// A `backward` mainly affects the direction of key retrieval of the track with ``UpdateMode/discrete`` converted by ``AnimationMixer/AnimationCallbackModeDiscrete/forceContinuous`` to match the result with ``trackFindKey(trackIdx:time:findMode:limit:backward:)``. + /// + public final func valueTrackInterpolate(trackIdx: Int32, timeSec: Double, backward: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: timeSec) { pArg1 in + withUnsafePointer(to: backward) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_value_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_method_track_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("method_track_get_name") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 351665558)! + } + + } + + }() + + /// Returns the method name of a method track. + public final func methodTrackGetName(trackIdx: Int32, keyIdx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_method_track_get_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_method_track_get_params: GDExtensionMethodBindPtr = { + let methodName = StringName("method_track_get_params") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2345056839)! + } + + } + + }() + + /// Returns the arguments values to be called on a method track for a given key in a given track. + public final func methodTrackGetParams(trackIdx: Int32, keyIdx: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_method_track_get_params, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bezier_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3656773645)! + } + + } + + }() + + /// Inserts a Bezier Track key at the given `time` in seconds. The `trackIdx` must be the index of a Bezier Track. + /// + /// `inHandle` is the left-side weight of the added Bezier curve point, `outHandle` is the right-side one, while `value` is the actual value at this point. + /// + public final func bezierTrackInsertKey(trackIdx: Int32, time: Double, value: Double, inHandle: Vector2 = Vector2 (x: 0, y: 0), outHandle: Vector2 = Vector2 (x: 0, y: 0)) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: inHandle) { pArg3 in + withUnsafePointer(to: outHandle) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bezier_track_set_key_value: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_set_key_value") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the value of the key identified by `keyIdx` to the given value. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackSetKeyValue(trackIdx: Int32, keyIdx: Int32, value: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_set_key_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bezier_track_set_key_in_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_set_key_in_handle") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1719223284)! + } + + } + + }() + + /// Sets the in handle of the key identified by `keyIdx` to value `inHandle`. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackSetKeyInHandle(trackIdx: Int32, keyIdx: Int32, inHandle: Vector2, balancedValueTimeRatio: Double = 1.0) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: inHandle) { pArg2 in + withUnsafePointer(to: balancedValueTimeRatio) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_set_key_in_handle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bezier_track_set_key_out_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_set_key_out_handle") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1719223284)! + } + + } + + }() + + /// Sets the out handle of the key identified by `keyIdx` to value `outHandle`. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackSetKeyOutHandle(trackIdx: Int32, keyIdx: Int32, outHandle: Vector2, balancedValueTimeRatio: Double = 1.0) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: outHandle) { pArg2 in + withUnsafePointer(to: balancedValueTimeRatio) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_set_key_out_handle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bezier_track_get_key_value: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_get_key_value") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the value of the key identified by `keyIdx`. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackGetKeyValue(trackIdx: Int32, keyIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_get_key_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bezier_track_get_key_in_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_get_key_in_handle") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3016396712)! + } + + } + + }() + + /// Returns the in handle of the key identified by `keyIdx`. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackGetKeyInHandle(trackIdx: Int32, keyIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_get_key_in_handle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bezier_track_get_key_out_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_get_key_out_handle") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3016396712)! + } + + } + + }() + + /// Returns the out handle of the key identified by `keyIdx`. The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackGetKeyOutHandle(trackIdx: Int32, keyIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_get_key_out_handle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bezier_track_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("bezier_track_interpolate") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1900462983)! + } + + } + + }() + + /// Returns the interpolated value at the given `time` (in seconds). The `trackIdx` must be the index of a Bezier Track. + public final func bezierTrackInterpolate(trackIdx: Int32, time: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_bezier_track_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_audio_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4021027286)! + } + + } + + }() + + /// Inserts an Audio Track key at the given `time` in seconds. The `trackIdx` must be the index of an Audio Track. + /// + /// `stream` is the ``AudioStream`` resource to play. `startOffset` is the number of seconds cut off at the beginning of the audio stream, while `endOffset` is at the ending. + /// + public final func audioTrackInsertKey(trackIdx: Int32, time: Double, stream: Resource?, startOffset: Double = 0, endOffset: Double = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: stream?.handle) { pArg2 in + withUnsafePointer(to: startOffset) { pArg3 in + withUnsafePointer(to: endOffset) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_audio_track_set_key_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_set_key_stream") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3886397084)! + } + + } + + }() + + /// Sets the stream of the key identified by `keyIdx` to value `stream`. The `trackIdx` must be the index of an Audio Track. + public final func audioTrackSetKeyStream(trackIdx: Int32, keyIdx: Int32, stream: Resource?) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: stream?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_set_key_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_audio_track_set_key_start_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_set_key_start_offset") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the start offset of the key identified by `keyIdx` to value `offset`. The `trackIdx` must be the index of an Audio Track. + public final func audioTrackSetKeyStartOffset(trackIdx: Int32, keyIdx: Int32, offset: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_set_key_start_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_audio_track_set_key_end_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_set_key_end_offset") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the end offset of the key identified by `keyIdx` to value `offset`. The `trackIdx` must be the index of an Audio Track. + public final func audioTrackSetKeyEndOffset(trackIdx: Int32, keyIdx: Int32, offset: Double) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_set_key_end_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_audio_track_get_key_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_get_key_stream") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 635277205)! + } + + } + + }() + + /// Returns the audio stream of the key identified by `keyIdx`. The `trackIdx` must be the index of an Audio Track. + public final func audioTrackGetKeyStream(trackIdx: Int32, keyIdx: Int32) -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_get_key_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_audio_track_get_key_start_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_get_key_start_offset") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the start offset of the key identified by `keyIdx`. The `trackIdx` must be the index of an Audio Track. + /// + /// Start offset is the number of seconds cut off at the beginning of the audio stream. + /// + public final func audioTrackGetKeyStartOffset(trackIdx: Int32, keyIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_get_key_start_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_audio_track_get_key_end_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_get_key_end_offset") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the end offset of the key identified by `keyIdx`. The `trackIdx` must be the index of an Audio Track. + /// + /// End offset is the number of seconds cut off at the ending of the audio stream. + /// + public final func audioTrackGetKeyEndOffset(trackIdx: Int32, keyIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_get_key_end_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_audio_track_set_use_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_set_use_blend") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets whether the track will be blended with other animations. If `true`, the audio playback volume changes depending on the blend value. + public final func audioTrackSetUseBlend(trackIdx: Int32, enable: Bool) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_set_use_blend, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_audio_track_is_use_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("audio_track_is_use_blend") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the track at `trackIdx` will be blended with other animations. + public final func audioTrackIsUseBlend(trackIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_audio_track_is_use_blend, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_animation_track_insert_key: GDExtensionMethodBindPtr = { + let methodName = StringName("animation_track_insert_key") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 158676774)! + } + + } + + }() + + /// Inserts a key with value `animation` at the given `time` (in seconds). The `trackIdx` must be the index of an Animation Track. + public final func animationTrackInsertKey(trackIdx: Int32, time: Double, animation: StringName) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: animation.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_animation_track_insert_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_animation_track_set_key_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("animation_track_set_key_animation") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 117615382)! + } + + } + + }() + + /// Sets the key identified by `keyIdx` to value `animation`. The `trackIdx` must be the index of an Animation Track. + public final func animationTrackSetKeyAnimation(trackIdx: Int32, keyIdx: Int32, animation: StringName) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: animation.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_animation_track_set_key_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_animation_track_get_key_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("animation_track_get_key_animation") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 351665558)! + } + + } + + }() + + /// Returns the animation name at the key identified by `keyIdx`. The `trackIdx` must be the index of an Animation Track. + public final func animationTrackGetKeyAnimation(trackIdx: Int32, keyIdx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: keyIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_animation_track_get_key_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_length") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_length(_ timeSec: Double) { + withUnsafePointer(to: timeSec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_set_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Animation.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_mode") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3155355575)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_mode(_ loopMode: Animation.LoopMode) { + withUnsafePointer(to: loopMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_set_loop_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_mode") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1988889481)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_mode() -> Animation.LoopMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Animation.method_get_loop_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Animation.LoopMode (rawValue: _result)! + } + + fileprivate static var method_set_step: GDExtensionMethodBindPtr = { + let methodName = StringName("set_step") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_step(_ sizeSec: Double) { + withUnsafePointer(to: sizeSec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_set_step, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_step: GDExtensionMethodBindPtr = { + let methodName = StringName("get_step") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_step() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Animation.method_get_step, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear the animation (clear all tracks and reset all). + public final func clear() { + gi.object_method_bind_ptrcall(Animation.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_copy_track: GDExtensionMethodBindPtr = { + let methodName = StringName("copy_track") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 148001024)! + } + + } + + }() + + /// Adds a new track to `toAnimation` that is a copy of the given track from this animation. + public final func copyTrack(trackIdx: Int32, toAnimation: Animation?) { + withUnsafePointer(to: trackIdx) { pArg0 in + withUnsafePointer(to: toAnimation?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_copy_track, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_compress: GDExtensionMethodBindPtr = { + let methodName = StringName("compress") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3608408117)! + } + + } + + }() + + /// Compress the animation and all its tracks in-place. This will make ``trackIsCompressed(trackIdx:)`` return `true` once called on this ``Animation``. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. + /// + /// > Note: Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. + /// + public final func compress(pageSize: UInt32 = 8192, fps: UInt32 = 120, splitTolerance: Double = 4.0) { + withUnsafePointer(to: pageSize) { pArg0 in + withUnsafePointer(to: fps) { pArg1 in + withUnsafePointer(to: splitTolerance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Animation.method_compress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_capture_included: GDExtensionMethodBindPtr = { + let methodName = StringName("is_capture_included") + return withUnsafePointer(to: &Animation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + public final func isCaptureIncluded() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Animation.method_is_capture_included, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationLibrary.swift b/Sources/SwiftGodot/Generated/Api/AnimationLibrary.swift new file mode 100644 index 000000000..6d43e464c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationLibrary.swift @@ -0,0 +1,522 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Container for ``Animation`` resources. +/// +/// An animation library stores a set of animations accessible through ``StringName`` keys, for use with ``AnimationPlayer`` nodes. +/// +/// +/// This object emits the following signals: +/// +/// - ``animationAdded`` +/// - ``animationRemoved`` +/// - ``animationRenamed`` +/// - ``animationChanged`` +open class AnimationLibrary: Resource { + override open class var godotClassName: StringName { "AnimationLibrary" } + /* Methods */ + fileprivate static var method_add_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("add_animation") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1811855551)! + } + + } + + }() + + /// Adds the `animation` to the library, accessible by the key `name`. + public final func addAnimation(name: StringName, animation: Animation?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: animation?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationLibrary.method_add_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_remove_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_animation") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the ``Animation`` with the key `name`. + public final func removeAnimation(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationLibrary.method_remove_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rename_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_animation") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Changes the key of the ``Animation`` associated with the key `name` to `newname`. + public final func renameAnimation(name: StringName, newname: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: newname.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationLibrary.method_rename_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("has_animation") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the library stores an ``Animation`` with `name` as the key. + public final func hasAnimation(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationLibrary.method_has_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2933122410)! + } + + } + + }() + + /// Returns the ``Animation`` with the key `name`. If the animation does not exist, `null` is returned and an error is logged. + public final func getAnimation(name: StringName) -> Animation? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationLibrary.method_get_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_animation_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_list") + return withUnsafePointer(to: &AnimationLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the keys for the ``Animation``s stored in the library. + public final func getAnimationList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(AnimationLibrary.method_get_animation_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ name: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an ``Animation`` is added, under the key `name`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationAdded.connect { name in + /// print ("caught signal") + /// } + /// ``` + public var animationAdded: Signal1 { Signal1 (target: self, signalName: "animation_added") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ name: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an ``Animation`` stored with the key `name` is removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationRemoved.connect { name in + /// print ("caught signal") + /// } + /// ``` + public var animationRemoved: Signal2 { Signal2 (target: self, signalName: "animation_removed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ name: StringName, _ toName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = StringName (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the key for an ``Animation`` is changed, from `name` to `toName`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationRenamed.connect { name, toName in + /// print ("caught signal") + /// } + /// ``` + public var animationRenamed: Signal3 { Signal3 (target: self, signalName: "animation_renamed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ name: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. `name` is the key of the animation that was changed. + /// + /// See also [signal Resource.changed], which this acts as a relay for. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationChanged.connect { name in + /// print ("caught signal") + /// } + /// ``` + public var animationChanged: Signal4 { Signal4 (target: self, signalName: "animation_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationMixer.swift b/Sources/SwiftGodot/Generated/Api/AnimationMixer.swift new file mode 100644 index 000000000..76af144ee --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationMixer.swift @@ -0,0 +1,1427 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for ``AnimationPlayer`` and ``AnimationTree``. +/// +/// Base class for ``AnimationPlayer`` and ``AnimationTree`` to manage animation lists. It also has general properties and methods for playback and blending. +/// +/// After instantiating the playback information data within the extended class, the blending is processed by the ``AnimationMixer``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``animationListChanged`` +/// - ``animationLibrariesUpdated`` +/// - ``animationFinished`` +/// - ``animationStarted`` +/// - ``cachesCleared`` +/// - ``mixerApplied`` +/// - ``mixerUpdated`` +open class AnimationMixer: Node { + override open class var godotClassName: StringName { "AnimationMixer" } + public enum AnimationCallbackModeProcess: Int64, CaseIterable, CustomDebugStringConvertible { + /// Process animation during physics frames (see ``Node/notificationInternalPhysicsProcess``). This is especially useful when animating physics bodies. + case physics = 0 // ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS + /// Process animation during process frames (see ``Node/notificationInternalProcess``). + case idle = 1 // ANIMATION_CALLBACK_MODE_PROCESS_IDLE + /// Do not process animation. Use ``advance(delta:)`` to process the animation manually. + case manual = 2 // ANIMATION_CALLBACK_MODE_PROCESS_MANUAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .physics: return ".physics" + case .idle: return ".idle" + case .manual: return ".manual" + } + + } + + } + + public enum AnimationCallbackModeMethod: Int64, CaseIterable, CustomDebugStringConvertible { + /// Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing. + case deferred = 0 // ANIMATION_CALLBACK_MODE_METHOD_DEFERRED + /// Make method calls immediately when reached in the animation. + case immediate = 1 // ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .deferred: return ".deferred" + case .immediate: return ".immediate" + } + + } + + } + + public enum AnimationCallbackModeDiscrete: Int64, CaseIterable, CustomDebugStringConvertible { + /// An ``Animation/UpdateMode/discrete`` track value takes precedence when blending ``Animation/UpdateMode/continuous`` or ``Animation/UpdateMode/capture`` track values and ``Animation/UpdateMode/discrete`` track values. + case dominant = 0 // ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT + /// An ``Animation/UpdateMode/continuous`` or ``Animation/UpdateMode/capture`` track value takes precedence when blending the ``Animation/UpdateMode/continuous`` or ``Animation/UpdateMode/capture`` track values and the ``Animation/UpdateMode/discrete`` track values. This is the default behavior for ``AnimationPlayer``. + case recessive = 1 // ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE + /// Always treat the ``Animation/UpdateMode/discrete`` track value as ``Animation/UpdateMode/continuous`` with ``Animation/InterpolationType/nearest``. This is the default behavior for ``AnimationTree``. + /// + /// If a value track has non-numeric type key values, it is internally converted to use ``AnimationCallbackModeDiscrete/recessive`` with ``Animation/UpdateMode/discrete``. + /// + case forceContinuous = 2 // ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .dominant: return ".dominant" + case .recessive: return ".recessive" + case .forceContinuous: return ".forceContinuous" + } + + } + + } + + + /* Properties */ + + /// If `true`, the ``AnimationMixer`` will be processing. + final public var active: Bool { + get { + return is_active () + } + + set { + set_active (newValue) + } + + } + + /// If `true`, the blending uses the deterministic algorithm. The total weight is not normalized and the result is accumulated with an initial value (`0` or a `"RESET"` animation if present). + /// + /// This means that if the total amount of blending is `0.0`, the result is equal to the `"RESET"` animation. + /// + /// If the number of tracks between the blended animations is different, the animation with the missing track is treated as if it had the initial value. + /// + /// If `false`, The blend does not use the deterministic algorithm. The total weight is normalized and always `1.0`. If the number of tracks between the blended animations is different, nothing is done about the animation that is missing a track. + /// + /// > Note: In ``AnimationTree``, the blending with ``AnimationNodeAdd2``, ``AnimationNodeAdd3``, ``AnimationNodeSub2`` or the weight greater than `1.0` may produce unexpected results. + /// + /// For example, if ``AnimationNodeAdd2`` blends two nodes with the amount `1.0`, then total weight is `2.0` but it will be normalized to make the total amount `1.0` and the result will be equal to ``AnimationNodeBlend2`` with the amount `0.5`. + /// + final public var deterministic: Bool { + get { + return is_deterministic () + } + + set { + set_deterministic (newValue) + } + + } + + /// This is used by the editor. If set to `true`, the scene will be saved with the effects of the reset animation (the animation with the key `"RESET"`) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. + /// + /// This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. + /// + final public var resetOnSave: Bool { + get { + return is_reset_on_save_enabled () + } + + set { + set_reset_on_save_enabled (newValue) + } + + } + + /// The node which node path references will travel from. + final public var rootNode: NodePath { + get { + return get_root_node () + } + + set { + set_root_node (newValue) + } + + } + + /// The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by `":"`. For example, `"character/skeleton:ankle"` or `"character/mesh:transform/local"`. + /// + /// If the track has type ``Animation/TrackType/position3d``, ``Animation/TrackType/rotation3d`` or ``Animation/TrackType/scale3d`` the transformation will be canceled visually, and the animation will appear to stay in place. See also ``getRootMotionPosition()``, ``getRootMotionRotation()``, ``getRootMotionScale()`` and ``RootMotionView``. + /// + final public var rootMotionTrack: NodePath { + get { + return get_root_motion_track () + } + + set { + set_root_motion_track (newValue) + } + + } + + /// The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. + /// + /// For example, if this value is `32` and the animation has two audio tracks, the two ``AudioStreamPlayer``s assigned can play simultaneously up to `32` voices each. + /// + final public var audioMaxPolyphony: Int32 { + get { + return get_audio_max_polyphony () + } + + set { + set_audio_max_polyphony (newValue) + } + + } + + /// The process notification in which to update animations. + final public var callbackModeProcess: AnimationMixer.AnimationCallbackModeProcess { + get { + return get_callback_mode_process () + } + + set { + set_callback_mode_process (newValue) + } + + } + + /// The call mode used for "Call Method" tracks. + final public var callbackModeMethod: AnimationMixer.AnimationCallbackModeMethod { + get { + return get_callback_mode_method () + } + + set { + set_callback_mode_method (newValue) + } + + } + + /// Ordinarily, tracks can be set to ``Animation/UpdateMode/discrete`` to update infrequently, usually when using nearest interpolation. + /// + /// However, when blending with ``Animation/UpdateMode/continuous`` several results are considered. The ``callbackModeDiscrete`` specify it explicitly. See also ``AnimationMixer/AnimationCallbackModeDiscrete``. + /// + /// To make the blended results look good, it is recommended to set this to ``AnimationCallbackModeDiscrete/forceContinuous`` to update every frame during blending. Other values exist for compatibility and they are fine if there is no blending, but not so, may produce artifacts. + /// + final public var callbackModeDiscrete: AnimationMixer.AnimationCallbackModeDiscrete { + get { + return get_callback_mode_discrete () + } + + set { + set_callback_mode_discrete (newValue) + } + + } + + /* Methods */ + /// A virtual function for processing after getting a key during playback. + @_documentation(visibility: public) + open func _postProcessKeyValue(animation: Animation?, track: Int32, value: Variant?, objectId: UInt, objectSubIdx: Int32) -> Variant? { + return nil + } + + fileprivate static var method_add_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("add_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 618909818)! + } + + } + + }() + + /// Adds `library` to the animation player, under the key `name`. + public final func addAnimationLibrary(name: StringName, library: AnimationLibrary?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: library?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_add_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_remove_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the ``AnimationLibrary`` associated with the key `name`. + public final func removeAnimationLibrary(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_remove_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rename_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Moves the ``AnimationLibrary`` associated with the key `name` to the key `newname`. + public final func renameAnimationLibrary(name: StringName, newname: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: newname.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_rename_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("has_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the ``AnimationMixer`` stores an ``AnimationLibrary`` with key `name`. + public final func hasAnimationLibrary(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_has_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 147342321)! + } + + } + + }() + + /// Returns the first ``AnimationLibrary`` with key `name` or `null` if not found. + /// + /// To get the ``AnimationMixer``'s global animation library, use `get_animation_library("")`. + /// + public final func getAnimationLibrary(name: StringName) -> AnimationLibrary? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_get_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_animation_library_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_library_list") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the list of stored library keys. + public final func getAnimationLibraryList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(AnimationMixer.method_get_animation_library_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_has_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("has_animation") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the ``AnimationMixer`` stores an ``Animation`` with key `name`. + public final func hasAnimation(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_has_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2933122410)! + } + + } + + }() + + /// Returns the ``Animation`` with the key `name`. If the animation does not exist, `null` is returned and an error is logged. + public final func getAnimation(name: StringName) -> Animation? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_get_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_animation_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_list") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of stored animation keys. + public final func getAnimationList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_animation_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_active") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_active(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_active") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationMixer.method_is_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_deterministic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_deterministic") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_deterministic(_ deterministic: Bool) { + withUnsafePointer(to: deterministic) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_deterministic, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_deterministic: GDExtensionMethodBindPtr = { + let methodName = StringName("is_deterministic") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_deterministic() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationMixer.method_is_deterministic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_root_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_node") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_node(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_root_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_node") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_node() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_callback_mode_process: GDExtensionMethodBindPtr = { + let methodName = StringName("set_callback_mode_process") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2153733086)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_callback_mode_process(_ mode: AnimationMixer.AnimationCallbackModeProcess) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_callback_mode_process, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_callback_mode_process: GDExtensionMethodBindPtr = { + let methodName = StringName("get_callback_mode_process") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1394468472)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_callback_mode_process() -> AnimationMixer.AnimationCallbackModeProcess { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationMixer.method_get_callback_mode_process, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationMixer.AnimationCallbackModeProcess (rawValue: _result)! + } + + fileprivate static var method_set_callback_mode_method: GDExtensionMethodBindPtr = { + let methodName = StringName("set_callback_mode_method") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 742218271)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_callback_mode_method(_ mode: AnimationMixer.AnimationCallbackModeMethod) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_callback_mode_method, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_callback_mode_method: GDExtensionMethodBindPtr = { + let methodName = StringName("get_callback_mode_method") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 489449656)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_callback_mode_method() -> AnimationMixer.AnimationCallbackModeMethod { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationMixer.method_get_callback_mode_method, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationMixer.AnimationCallbackModeMethod (rawValue: _result)! + } + + fileprivate static var method_set_callback_mode_discrete: GDExtensionMethodBindPtr = { + let methodName = StringName("set_callback_mode_discrete") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1998944670)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_callback_mode_discrete(_ mode: AnimationMixer.AnimationCallbackModeDiscrete) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_callback_mode_discrete, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_callback_mode_discrete: GDExtensionMethodBindPtr = { + let methodName = StringName("get_callback_mode_discrete") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3493168860)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_callback_mode_discrete() -> AnimationMixer.AnimationCallbackModeDiscrete { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationMixer.method_get_callback_mode_discrete, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationMixer.AnimationCallbackModeDiscrete (rawValue: _result)! + } + + fileprivate static var method_set_audio_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("set_audio_max_polyphony") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_audio_max_polyphony(_ maxPolyphony: Int32) { + withUnsafePointer(to: maxPolyphony) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_audio_max_polyphony, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_audio_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("get_audio_max_polyphony") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_audio_max_polyphony() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationMixer.method_get_audio_max_polyphony, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_root_motion_track: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_motion_track") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_motion_track(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_root_motion_track, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_motion_track: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_track") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_motion_track() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_track, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_root_motion_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_position") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Retrieve the motion delta of position with the ``rootMotionTrack`` as a ``Vector3`` that can be used elsewhere. + /// + /// If ``rootMotionTrack`` is not a path to a track of type ``Animation/TrackType/position3d``, returns `Vector3(0, 0, 0)`. + /// + /// See also ``rootMotionTrack`` and ``RootMotionView``. + /// + /// The most basic example is applying position to ``CharacterBody3D``: + /// + /// By using this in combination with ``getRootMotionPositionAccumulator()``, you can apply the root motion position more correctly to account for the rotation of the node. + /// + public final func getRootMotionPosition() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_root_motion_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_rotation") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1222331677)! + } + + } + + }() + + /// Retrieve the motion delta of rotation with the ``rootMotionTrack`` as a ``Quaternion`` that can be used elsewhere. + /// + /// If ``rootMotionTrack`` is not a path to a track of type ``Animation/TrackType/rotation3d``, returns `Quaternion(0, 0, 0, 1)`. + /// + /// See also ``rootMotionTrack`` and ``RootMotionView``. + /// + /// The most basic example is applying rotation to ``CharacterBody3D``: + /// + public final func getRootMotionRotation() -> Quaternion { + var _result: Quaternion = Quaternion () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_root_motion_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_scale") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Retrieve the motion delta of scale with the ``rootMotionTrack`` as a ``Vector3`` that can be used elsewhere. + /// + /// If ``rootMotionTrack`` is not a path to a track of type ``Animation/TrackType/scale3d``, returns `Vector3(0, 0, 0)`. + /// + /// See also ``rootMotionTrack`` and ``RootMotionView``. + /// + /// The most basic example is applying scale to ``CharacterBody3D``: + /// + public final func getRootMotionScale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_root_motion_position_accumulator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_position_accumulator") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Retrieve the blended value of the position tracks with the ``rootMotionTrack`` as a ``Vector3`` that can be used elsewhere. + /// + /// This is useful in cases where you want to respect the initial key values of the animation. + /// + /// For example, if an animation with only one key `Vector3(0, 0, 0)` is played in the previous frame and then an animation with only one key `Vector3(1, 0, 1)` is played in the next frame, the difference can be calculated as follows: + /// + /// However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + /// + public final func getRootMotionPositionAccumulator() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_position_accumulator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_root_motion_rotation_accumulator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_rotation_accumulator") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1222331677)! + } + + } + + }() + + /// Retrieve the blended value of the rotation tracks with the ``rootMotionTrack`` as a ``Quaternion`` that can be used elsewhere. + /// + /// This is necessary to apply the root motion position correctly, taking rotation into account. See also ``getRootMotionPosition()``. + /// + /// Also, this is useful in cases where you want to respect the initial key values of the animation. + /// + /// For example, if an animation with only one key `Quaternion(0, 0, 0, 1)` is played in the previous frame and then an animation with only one key `Quaternion(0, 0.707, 0, 0.707)` is played in the next frame, the difference can be calculated as follows: + /// + /// However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + /// + public final func getRootMotionRotationAccumulator() -> Quaternion { + var _result: Quaternion = Quaternion () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_rotation_accumulator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_root_motion_scale_accumulator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_motion_scale_accumulator") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Retrieve the blended value of the scale tracks with the ``rootMotionTrack`` as a ``Vector3`` that can be used elsewhere. + /// + /// For example, if an animation with only one key `Vector3(1, 1, 1)` is played in the previous frame and then an animation with only one key `Vector3(2, 2, 2)` is played in the next frame, the difference can be calculated as follows: + /// + /// However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + /// + public final func getRootMotionScaleAccumulator() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(AnimationMixer.method_get_root_motion_scale_accumulator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear_caches: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_caches") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// ``AnimationMixer`` caches animated nodes. It may not notice if a node disappears; ``clearCaches()`` forces it to update the cache again. + public final func clearCaches() { + gi.object_method_bind_ptrcall(AnimationMixer.method_clear_caches, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("advance") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Manually advance the animations by the specified time (in seconds). + public final func advance(delta: Double) { + withUnsafePointer(to: delta) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("capture") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1333632127)! + } + + } + + }() + + /// If the animation track specified by `name` has an option ``Animation/UpdateMode/capture``, stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded. + /// + /// After this it will interpolate with current animation blending result during the playback process for the time specified by `duration`, working like a crossfade. + /// + /// You can specify `transType` as the curve for the interpolation. For better results, it may be appropriate to specify ``Tween/TransitionType/linear`` for cases where the first key of the track begins with a non-zero value or where the key value does not change, and ``Tween/TransitionType/quad`` for cases where the key value changes linearly. + /// + public final func capture(name: StringName, duration: Double, transType: Tween.TransitionType = .linear, easeType: Tween.EaseType = .`in`) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: duration) { pArg1 in + withUnsafePointer(to: transType.rawValue) { pArg2 in + withUnsafePointer(to: easeType.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_capture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_reset_on_save_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reset_on_save_enabled") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reset_on_save_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_set_reset_on_save_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_reset_on_save_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_reset_on_save_enabled") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_reset_on_save_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationMixer.method_is_reset_on_save_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_find_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("find_animation") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1559484580)! + } + + } + + }() + + /// Returns the key of `animation` or an empty ``StringName`` if not found. + public final func findAnimation(_ animation: Animation?) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: animation?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_find_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_find_animation_library: GDExtensionMethodBindPtr = { + let methodName = StringName("find_animation_library") + return withUnsafePointer(to: &AnimationMixer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1559484580)! + } + + } + + }() + + /// Returns the key for the ``AnimationLibrary`` that contains `animation` or an empty ``StringName`` if not found. + public final func findAnimationLibrary(animation: Animation?) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: animation?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationMixer.method_find_animation_library, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_post_process_key_value": + return _AnimationMixer_proxy_post_process_key_value + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Notifies when an animation list is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationListChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationListChanged: SimpleSignal { SimpleSignal (target: self, signalName: "animation_list_changed") } + + /// Notifies when the animation libraries have changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationLibrariesUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationLibrariesUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "animation_libraries_updated") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ animName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Notifies when an animation finished playing. + /// + /// > Note: This signal is not emitted if an animation is looping. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationFinished.connect { animName in + /// print ("caught signal") + /// } + /// ``` + public var animationFinished: Signal1 { Signal1 (target: self, signalName: "animation_finished") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ animName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Notifies when an animation starts playing. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationStarted.connect { animName in + /// print ("caught signal") + /// } + /// ``` + public var animationStarted: Signal2 { Signal2 (target: self, signalName: "animation_started") } + + /// Notifies when the caches have been cleared, either automatically, or manually via ``clearCaches()``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.cachesCleared.connect { + /// print ("caught signal") + /// } + /// ``` + public var cachesCleared: SimpleSignal { SimpleSignal (target: self, signalName: "caches_cleared") } + + /// Notifies when the blending result related have been applied to the target objects. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mixerApplied.connect { + /// print ("caught signal") + /// } + /// ``` + public var mixerApplied: SimpleSignal { SimpleSignal (target: self, signalName: "mixer_applied") } + + /// Notifies when the property related process have been updated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mixerUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var mixerUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "mixer_updated") } + +} + +// Support methods for proxies +func _AnimationMixer_proxy_post_process_key_value (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._postProcessKeyValue (animation: lookupLiveObject (handleAddress: resolved_0) as? Animation ?? lookupObject (nativeHandle: resolved_0)!, track: args [1]!.assumingMemoryBound (to: Int32.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee, objectId: args [3]!.assumingMemoryBound (to: UInt.self).pointee, objectSubIdx: args [4]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNode.swift b/Sources/SwiftGodot/Generated/Api/AnimationNode.swift new file mode 100644 index 000000000..2c210eb40 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNode.swift @@ -0,0 +1,864 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for ``AnimationTree`` nodes. Not related to scene nodes. +/// +/// Base resource for ``AnimationTree`` nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. +/// +/// Inherit this when creating animation nodes mainly for use in ``AnimationNodeBlendTree``, otherwise ``AnimationRootNode`` should be used instead. +/// +/// You can access the time information as read-only parameter which is processed and stored in the previous frame for all nodes except ``AnimationNodeOutput``. +/// +/// > Note: If multiple inputs exist in the ``AnimationNode``, which time information takes precedence depends on the type of ``AnimationNode``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``treeChanged`` +/// - ``animationNodeRenamed`` +/// - ``animationNodeRemoved`` +open class AnimationNode: Resource { + override open class var godotClassName: StringName { "AnimationNode" } + public enum FilterAction: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not use filtering. + case ignore = 0 // FILTER_IGNORE + /// Paths matching the filter will be allowed to pass. + case pass = 1 // FILTER_PASS + /// Paths matching the filter will be discarded. + case stop = 2 // FILTER_STOP + /// Paths matching the filter will be blended (by the blend value). + case blend = 3 // FILTER_BLEND + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ignore: return ".ignore" + case .pass: return ".pass" + case .stop: return ".stop" + case .blend: return ".blend" + } + + } + + } + + + /* Properties */ + + /// If `true`, filtering is enabled. + final public var filterEnabled: Bool { + get { + return is_filter_enabled () + } + + set { + set_filter_enabled (newValue) + } + + } + + /* Methods */ + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return all child animation nodes in order as a `name: node` dictionary. + @_documentation(visibility: public) + open func _getChildNodes() -> GDictionary { + return GDictionary () + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to ``Object/getPropertyList()``. + @_documentation(visibility: public) + open func _getParameterList() -> GArray { + return GArray () + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return a child animation node by its `name`. + @_documentation(visibility: public) + open func _getChildByName(_ name: StringName) -> AnimationNode? { + return AnimationNode () + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return the default value of a `parameter`. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. + @_documentation(visibility: public) + open func _getParameterDefaultValue(parameter: StringName) -> Variant? { + return nil + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return whether the `parameter` is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. + @_documentation(visibility: public) + open func _isParameterReadOnly(parameter: StringName) -> Bool { + return false + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to run some code when this animation node is processed. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. + /// + /// Here, call the ``blendInput(inputIndex:time:seek:isExternalSeeking:blend:filter:sync:testOnly:)``, ``blendNode(name:node:time:seek:isExternalSeeking:blend:filter:sync:testOnly:)`` or ``blendAnimation(_:time:delta:seeked:isExternalSeeking:blend:loopedFlag:)`` functions. You can also use ``getParameter(name:)`` and ``setParameter(name:value:)`` to modify local memory. + /// + /// This function should return the delta. + /// + @_documentation(visibility: public) + open func _process(time: Double, seek: Bool, isExternalSeeking: Bool, testOnly: Bool) -> Double { + return 0.0 + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to override the text caption for this animation node. + @_documentation(visibility: public) + open func _getCaption() -> String { + return String () + } + + /// When inheriting from ``AnimationRootNode``, implement this virtual method to return whether the blend tree editor should display filter editing on this animation node. + @_documentation(visibility: public) + open func _hasFilter() -> Bool { + return false + } + + fileprivate static var method_add_input: GDExtensionMethodBindPtr = { + let methodName = StringName("add_input") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Adds an input to the animation node. This is only useful for animation nodes created for use in an ``AnimationNodeBlendTree``. If the addition fails, returns `false`. + public final func addInput(name: String) -> Bool { + var _result: Bool = false + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_add_input, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_input: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_input") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes an input, call this only when inactive. + public final func removeInput(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_remove_input, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_input_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_name") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 215573526)! + } + + } + + }() + + /// Sets the name of the input at the given `input` index. If the setting fails, returns `false`. + public final func setInputName(input: Int32, name: String) -> Bool { + var _result: Bool = false + withUnsafePointer(to: input) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_set_input_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_input_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_name") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Gets the name of an input by index. + public final func getInputName(input: Int32) -> String { + let _result = GString () + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_get_input_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_input_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_count") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Amount of inputs in this animation node, only useful for animation nodes that go into ``AnimationNodeBlendTree``. + public final func getInputCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNode.method_get_input_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_find_input: GDExtensionMethodBindPtr = { + let methodName = StringName("find_input") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the input index which corresponds to `name`. If not found, returns `-1`. + public final func findInput(name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_find_input, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_filter_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_path") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3868023870)! + } + + } + + }() + + /// Adds or removes a path for the filter. + public final func setFilterPath(_ path: NodePath, enable: Bool) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_set_filter_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_path_filtered: GDExtensionMethodBindPtr = { + let methodName = StringName("is_path_filtered") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 861721659)! + } + + } + + }() + + /// Returns whether the given path is filtered. + public final func isPathFiltered(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_is_path_filtered, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_filter_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_enabled") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_set_filter_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_filter_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_filter_enabled") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_filter_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNode.method_is_filter_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_blend_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_animation") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1630801826)! + } + + } + + }() + + /// Blend an animation by `blend` amount (name must be valid in the linked ``AnimationPlayer``). A `time` and `delta` may be passed, as well as whether `seeked` happened. + /// + /// A `loopedFlag` is used by internal processing immediately after the loop. See also ``Animation.LoopedFlag``. + /// + public final func blendAnimation(_ animation: StringName, time: Double, delta: Double, seeked: Bool, isExternalSeeking: Bool, blend: Double, loopedFlag: Animation.LoopedFlag = .none) { + withUnsafePointer(to: animation.content) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: delta) { pArg2 in + withUnsafePointer(to: seeked) { pArg3 in + withUnsafePointer(to: isExternalSeeking) { pArg4 in + withUnsafePointer(to: blend) { pArg5 in + withUnsafePointer(to: loopedFlag.rawValue) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_blend_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_blend_node: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_node") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1746075988)! + } + + } + + }() + + /// Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from ``AnimationRootNode`` instead, otherwise editors will not display your animation node for addition. + public final func blendNode(name: StringName, node: AnimationNode?, time: Double, seek: Bool, isExternalSeeking: Bool, blend: Double, filter: AnimationNode.FilterAction = .ignore, sync: Bool = true, testOnly: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: time) { pArg2 in + withUnsafePointer(to: seek) { pArg3 in + withUnsafePointer(to: isExternalSeeking) { pArg4 in + withUnsafePointer(to: blend) { pArg5 in + withUnsafePointer(to: filter.rawValue) { pArg6 in + withUnsafePointer(to: sync) { pArg7 in + withUnsafePointer(to: testOnly) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_blend_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_blend_input: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_input") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1361527350)! + } + + } + + }() + + /// Blend an input. This is only useful for animation nodes created for an ``AnimationNodeBlendTree``. The `time` parameter is a relative delta, unless `seek` is `true`, in which case it is absolute. A filter mode may be optionally passed (see ``AnimationNode/FilterAction`` for options). + public final func blendInput(inputIndex: Int32, time: Double, seek: Bool, isExternalSeeking: Bool, blend: Double, filter: AnimationNode.FilterAction = .ignore, sync: Bool = true, testOnly: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: inputIndex) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: seek) { pArg2 in + withUnsafePointer(to: isExternalSeeking) { pArg3 in + withUnsafePointer(to: blend) { pArg4 in + withUnsafePointer(to: filter.rawValue) { pArg5 in + withUnsafePointer(to: sync) { pArg6 in + withUnsafePointer(to: testOnly) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_blend_input, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parameter") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. + public final func setParameter(name: StringName, value: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_set_parameter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parameter") + return withUnsafePointer(to: &AnimationNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. + public final func getParameter(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNode.method_get_parameter, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_caption": + return _AnimationNode_proxy_get_caption + case "_get_child_by_name": + return _AnimationNode_proxy_get_child_by_name + case "_get_child_nodes": + return _AnimationNode_proxy_get_child_nodes + case "_get_parameter_default_value": + return _AnimationNode_proxy_get_parameter_default_value + case "_get_parameter_list": + return _AnimationNode_proxy_get_parameter_list + case "_has_filter": + return _AnimationNode_proxy_has_filter + case "_is_parameter_read_only": + return _AnimationNode_proxy_is_parameter_read_only + case "_process": + return _AnimationNode_proxy_process + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are ``AnimationNodeBlendSpace1D``, ``AnimationNodeBlendSpace2D``, ``AnimationNodeStateMachine``, ``AnimationNodeBlendTree`` and ``AnimationNodeTransition``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "tree_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ objectId: Int64, _ oldName: String, _ newName: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = GString (args [1]!)!.description + let arg_2 = GString (args [2]!)!.description + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are ``AnimationNodeBlendSpace1D``, ``AnimationNodeBlendSpace2D``, ``AnimationNodeStateMachine``, and ``AnimationNodeBlendTree``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationNodeRenamed.connect { objectId, oldName, newName in + /// print ("caught signal") + /// } + /// ``` + public var animationNodeRenamed: Signal1 { Signal1 (target: self, signalName: "animation_node_renamed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ objectId: Int64, _ name: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = GString (args [1]!)!.description + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are ``AnimationNodeBlendSpace1D``, ``AnimationNodeBlendSpace2D``, ``AnimationNodeStateMachine``, and ``AnimationNodeBlendTree``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationNodeRemoved.connect { objectId, name in + /// print ("caught signal") + /// } + /// ``` + public var animationNodeRemoved: Signal2 { Signal2 (target: self, signalName: "animation_node_removed") } + +} + +// Support methods for proxies +func _AnimationNode_proxy_get_caption (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getCaption ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _AnimationNode_proxy_get_child_by_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getChildByName (StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // AnimationNode +} + +func _AnimationNode_proxy_get_child_nodes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getChildNodes () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _AnimationNode_proxy_get_parameter_default_value (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getParameterDefaultValue (parameter: StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _AnimationNode_proxy_get_parameter_list (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getParameterList () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Array + ret.content = GArray.zero +} + +func _AnimationNode_proxy_has_filter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hasFilter () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _AnimationNode_proxy_is_parameter_read_only (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isParameterReadOnly (parameter: StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _AnimationNode_proxy_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._process (time: args [0]!.assumingMemoryBound (to: Double.self).pointee, seek: args [1]!.assumingMemoryBound (to: Bool.self).pointee, isExternalSeeking: args [2]!.assumingMemoryBound (to: Bool.self).pointee, testOnly: args [3]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd2.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd2.swift new file mode 100644 index 000000000..a6a79b877 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd2.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Blends two animations additively inside of an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Blends two animations additively based on the amount value. +/// +/// If the amount is greater than `1.0`, the animation connected to "in" port is blended with the amplified animation connected to "add" port. +/// +/// If the amount is less than `0.0`, the animation connected to "in" port is blended with the inverted animation connected to "add" port. +/// +open class AnimationNodeAdd2: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeAdd2" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd3.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd3.swift new file mode 100644 index 000000000..af7d2c2af --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeAdd3.swift @@ -0,0 +1,38 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Blends two of three animations additively inside of an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Blends two animations out of three additively out of three based on the amount value. +/// +/// This animation node has three inputs: +/// +/// - The base animation to add to +/// +/// - A "-add" animation to blend with when the blend amount is negative +/// +/// - A "+add" animation to blend with when the blend amount is positive +/// +/// If the absolute value of the amount is greater than `1.0`, the animation connected to "in" port is blended with the amplified animation connected to "-add"/"+add" port. +/// +open class AnimationNodeAdd3: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeAdd3" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeAnimation.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeAnimation.swift new file mode 100644 index 000000000..f89e547bd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeAnimation.swift @@ -0,0 +1,447 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An input animation for an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Only has one output port using the ``animation`` property. Used as an input for ``AnimationNode``s that blend animations together. +open class AnimationNodeAnimation: AnimationRootNode { + override open class var godotClassName: StringName { "AnimationNodeAnimation" } + public enum PlayMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Plays animation in forward direction. + case forward = 0 // PLAY_MODE_FORWARD + /// Plays animation in backward direction. + case backward = 1 // PLAY_MODE_BACKWARD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .forward: return ".forward" + case .backward: return ".backward" + } + + } + + } + + + /* Properties */ + + /// Animation to use as an output. It is one of the animations provided by ``AnimationTree/animPlayer``. + final public var animation: StringName { + get { + return get_animation () + } + + set { + set_animation (newValue) + } + + } + + /// Determines the playback direction of the animation. + final public var playMode: AnimationNodeAnimation.PlayMode { + get { + return get_play_mode () + } + + set { + set_play_mode (newValue) + } + + } + + /// If `true`, ``AnimationNode`` provides an animation based on the ``Animation`` resource with some parameters adjusted. + final public var useCustomTimeline: Bool { + get { + return is_using_custom_timeline () + } + + set { + set_use_custom_timeline (newValue) + } + + } + + /// If ``useCustomTimeline`` is `true`, offset the start position of the animation. + final public var timelineLength: Double { + get { + return get_timeline_length () + } + + set { + set_timeline_length (newValue) + } + + } + + /// If `true`, scales the time so that the length specified in ``timelineLength`` is one cycle. + /// + /// This is useful for matching the periods of walking and running animations. + /// + /// If `false`, the original animation length is respected. If you set the loop to ``loopMode``, the animation will loop in ``timelineLength``. + /// + final public var stretchTimeScale: Bool { + get { + return is_stretching_time_scale () + } + + set { + set_stretch_time_scale (newValue) + } + + } + + /// If ``useCustomTimeline`` is `true`, offset the start position of the animation. + /// + /// This is useful for adjusting which foot steps first in 3D walking animations. + /// + final public var startOffset: Double { + get { + return get_start_offset () + } + + set { + set_start_offset (newValue) + } + + } + + /// If ``useCustomTimeline`` is `true`, override the loop settings of the original ``Animation`` resource with the value. + final public var loopMode: Animation.LoopMode { + get { + return get_loop_mode () + } + + set { + set_loop_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animation") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_animation(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_animation() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_get_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_play_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_play_mode") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3347718873)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_play_mode(_ mode: AnimationNodeAnimation.PlayMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_play_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_play_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_play_mode") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2061244637)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_play_mode() -> AnimationNodeAnimation.PlayMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_get_play_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeAnimation.PlayMode (rawValue: _result)! + } + + fileprivate static var method_set_use_custom_timeline: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_custom_timeline") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_custom_timeline(_ useCustomTimeline: Bool) { + withUnsafePointer(to: useCustomTimeline) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_use_custom_timeline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_custom_timeline: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_custom_timeline") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_custom_timeline() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_is_using_custom_timeline, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_timeline_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_timeline_length") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_timeline_length(_ timelineLength: Double) { + withUnsafePointer(to: timelineLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_timeline_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_timeline_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_timeline_length") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_timeline_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_get_timeline_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stretch_time_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stretch_time_scale") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stretch_time_scale(_ stretchTimeScale: Bool) { + withUnsafePointer(to: stretchTimeScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_stretch_time_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_stretching_time_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("is_stretching_time_scale") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_stretching_time_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_is_stretching_time_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_start_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_offset") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_offset(_ startOffset: Double) { + withUnsafePointer(to: startOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_start_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_offset") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_get_start_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_mode") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3155355575)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_mode(_ loopMode: Animation.LoopMode) { + withUnsafePointer(to: loopMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_set_loop_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_mode") + return withUnsafePointer(to: &AnimationNodeAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1988889481)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_mode() -> Animation.LoopMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeAnimation.method_get_loop_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Animation.LoopMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend2.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend2.swift new file mode 100644 index 000000000..2f9b39bb4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend2.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Blends two animations linearly inside of an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Blends two animations linearly based on the amount value. +/// +/// In general, the blend value should be in the `[0.0, 1.0]` range. Values outside of this range can blend amplified or inverted animations, however, ``AnimationNodeAdd2`` works better for this purpose. +/// +open class AnimationNodeBlend2: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeBlend2" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend3.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend3.swift new file mode 100644 index 000000000..82853c75e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlend3.swift @@ -0,0 +1,38 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Blends two of three animations linearly inside of an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Blends two animations out of three linearly out of three based on the amount value. +/// +/// This animation node has three inputs: +/// +/// - The base animation to blend with +/// +/// - A "-blend" animation to blend with when the blend amount is negative value +/// +/// - A "+blend" animation to blend with when the blend amount is positive value +/// +/// In general, the blend value should be in the `[-1.0, 1.0]` range. Values outside of this range can blend amplified animations, however, ``AnimationNodeAdd3`` works better for this purpose. +/// +open class AnimationNodeBlend3: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeBlend3" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace1D.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace1D.swift new file mode 100644 index 000000000..47a668e39 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace1D.swift @@ -0,0 +1,583 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A set of ``AnimationRootNode``s placed on a virtual axis, crossfading between the two adjacent ones. Used by ``AnimationTree``. +/// +/// A resource used by ``AnimationNodeBlendTree``. +/// +/// ``AnimationNodeBlendSpace1D`` represents a virtual axis on which any type of ``AnimationRootNode``s can be added using ``addBlendPoint(node:pos:atIndex:)``. Outputs the linear blend of the two ``AnimationRootNode``s adjacent to the current value. +/// +/// You can set the extents of the axis with ``minSpace`` and ``maxSpace``. +/// +open class AnimationNodeBlendSpace1D: AnimationRootNode { + override open class var godotClassName: StringName { "AnimationNodeBlendSpace1D" } + public enum BlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The interpolation between animations is linear. + case interpolated = 0 // BLEND_MODE_INTERPOLATED + /// The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. + case discrete = 1 // BLEND_MODE_DISCRETE + /// Similar to ``BlendMode/discrete``, but starts the new animation at the last animation's playback position. + case discreteCarry = 2 // BLEND_MODE_DISCRETE_CARRY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .interpolated: return ".interpolated" + case .discrete: return ".discrete" + case .discreteCarry: return ".discreteCarry" + } + + } + + } + + + /* Properties */ + + /// The blend space's axis's lower limit for the points' position. See ``addBlendPoint(node:pos:atIndex:)``. + final public var minSpace: Double { + get { + return get_min_space () + } + + set { + set_min_space (newValue) + } + + } + + /// The blend space's axis's upper limit for the points' position. See ``addBlendPoint(node:pos:atIndex:)``. + final public var maxSpace: Double { + get { + return get_max_space () + } + + set { + set_max_space (newValue) + } + + } + + /// Position increment to snap to when moving a point on the axis. + final public var snap: Double { + get { + return get_snap () + } + + set { + set_snap (newValue) + } + + } + + /// Label of the virtual axis of the blend space. + final public var valueLabel: String { + get { + return get_value_label () + } + + set { + set_value_label (newValue) + } + + } + + /// Controls the interpolation between animations. See ``AnimationNodeBlendSpace1D/BlendMode`` constants. + final public var blendMode: AnimationNodeBlendSpace1D.BlendMode { + get { + return get_blend_mode () + } + + set { + set_blend_mode (newValue) + } + + } + + /// If `false`, the blended animations' frame are stopped when the blend value is `0`. + /// + /// If `true`, forcing the blended animations to advance frame. + /// + final public var sync: Bool { + get { + return is_using_sync () + } + + set { + set_use_sync (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_blend_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_blend_point") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 285050433)! + } + + } + + }() + + /// Adds a new point that represents a `node` on the virtual axis at a given position set by `pos`. You can insert it at a specific index using the `atIndex` argument. If you use the default value for `atIndex`, the point is inserted at the end of the blend points array. + public final func addBlendPoint(node: AnimationRootNode?, pos: Double, atIndex: Int32 = -1) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: atIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_add_blend_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_blend_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_point_position") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Updates the position of the point at index `point` on the blend axis. + public final func setBlendPointPosition(point: Int32, pos: Double) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_blend_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_position") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the position of the point at index `point`. + public final func getBlendPointPosition(point: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_blend_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_blend_point_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_point_node") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4240341528)! + } + + } + + }() + + /// Changes the ``AnimationNode`` referenced by the point at index `point`. + public final func setBlendPointNode(point: Int32, node: AnimationRootNode?) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_blend_point_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_node") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 665599029)! + } + + } + + }() + + /// Returns the ``AnimationNode`` referenced by the point at index `point`. + public final func getBlendPointNode(point: Int32) -> AnimationRootNode? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_blend_point_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_blend_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_blend_point") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point at index `point` from the blend axis. + public final func removeBlendPoint(_ point: Int32) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_remove_blend_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_count") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of points on the blend axis. + public final func getBlendPointCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_blend_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_space(_ minSpace: Double) { + withUnsafePointer(to: minSpace) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_min_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_space() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_min_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_space(_ maxSpace: Double) { + withUnsafePointer(to: maxSpace) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_max_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_space() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_max_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_snap") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_snap(_ snap: Double) { + withUnsafePointer(to: snap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_snap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("get_snap") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_snap() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_snap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_value_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_value_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_value_label(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_value_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_value_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_value_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_value_label() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_value_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_mode") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2600869457)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_mode(_ mode: AnimationNodeBlendSpace1D.BlendMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_mode") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1547667849)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_mode() -> AnimationNodeBlendSpace1D.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_get_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeBlendSpace1D.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_use_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_sync") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_sync(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_set_use_sync, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_sync") + return withUnsafePointer(to: &AnimationNodeBlendSpace1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_sync() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace1D.method_is_using_sync, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace2D.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace2D.swift new file mode 100644 index 000000000..09472ff6b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendSpace2D.swift @@ -0,0 +1,827 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A set of ``AnimationRootNode``s placed on 2D coordinates, crossfading between the three adjacent ones. Used by ``AnimationTree``. +/// +/// A resource used by ``AnimationNodeBlendTree``. +/// +/// ``AnimationNodeBlendSpace1D`` represents a virtual 2D space on which ``AnimationRootNode``s are placed. Outputs the linear blend of the three adjacent animations using a ``Vector2`` weight. Adjacent in this context means the three ``AnimationRootNode``s making up the triangle that contains the current value. +/// +/// You can add vertices to the blend space with ``addBlendPoint(node:pos:atIndex:)`` and automatically triangulate it by setting ``autoTriangles`` to `true`. Otherwise, use ``addTriangle(x:y:z:atIndex:)`` and ``removeTriangle(_:)`` to triangulate the blend space by hand. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``trianglesUpdated`` +open class AnimationNodeBlendSpace2D: AnimationRootNode { + override open class var godotClassName: StringName { "AnimationNodeBlendSpace2D" } + public enum BlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The interpolation between animations is linear. + case interpolated = 0 // BLEND_MODE_INTERPOLATED + /// The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. + case discrete = 1 // BLEND_MODE_DISCRETE + /// Similar to ``BlendMode/discrete``, but starts the new animation at the last animation's playback position. + case discreteCarry = 2 // BLEND_MODE_DISCRETE_CARRY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .interpolated: return ".interpolated" + case .discrete: return ".discrete" + case .discreteCarry: return ".discreteCarry" + } + + } + + } + + + /* Properties */ + + /// If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with ``addBlendPoint(node:pos:atIndex:)`` and ``removeBlendPoint(_:)``. + final public var autoTriangles: Bool { + get { + return get_auto_triangles () + } + + set { + set_auto_triangles (newValue) + } + + } + + /// The blend space's X and Y axes' lower limit for the points' position. See ``addBlendPoint(node:pos:atIndex:)``. + final public var minSpace: Vector2 { + get { + return get_min_space () + } + + set { + set_min_space (newValue) + } + + } + + /// The blend space's X and Y axes' upper limit for the points' position. See ``addBlendPoint(node:pos:atIndex:)``. + final public var maxSpace: Vector2 { + get { + return get_max_space () + } + + set { + set_max_space (newValue) + } + + } + + /// Position increment to snap to when moving a point. + final public var snap: Vector2 { + get { + return get_snap () + } + + set { + set_snap (newValue) + } + + } + + /// Name of the blend space's X axis. + final public var xLabel: String { + get { + return get_x_label () + } + + set { + set_x_label (newValue) + } + + } + + /// Name of the blend space's Y axis. + final public var yLabel: String { + get { + return get_y_label () + } + + set { + set_y_label (newValue) + } + + } + + /// Controls the interpolation between animations. See ``AnimationNodeBlendSpace2D/BlendMode`` constants. + final public var blendMode: AnimationNodeBlendSpace2D.BlendMode { + get { + return get_blend_mode () + } + + set { + set_blend_mode (newValue) + } + + } + + /// If `false`, the blended animations' frame are stopped when the blend value is `0`. + /// + /// If `true`, forcing the blended animations to advance frame. + /// + final public var sync: Bool { + get { + return is_using_sync () + } + + set { + set_use_sync (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_blend_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_blend_point") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402261981)! + } + + } + + }() + + /// Adds a new point that represents a `node` at the position set by `pos`. You can insert it at a specific index using the `atIndex` argument. If you use the default value for `atIndex`, the point is inserted at the end of the blend points array. + public final func addBlendPoint(node: AnimationRootNode?, pos: Vector2, atIndex: Int32 = -1) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: atIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_add_blend_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_blend_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_point_position") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Updates the position of the point at index `point` on the blend axis. + public final func setBlendPointPosition(point: Int32, pos: Vector2) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_blend_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_position") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the point at index `point`. + public final func getBlendPointPosition(point: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_blend_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_blend_point_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_point_node") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4240341528)! + } + + } + + }() + + /// Changes the ``AnimationNode`` referenced by the point at index `point`. + public final func setBlendPointNode(point: Int32, node: AnimationRootNode?) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_blend_point_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_node") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 665599029)! + } + + } + + }() + + /// Returns the ``AnimationRootNode`` referenced by the point at index `point`. + public final func getBlendPointNode(point: Int32) -> AnimationRootNode? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_blend_point_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_blend_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_blend_point") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point at index `point` from the blend space. + public final func removeBlendPoint(_ point: Int32) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_remove_blend_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_point_count") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of points in the blend space. + public final func getBlendPointCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_blend_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_triangle: GDExtensionMethodBindPtr = { + let methodName = StringName("add_triangle") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 753017335)! + } + + } + + }() + + /// Creates a new triangle using three points `x`, `y`, and `z`. Triangles can overlap. You can insert the triangle at a specific index using the `atIndex` argument. If you use the default value for `atIndex`, the point is inserted at the end of the blend points array. + public final func addTriangle(x: Int32, y: Int32, z: Int32, atIndex: Int32 = -1) { + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: z) { pArg2 in + withUnsafePointer(to: atIndex) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_add_triangle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_triangle_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_triangle_point") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 50157827)! + } + + } + + }() + + /// Returns the position of the point at index `point` in the triangle of index `triangle`. + public final func getTrianglePoint(triangle: Int32, point: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: triangle) { pArg0 in + withUnsafePointer(to: point) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_triangle_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_remove_triangle: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_triangle") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the triangle at index `triangle` from the blend space. + public final func removeTriangle(_ triangle: Int32) { + withUnsafePointer(to: triangle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_remove_triangle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_triangle_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_triangle_count") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of triangles in the blend space. + public final func getTriangleCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_triangle_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_space(_ minSpace: Vector2) { + withUnsafePointer(to: minSpace) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_min_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_space() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_min_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_space(_ maxSpace: Vector2) { + withUnsafePointer(to: maxSpace) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_max_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_space") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_space() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_max_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_snap") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_snap(_ snap: Vector2) { + withUnsafePointer(to: snap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_snap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("get_snap") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_snap() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_snap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_x_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_x_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_x_label(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_x_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_x_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_x_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_x_label() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_x_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_y_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_y_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_y_label(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_y_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_y_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_y_label") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_y_label() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_y_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_auto_triangles: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_triangles") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_triangles(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_auto_triangles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_triangles: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_triangles") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_triangles() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_auto_triangles, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_mode") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 81193520)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_mode(_ mode: AnimationNodeBlendSpace2D.BlendMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_mode") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1398433632)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_mode() -> AnimationNodeBlendSpace2D.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_get_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeBlendSpace2D.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_use_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_sync") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_sync(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_set_use_sync, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_sync") + return withUnsafePointer(to: &AnimationNodeBlendSpace2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_sync() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeBlendSpace2D.method_is_using_sync, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.trianglesUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var trianglesUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "triangles_updated") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendTree.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendTree.swift new file mode 100644 index 000000000..8fca92b6a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeBlendTree.swift @@ -0,0 +1,448 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A sub-tree of many type ``AnimationNode``s used for complex animations. Used by ``AnimationTree``. +/// +/// This animation node may contain a sub-tree of any other type animation nodes, such as ``AnimationNodeTransition``, ``AnimationNodeBlend2``, ``AnimationNodeBlend3``, ``AnimationNodeOneShot``, etc. This is one of the most commonly used animation node roots. +/// +/// An ``AnimationNodeOutput`` node named `output` is created by default. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``nodeChanged`` +open class AnimationNodeBlendTree: AnimationRootNode { + override open class var godotClassName: StringName { "AnimationNodeBlendTree" } + /* Constants */ + /// The connection was successful. + public static let connectionOk = 0 + /// The input node is `null`. + public static let connectionErrorNoInput = 1 + /// The specified input port is out of range. + public static let connectionErrorNoInputIndex = 2 + /// The output node is `null`. + public static let connectionErrorNoOutput = 3 + /// Input and output nodes are the same. + public static let connectionErrorSameNode = 4 + /// The specified connection already exists. + public static let connectionErrorConnectionExists = 5 + + /* Properties */ + + /// The global offset of all sub animation nodes. + final public var graphOffset: Vector2 { + get { + return get_graph_offset () + } + + set { + set_graph_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_node: GDExtensionMethodBindPtr = { + let methodName = StringName("add_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1980270704)! + } + + } + + }() + + /// Adds an ``AnimationNode`` at the given `position`. The `name` is used to identify the created sub animation node later. + public final func addNode(name: StringName, node: AnimationNode?, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_add_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 625644256)! + } + + } + + }() + + /// Returns the sub animation node with the specified `name`. + public final func getNode(name: StringName) -> AnimationNode? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_get_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_node: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a sub animation node. + public final func removeNode(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_remove_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rename_node: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Changes the name of a sub animation node. + public final func renameNode(name: StringName, newName: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: newName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_rename_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_node: GDExtensionMethodBindPtr = { + let methodName = StringName("has_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if a sub animation node with specified `name` exists. + public final func hasNode(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_has_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_connect_node: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2168001410)! + } + + } + + }() + + /// Connects the output of an ``AnimationNode`` as input for another ``AnimationNode``, at the input port specified by `inputIndex`. + public final func connectNode(inputNode: StringName, inputIndex: Int32, outputNode: StringName) { + withUnsafePointer(to: inputNode.content) { pArg0 in + withUnsafePointer(to: inputIndex) { pArg1 in + withUnsafePointer(to: outputNode.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_connect_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_disconnect_node: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_node") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2415702435)! + } + + } + + }() + + /// Disconnects the animation node connected to the specified input. + public final func disconnectNode(inputNode: StringName, inputIndex: Int32) { + withUnsafePointer(to: inputNode.content) { pArg0 in + withUnsafePointer(to: inputIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_disconnect_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_node_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_position") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1999414630)! + } + + } + + }() + + /// Modifies the position of a sub animation node. + public final func setNodePosition(name: StringName, position: Vector2) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_set_node_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_node_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_position") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3100822709)! + } + + } + + }() + + /// Returns the position of the sub animation node with the specified `name`. + public final func getNodePosition(name: StringName) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_get_node_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_graph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_graph_offset") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_graph_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_set_graph_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_graph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_graph_offset") + return withUnsafePointer(to: &AnimationNodeBlendTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_graph_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimationNodeBlendTree.method_get_graph_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ nodeName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the input port information is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeChanged.connect { nodeName in + /// print ("caught signal") + /// } + /// ``` + public var nodeChanged: Signal1 { Signal1 (target: self, signalName: "node_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeOneShot.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeOneShot.swift new file mode 100644 index 000000000..b31af7c46 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeOneShot.swift @@ -0,0 +1,585 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plays an animation once in an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. This animation node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. +/// +/// After setting the request and changing the animation playback, the one-shot node automatically clears the request on the next process frame by setting its `request` value to ``OneShotRequest/none``. +/// +open class AnimationNodeOneShot: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeOneShot" } + public enum OneShotRequest: Int64, CaseIterable, CustomDebugStringConvertible { + /// The default state of the request. Nothing is done. + case none = 0 // ONE_SHOT_REQUEST_NONE + /// The request to play the animation connected to "shot" port. + case fire = 1 // ONE_SHOT_REQUEST_FIRE + /// The request to stop the animation connected to "shot" port. + case abort = 2 // ONE_SHOT_REQUEST_ABORT + /// The request to fade out the animation connected to "shot" port. + case fadeOut = 3 // ONE_SHOT_REQUEST_FADE_OUT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .fire: return ".fire" + case .abort: return ".abort" + case .fadeOut: return ".fadeOut" + } + + } + + } + + public enum MixMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Blends two animations. See also ``AnimationNodeBlend2``. + case blend = 0 // MIX_MODE_BLEND + /// Blends two animations additively. See also ``AnimationNodeAdd2``. + case add = 1 // MIX_MODE_ADD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .blend: return ".blend" + case .add: return ".add" + } + + } + + } + + + /* Properties */ + + /// The blend type. + final public var mixMode: AnimationNodeOneShot.MixMode { + get { + return get_mix_mode () + } + + set { + set_mix_mode (newValue) + } + + } + + /// The fade-in duration. For example, setting this to `1.0` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. + /// + /// > Note: ``AnimationNodeOneShot`` transitions the current state after the end of the fading. When ``AnimationNodeOutput`` is considered as the most upstream, so the ``fadeinTime`` is scaled depending on the downstream delta. For example, if this value is set to `1.0` and a ``AnimationNodeTimeScale`` with a value of `2.0` is chained downstream, the actual processing time will be 0.5 second. + /// + final public var fadeinTime: Double { + get { + return get_fadein_time () + } + + set { + set_fadein_time (newValue) + } + + } + + /// Determines how cross-fading between animations is eased. If empty, the transition will be linear. + final public var fadeinCurve: Curve? { + get { + return get_fadein_curve () + } + + set { + set_fadein_curve (newValue) + } + + } + + /// The fade-out duration. For example, setting this to `1.0` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. + /// + /// > Note: ``AnimationNodeOneShot`` transitions the current state after the end of the fading. When ``AnimationNodeOutput`` is considered as the most upstream, so the ``fadeoutTime`` is scaled depending on the downstream delta. For example, if this value is set to `1.0` and an ``AnimationNodeTimeScale`` with a value of `2.0` is chained downstream, the actual processing time will be 0.5 second. + /// + final public var fadeoutTime: Double { + get { + return get_fadeout_time () + } + + set { + set_fadeout_time (newValue) + } + + } + + /// Determines how cross-fading between animations is eased. If empty, the transition will be linear. + final public var fadeoutCurve: Curve? { + get { + return get_fadeout_curve () + } + + set { + set_fadeout_curve (newValue) + } + + } + + /// If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + final public var breakLoopAtEnd: Bool { + get { + return is_loop_broken_at_end () + } + + set { + set_break_loop_at_end (newValue) + } + + } + + /// If `true`, the sub-animation will restart automatically after finishing. + /// + /// In other words, to start auto restarting, the animation must be played once with the ``OneShotRequest/fire`` request. The ``OneShotRequest/abort`` request stops the auto restarting, but it does not disable the ``autorestart`` itself. So, the ``OneShotRequest/fire`` request will start auto restarting again. + /// + final public var autorestart: Bool { + get { + return has_autorestart () + } + + set { + set_autorestart (newValue) + } + + } + + /// The delay after which the automatic restart is triggered, in seconds. + final public var autorestartDelay: Double { + get { + return get_autorestart_delay () + } + + set { + set_autorestart_delay (newValue) + } + + } + + /// If ``autorestart`` is `true`, a random additional delay (in seconds) between 0 and this value will be added to ``autorestartDelay``. + final public var autorestartRandomDelay: Double { + get { + return get_autorestart_random_delay () + } + + set { + set_autorestart_random_delay (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_fadein_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fadein_time") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fadein_time(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_fadein_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fadein_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fadein_time") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fadein_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_fadein_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fadein_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fadein_curve") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fadein_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_fadein_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fadein_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fadein_curve") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fadein_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_fadein_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_fadeout_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fadeout_time") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fadeout_time(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_fadeout_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fadeout_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fadeout_time") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fadeout_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_fadeout_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fadeout_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fadeout_curve") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fadeout_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_fadeout_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fadeout_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fadeout_curve") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fadeout_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_fadeout_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_break_loop_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_break_loop_at_end") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_break_loop_at_end(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_break_loop_at_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_loop_broken_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("is_loop_broken_at_end") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_loop_broken_at_end() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_is_loop_broken_at_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autorestart: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autorestart") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autorestart(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_autorestart, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_autorestart: GDExtensionMethodBindPtr = { + let methodName = StringName("has_autorestart") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_autorestart() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_has_autorestart, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autorestart_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autorestart_delay") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autorestart_delay(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_autorestart_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autorestart_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autorestart_delay") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autorestart_delay() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_autorestart_delay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autorestart_random_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autorestart_random_delay") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autorestart_random_delay(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_autorestart_random_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autorestart_random_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autorestart_random_delay") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autorestart_random_delay() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_autorestart_random_delay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mix_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mix_mode") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1018899799)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mix_mode(_ mode: AnimationNodeOneShot.MixMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_set_mix_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mix_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix_mode") + return withUnsafePointer(to: &AnimationNodeOneShot.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3076550526)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mix_mode() -> AnimationNodeOneShot.MixMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeOneShot.method_get_mix_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeOneShot.MixMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeOutput.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeOutput.swift new file mode 100644 index 000000000..c3fac7988 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeOutput.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// The animation output node of an ``AnimationNodeBlendTree``. +/// +/// A node created automatically in an ``AnimationNodeBlendTree`` that outputs the final animation. +open class AnimationNodeOutput: AnimationNode { + override open class var godotClassName: StringName { "AnimationNodeOutput" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachine.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachine.swift new file mode 100644 index 000000000..c5defe90d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachine.swift @@ -0,0 +1,737 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A state machine with multiple ``AnimationRootNode``s, used by ``AnimationTree``. +/// +/// Contains multiple ``AnimationRootNode``s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the ``AnimationNodeStateMachinePlayback`` object from the ``AnimationTree`` node to control it programmatically. +/// +/// **Example:** +/// +open class AnimationNodeStateMachine: AnimationRootNode { + override open class var godotClassName: StringName { "AnimationNodeStateMachine" } + public enum StateMachineType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine. + case root = 0 // STATE_MACHINE_TYPE_ROOT + /// Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine. + case nested = 1 // STATE_MACHINE_TYPE_NESTED + /// This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with ``stateMachineType`` of ``StateMachineType/root`` or ``StateMachineType/nested`` in the parent or ancestor. + case grouped = 2 // STATE_MACHINE_TYPE_GROUPED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .root: return ".root" + case .nested: return ".nested" + case .grouped: return ".grouped" + } + + } + + } + + + /* Properties */ + + /// This property can define the process of transitions for different use cases. See also ``AnimationNodeStateMachine.StateMachineType``. + final public var stateMachineType: AnimationNodeStateMachine.StateMachineType { + get { + return get_state_machine_type () + } + + set { + set_state_machine_type (newValue) + } + + } + + /// If `true`, allows teleport to the self state with ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)``. When the reset option is enabled in ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)``, the animation is restarted. If `false`, nothing happens on the teleportation to the self state. + final public var allowTransitionToSelf: Bool { + get { + return is_allow_transition_to_self () + } + + set { + set_allow_transition_to_self (newValue) + } + + } + + /// If `true`, treat the cross-fade to the start and end nodes as a blend with the RESET animation. + /// + /// In most cases, when additional cross-fades are performed in the parent ``AnimationNode`` of the state machine, setting this property to `false` and matching the cross-fade time of the parent ``AnimationNode`` and the state machine's start node and end node gives good results. + /// + final public var resetEnds: Bool { + get { + return are_ends_reset () + } + + set { + set_reset_ends (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_node: GDExtensionMethodBindPtr = { + let methodName = StringName("add_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1980270704)! + } + + } + + }() + + /// Adds a new animation node to the graph. The `position` is used for display in the editor. + public final func addNode(name: StringName, node: AnimationNode?, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_add_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_replace_node: GDExtensionMethodBindPtr = { + let methodName = StringName("replace_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2559412862)! + } + + } + + }() + + /// Replaces the given animation node with a new animation node. + public final func replaceNode(name: StringName, node: AnimationNode?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: node?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_replace_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 625644256)! + } + + } + + }() + + /// Returns the animation node with the given name. + public final func getNode(name: StringName) -> AnimationNode? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_node: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Deletes the given animation node from the graph. + public final func removeNode(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_remove_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rename_node: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Renames the given animation node. + public final func renameNode(name: StringName, newName: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: newName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_rename_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_node: GDExtensionMethodBindPtr = { + let methodName = StringName("has_node") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the graph contains the given animation node. + public final func hasNode(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_has_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_name") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 739213945)! + } + + } + + }() + + /// Returns the given animation node's name. + public final func getNodeName(node: AnimationNode?) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_node_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_node_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_position") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1999414630)! + } + + } + + }() + + /// Sets the animation node's coordinates. Used for display in the editor. + public final func setNodePosition(name: StringName, position: Vector2) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_set_node_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_node_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_position") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3100822709)! + } + + } + + }() + + /// Returns the given animation node's coordinates. Used for display in the editor. + public final func getNodePosition(name: StringName) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_node_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("has_transition") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns `true` if there is a transition between the given animation nodes. + public final func hasTransition(from: StringName, to: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: from.content) { pArg0 in + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_has_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("add_transition") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 795486887)! + } + + } + + }() + + /// Adds a transition between the given animation nodes. + public final func addTransition(from: StringName, to: StringName, transition: AnimationNodeStateMachineTransition?) { + withUnsafePointer(to: from.content) { pArg0 in + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: transition?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_add_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4192381260)! + } + + } + + }() + + /// Returns the given transition. + public final func getTransition(idx: Int32) -> AnimationNodeStateMachineTransition? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_transition_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_from") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the given transition's start node. + public final func getTransitionFrom(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_transition_from, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_transition_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_to") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the given transition's end node. + public final func getTransitionTo(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_transition_to, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_transition_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_count") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of connections in the graph. + public final func getTransitionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_transition_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_remove_transition_by_index: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_transition_by_index") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Deletes the given transition by index. + public final func removeTransitionByIndex(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_remove_transition_by_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_transition") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Deletes the transition between the two specified animation nodes. + public final func removeTransition(from: StringName, to: StringName) { + withUnsafePointer(to: from.content) { pArg0 in + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_remove_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_graph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_graph_offset") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the draw offset of the graph. Used for display in the editor. + public final func setGraphOffset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_set_graph_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_graph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_graph_offset") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the draw offset of the graph. Used for display in the editor. + public final func getGraphOffset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_graph_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_state_machine_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_state_machine_type") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2584759088)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_state_machine_type(_ stateMachineType: AnimationNodeStateMachine.StateMachineType) { + withUnsafePointer(to: stateMachineType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_set_state_machine_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_state_machine_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_state_machine_type") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1140726469)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_state_machine_type() -> AnimationNodeStateMachine.StateMachineType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_get_state_machine_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeStateMachine.StateMachineType (rawValue: _result)! + } + + fileprivate static var method_set_allow_transition_to_self: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_transition_to_self") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_transition_to_self(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_set_allow_transition_to_self, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_allow_transition_to_self: GDExtensionMethodBindPtr = { + let methodName = StringName("is_allow_transition_to_self") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_allow_transition_to_self() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_is_allow_transition_to_self, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reset_ends: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reset_ends") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reset_ends(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_set_reset_ends, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_ends_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("are_ends_reset") + return withUnsafePointer(to: &AnimationNodeStateMachine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_ends_reset() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeStateMachine.method_are_ends_reset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachinePlayback.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachinePlayback.swift new file mode 100644 index 000000000..6f4ff9631 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachinePlayback.swift @@ -0,0 +1,245 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides playback control for an ``AnimationNodeStateMachine``. +/// +/// Allows control of ``AnimationTree`` state machines created with ``AnimationNodeStateMachine``. Retrieve with `$AnimationTree.get("parameters/playback")`. +/// +/// **Example:** +/// +open class AnimationNodeStateMachinePlayback: Resource { + override open class var godotClassName: StringName { "AnimationNodeStateMachinePlayback" } + /* Methods */ + fileprivate static var method_travel: GDExtensionMethodBindPtr = { + let methodName = StringName("travel") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3823612587)! + } + + } + + }() + + /// Transitions from the current state to another one, following the shortest path. + /// + /// If the path does not connect from the current state, the animation will play after the state teleports. + /// + /// If `resetOnTeleport` is `true`, the animation is played from the beginning when the travel cause a teleportation. + /// + public final func travel(toNode: StringName, resetOnTeleport: Bool = true) { + withUnsafePointer(to: toNode.content) { pArg0 in + withUnsafePointer(to: resetOnTeleport) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_travel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_start: GDExtensionMethodBindPtr = { + let methodName = StringName("start") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3823612587)! + } + + } + + }() + + /// Starts playing the given animation. + /// + /// If `reset` is `true`, the animation is played from the beginning. + /// + public final func start(node: StringName, reset: Bool = true) { + withUnsafePointer(to: node.content) { pArg0 in + withUnsafePointer(to: reset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_start, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_next: GDExtensionMethodBindPtr = { + let methodName = StringName("next") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// If there is a next path by travel or auto advance, immediately transitions from the current state to the next state. + public final func next() { + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_next, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the currently playing animation. + public final func stop() { + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if an animation is playing. + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_node") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + /// Returns the currently playing animation state. + /// + /// > Note: When using a cross-fade, the current state changes to the next state immediately after the cross-fade begins. + /// + public final func getCurrentNode() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_get_current_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_play_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_play_position") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the playback position within the current animation state. + public final func getCurrentPlayPosition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_get_current_play_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_length") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the current state length. + /// + /// > Note: It is possible that any ``AnimationRootNode`` can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned. + /// + public final func getCurrentLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_get_current_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fading_from_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fading_from_node") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + /// Returns the starting state of currently fading animation. + public final func getFadingFromNode() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_get_fading_from_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_travel_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel_path") + return withUnsafePointer(to: &AnimationNodeStateMachinePlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the current travel path as computed internally by the A* algorithm. + public final func getTravelPath() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachinePlayback.method_get_travel_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachineTransition.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachineTransition.swift new file mode 100644 index 000000000..3815836f7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeStateMachineTransition.swift @@ -0,0 +1,603 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A transition within an ``AnimationNodeStateMachine`` connecting two ``AnimationRootNode``s. +/// +/// The path generated when using ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)`` is limited to the nodes connected by ``AnimationNodeStateMachineTransition``. +/// +/// You can set the timing and conditions of the transition in detail. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``advanceConditionChanged`` +open class AnimationNodeStateMachineTransition: Resource { + override open class var godotClassName: StringName { "AnimationNodeStateMachineTransition" } + public enum SwitchMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Switch to the next state immediately. The current state will end and blend into the beginning of the new one. + case immediate = 0 // SWITCH_MODE_IMMEDIATE + /// Switch to the next state immediately, but will seek the new state to the playback position of the old state. + case sync = 1 // SWITCH_MODE_SYNC + /// Wait for the current state playback to end, then switch to the beginning of the next state animation. + case atEnd = 2 // SWITCH_MODE_AT_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .immediate: return ".immediate" + case .sync: return ".sync" + case .atEnd: return ".atEnd" + } + + } + + } + + public enum AdvanceMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Don't use this transition. + case disabled = 0 // ADVANCE_MODE_DISABLED + /// Only use this transition during ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)``. + case enabled = 1 // ADVANCE_MODE_ENABLED + /// Automatically use this transition if the ``advanceCondition`` and ``advanceExpression`` checks are true (if assigned). + case auto = 2 // ADVANCE_MODE_AUTO + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .auto: return ".auto" + } + + } + + } + + + /* Properties */ + + /// The time to cross-fade between this state and the next. + /// + /// > Note: ``AnimationNodeStateMachine`` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When ``AnimationNodeOutput`` is considered as the most upstream, so the ``xfadeTime`` is not scaled depending on the downstream delta. See also ``AnimationNodeOneShot/fadeoutTime``. + /// + final public var xfadeTime: Double { + get { + return get_xfade_time () + } + + set { + set_xfade_time (newValue) + } + + } + + /// Ease curve for better control over cross-fade between this state and the next. + final public var xfadeCurve: Curve? { + get { + return get_xfade_curve () + } + + set { + set_xfade_curve (newValue) + } + + } + + /// If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + final public var breakLoopAtEnd: Bool { + get { + return is_loop_broken_at_end () + } + + set { + set_break_loop_at_end (newValue) + } + + } + + /// If `true`, the destination animation is played back from the beginning when switched. + final public var reset: Bool { + get { + return is_reset () + } + + set { + set_reset (newValue) + } + + } + + /// Lower priority transitions are preferred when travelling through the tree via ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)`` or ``advanceMode`` is set to ``AdvanceMode/auto``. + final public var priority: Int32 { + get { + return get_priority () + } + + set { + set_priority (newValue) + } + + } + + /// The transition type. + final public var switchMode: AnimationNodeStateMachineTransition.SwitchMode { + get { + return get_switch_mode () + } + + set { + set_switch_mode (newValue) + } + + } + + /// Determines whether the transition should disabled, enabled when using ``AnimationNodeStateMachinePlayback/travel(toNode:resetOnTeleport:)``, or traversed automatically if the ``advanceCondition`` and ``advanceExpression`` checks are true (if assigned). + final public var advanceMode: AnimationNodeStateMachineTransition.AdvanceMode { + get { + return get_advance_mode () + } + + set { + set_advance_mode (newValue) + } + + } + + /// Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the ``AnimationTree`` that can be controlled from code (see Using AnimationTree). For example, if ``AnimationTree/treeRoot`` is an ``AnimationNodeStateMachine`` and ``advanceCondition`` is set to `"idle"`: + /// + final public var advanceCondition: StringName { + get { + return get_advance_condition () + } + + set { + set_advance_condition (newValue) + } + + } + + /// Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. + final public var advanceExpression: String { + get { + return get_advance_expression () + } + + set { + set_advance_expression (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_switch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_switch_mode") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074906633)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_switch_mode(_ mode: AnimationNodeStateMachineTransition.SwitchMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_switch_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_switch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_switch_mode") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138562085)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_switch_mode() -> AnimationNodeStateMachineTransition.SwitchMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_switch_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeStateMachineTransition.SwitchMode (rawValue: _result)! + } + + fileprivate static var method_set_advance_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_advance_mode") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1210869868)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_advance_mode(_ mode: AnimationNodeStateMachineTransition.AdvanceMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_advance_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_advance_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_advance_mode") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 61101689)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_advance_mode() -> AnimationNodeStateMachineTransition.AdvanceMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_advance_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationNodeStateMachineTransition.AdvanceMode (rawValue: _result)! + } + + fileprivate static var method_set_advance_condition: GDExtensionMethodBindPtr = { + let methodName = StringName("set_advance_condition") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_advance_condition(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_advance_condition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_advance_condition: GDExtensionMethodBindPtr = { + let methodName = StringName("get_advance_condition") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_advance_condition() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_advance_condition, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_xfade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_xfade_time") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_xfade_time(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_xfade_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_xfade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_xfade_time") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_xfade_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_xfade_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_xfade_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_xfade_curve") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_xfade_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_xfade_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_xfade_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_xfade_curve") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_xfade_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_xfade_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_break_loop_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_break_loop_at_end") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_break_loop_at_end(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_break_loop_at_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_loop_broken_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("is_loop_broken_at_end") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_loop_broken_at_end() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_is_loop_broken_at_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reset") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reset(_ reset: Bool) { + withUnsafePointer(to: reset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_reset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("is_reset") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_reset() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_is_reset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_priority") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_priority") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_advance_expression: GDExtensionMethodBindPtr = { + let methodName = StringName("set_advance_expression") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_advance_expression(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_set_advance_expression, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_advance_expression: GDExtensionMethodBindPtr = { + let methodName = StringName("get_advance_expression") + return withUnsafePointer(to: &AnimationNodeStateMachineTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_advance_expression() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationNodeStateMachineTransition.method_get_advance_expression, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + // Signals + /// Emitted when ``advanceCondition`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.advanceConditionChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var advanceConditionChanged: SimpleSignal { SimpleSignal (target: self, signalName: "advance_condition_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeSub2.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeSub2.swift new file mode 100644 index 000000000..6f285ad8a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeSub2.swift @@ -0,0 +1,34 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Blends two animations subtractively inside of an ``AnimationNodeBlendTree``. +/// +/// A resource to add to an ``AnimationNodeBlendTree``. Blends two animations subtractively based on the amount value. +/// +/// This animation node is usually used for pre-calculation to cancel out any extra poses from the animation for the "add" animation source in ``AnimationNodeAdd2`` or ``AnimationNodeAdd3``. +/// +/// In general, the blend value should be in the `[0.0, 1.0]` range, but values outside of this range can be used for amplified or inverted animations. +/// +/// > Note: This calculation is different from using a negative value in ``AnimationNodeAdd2``, since the transformation matrices do not satisfy the commutative law. ``AnimationNodeSub2`` multiplies the transformation matrix of the inverted animation from the left side, while negative ``AnimationNodeAdd2`` multiplies it from the right side. +/// +open class AnimationNodeSub2: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeSub2" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeSync.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeSync.swift new file mode 100644 index 000000000..effdad09a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeSync.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for ``AnimationNode``s with multiple input ports that must be synchronized. +/// +/// An animation node used to combine, mix, or blend two or more animations together while keeping them synchronized within an ``AnimationTree``. +open class AnimationNodeSync: AnimationNode { + override open class var godotClassName: StringName { "AnimationNodeSync" } + + /* Properties */ + + /// If `false`, the blended animations' frame are stopped when the blend value is `0`. + /// + /// If `true`, forcing the blended animations to advance frame. + /// + final public var sync: Bool { + get { + return is_using_sync () + } + + set { + set_use_sync (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_use_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_sync") + return withUnsafePointer(to: &AnimationNodeSync.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_sync(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeSync.method_set_use_sync, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_sync") + return withUnsafePointer(to: &AnimationNodeSync.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_sync() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeSync.method_is_using_sync, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeScale.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeScale.swift new file mode 100644 index 000000000..fff361649 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeScale.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A time-scaling animation node used in ``AnimationTree``. +/// +/// Allows to scale the speed of the animation (or reverse it) in any child ``AnimationNode``s. Setting it to `0.0` will pause the animation. +open class AnimationNodeTimeScale: AnimationNode { + override open class var godotClassName: StringName { "AnimationNodeTimeScale" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeSeek.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeSeek.swift new file mode 100644 index 000000000..05719c758 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeTimeSeek.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A time-seeking animation node used in ``AnimationTree``. +/// +/// This animation node can be used to cause a seek command to happen to any sub-children of the animation graph. Use to play an ``Animation`` from the start or a certain playback position inside the ``AnimationNodeBlendTree``. +/// +/// After setting the time and changing the animation playback, the time seek node automatically goes into sleep mode on the next process frame by setting its `seek_request` value to `-1.0`. +/// +open class AnimationNodeTimeSeek: AnimationNode { + override open class var godotClassName: StringName { "AnimationNodeTimeSeek" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationNodeTransition.swift b/Sources/SwiftGodot/Generated/Api/AnimationNodeTransition.swift new file mode 100644 index 000000000..86e02f3c6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationNodeTransition.swift @@ -0,0 +1,413 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A transition within an ``AnimationTree`` connecting two ``AnimationNode``s. +/// +/// Simple state machine for cases which don't require a more advanced ``AnimationNodeStateMachine``. Animations can be connected to the inputs and transition times can be specified. +/// +/// After setting the request and changing the animation playback, the transition node automatically clears the request on the next process frame by setting its `transition_request` value to empty. +/// +/// > Note: When using a cross-fade, `current_state` and `current_index` change to the next state immediately after the cross-fade begins. +/// +open class AnimationNodeTransition: AnimationNodeSync { + override open class var godotClassName: StringName { "AnimationNodeTransition" } + + /* Properties */ + + /// Cross-fading time (in seconds) between each animation connected to the inputs. + /// + /// > Note: ``AnimationNodeTransition`` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When ``AnimationNodeOutput`` is considered as the most upstream, so the ``xfadeTime`` is not scaled depending on the downstream delta. See also ``AnimationNodeOneShot/fadeoutTime``. + /// + final public var xfadeTime: Double { + get { + return get_xfade_time () + } + + set { + set_xfade_time (newValue) + } + + } + + /// Determines how cross-fading between animations is eased. If empty, the transition will be linear. + final public var xfadeCurve: Curve? { + get { + return get_xfade_curve () + } + + set { + set_xfade_curve (newValue) + } + + } + + /// If `true`, allows transition to the self state. When the reset option is enabled in input, the animation is restarted. If `false`, nothing happens on the transition to the self state. + final public var allowTransitionToSelf: Bool { + get { + return is_allow_transition_to_self () + } + + set { + set_allow_transition_to_self (newValue) + } + + } + + /// The number of enabled input ports for this animation node. + final public var inputCount: Int32 { + get { + return getInputCount () + } + + set { + set_input_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_input_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_count") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_input_count(_ inputCount: Int32) { + withUnsafePointer(to: inputCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_input_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_input_as_auto_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_as_auto_advance") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Enables or disables auto-advance for the given `input` index. If enabled, state changes to the next input after playing the animation once. If enabled for the last input state, it loops to the first. + public final func setInputAsAutoAdvance(input: Int32, enable: Bool) { + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_input_as_auto_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_input_set_as_auto_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("is_input_set_as_auto_advance") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if auto-advance is enabled for the given `input` index. + public final func isInputSetAsAutoAdvance(input: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_is_input_set_as_auto_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_input_break_loop_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_break_loop_at_end") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. + public final func setInputBreakLoopAtEnd(input: Int32, enable: Bool) { + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_input_break_loop_at_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_input_loop_broken_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("is_input_loop_broken_at_end") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the animation breaks the loop at the end of the loop cycle for transition. + public final func isInputLoopBrokenAtEnd(input: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_is_input_loop_broken_at_end, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_input_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_reset") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, the destination animation is restarted when the animation transitions. + public final func setInputReset(input: Int32, enable: Bool) { + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_input_reset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_input_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("is_input_reset") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the animation restarts when the animation transitions from the other animation. + public final func isInputReset(input: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: input) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_is_input_reset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_xfade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_xfade_time") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_xfade_time(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_xfade_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_xfade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_xfade_time") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_xfade_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_get_xfade_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_xfade_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_xfade_curve") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_xfade_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_xfade_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_xfade_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_xfade_curve") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_xfade_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_get_xfade_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_allow_transition_to_self: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_transition_to_self") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_transition_to_self(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_set_allow_transition_to_self, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_allow_transition_to_self: GDExtensionMethodBindPtr = { + let methodName = StringName("is_allow_transition_to_self") + return withUnsafePointer(to: &AnimationNodeTransition.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_allow_transition_to_self() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationNodeTransition.method_is_allow_transition_to_self, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationPlayer.swift b/Sources/SwiftGodot/Generated/Api/AnimationPlayer.swift new file mode 100644 index 000000000..096ed5f8b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationPlayer.swift @@ -0,0 +1,1444 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used for animation playback. +/// +/// An animation player is used for general-purpose playback of animations. It contains a dictionary of ``AnimationLibrary`` resources and custom blend times between animation transitions. +/// +/// Some methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example `"movement/run"`. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library. +/// +/// ``AnimationPlayer`` is better-suited than ``Tween`` for more complex animations, for example ones with non-trivial timings. It can also be used over ``Tween`` if the animation track editor is more convenient than doing it in code. +/// +/// Updating the target properties of animations occurs at the process frame. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``currentAnimationChanged`` +/// - ``animationChanged`` +open class AnimationPlayer: AnimationMixer { + override open class var godotClassName: StringName { "AnimationPlayer" } + public enum AnimationProcessCallback: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case physics = 0 // ANIMATION_PROCESS_PHYSICS + /// + case idle = 1 // ANIMATION_PROCESS_IDLE + /// + case manual = 2 // ANIMATION_PROCESS_MANUAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .physics: return ".physics" + case .idle: return ".idle" + case .manual: return ".manual" + } + + } + + } + + public enum AnimationMethodCallMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case deferred = 0 // ANIMATION_METHOD_CALL_DEFERRED + /// + case immediate = 1 // ANIMATION_METHOD_CALL_IMMEDIATE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .deferred: return ".deferred" + case .immediate: return ".immediate" + } + + } + + } + + + /* Properties */ + + /// The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See ``play(name:customBlend:customSpeed:fromEnd:)`` for more information on playing animations. + /// + /// > Note: While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see ``Animation``. + /// + final public var currentAnimation: String { + get { + return get_current_animation () + } + + set { + set_current_animation (newValue) + } + + } + + /// If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also ``currentAnimation``. + final public var assignedAnimation: String { + get { + return get_assigned_animation () + } + + set { + set_assigned_animation (newValue) + } + + } + + /// The key of the animation to play when the scene loads. + final public var autoplay: String { + get { + return get_autoplay () + } + + set { + set_autoplay (newValue) + } + + } + + /// The length (in seconds) of the currently playing animation. + final public var currentAnimationLength: Double { + get { + return get_current_animation_length () + } + + } + + /// The position (in seconds) of the currently playing animation. + final public var currentAnimationPosition: Double { + get { + return get_current_animation_position () + } + + } + + /// If `true`, performs ``AnimationMixer/capture(name:duration:transType:easeType:)`` before playback automatically. This means just ``playWithCapture(name:duration:customBlend:customSpeed:fromEnd:transType:easeType:)`` is executed with default arguments instead of ``play(name:customBlend:customSpeed:fromEnd:)``. + /// + /// > Note: Capture interpolation is only performed if the animation contains a capture track. See also ``Animation/UpdateMode/capture``. + /// + final public var playbackAutoCapture: Bool { + get { + return is_auto_capture () + } + + set { + set_auto_capture (newValue) + } + + } + + /// See also ``playWithCapture(name:duration:customBlend:customSpeed:fromEnd:transType:easeType:)`` and ``AnimationMixer/capture(name:duration:transType:easeType:)``. + /// + /// If ``playbackAutoCaptureDuration`` is negative value, the duration is set to the interval between the current position and the first key. + /// + final public var playbackAutoCaptureDuration: Double { + get { + return get_auto_capture_duration () + } + + set { + set_auto_capture_duration (newValue) + } + + } + + /// The transition type of the capture interpolation. See also ``Tween.TransitionType``. + final public var playbackAutoCaptureTransitionType: Tween.TransitionType { + get { + return get_auto_capture_transition_type () + } + + set { + set_auto_capture_transition_type (newValue) + } + + } + + /// The ease type of the capture interpolation. See also ``Tween.EaseType``. + final public var playbackAutoCaptureEaseType: Tween.EaseType { + get { + return get_auto_capture_ease_type () + } + + set { + set_auto_capture_ease_type (newValue) + } + + } + + /// The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. + final public var playbackDefaultBlendTime: Double { + get { + return get_default_blend_time () + } + + set { + set_default_blend_time (newValue) + } + + } + + /// The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + /// + /// If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + /// + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// If `true` and the engine is running in Movie Maker mode (see ``MovieWriter``), exits the engine with ``SceneTree/quit(exitCode:)`` as soon as an animation is done playing in this ``AnimationPlayer``. A message is printed when the engine quits for this reason. + /// + /// > Note: This obeys the same logic as the [signal AnimationMixer.animation_finished] signal, so it will not quit the engine if the animation is set to be looping. + /// + final public var movieQuitOnFinish: Bool { + get { + return is_movie_quit_on_finish_enabled () + } + + set { + set_movie_quit_on_finish_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_animation_set_next: GDExtensionMethodBindPtr = { + let methodName = StringName("animation_set_next") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Triggers the `animationTo` animation when the `animationFrom` animation completes. + public final func animationSetNext(animationFrom: StringName, animationTo: StringName) { + withUnsafePointer(to: animationFrom.content) { pArg0 in + withUnsafePointer(to: animationTo.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_animation_set_next, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_animation_get_next: GDExtensionMethodBindPtr = { + let methodName = StringName("animation_get_next") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965194235)! + } + + } + + }() + + /// Returns the key of the animation which is queued to play after the `animationFrom` animation. + public final func animationGetNext(animationFrom: StringName) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: animationFrom.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_animation_get_next, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_blend_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_time") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3231131886)! + } + + } + + }() + + /// Specifies a blend time (in seconds) between two animations, referenced by their keys. + public final func setBlendTime(animationFrom: StringName, animationTo: StringName, sec: Double) { + withUnsafePointer(to: animationFrom.content) { pArg0 in + withUnsafePointer(to: animationTo.content) { pArg1 in + withUnsafePointer(to: sec) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_blend_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_blend_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_time") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1958752504)! + } + + } + + }() + + /// Returns the blend time (in seconds) between two animations, referenced by their keys. + public final func getBlendTime(animationFrom: StringName, animationTo: StringName) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: animationFrom.content) { pArg0 in + withUnsafePointer(to: animationTo.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_blend_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_default_blend_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_blend_time") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_default_blend_time(_ sec: Double) { + withUnsafePointer(to: sec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_default_blend_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_blend_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_blend_time") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_default_blend_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_default_blend_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_capture") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_capture(_ autoCapture: Bool) { + withUnsafePointer(to: autoCapture) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_auto_capture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_auto_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_capture") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_capture() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationPlayer.method_is_auto_capture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_capture_duration: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_capture_duration") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_capture_duration(_ autoCaptureDuration: Double) { + withUnsafePointer(to: autoCaptureDuration) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_auto_capture_duration, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_capture_duration: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_capture_duration") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_capture_duration() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_auto_capture_duration, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_capture_transition_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_capture_transition_type") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1058637742)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_capture_transition_type(_ autoCaptureTransitionType: Tween.TransitionType) { + withUnsafePointer(to: autoCaptureTransitionType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_auto_capture_transition_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_capture_transition_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_capture_transition_type") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3842314528)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_capture_transition_type() -> Tween.TransitionType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_auto_capture_transition_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Tween.TransitionType (rawValue: _result)! + } + + fileprivate static var method_set_auto_capture_ease_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_capture_ease_type") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1208105857)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_capture_ease_type(_ autoCaptureEaseType: Tween.EaseType) { + withUnsafePointer(to: autoCaptureEaseType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_auto_capture_ease_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_capture_ease_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_capture_ease_type") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 631880200)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_capture_ease_type() -> Tween.EaseType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_auto_capture_ease_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Tween.EaseType (rawValue: _result)! + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3697947785)! + } + + } + + }() + + /// Plays the animation with key `name`. Custom blend times and speed can be set. + /// + /// The `fromEnd` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If `customSpeed` is negative and `fromEnd` is `true`, the animation will play backwards (which is equivalent to calling ``playBackwards(name:customBlend:)``). + /// + /// The ``AnimationPlayer`` keeps track of its current or last played animation with ``assignedAnimation``. If this method is called with that same animation `name`, or with no `name` parameter, the assigned animation will resume playing if it was paused. + /// + /// > Note: The animation will be updated the next time the ``AnimationPlayer`` is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call `advance(0)`. + /// + public final func play(name: StringName = StringName (""), customBlend: Double = -1, customSpeed: Double = 1.0, fromEnd: Bool = false) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: customBlend) { pArg1 in + withUnsafePointer(to: customSpeed) { pArg2 in + withUnsafePointer(to: fromEnd) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_play_backwards: GDExtensionMethodBindPtr = { + let methodName = StringName("play_backwards") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3890664824)! + } + + } + + }() + + /// Plays the animation with key `name` in reverse. + /// + /// This method is a shorthand for ``play(name:customBlend:customSpeed:fromEnd:)`` with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + /// + public final func playBackwards(name: StringName = StringName (""), customBlend: Double = -1) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: customBlend) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_play_backwards, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_play_with_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("play_with_capture") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3180464118)! + } + + } + + }() + + /// See also ``AnimationMixer/capture(name:duration:transType:easeType:)``. + /// + /// You can use this method to use more detailed options for capture than those performed by ``playbackAutoCapture``. When ``playbackAutoCapture`` is `false`, this method is almost the same as the following: + /// + /// If `name` is blank, it specifies ``assignedAnimation``. + /// + /// If `duration` is a negative value, the duration is set to the interval between the current position and the first key, when `fromEnd` is `true`, uses the interval between the current position and the last key instead. + /// + /// > Note: The `duration` takes ``speedScale`` into account, but `customSpeed` does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations. + /// + public final func playWithCapture(name: StringName = StringName (""), duration: Double = -1.0, customBlend: Double = -1, customSpeed: Double = 1.0, fromEnd: Bool = false, transType: Tween.TransitionType = .linear, easeType: Tween.EaseType = .`in`) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: duration) { pArg1 in + withUnsafePointer(to: customBlend) { pArg2 in + withUnsafePointer(to: customSpeed) { pArg3 in + withUnsafePointer(to: fromEnd) { pArg4 in + withUnsafePointer(to: transType.rawValue) { pArg5 in + withUnsafePointer(to: easeType.rawValue) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_play_with_capture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("pause") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Pauses the currently playing animation. The ``currentAnimationPosition`` will be kept and calling ``play(name:customBlend:customSpeed:fromEnd:)`` or ``playBackwards(name:customBlend:)`` without arguments or with the same animation name as ``assignedAnimation`` will resume the animation. + /// + /// See also ``stop(keepState:)``. + /// + public final func pause() { + gi.object_method_bind_ptrcall(AnimationPlayer.method_pause, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107499316)! + } + + } + + }() + + /// Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also ``pause()``. + /// + /// If `keepState` is `true`, the animation state is not updated visually. + /// + /// > Note: The method / audio / animation playback tracks will not be processed by this method. + /// + public final func stop(keepState: Bool = false) { + withUnsafePointer(to: keepState) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_stop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if an animation is currently playing (even if ``speedScale`` and/or `custom_speed` are `0`). + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationPlayer.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_current_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_animation") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_animation(_ animation: String) { + let animation = GString(animation) + withUnsafePointer(to: animation.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_current_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_current_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_animation") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_animation() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_current_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_assigned_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_assigned_animation") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_assigned_animation(_ animation: String) { + let animation = GString(animation) + withUnsafePointer(to: animation.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_assigned_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_assigned_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_assigned_animation") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_assigned_animation() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_assigned_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_queue: GDExtensionMethodBindPtr = { + let methodName = StringName("queue") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Queues an animation for playback once the current one is done. + /// + /// > Note: If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. + /// + public final func queue(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_queue, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_queue: GDExtensionMethodBindPtr = { + let methodName = StringName("get_queue") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns a list of the animation keys that are currently queued to play. + public final func getQueue() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_queue, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_clear_queue: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_queue") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all queued, unplayed animations. + public final func clearQueue() { + gi.object_method_bind_ptrcall(AnimationPlayer.method_clear_queue, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ speed: Double) { + withUnsafePointer(to: speed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playing_speed") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the actual playing speed of current animation or `0` if not playing. This speed is the ``speedScale`` property multiplied by `custom_speed` argument specified when calling the ``play(name:customBlend:customSpeed:fromEnd:)`` method. + /// + /// Returns a negative value if the current animation is playing backwards. + /// + public final func getPlayingSpeed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_playing_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autoplay") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autoplay() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_autoplay, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_movie_quit_on_finish_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_movie_quit_on_finish_enabled") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_movie_quit_on_finish_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_movie_quit_on_finish_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_movie_quit_on_finish_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_movie_quit_on_finish_enabled") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_movie_quit_on_finish_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AnimationPlayer.method_is_movie_quit_on_finish_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_animation_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_animation_position") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_animation_position() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_current_animation_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_animation_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_animation_length") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_animation_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_current_animation_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_seek: GDExtensionMethodBindPtr = { + let methodName = StringName("seek") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1807872683)! + } + + } + + }() + + /// Seeks the animation to the `seconds` point in time (in seconds). If `update` is `true`, the animation updates too, otherwise it updates at process time. Events between the current frame and `seconds` are skipped. + /// + /// If `updateOnly` is `true`, the method / audio / animation playback tracks will not be processed. + /// + /// > Note: Seeking to the end of the animation doesn't emit [signal AnimationMixer.animation_finished]. If you want to skip animation and emit the signal, use ``AnimationMixer/advance(delta:)``. + /// + public final func seek(seconds: Double, update: Bool = false, updateOnly: Bool = false) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: update) { pArg1 in + withUnsafePointer(to: updateOnly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_seek, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_callback") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1663839457)! + } + + } + + }() + + /// Sets the process notification in which to update animations. + public final func setProcessCallback(mode: AnimationPlayer.AnimationProcessCallback) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_process_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_callback") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4207496604)! + } + + } + + }() + + /// Returns the process notification in which to update animations. + public final func getProcessCallback() -> AnimationPlayer.AnimationProcessCallback { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_process_callback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationPlayer.AnimationProcessCallback (rawValue: _result)! + } + + fileprivate static var method_set_method_call_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_method_call_mode") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3413514846)! + } + + } + + }() + + /// Sets the call mode used for "Call Method" tracks. + public final func setMethodCallMode(_ mode: AnimationPlayer.AnimationMethodCallMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_method_call_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_method_call_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_method_call_mode") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3583380054)! + } + + } + + }() + + /// Returns the call mode used for "Call Method" tracks. + public final func getMethodCallMode() -> AnimationPlayer.AnimationMethodCallMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_method_call_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationPlayer.AnimationMethodCallMode (rawValue: _result)! + } + + fileprivate static var method_set_root: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + /// Sets the node which node path references will travel from. + public final func setRoot(path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationPlayer.method_set_root, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root") + return withUnsafePointer(to: &AnimationPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + /// Returns the node which node path references will travel from. + public final func getRoot() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(AnimationPlayer.method_get_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ name: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when ``currentAnimation`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.currentAnimationChanged.connect { name in + /// print ("caught signal") + /// } + /// ``` + public var currentAnimationChanged: Signal1 { Signal1 (target: self, signalName: "current_animation_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ oldName: StringName, _ newName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = StringName (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a queued animation plays after the previous animation finished. See also ``AnimationPlayer/queue(name:)``. + /// + /// > Note: The signal is not emitted when the animation is changed via ``AnimationPlayer/play(name:customBlend:customSpeed:fromEnd:)`` or by an ``AnimationTree``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationChanged.connect { oldName, newName in + /// print ("caught signal") + /// } + /// ``` + public var animationChanged: Signal2 { Signal2 (target: self, signalName: "animation_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationRootNode.swift b/Sources/SwiftGodot/Generated/Api/AnimationRootNode.swift new file mode 100644 index 000000000..30df63a78 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationRootNode.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for ``AnimationNode``s that hold one or multiple composite animations. Usually used for ``AnimationTree/treeRoot``. +/// +/// ``AnimationRootNode`` is a base class for ``AnimationNode``s that hold a complete animation. A complete animation refers to the output of an ``AnimationNodeOutput`` in an ``AnimationNodeBlendTree`` or the output of another ``AnimationRootNode``. Used for ``AnimationTree/treeRoot`` or in other ``AnimationRootNode``s. +/// +/// Examples of built-in root nodes include ``AnimationNodeBlendTree`` (allows blending nodes between each other using various modes), ``AnimationNodeStateMachine`` (allows to configure blending and transitions between nodes using a state machine pattern), ``AnimationNodeBlendSpace2D`` (allows linear blending between **three** ``AnimationNode``s), ``AnimationNodeBlendSpace1D`` (allows linear blending only between **two** ``AnimationNode``s). +/// +open class AnimationRootNode: AnimationNode { + override open class var godotClassName: StringName { "AnimationRootNode" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AnimationTree.swift b/Sources/SwiftGodot/Generated/Api/AnimationTree.swift new file mode 100644 index 000000000..5f2a453ac --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AnimationTree.swift @@ -0,0 +1,287 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used for advanced animation transitions in an ``AnimationPlayer``. +/// +/// A node used for advanced animation transitions in an ``AnimationPlayer``. +/// +/// > Note: When linked with an ``AnimationPlayer``, several properties and methods of the corresponding ``AnimationPlayer`` will not function as expected. Playback and transitions should be handled using only the ``AnimationTree`` and its constituent ``AnimationNode``(s). The ``AnimationPlayer`` node should be used solely for adding, deleting, and editing animations. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``animationPlayerChanged`` +open class AnimationTree: AnimationMixer { + override open class var godotClassName: StringName { "AnimationTree" } + public enum AnimationProcessCallback: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case physics = 0 // ANIMATION_PROCESS_PHYSICS + /// + case idle = 1 // ANIMATION_PROCESS_IDLE + /// + case manual = 2 // ANIMATION_PROCESS_MANUAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .physics: return ".physics" + case .idle: return ".idle" + case .manual: return ".manual" + } + + } + + } + + + /* Properties */ + + /// The root animation node of this ``AnimationTree``. See ``AnimationRootNode``. + final public var treeRoot: AnimationRootNode? { + get { + return get_tree_root () + } + + set { + set_tree_root (newValue) + } + + } + + /// The path to the ``Node`` used to evaluate the ``AnimationNode`` ``Expression`` if one is not explicitly specified internally. + final public var advanceExpressionBaseNode: NodePath { + get { + return get_advance_expression_base_node () + } + + set { + set_advance_expression_base_node (newValue) + } + + } + + /// The path to the ``AnimationPlayer`` used for animating. + final public var animPlayer: NodePath { + get { + return get_animation_player () + } + + set { + set_animation_player (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_tree_root: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tree_root") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2581683800)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tree_root(_ animationNode: AnimationRootNode?) { + withUnsafePointer(to: animationNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationTree.method_set_tree_root, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tree_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tree_root") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4110384712)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tree_root() -> AnimationRootNode? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AnimationTree.method_get_tree_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_advance_expression_base_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_advance_expression_base_node") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_advance_expression_base_node(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationTree.method_set_advance_expression_base_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_advance_expression_base_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_advance_expression_base_node") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_advance_expression_base_node() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(AnimationTree.method_get_advance_expression_base_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_animation_player: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animation_player") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_animation_player(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationTree.method_set_animation_player, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation_player: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_player") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_animation_player() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(AnimationTree.method_get_animation_player, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_callback") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1723352826)! + } + + } + + }() + + /// Sets the process notification in which to update animations. + public final func setProcessCallback(mode: AnimationTree.AnimationProcessCallback) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AnimationTree.method_set_process_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_callback") + return withUnsafePointer(to: &AnimationTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 891317132)! + } + + } + + }() + + /// Returns the process notification in which to update animations. + public final func getProcessCallback() -> AnimationTree.AnimationProcessCallback { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AnimationTree.method_get_process_callback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AnimationTree.AnimationProcessCallback (rawValue: _result)! + } + + // Signals + /// Emitted when the ``animPlayer`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.animationPlayerChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var animationPlayerChanged: SimpleSignal { SimpleSignal (target: self, signalName: "animation_player_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Area2D.swift b/Sources/SwiftGodot/Generated/Api/Area2D.swift new file mode 100644 index 000000000..662af269f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Area2D.swift @@ -0,0 +1,1761 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A region of 2D space that detects other ``CollisionObject2D``s entering or exiting it. +/// +/// ``Area2D`` is a region of 2D space defined by one or multiple ``CollisionShape2D`` or ``CollisionPolygon2D`` child nodes. It detects when other ``CollisionObject2D``s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). +/// +/// This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +/// +/// > Note: Areas and bodies created with ``PhysicsServer2D`` might not interact as expected with ``Area2D``s, and might not emit signals or track objects correctly. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``bodyShapeEntered`` +/// - ``bodyShapeExited`` +/// - ``bodyEntered`` +/// - ``bodyExited`` +/// - ``areaShapeEntered`` +/// - ``areaShapeExited`` +/// - ``areaEntered`` +/// - ``areaExited`` +open class Area2D: CollisionObject2D { + override open class var godotClassName: StringName { "Area2D" } + public enum SpaceOverride: Int64, CaseIterable, CustomDebugStringConvertible { + /// This area does not affect gravity/damping. + case disabled = 0 // SPACE_OVERRIDE_DISABLED + /// This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). + case combine = 1 // SPACE_OVERRIDE_COMBINE + /// This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. + case combineReplace = 2 // SPACE_OVERRIDE_COMBINE_REPLACE + /// This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + case replace = 3 // SPACE_OVERRIDE_REPLACE + /// This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. + case replaceCombine = 4 // SPACE_OVERRIDE_REPLACE_COMBINE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .combine: return ".combine" + case .combineReplace: return ".combineReplace" + case .replace: return ".replace" + case .replaceCombine: return ".replaceCombine" + } + + } + + } + + + /* Properties */ + + /// If `true`, the area detects bodies or areas entering and exiting it. + final public var monitoring: Bool { + get { + return is_monitoring () + } + + set { + set_monitoring (newValue) + } + + } + + /// If `true`, other monitoring areas can detect this area. + final public var monitorable: Bool { + get { + return is_monitorable () + } + + set { + set_monitorable (newValue) + } + + } + + /// The area's priority. Higher priority areas are processed first. The ``World2D``'s physics is always processed last, after all areas. + final public var priority: Int32 { + get { + return get_priority () + } + + set { + set_priority (newValue) + } + + } + + /// Override mode for gravity calculations within this area. See ``Area2D/SpaceOverride`` for possible values. + final public var gravitySpaceOverride: Area2D.SpaceOverride { + get { + return get_gravity_space_override_mode () + } + + set { + set_gravity_space_override_mode (newValue) + } + + } + + /// If `true`, gravity is calculated from a point (set via ``gravityPointCenter``). See also ``gravitySpaceOverride``. + final public var gravityPoint: Bool { + get { + return is_gravity_a_point () + } + + set { + set_gravity_is_point (newValue) + } + + } + + /// The distance at which the gravity strength is equal to ``gravity``. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the ``gravity`` to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on. + /// + /// The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + /// + final public var gravityPointUnitDistance: Double { + get { + return get_gravity_point_unit_distance () + } + + set { + set_gravity_point_unit_distance (newValue) + } + + } + + /// If gravity is a point (see ``gravityPoint``), this will be the point of attraction. + final public var gravityPointCenter: Vector2 { + get { + return get_gravity_point_center () + } + + set { + set_gravity_point_center (newValue) + } + + } + + /// The area's gravity vector (not normalized). + final public var gravityDirection: Vector2 { + get { + return get_gravity_direction () + } + + set { + set_gravity_direction (newValue) + } + + } + + /// The area's gravity intensity (in pixels per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. + final public var gravity: Double { + get { + return get_gravity () + } + + set { + set_gravity (newValue) + } + + } + + /// Override mode for linear damping calculations within this area. See ``Area2D/SpaceOverride`` for possible values. + final public var linearDampSpaceOverride: Area2D.SpaceOverride { + get { + return get_linear_damp_space_override_mode () + } + + set { + set_linear_damp_space_override_mode (newValue) + } + + } + + /// The rate at which objects stop moving in this area. Represents the linear velocity lost per second. + /// + /// See ``ProjectSettings/physics/2d/defaultLinearDamp`` for more details about damping. + /// + final public var linearDamp: Double { + get { + return get_linear_damp () + } + + set { + set_linear_damp (newValue) + } + + } + + /// Override mode for angular damping calculations within this area. See ``Area2D/SpaceOverride`` for possible values. + final public var angularDampSpaceOverride: Area2D.SpaceOverride { + get { + return get_angular_damp_space_override_mode () + } + + set { + set_angular_damp_space_override_mode (newValue) + } + + } + + /// The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. + /// + /// See ``ProjectSettings/physics/2d/defaultAngularDamp`` for more details about damping. + /// + final public var angularDamp: Double { + get { + return get_angular_damp () + } + + set { + set_angular_damp (newValue) + } + + } + + /// If `true`, the area's audio bus overrides the default audio bus. + final public var audioBusOverride: Bool { + get { + return is_overriding_audio_bus () + } + + set { + set_audio_bus_override (newValue) + } + + } + + /// The name of the area's audio bus. + final public var audioBusName: StringName { + get { + return get_audio_bus_name () + } + + set { + set_audio_bus_name (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gravity_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2879900038)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_space_override_mode(_ spaceOverrideMode: Area2D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3990256304)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_space_override_mode() -> Area2D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area2D.method_get_gravity_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area2D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_gravity_is_point: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_is_point") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_is_point(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity_is_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_gravity_a_point: GDExtensionMethodBindPtr = { + let methodName = StringName("is_gravity_a_point") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_gravity_a_point() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_is_gravity_a_point, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_point_unit_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_point_unit_distance") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_point_unit_distance(_ distanceScale: Double) { + withUnsafePointer(to: distanceScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity_point_unit_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_point_unit_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_point_unit_distance") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_point_unit_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area2D.method_get_gravity_point_unit_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_point_center: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_point_center") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_point_center(_ center: Vector2) { + withUnsafePointer(to: center) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity_point_center, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_point_center: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_point_center") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_point_center() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Area2D.method_get_gravity_point_center, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_direction") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_direction(_ direction: Vector2) { + withUnsafePointer(to: direction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_direction") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_direction() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Area2D.method_get_gravity_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity(_ gravity: Double) { + withUnsafePointer(to: gravity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_gravity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area2D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2879900038)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp_space_override_mode(_ spaceOverrideMode: Area2D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_linear_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3990256304)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp_space_override_mode() -> Area2D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area2D.method_get_linear_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area2D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2879900038)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp_space_override_mode(_ spaceOverrideMode: Area2D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_angular_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp_space_override_mode") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3990256304)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp_space_override_mode() -> Area2D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area2D.method_get_angular_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area2D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp(_ linearDamp: Double) { + withUnsafePointer(to: linearDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_linear_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area2D.method_get_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp(_ angularDamp: Double) { + withUnsafePointer(to: angularDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_angular_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area2D.method_get_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_priority") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_priority") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Area2D.method_get_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_monitoring: GDExtensionMethodBindPtr = { + let methodName = StringName("set_monitoring") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_monitoring(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_monitoring, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_monitoring: GDExtensionMethodBindPtr = { + let methodName = StringName("is_monitoring") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_monitoring() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_is_monitoring, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_monitorable") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_monitorable(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_monitorable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_monitorable") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_monitorable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_is_monitorable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_overlapping_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_overlapping_bodies") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of intersecting ``PhysicsBody2D``s and ``TileMap``s. The overlapping body's ``CollisionObject2D/collisionLayer`` must be part of this area's ``CollisionObject2D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func getOverlappingBodies() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Area2D.method_get_overlapping_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_overlapping_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_overlapping_areas") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of intersecting ``Area2D``s. The overlapping area's ``CollisionObject2D/collisionLayer`` must be part of this area's ``CollisionObject2D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func getOverlappingAreas() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Area2D.method_get_overlapping_areas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_has_overlapping_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("has_overlapping_bodies") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if intersecting any ``PhysicsBody2D``s or ``TileMap``s, otherwise returns `false`. The overlapping body's ``CollisionObject2D/collisionLayer`` must be part of this area's ``CollisionObject2D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func hasOverlappingBodies() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_has_overlapping_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_overlapping_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("has_overlapping_areas") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if intersecting any ``Area2D``s, otherwise returns `false`. The overlapping area's ``CollisionObject2D/collisionLayer`` must be part of this area's ``CollisionObject2D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func hasOverlappingAreas() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_has_overlapping_areas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_overlaps_body: GDExtensionMethodBindPtr = { + let methodName = StringName("overlaps_body") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given physics body intersects or overlaps this ``Area2D``, `false` otherwise. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + /// + /// The `body` argument can either be a ``PhysicsBody2D`` or a ``TileMap`` instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. + /// + public final func overlapsBody(_ body: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_overlaps_body, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_overlaps_area: GDExtensionMethodBindPtr = { + let methodName = StringName("overlaps_area") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given ``Area2D`` intersects or overlaps this ``Area2D``, `false` otherwise. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + /// + public final func overlapsArea(_ area: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: area?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_overlaps_area, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_audio_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_audio_bus_name") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_audio_bus_name(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_audio_bus_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_audio_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_audio_bus_name") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_audio_bus_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Area2D.method_get_audio_bus_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_audio_bus_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_audio_bus_override") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_audio_bus_override(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area2D.method_set_audio_bus_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_overriding_audio_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("is_overriding_audio_bus") + return withUnsafePointer(to: &Area2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_overriding_audio_bus() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area2D.method_is_overriding_audio_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node2D, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node2D ?? Node2D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape2D`` of the received `body` enters a shape of this area. `body` can be a ``PhysicsBody2D`` or a ``TileMap``. ``TileMap``s are detected if their ``TileSet`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// `localShapeIndex` and `bodyShapeIndex` contain indices of the interacting shapes from this area and the interacting body, respectively. `bodyRid` contains the ``RID`` of the body. These values can be used with the ``PhysicsServer2D``. + /// + /// **Example of getting the** ``CollisionShape2D`` **node from the shape index:** + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeEntered.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeEntered: Signal1 { Signal1 (target: self, signalName: "body_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node2D, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node2D ?? Node2D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape2D`` of the received `body` exits a shape of this area. `body` can be a ``PhysicsBody2D`` or a ``TileMap``. ``TileMap``s are detected if their ``TileSet`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// See also [signal body_shape_entered]. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeExited.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeExited: Signal2 { Signal2 (target: self, signalName: "body_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node2D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node2D ?? Node2D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `body` enters this area. `body` can be a ``PhysicsBody2D`` or a ``TileMap``. ``TileMap``s are detected if their ``TileSet`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyEntered.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyEntered: Signal3 { Signal3 (target: self, signalName: "body_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node2D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node2D ?? Node2D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `body` exits this area. `body` can be a ``PhysicsBody2D`` or a ``TileMap``. ``TileMap``s are detected if their ``TileSet`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyExited.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyExited: Signal4 { Signal4 (target: self, signalName: "body_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ areaRid: RID, _ area: Area2D, _ areaShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Area2D ?? Area2D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape2D`` of the received `area` enters a shape of this area. Requires ``monitoring`` to be set to `true`. + /// + /// `localShapeIndex` and `areaShapeIndex` contain indices of the interacting shapes from this area and the other area, respectively. `areaRid` contains the ``RID`` of the other area. These values can be used with the ``PhysicsServer2D``. + /// + /// **Example of getting the** ``CollisionShape2D`` **node from the shape index:** + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaShapeEntered.connect { areaRid, area, areaShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var areaShapeEntered: Signal5 { Signal5 (target: self, signalName: "area_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ areaRid: RID, _ area: Area2D, _ areaShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Area2D ?? Area2D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape2D`` of the received `area` exits a shape of this area. Requires ``monitoring`` to be set to `true`. + /// + /// See also [signal area_shape_entered]. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaShapeExited.connect { areaRid, area, areaShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var areaShapeExited: Signal6 { Signal6 (target: self, signalName: "area_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ area: Area2D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Area2D ?? Area2D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `area` enters this area. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaEntered.connect { area in + /// print ("caught signal") + /// } + /// ``` + public var areaEntered: Signal7 { Signal7 (target: self, signalName: "area_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal8/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal8/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal8/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal8 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal8 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ area: Area2D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Area2D ?? Area2D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `area` exits this area. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaExited.connect { area in + /// print ("caught signal") + /// } + /// ``` + public var areaExited: Signal8 { Signal8 (target: self, signalName: "area_exited") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Area3D.swift b/Sources/SwiftGodot/Generated/Api/Area3D.swift new file mode 100644 index 000000000..ae4daa8c1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Area3D.swift @@ -0,0 +1,2164 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A region of 3D space that detects other ``CollisionObject3D``s entering or exiting it. +/// +/// ``Area3D`` is a region of 3D space defined by one or multiple ``CollisionShape3D`` or ``CollisionPolygon3D`` child nodes. It detects when other ``CollisionObject3D``s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it). +/// +/// This node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses. +/// +/// > Note: Areas and bodies created with ``PhysicsServer3D`` might not interact as expected with ``Area3D``s, and might not emit signals or track objects correctly. +/// +/// > Warning: Using a ``ConcavePolygonShape3D`` inside a ``CollisionShape3D`` child of this node (created e.g. by using the **Create Trimesh Collision Sibling** option in the **Mesh** menu that appears when selecting a ``MeshInstance3D`` node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple ``ConvexPolygonShape3D``s or primitive shapes like ``BoxShape3D``, or in some cases it may be replaceable by a ``CollisionPolygon3D``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``bodyShapeEntered`` +/// - ``bodyShapeExited`` +/// - ``bodyEntered`` +/// - ``bodyExited`` +/// - ``areaShapeEntered`` +/// - ``areaShapeExited`` +/// - ``areaEntered`` +/// - ``areaExited`` +open class Area3D: CollisionObject3D { + override open class var godotClassName: StringName { "Area3D" } + public enum SpaceOverride: Int64, CaseIterable, CustomDebugStringConvertible { + /// This area does not affect gravity/damping. + case disabled = 0 // SPACE_OVERRIDE_DISABLED + /// This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order). + case combine = 1 // SPACE_OVERRIDE_COMBINE + /// This area adds its gravity/damping values to whatever has been calculated so far (in ``priority`` order), ignoring any lower priority areas. + case combineReplace = 2 // SPACE_OVERRIDE_COMBINE_REPLACE + /// This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. + case replace = 3 // SPACE_OVERRIDE_REPLACE + /// This area replaces any gravity/damping calculated so far (in ``priority`` order), but keeps calculating the rest of the areas. + case replaceCombine = 4 // SPACE_OVERRIDE_REPLACE_COMBINE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .combine: return ".combine" + case .combineReplace: return ".combineReplace" + case .replace: return ".replace" + case .replaceCombine: return ".replaceCombine" + } + + } + + } + + + /* Properties */ + + /// If `true`, the area detects bodies or areas entering and exiting it. + final public var monitoring: Bool { + get { + return is_monitoring () + } + + set { + set_monitoring (newValue) + } + + } + + /// If `true`, other monitoring areas can detect this area. + final public var monitorable: Bool { + get { + return is_monitorable () + } + + set { + set_monitorable (newValue) + } + + } + + /// The area's priority. Higher priority areas are processed first. The ``World3D``'s physics is always processed last, after all areas. + final public var priority: Int32 { + get { + return get_priority () + } + + set { + set_priority (newValue) + } + + } + + /// Override mode for gravity calculations within this area. See ``Area3D/SpaceOverride`` for possible values. + final public var gravitySpaceOverride: Area3D.SpaceOverride { + get { + return get_gravity_space_override_mode () + } + + set { + set_gravity_space_override_mode (newValue) + } + + } + + /// If `true`, gravity is calculated from a point (set via ``gravityPointCenter``). See also ``gravitySpaceOverride``. + final public var gravityPoint: Bool { + get { + return is_gravity_a_point () + } + + set { + set_gravity_is_point (newValue) + } + + } + + /// The distance at which the gravity strength is equal to ``gravity``. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the ``gravity`` to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on. + /// + /// The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + /// + final public var gravityPointUnitDistance: Double { + get { + return get_gravity_point_unit_distance () + } + + set { + set_gravity_point_unit_distance (newValue) + } + + } + + /// If gravity is a point (see ``gravityPoint``), this will be the point of attraction. + final public var gravityPointCenter: Vector3 { + get { + return get_gravity_point_center () + } + + set { + set_gravity_point_center (newValue) + } + + } + + /// The area's gravity vector (not normalized). + final public var gravityDirection: Vector3 { + get { + return get_gravity_direction () + } + + set { + set_gravity_direction (newValue) + } + + } + + /// The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. + final public var gravity: Double { + get { + return get_gravity () + } + + set { + set_gravity (newValue) + } + + } + + /// Override mode for linear damping calculations within this area. See ``Area3D/SpaceOverride`` for possible values. + final public var linearDampSpaceOverride: Area3D.SpaceOverride { + get { + return get_linear_damp_space_override_mode () + } + + set { + set_linear_damp_space_override_mode (newValue) + } + + } + + /// The rate at which objects stop moving in this area. Represents the linear velocity lost per second. + /// + /// See ``ProjectSettings/physics/3d/defaultLinearDamp`` for more details about damping. + /// + final public var linearDamp: Double { + get { + return get_linear_damp () + } + + set { + set_linear_damp (newValue) + } + + } + + /// Override mode for angular damping calculations within this area. See ``Area3D/SpaceOverride`` for possible values. + final public var angularDampSpaceOverride: Area3D.SpaceOverride { + get { + return get_angular_damp_space_override_mode () + } + + set { + set_angular_damp_space_override_mode (newValue) + } + + } + + /// The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. + /// + /// See ``ProjectSettings/physics/3d/defaultAngularDamp`` for more details about damping. + /// + final public var angularDamp: Double { + get { + return get_angular_damp () + } + + set { + set_angular_damp (newValue) + } + + } + + /// The magnitude of area-specific wind force. + /// + /// > Note: This wind force only applies to ``SoftBody3D`` nodes. Other physics bodies are currently not affected by wind. + /// + final public var windForceMagnitude: Double { + get { + return get_wind_force_magnitude () + } + + set { + set_wind_force_magnitude (newValue) + } + + } + + /// The exponential rate at which wind force decreases with distance from its origin. + /// + /// > Note: This wind force only applies to ``SoftBody3D`` nodes. Other physics bodies are currently not affected by wind. + /// + final public var windAttenuationFactor: Double { + get { + return get_wind_attenuation_factor () + } + + set { + set_wind_attenuation_factor (newValue) + } + + } + + /// The ``Node3D`` which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the ``Node3D``'s local transform, and its origin is the origin of the ``Node3D``'s local transform. + /// + /// > Note: This wind force only applies to ``SoftBody3D`` nodes. Other physics bodies are currently not affected by wind. + /// + final public var windSourcePath: NodePath { + get { + return get_wind_source_path () + } + + set { + set_wind_source_path (newValue) + } + + } + + /// If `true`, the area's audio bus overrides the default audio bus. + final public var audioBusOverride: Bool { + get { + return is_overriding_audio_bus () + } + + set { + set_audio_bus_override (newValue) + } + + } + + /// The name of the area's audio bus. + final public var audioBusName: StringName { + get { + return get_audio_bus_name () + } + + set { + set_audio_bus_name (newValue) + } + + } + + /// If `true`, the area applies reverb to its associated audio. + final public var reverbBusEnabled: Bool { + get { + return is_using_reverb_bus () + } + + set { + set_use_reverb_bus (newValue) + } + + } + + /// The name of the reverb bus to use for this area's associated audio. + final public var reverbBusName: StringName { + get { + return get_reverb_bus_name () + } + + set { + set_reverb_bus_name (newValue) + } + + } + + /// The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision. + final public var reverbBusAmount: Double { + get { + return get_reverb_amount () + } + + set { + set_reverb_amount (newValue) + } + + } + + /// The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision. + final public var reverbBusUniformity: Double { + get { + return get_reverb_uniformity () + } + + set { + set_reverb_uniformity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gravity_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311433571)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_space_override_mode(_ spaceOverrideMode: Area3D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 958191869)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_space_override_mode() -> Area3D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area3D.method_get_gravity_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area3D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_gravity_is_point: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_is_point") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_is_point(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity_is_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_gravity_a_point: GDExtensionMethodBindPtr = { + let methodName = StringName("is_gravity_a_point") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_gravity_a_point() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_is_gravity_a_point, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_point_unit_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_point_unit_distance") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_point_unit_distance(_ distanceScale: Double) { + withUnsafePointer(to: distanceScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity_point_unit_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_point_unit_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_point_unit_distance") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_point_unit_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_gravity_point_unit_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_point_center: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_point_center") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_point_center(_ center: Vector3) { + withUnsafePointer(to: center) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity_point_center, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_point_center: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_point_center") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_point_center() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Area3D.method_get_gravity_point_center, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_direction") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_direction(_ direction: Vector3) { + withUnsafePointer(to: direction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_direction") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_direction() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Area3D.method_get_gravity_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity(_ gravity: Double) { + withUnsafePointer(to: gravity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_gravity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311433571)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp_space_override_mode(_ spaceOverrideMode: Area3D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_linear_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 958191869)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp_space_override_mode() -> Area3D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area3D.method_get_linear_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area3D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311433571)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp_space_override_mode(_ spaceOverrideMode: Area3D.SpaceOverride) { + withUnsafePointer(to: spaceOverrideMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_angular_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp_space_override_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp_space_override_mode") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 958191869)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp_space_override_mode() -> Area3D.SpaceOverride { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Area3D.method_get_angular_damp_space_override_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Area3D.SpaceOverride (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp(_ angularDamp: Double) { + withUnsafePointer(to: angularDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_angular_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp(_ linearDamp: Double) { + withUnsafePointer(to: linearDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_linear_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_priority") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_priority") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Area3D.method_get_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wind_force_magnitude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wind_force_magnitude") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wind_force_magnitude(_ windForceMagnitude: Double) { + withUnsafePointer(to: windForceMagnitude) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_wind_force_magnitude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wind_force_magnitude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wind_force_magnitude") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wind_force_magnitude() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_wind_force_magnitude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wind_attenuation_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wind_attenuation_factor") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wind_attenuation_factor(_ windAttenuationFactor: Double) { + withUnsafePointer(to: windAttenuationFactor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_wind_attenuation_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wind_attenuation_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wind_attenuation_factor") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wind_attenuation_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_wind_attenuation_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wind_source_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wind_source_path") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wind_source_path(_ windSourcePath: NodePath) { + withUnsafePointer(to: windSourcePath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_wind_source_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wind_source_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wind_source_path") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wind_source_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Area3D.method_get_wind_source_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_monitorable") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_monitorable(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_monitorable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_monitorable") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_monitorable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_is_monitorable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_monitoring: GDExtensionMethodBindPtr = { + let methodName = StringName("set_monitoring") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_monitoring(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_monitoring, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_monitoring: GDExtensionMethodBindPtr = { + let methodName = StringName("is_monitoring") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_monitoring() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_is_monitoring, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_overlapping_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_overlapping_bodies") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of intersecting ``PhysicsBody3D``s and ``GridMap``s. The overlapping body's ``CollisionObject3D/collisionLayer`` must be part of this area's ``CollisionObject3D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func getOverlappingBodies() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Area3D.method_get_overlapping_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_overlapping_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_overlapping_areas") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of intersecting ``Area3D``s. The overlapping area's ``CollisionObject3D/collisionLayer`` must be part of this area's ``CollisionObject3D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func getOverlappingAreas() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Area3D.method_get_overlapping_areas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_has_overlapping_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("has_overlapping_bodies") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if intersecting any ``PhysicsBody3D``s or ``GridMap``s, otherwise returns `false`. The overlapping body's ``CollisionObject3D/collisionLayer`` must be part of this area's ``CollisionObject3D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func hasOverlappingBodies() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_has_overlapping_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_overlapping_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("has_overlapping_areas") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if intersecting any ``Area3D``s, otherwise returns `false`. The overlapping area's ``CollisionObject3D/collisionLayer`` must be part of this area's ``CollisionObject3D/collisionMask`` in order to be detected. + /// + /// For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + /// + public final func hasOverlappingAreas() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_has_overlapping_areas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_overlaps_body: GDExtensionMethodBindPtr = { + let methodName = StringName("overlaps_body") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given physics body intersects or overlaps this ``Area3D``, `false` otherwise. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + /// + /// The `body` argument can either be a ``PhysicsBody3D`` or a ``GridMap`` instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. + /// + public final func overlapsBody(_ body: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_overlaps_body, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_overlaps_area: GDExtensionMethodBindPtr = { + let methodName = StringName("overlaps_area") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given ``Area3D`` intersects or overlaps this ``Area3D``, `false` otherwise. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + /// + public final func overlapsArea(_ area: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: area?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_overlaps_area, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_audio_bus_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_audio_bus_override") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_audio_bus_override(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_audio_bus_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_overriding_audio_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("is_overriding_audio_bus") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_overriding_audio_bus() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_is_overriding_audio_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_audio_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_audio_bus_name") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_audio_bus_name(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_audio_bus_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_audio_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_audio_bus_name") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_audio_bus_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Area3D.method_get_audio_bus_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_use_reverb_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_reverb_bus") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_reverb_bus(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_use_reverb_bus, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_reverb_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_reverb_bus") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_reverb_bus() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Area3D.method_is_using_reverb_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reverb_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reverb_bus_name") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reverb_bus_name(_ name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_reverb_bus_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_reverb_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reverb_bus_name") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_reverb_bus_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Area3D.method_get_reverb_bus_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_reverb_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reverb_amount") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reverb_amount(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_reverb_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_reverb_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reverb_amount") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_reverb_amount() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_reverb_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reverb_uniformity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reverb_uniformity") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reverb_uniformity(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Area3D.method_set_reverb_uniformity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_reverb_uniformity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reverb_uniformity") + return withUnsafePointer(to: &Area3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_reverb_uniformity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Area3D.method_get_reverb_uniformity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node3D, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node3D ?? Node3D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape3D`` of the received `body` enters a shape of this area. `body` can be a ``PhysicsBody3D`` or a ``GridMap``. ``GridMap``s are detected if their ``MeshLibrary`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// `localShapeIndex` and `bodyShapeIndex` contain indices of the interacting shapes from this area and the interacting body, respectively. `bodyRid` contains the ``RID`` of the body. These values can be used with the ``PhysicsServer3D``. + /// + /// **Example of getting the** ``CollisionShape3D`` **node from the shape index:** + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeEntered.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeEntered: Signal1 { Signal1 (target: self, signalName: "body_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node3D, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node3D ?? Node3D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape3D`` of the received `body` exits a shape of this area. `body` can be a ``PhysicsBody3D`` or a ``GridMap``. ``GridMap``s are detected if their ``MeshLibrary`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// See also [signal body_shape_entered]. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeExited.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeExited: Signal2 { Signal2 (target: self, signalName: "body_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node3D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node3D ?? Node3D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `body` enters this area. `body` can be a ``PhysicsBody3D`` or a ``GridMap``. ``GridMap``s are detected if their ``MeshLibrary`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyEntered.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyEntered: Signal3 { Signal3 (target: self, signalName: "body_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node3D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node3D ?? Node3D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `body` exits this area. `body` can be a ``PhysicsBody3D`` or a ``GridMap``. ``GridMap``s are detected if their ``MeshLibrary`` has collision shapes configured. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyExited.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyExited: Signal4 { Signal4 (target: self, signalName: "body_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ areaRid: RID, _ area: Area3D, _ areaShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Area3D ?? Area3D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape3D`` of the received `area` enters a shape of this area. Requires ``monitoring`` to be set to `true`. + /// + /// `localShapeIndex` and `areaShapeIndex` contain indices of the interacting shapes from this area and the other area, respectively. `areaRid` contains the ``RID`` of the other area. These values can be used with the ``PhysicsServer3D``. + /// + /// **Example of getting the** ``CollisionShape3D`` **node from the shape index:** + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaShapeEntered.connect { areaRid, area, areaShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var areaShapeEntered: Signal5 { Signal5 (target: self, signalName: "area_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ areaRid: RID, _ area: Area3D, _ areaShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Area3D ?? Area3D (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``Shape3D`` of the received `area` exits a shape of this area. Requires ``monitoring`` to be set to `true`. + /// + /// See also [signal area_shape_entered]. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaShapeExited.connect { areaRid, area, areaShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var areaShapeExited: Signal6 { Signal6 (target: self, signalName: "area_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ area: Area3D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Area3D ?? Area3D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `area` enters this area. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaEntered.connect { area in + /// print ("caught signal") + /// } + /// ``` + public var areaEntered: Signal7 { Signal7 (target: self, signalName: "area_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal8/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal8/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal8/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal8 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal8 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ area: Area3D) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Area3D ?? Area3D (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the received `area` exits this area. Requires ``monitoring`` to be set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.areaExited.connect { area in + /// print ("caught signal") + /// } + /// ``` + public var areaExited: Signal8 { Signal8 (target: self, signalName: "area_exited") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ArrayMesh.swift b/Sources/SwiftGodot/Generated/Api/ArrayMesh.swift new file mode 100644 index 000000000..a7e7159e3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ArrayMesh.swift @@ -0,0 +1,729 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// ``Mesh`` type that provides utility for constructing a surface from arrays. +/// +/// The ``ArrayMesh`` is used to construct a ``Mesh`` by specifying the attributes as arrays. +/// +/// The most basic example is the creation of a single triangle: +/// +/// The ``MeshInstance3D`` is ready to be added to the ``SceneTree`` to be shown. +/// +/// See also ``ImmediateMesh``, ``MeshDataTool`` and ``SurfaceTool`` for procedural geometry generation. +/// +/// > Note: Godot uses clockwise winding order for front faces of triangle primitive modes. +/// +open class ArrayMesh: Mesh { + override open class var godotClassName: StringName { "ArrayMesh" } + + /* Properties */ + + /// Sets the blend shape mode to one of ``Mesh.BlendShapeMode``. + final public var blendShapeMode: Mesh.BlendShapeMode { + get { + return get_blend_shape_mode () + } + + set { + set_blend_shape_mode (newValue) + } + + } + + /// Overrides the ``AABB`` with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. + final public var customAabb: AABB { + get { + return get_custom_aabb () + } + + set { + set_custom_aabb (newValue) + } + + } + + /// An optional mesh which is used for rendering shadows and can be used for the depth prepass. Can be used to increase performance of shadow rendering by using a mesh that only contains vertex position data (without normals, UVs, colors, etc.). + final public var shadowMesh: ArrayMesh? { + get { + return get_shadow_mesh () + } + + set { + set_shadow_mesh (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_blend_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("add_blend_shape") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Adds name for a blend shape that will be added with ``addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``. Must be called before surface is added. + public final func addBlendShape(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_add_blend_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_count") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of blend shapes that the ``ArrayMesh`` holds. + public final func getBlendShapeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ArrayMesh.method_get_blend_shape_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_blend_shape_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_name") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the name of the blend shape at this index. + public final func getBlendShapeName(index: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_get_blend_shape_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_blend_shape_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_shape_name") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780747571)! + } + + } + + }() + + /// Sets the name of the blend shape at this index. + public final func setBlendShapeName(index: Int32, name: StringName) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_set_blend_shape_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear_blend_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_blend_shapes") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all blend shapes from this ``ArrayMesh``. + public final func clearBlendShapes() { + gi.object_method_bind_ptrcall(ArrayMesh.method_clear_blend_shapes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_shape_mode") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 227983991)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_shape_mode(_ mode: Mesh.BlendShapeMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_set_blend_shape_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_mode") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 836485024)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_shape_mode() -> Mesh.BlendShapeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ArrayMesh.method_get_blend_shape_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Mesh.BlendShapeMode (rawValue: _result)! + } + + fileprivate static var method_add_surface_from_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("add_surface_from_arrays") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1796411378)! + } + + } + + }() + + /// Creates a new surface. ``Mesh/getSurfaceCount()`` will become the `surf_idx` for this new surface. + /// + /// Surfaces are created to be rendered using a `primitive`, which may be any of the values defined in ``Mesh.PrimitiveType``. + /// + /// The `arrays` argument is an array of arrays. Each of the ``Mesh/ArrayType/max`` elements contains an array with some of the mesh data for this surface as described by the corresponding member of ``Mesh.ArrayType`` or `null` if it is not used by the surface. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for ``Mesh/ArrayType/index`` if it is used. + /// + /// The `blendShapes` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as `arrays`, but ``Mesh/ArrayType/vertex``, ``Mesh/ArrayType/normal``, and ``Mesh/ArrayType/tangent`` are set if and only if they are set in `arrays` and all other entries are `null`. + /// + /// The `lods` argument is a dictionary with float keys and ``PackedInt32Array`` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the ``Mesh/ArrayType/index`` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. + /// + /// The `flags` argument is the bitwise or of, as required: One value of ``Mesh.ArrayCustomFormat`` left shifted by `ARRAY_FORMAT_CUSTOMn_SHIFT` for each custom channel in use, ``Mesh/ArrayFormat/flagUseDynamicUpdate``, ``Mesh/ArrayFormat/flagUse8BoneWeights``, or ``Mesh/ArrayFormat/flagUsesEmptyVertexArray``. + /// + /// > Note: When using indices, it is recommended to only use points, lines, or triangles. + /// + public final func addSurfaceFromArrays(primitive: Mesh.PrimitiveType, arrays: GArray, blendShapes: VariantCollection = VariantCollection (), lods: GDictionary = GDictionary (), flags: Mesh.ArrayFormat = []) { + withUnsafePointer(to: primitive.rawValue) { pArg0 in + withUnsafePointer(to: arrays.content) { pArg1 in + withUnsafePointer(to: blendShapes.array.content) { pArg2 in + withUnsafePointer(to: lods.content) { pArg3 in + withUnsafePointer(to: flags.rawValue) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_add_surface_from_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_clear_surfaces: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_surfaces") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all surfaces from this ``ArrayMesh``. + public final func clearSurfaces() { + gi.object_method_bind_ptrcall(ArrayMesh.method_clear_surfaces, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_surface_update_vertex_region: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_update_vertex_region") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3837166854)! + } + + } + + }() + + /// + public final func surfaceUpdateVertexRegion(surfIdx: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_update_vertex_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_surface_update_attribute_region: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_update_attribute_region") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3837166854)! + } + + } + + }() + + /// + public final func surfaceUpdateAttributeRegion(surfIdx: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_update_attribute_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_surface_update_skin_region: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_update_skin_region") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3837166854)! + } + + } + + }() + + /// + public final func surfaceUpdateSkinRegion(surfIdx: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_update_skin_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_surface_get_array_len: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_array_len") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the length in vertices of the vertex array in the requested surface (see ``addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``). + public final func surfaceGetArrayLen(surfIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_get_array_len, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_surface_get_array_index_len: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_array_index_len") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the length in indices of the index array in the requested surface (see ``addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``). + public final func surfaceGetArrayIndexLen(surfIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_get_array_index_len, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_surface_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_format") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3718287884)! + } + + } + + }() + + /// Returns the format mask of the requested surface (see ``addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``). + public final func surfaceGetFormat(surfIdx: Int32) -> Mesh.ArrayFormat { + var _result: Mesh.ArrayFormat = Mesh.ArrayFormat () + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_get_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_surface_get_primitive_type: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_primitive_type") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4141943888)! + } + + } + + }() + + /// Returns the primitive type of the requested surface (see ``addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``). + public final func surfaceGetPrimitiveType(surfIdx: Int32) -> Mesh.PrimitiveType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_get_primitive_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Mesh.PrimitiveType (rawValue: _result)! + } + + fileprivate static var method_surface_find_by_name: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_find_by_name") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the index of the first surface with this name held within this ``ArrayMesh``. If none are found, -1 is returned. + public final func surfaceFindByName(_ name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_find_by_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_surface_set_name: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_name") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets a name for a given surface. + public final func surfaceSetName(surfIdx: Int32, name: String) { + withUnsafePointer(to: surfIdx) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_set_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_surface_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_name") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Gets the name assigned to this surface. + public final func surfaceGetName(surfIdx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_surface_get_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_regen_normal_maps: GDExtensionMethodBindPtr = { + let methodName = StringName("regen_normal_maps") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Regenerates tangents for each of the ``ArrayMesh``'s surfaces. + public final func regenNormalMaps() { + gi.object_method_bind_ptrcall(ArrayMesh.method_regen_normal_maps, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_lightmap_unwrap: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_unwrap") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1476641071)! + } + + } + + }() + + /// Performs a UV unwrap on the ``ArrayMesh`` to prepare the mesh for lightmapping. + public final func lightmapUnwrap(transform: Transform3D, texelSize: Double) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: texelSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_lightmap_unwrap, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_aabb") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_set_custom_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_aabb") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(ArrayMesh.method_get_custom_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_mesh") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3377897901)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_mesh(_ mesh: ArrayMesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayMesh.method_set_shadow_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_mesh") + return withUnsafePointer(to: &ArrayMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3206942465)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_mesh() -> ArrayMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ArrayMesh.method_get_shadow_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ArrayOccluder3D.swift b/Sources/SwiftGodot/Generated/Api/ArrayOccluder3D.swift new file mode 100644 index 000000000..597f876f1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ArrayOccluder3D.swift @@ -0,0 +1,145 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// 3D polygon shape for use with occlusion culling in ``OccluderInstance3D``. +/// +/// ``ArrayOccluder3D`` stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to ``ArrayMesh``, but for occluders. +/// +/// See ``OccluderInstance3D``'s documentation for instructions on setting up occlusion culling. +/// +open class ArrayOccluder3D: Occluder3D { + override open class var godotClassName: StringName { "ArrayOccluder3D" } + + /* Properties */ + + /// The occluder's vertex positions in local 3D coordinates. + /// + /// > Note: The occluder is always updated after setting this value. If creating occluders procedurally, consider using ``setArrays(vertices:indices:)`` instead to avoid updating the occluder twice when it's created. + /// + final public var vertices: PackedVector3Array { + get { + return getVertices () + } + + set { + set_vertices (newValue) + } + + } + + /// The occluder's index position. Indices determine which points from the ``vertices`` array should be drawn, and in which order. + /// + /// > Note: The occluder is always updated after setting this value. If creating occluders procedurally, consider using ``setArrays(vertices:indices:)`` instead to avoid updating the occluder twice when it's created. + /// + final public var indices: PackedInt32Array { + get { + return getIndices () + } + + set { + set_indices (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("set_arrays") + return withUnsafePointer(to: &ArrayOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3233972621)! + } + + } + + }() + + /// Sets ``indices`` and ``vertices``, while updating the final occluder only once after both values are set. + public final func setArrays(vertices: PackedVector3Array, indices: PackedInt32Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: indices.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ArrayOccluder3D.method_set_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &ArrayOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertices(_ vertices: PackedVector3Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayOccluder3D.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indices") + return withUnsafePointer(to: &ArrayOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_indices(_ indices: PackedInt32Array) { + withUnsafePointer(to: indices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ArrayOccluder3D.method_set_indices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AspectRatioContainer.swift b/Sources/SwiftGodot/Generated/Api/AspectRatioContainer.swift new file mode 100644 index 000000000..d9c1269fb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AspectRatioContainer.swift @@ -0,0 +1,299 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that preserves the proportions of its child controls. +/// +/// A container type that arranges its child controls in a way that preserves their proportions automatically when the container is resized. Useful when a container has a dynamic size and the child nodes must adjust their sizes accordingly without losing their aspect ratios. +open class AspectRatioContainer: Container { + override open class var godotClassName: StringName { "AspectRatioContainer" } + public enum StretchMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The height of child controls is automatically adjusted based on the width of the container. + case widthControlsHeight = 0 // STRETCH_WIDTH_CONTROLS_HEIGHT + /// The width of child controls is automatically adjusted based on the height of the container. + case heightControlsWidth = 1 // STRETCH_HEIGHT_CONTROLS_WIDTH + /// The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio. + case fit = 2 // STRETCH_FIT + /// The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. + /// + /// When the bounding rectangle of child controls exceed the container's size and ``Control/clipContents`` is enabled, this allows to show only the container's area restricted by its own bounding rectangle. + /// + case cover = 3 // STRETCH_COVER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .widthControlsHeight: return ".widthControlsHeight" + case .heightControlsWidth: return ".heightControlsWidth" + case .fit: return ".fit" + case .cover: return ".cover" + } + + } + + } + + public enum AlignmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Aligns child controls with the beginning (left or top) of the container. + case begin = 0 // ALIGNMENT_BEGIN + /// Aligns child controls with the center of the container. + case center = 1 // ALIGNMENT_CENTER + /// Aligns child controls with the end (right or bottom) of the container. + case end = 2 // ALIGNMENT_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .begin: return ".begin" + case .center: return ".center" + case .end: return ".end" + } + + } + + } + + + /* Properties */ + + /// The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the ``stretchMode``. + final public var ratio: Double { + get { + return get_ratio () + } + + set { + set_ratio (newValue) + } + + } + + /// The stretch mode used to align child controls. + final public var stretchMode: AspectRatioContainer.StretchMode { + get { + return get_stretch_mode () + } + + set { + set_stretch_mode (newValue) + } + + } + + /// Specifies the horizontal relative position of child controls. + final public var alignmentHorizontal: AspectRatioContainer.AlignmentMode { + get { + return get_alignment_horizontal () + } + + set { + set_alignment_horizontal (newValue) + } + + } + + /// Specifies the vertical relative position of child controls. + final public var alignmentVertical: AspectRatioContainer.AlignmentMode { + get { + return get_alignment_vertical () + } + + set { + set_alignment_vertical (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ratio") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AspectRatioContainer.method_set_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ratio") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AspectRatioContainer.method_get_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stretch_mode") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1876743467)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stretch_mode(_ stretchMode: AspectRatioContainer.StretchMode) { + withUnsafePointer(to: stretchMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AspectRatioContainer.method_set_stretch_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stretch_mode") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3416449033)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stretch_mode() -> AspectRatioContainer.StretchMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AspectRatioContainer.method_get_stretch_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AspectRatioContainer.StretchMode (rawValue: _result)! + } + + fileprivate static var method_set_alignment_horizontal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alignment_horizontal") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2147829016)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alignment_horizontal(_ alignmentHorizontal: AspectRatioContainer.AlignmentMode) { + withUnsafePointer(to: alignmentHorizontal.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AspectRatioContainer.method_set_alignment_horizontal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alignment_horizontal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alignment_horizontal") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3838875429)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alignment_horizontal() -> AspectRatioContainer.AlignmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AspectRatioContainer.method_get_alignment_horizontal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AspectRatioContainer.AlignmentMode (rawValue: _result)! + } + + fileprivate static var method_set_alignment_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alignment_vertical") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2147829016)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alignment_vertical(_ alignmentVertical: AspectRatioContainer.AlignmentMode) { + withUnsafePointer(to: alignmentVertical.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AspectRatioContainer.method_set_alignment_vertical, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alignment_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alignment_vertical") + return withUnsafePointer(to: &AspectRatioContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3838875429)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alignment_vertical() -> AspectRatioContainer.AlignmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AspectRatioContainer.method_get_alignment_vertical, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AspectRatioContainer.AlignmentMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AtlasTexture.swift b/Sources/SwiftGodot/Generated/Api/AtlasTexture.swift new file mode 100644 index 000000000..0460a5176 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AtlasTexture.swift @@ -0,0 +1,260 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A texture that crops out part of another Texture2D. +/// +/// ``Texture2D`` resource that draws only part of its ``atlas`` texture, as defined by the ``region``. An additional ``margin`` can also be set, which is useful for small adjustments. +/// +/// Multiple ``AtlasTexture`` resources can be cropped from the same ``atlas``. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls. +/// +/// > Note: ``AtlasTexture`` cannot be used in an ``AnimatedTexture``, and may not tile properly in nodes such as ``TextureRect``, when inside other ``AtlasTexture`` resources. +/// +open class AtlasTexture: Texture2D { + override open class var godotClassName: StringName { "AtlasTexture" } + + /* Properties */ + + /// The texture that contains the atlas. Can be any type inheriting from ``Texture2D``, including another ``AtlasTexture``. + final public var atlas: Texture2D? { + get { + return get_atlas () + } + + set { + set_atlas (newValue) + } + + } + + /// The region used to draw the ``atlas``. + final public var region: Rect2 { + get { + return get_region () + } + + set { + set_region (newValue) + } + + } + + /// The margin around the ``region``. Useful for small adjustments. If the ``Rect2/size`` of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin. + final public var margin: Rect2 { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /// If `true`, the area outside of the ``region`` is clipped to avoid bleeding of the surrounding texture pixels. + final public var filterClip: Bool { + get { + return has_filter_clip () + } + + set { + set_filter_clip (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_atlas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_atlas") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_atlas(_ atlas: Texture2D?) { + withUnsafePointer(to: atlas?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AtlasTexture.method_set_atlas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_atlas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_atlas") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_atlas() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AtlasTexture.method_get_atlas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_region: GDExtensionMethodBindPtr = { + let methodName = StringName("set_region") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_region(_ region: Rect2) { + withUnsafePointer(to: region) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AtlasTexture.method_set_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_region: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_region() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(AtlasTexture.method_get_region, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Rect2) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AtlasTexture.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(AtlasTexture.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_clip") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_clip(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AtlasTexture.method_set_filter_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_filter_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("has_filter_clip") + return withUnsafePointer(to: &AtlasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_filter_clip() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AtlasTexture.method_has_filter_clip, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioBusLayout.swift b/Sources/SwiftGodot/Generated/Api/AudioBusLayout.swift new file mode 100644 index 000000000..652265463 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioBusLayout.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Stores information about the audio buses. +/// +/// Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See ``AudioServer`` for usage. +open class AudioBusLayout: Resource { + override open class var godotClassName: StringName { "AudioBusLayout" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffect.swift b/Sources/SwiftGodot/Generated/Api/AudioEffect.swift new file mode 100644 index 000000000..c45c76770 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffect.swift @@ -0,0 +1,59 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for audio effect resources. +/// +/// The base ``Resource`` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through ``AudioServer/addBusEffect(busIdx:effect:atPosition:)``, ``AudioServer/removeBusEffect(busIdx:effectIdx:)``, and ``AudioServer/getBusEffect(busIdx:effectIdx:)``. +/// +/// When applied on a bus, an audio effect creates a corresponding ``AudioEffectInstance``. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties. +/// +open class AudioEffect: Resource { + override open class var godotClassName: StringName { "AudioEffect" } + /* Methods */ + /// Override this method to customize the ``AudioEffectInstance`` created when this effect is applied on a bus in the editor's Audio panel, or through ``AudioServer/addBusEffect(busIdx:effect:atPosition:)``. + /// + /// > Note: It is recommended to keep a reference to the original ``AudioEffect`` in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly. + /// + @_documentation(visibility: public) + open func _instantiate() -> AudioEffectInstance? { + return AudioEffectInstance () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_instantiate": + return _AudioEffect_proxy_instantiate + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AudioEffect_proxy_instantiate (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._instantiate () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // AudioEffectInstance +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectAmplify.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectAmplify.swift new file mode 100644 index 000000000..a19a494bc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectAmplify.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds an amplifying audio effect to an audio bus. +/// +/// Increases or decreases the volume being routed through the audio bus. +open class AudioEffectAmplify: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectAmplify" } + + /* Properties */ + + /// Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. + final public var volumeDb: Double { + get { + return get_volume_db () + } + + set { + set_volume_db (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volume_db") + return withUnsafePointer(to: &AudioEffectAmplify.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volume_db(_ volume: Double) { + withUnsafePointer(to: volume) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectAmplify.method_set_volume_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volume_db") + return withUnsafePointer(to: &AudioEffectAmplify.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volume_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectAmplify.method_get_volume_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectBandLimitFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectBandLimitFilter.swift new file mode 100644 index 000000000..d0495ca40 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectBandLimitFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a band limit filter to the audio bus. +/// +/// Limits the frequencies in a range around the ``AudioEffectFilter/cutoffHz`` and allows frequencies outside of this range to pass. +open class AudioEffectBandLimitFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectBandLimitFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectBandPassFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectBandPassFilter.swift new file mode 100644 index 000000000..4291b081f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectBandPassFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a band pass filter to the audio bus. +/// +/// Attenuates the frequencies inside of a range around the ``AudioEffectFilter/cutoffHz`` and cuts frequencies outside of this band. +open class AudioEffectBandPassFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectBandPassFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectCapture.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectCapture.swift new file mode 100644 index 000000000..a89506792 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectCapture.swift @@ -0,0 +1,243 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Captures audio from an audio bus in real-time. +/// +/// AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. +/// +/// Application code should consume these audio frames from this ring buffer using ``getBuffer(frames:)`` and process it as needed, for example to capture data from an ``AudioStreamMicrophone``, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. +/// +/// Unlike ``AudioEffectRecord``, this effect only returns the raw audio samples instead of encoding them into an ``AudioStream``. +/// +open class AudioEffectCapture: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectCapture" } + + /* Properties */ + + /// Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. + final public var bufferLength: Double { + get { + return get_buffer_length () + } + + set { + set_buffer_length (newValue) + } + + } + + /* Methods */ + fileprivate static var method_can_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("can_get_buffer") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if at least `frames` audio frames are available to read in the internal ring buffer. + public final func canGetBuffer(frames: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCapture.method_can_get_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2649534757)! + } + + } + + }() + + /// Gets the next `frames` audio samples from the internal ring buffer. + /// + /// Returns a ``PackedVector2Array`` containing exactly `frames` audio samples if available, or an empty ``PackedVector2Array`` if insufficient data was available. + /// + /// The samples are signed floating-point PCM between `-1` and `1`. You will have to scale them if you want to use them as 8 or 16-bit integer samples. (`v = 0x7fff * samples[0].x`) + /// + public final func getBuffer(frames: Int32) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_buffer") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the internal ring buffer. + /// + /// > Note: Calling this during a capture can cause the loss of samples which causes popping in the playback. + /// + public final func clearBuffer() { + gi.object_method_bind_ptrcall(AudioEffectCapture.method_clear_buffer, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer_length") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer_length(_ bufferLengthSeconds: Double) { + withUnsafePointer(to: bufferLengthSeconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCapture.method_set_buffer_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer_length") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffer_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_buffer_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_frames_available: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frames_available") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of frames available to read using ``getBuffer(frames:)``. + public final func getFramesAvailable() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_frames_available, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_discarded_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_discarded_frames") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of audio frames discarded from the audio bus due to full buffer. + public final func getDiscardedFrames() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_discarded_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_buffer_length_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer_length_frames") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total size of the internal ring buffer in frames. + public final func getBufferLengthFrames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_buffer_length_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pushed_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pushed_frames") + return withUnsafePointer(to: &AudioEffectCapture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of audio frames inserted from the audio bus. + public final func getPushedFrames() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(AudioEffectCapture.method_get_pushed_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectChorus.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectChorus.swift new file mode 100644 index 000000000..96514f973 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectChorus.swift @@ -0,0 +1,535 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a chorus audio effect. +/// +/// Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter. +open class AudioEffectChorus: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectChorus" } + + /* Properties */ + + /// The number of voices in the effect. + final public var voiceCount: Int32 { + get { + return get_voice_count () + } + + set { + set_voice_count (newValue) + } + + } + + /// The effect's raw signal. + final public var dry: Double { + get { + return get_dry () + } + + set { + set_dry (newValue) + } + + } + + /// The effect's processed signal. + final public var wet: Double { + get { + return get_wet () + } + + set { + set_wet (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_voice_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_count") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_voice_count(_ voices: Int32) { + withUnsafePointer(to: voices) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_voice_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_count") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_voice_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_voice_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_delay_ms") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoiceDelayMs(voiceIdx: Int32, delayMs: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: delayMs) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_delay_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_delay_ms") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoiceDelayMs(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_delay_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_voice_rate_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_rate_hz") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoiceRateHz(voiceIdx: Int32, rateHz: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: rateHz) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_rate_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_rate_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_rate_hz") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoiceRateHz(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_rate_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_voice_depth_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_depth_ms") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoiceDepthMs(voiceIdx: Int32, depthMs: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: depthMs) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_depth_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_depth_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_depth_ms") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoiceDepthMs(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_depth_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_voice_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_level_db") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoiceLevelDb(voiceIdx: Int32, levelDb: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: levelDb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_level_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_level_db") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoiceLevelDb(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_level_db, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_voice_cutoff_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_cutoff_hz") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoiceCutoffHz(voiceIdx: Int32, cutoffHz: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: cutoffHz) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_cutoff_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_cutoff_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_cutoff_hz") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoiceCutoffHz(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_cutoff_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_voice_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("set_voice_pan") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setVoicePan(voiceIdx: Int32, pan: Double) { + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: pan) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_voice_pan, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_voice_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("get_voice_pan") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getVoicePan(voiceIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: voiceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_voice_pan, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_wet: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wet") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wet(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_wet, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wet: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wet") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wet() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_wet, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dry") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dry(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectChorus.method_set_dry, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dry") + return withUnsafePointer(to: &AudioEffectChorus.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dry() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectChorus.method_get_dry, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectCompressor.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectCompressor.swift new file mode 100644 index 000000000..639373448 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectCompressor.swift @@ -0,0 +1,437 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a compressor audio effect to an audio bus. +/// +/// Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. +/// +/// +/// Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). +/// +/// Compressor has many uses in the mix: +/// +/// - In the Master bus to compress the whole output (although an ``AudioEffectLimiter`` is probably better). +/// +/// - In voice channels to ensure they sound as balanced as possible. +/// +/// - Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. +/// +/// - Accentuates transients by using a wider attack, making effects sound more punchy. +/// +open class AudioEffectCompressor: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectCompressor" } + + /* Properties */ + + /// The level above which compression is applied to the audio. Value can range from -60 to 0. + final public var threshold: Double { + get { + return get_threshold () + } + + set { + set_threshold (newValue) + } + + } + + /// Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48. + final public var ratio: Double { + get { + return get_ratio () + } + + set { + set_ratio (newValue) + } + + } + + /// Gain applied to the output signal. + final public var gain: Double { + get { + return get_gain () + } + + set { + set_gain (newValue) + } + + } + + /// Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. + final public var attackUs: Double { + get { + return get_attack_us () + } + + set { + set_attack_us (newValue) + } + + } + + /// Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. + final public var releaseMs: Double { + get { + return get_release_ms () + } + + set { + set_release_ms (newValue) + } + + } + + /// Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). + final public var mix: Double { + get { + return get_mix () + } + + set { + set_mix (newValue) + } + + } + + /// Reduce the sound level using another audio bus for threshold detection. + final public var sidechain: StringName { + get { + return get_sidechain () + } + + set { + set_sidechain (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("set_threshold") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_threshold(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_threshold, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("get_threshold") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_threshold() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_threshold, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ratio") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ratio") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gain") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gain(_ gain: Double) { + withUnsafePointer(to: gain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gain") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attack_us: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attack_us") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attack_us(_ attackUs: Double) { + withUnsafePointer(to: attackUs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_attack_us, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attack_us: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attack_us") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attack_us() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_attack_us, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_release_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_release_ms") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_release_ms(_ releaseMs: Double) { + withUnsafePointer(to: releaseMs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_release_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_release_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_release_ms") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_release_ms() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_release_ms, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mix") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mix(_ mix: Double) { + withUnsafePointer(to: mix) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_mix, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_mix, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sidechain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sidechain") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sidechain(_ sidechain: StringName) { + withUnsafePointer(to: sidechain.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_set_sidechain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sidechain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sidechain") + return withUnsafePointer(to: &AudioEffectCompressor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sidechain() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AudioEffectCompressor.method_get_sidechain, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectDelay.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectDelay.swift new file mode 100644 index 000000000..835668c75 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectDelay.swift @@ -0,0 +1,762 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. +/// +/// Two tap delay and feedback options. +/// +/// +/// Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds. +open class AudioEffectDelay: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectDelay" } + + /* Properties */ + + /// Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. + final public var dry: Double { + get { + return get_dry () + } + + set { + set_dry (newValue) + } + + } + + /// If `true`, the first tap will be enabled. + final public var tap1Active: Bool { + get { + return is_tap1_active () + } + + set { + set_tap1_active (newValue) + } + + } + + /// First tap delay time in milliseconds. + final public var tap1DelayMs: Double { + get { + return get_tap1_delay_ms () + } + + set { + set_tap1_delay_ms (newValue) + } + + } + + /// Sound level for the first tap. + final public var tap1LevelDb: Double { + get { + return get_tap1_level_db () + } + + set { + set_tap1_level_db (newValue) + } + + } + + /// Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right). + final public var tap1Pan: Double { + get { + return get_tap1_pan () + } + + set { + set_tap1_pan (newValue) + } + + } + + /// If `true`, the second tap will be enabled. + final public var tap2Active: Bool { + get { + return is_tap2_active () + } + + set { + set_tap2_active (newValue) + } + + } + + /// Second tap delay time in milliseconds. + final public var tap2DelayMs: Double { + get { + return get_tap2_delay_ms () + } + + set { + set_tap2_delay_ms (newValue) + } + + } + + /// Sound level for the second tap. + final public var tap2LevelDb: Double { + get { + return get_tap2_level_db () + } + + set { + set_tap2_level_db (newValue) + } + + } + + /// Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). + final public var tap2Pan: Double { + get { + return get_tap2_pan () + } + + set { + set_tap2_pan (newValue) + } + + } + + /// If `true`, feedback is enabled. + final public var feedbackActive: Bool { + get { + return is_feedback_active () + } + + set { + set_feedback_active (newValue) + } + + } + + /// Feedback delay time in milliseconds. + final public var feedbackDelayMs: Double { + get { + return get_feedback_delay_ms () + } + + set { + set_feedback_delay_ms (newValue) + } + + } + + /// Sound level for feedback. + final public var feedbackLevelDb: Double { + get { + return get_feedback_level_db () + } + + set { + set_feedback_level_db (newValue) + } + + } + + /// Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. + final public var feedbackLowpass: Double { + get { + return get_feedback_lowpass () + } + + set { + set_feedback_lowpass (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dry") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dry(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_dry, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dry") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dry() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_dry, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap1_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap1_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap1_active(_ amount: Bool) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap1_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_tap1_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_tap1_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_tap1_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioEffectDelay.method_is_tap1_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap1_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap1_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap1_delay_ms(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap1_delay_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap1_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap1_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap1_delay_ms() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap1_delay_ms, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap1_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap1_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap1_level_db(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap1_level_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap1_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap1_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap1_level_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap1_level_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap1_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap1_pan") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap1_pan(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap1_pan, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap1_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap1_pan") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap1_pan() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap1_pan, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap2_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap2_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap2_active(_ amount: Bool) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap2_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_tap2_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_tap2_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_tap2_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioEffectDelay.method_is_tap2_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap2_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap2_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap2_delay_ms(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap2_delay_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap2_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap2_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap2_delay_ms() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap2_delay_ms, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap2_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap2_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap2_level_db(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap2_level_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap2_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap2_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap2_level_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap2_level_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap2_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap2_pan") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap2_pan(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_tap2_pan, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap2_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap2_pan") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap2_pan() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_tap2_pan, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_feedback_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feedback_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_feedback_active(_ amount: Bool) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_feedback_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_feedback_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_feedback_active") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_feedback_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioEffectDelay.method_is_feedback_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_feedback_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feedback_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_feedback_delay_ms(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_feedback_delay_ms, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_feedback_delay_ms: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feedback_delay_ms") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_feedback_delay_ms() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_feedback_delay_ms, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_feedback_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feedback_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_feedback_level_db(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_feedback_level_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_feedback_level_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feedback_level_db") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_feedback_level_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_feedback_level_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_feedback_lowpass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feedback_lowpass") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_feedback_lowpass(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDelay.method_set_feedback_lowpass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_feedback_lowpass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feedback_lowpass") + return withUnsafePointer(to: &AudioEffectDelay.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_feedback_lowpass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDelay.method_get_feedback_lowpass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectDistortion.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectDistortion.swift new file mode 100644 index 000000000..c03be7177 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectDistortion.swift @@ -0,0 +1,342 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a distortion audio effect to an Audio bus. +/// +/// Modifies the sound to make it distorted. +/// +/// +/// Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. +/// +/// By distorting the waveform the frequency content changes, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. +/// +open class AudioEffectDistortion: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectDistortion" } + public enum Mode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Digital distortion effect which cuts off peaks at the top and bottom of the waveform. + case clip = 0 // MODE_CLIP + /// + case atan = 1 // MODE_ATAN + /// Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices. + case lofi = 2 // MODE_LOFI + /// Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. The ``drive`` property has no effect in this mode. + case overdrive = 3 // MODE_OVERDRIVE + /// Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. + case waveshape = 4 // MODE_WAVESHAPE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .clip: return ".clip" + case .atan: return ".atan" + case .lofi: return ".lofi" + case .overdrive: return ".overdrive" + case .waveshape: return ".waveshape" + } + + } + + } + + + /* Properties */ + + /// Distortion type. + final public var mode: AudioEffectDistortion.Mode { + get { + return get_mode () + } + + set { + set_mode (newValue) + } + + } + + /// Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. + final public var preGain: Double { + get { + return get_pre_gain () + } + + set { + set_pre_gain (newValue) + } + + } + + /// High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. + final public var keepHfHz: Double { + get { + return get_keep_hf_hz () + } + + set { + set_keep_hf_hz (newValue) + } + + } + + /// Distortion power. Value can range from 0 to 1. + final public var drive: Double { + get { + return get_drive () + } + + set { + set_drive (newValue) + } + + } + + /// Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24. + final public var postGain: Double { + get { + return get_post_gain () + } + + set { + set_post_gain (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mode") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1314744793)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mode(_ mode: AudioEffectDistortion.Mode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_set_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mode") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 809118343)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mode() -> AudioEffectDistortion.Mode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_get_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioEffectDistortion.Mode (rawValue: _result)! + } + + fileprivate static var method_set_pre_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_gain") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_gain(_ preGain: Double) { + withUnsafePointer(to: preGain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_set_pre_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pre_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_gain") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_get_pre_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_keep_hf_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_hf_hz") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keep_hf_hz(_ keepHfHz: Double) { + withUnsafePointer(to: keepHfHz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_set_keep_hf_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_keep_hf_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keep_hf_hz") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_keep_hf_hz() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_get_keep_hf_hz, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drive: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drive") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drive(_ drive: Double) { + withUnsafePointer(to: drive) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_set_drive, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_drive: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drive") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_drive() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_get_drive, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_post_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_post_gain") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_post_gain(_ postGain: Double) { + withUnsafePointer(to: postGain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_set_post_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_post_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_post_gain") + return withUnsafePointer(to: &AudioEffectDistortion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_post_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectDistortion.method_get_post_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectEQ.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ.swift new file mode 100644 index 000000000..cc5ecad5b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ.swift @@ -0,0 +1,105 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for audio equalizers. Gives you control over frequencies. +/// +/// Use it to create a custom equalizer if ``AudioEffectEQ6``, ``AudioEffectEQ10`` or ``AudioEffectEQ21`` don't fit your needs. +/// +/// +/// AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). +open class AudioEffectEQ: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectEQ" } + /* Methods */ + fileprivate static var method_set_band_gain_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_band_gain_db") + return withUnsafePointer(to: &AudioEffectEQ.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets band's gain at the specified index, in dB. + public final func setBandGainDb(bandIdx: Int32, volumeDb: Double) { + withUnsafePointer(to: bandIdx) { pArg0 in + withUnsafePointer(to: volumeDb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectEQ.method_set_band_gain_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_band_gain_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_band_gain_db") + return withUnsafePointer(to: &AudioEffectEQ.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the band's gain at the specified index, in dB. + public final func getBandGainDb(bandIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: bandIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectEQ.method_get_band_gain_db, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_band_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_band_count") + return withUnsafePointer(to: &AudioEffectEQ.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of bands of the equalizer. + public final func getBandCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioEffectEQ.method_get_band_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectEQ10.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ10.swift new file mode 100644 index 000000000..daad8062c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ10.swift @@ -0,0 +1,53 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. +/// +/// Each frequency can be modulated between -60/+24 dB. +/// +/// +/// Frequency bands: +/// +/// Band 1: 31 Hz +/// +/// Band 2: 62 Hz +/// +/// Band 3: 125 Hz +/// +/// Band 4: 250 Hz +/// +/// Band 5: 500 Hz +/// +/// Band 6: 1000 Hz +/// +/// Band 7: 2000 Hz +/// +/// Band 8: 4000 Hz +/// +/// Band 9: 8000 Hz +/// +/// Band 10: 16000 Hz +/// +/// See also ``AudioEffectEQ``, ``AudioEffectEQ6``, ``AudioEffectEQ21``. +/// +open class AudioEffectEQ10: AudioEffectEQ { + override open class var godotClassName: StringName { "AudioEffectEQ10" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectEQ21.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ21.swift new file mode 100644 index 000000000..362e6b700 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ21.swift @@ -0,0 +1,75 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. +/// +/// Each frequency can be modulated between -60/+24 dB. +/// +/// +/// Frequency bands: +/// +/// Band 1: 22 Hz +/// +/// Band 2: 32 Hz +/// +/// Band 3: 44 Hz +/// +/// Band 4: 63 Hz +/// +/// Band 5: 90 Hz +/// +/// Band 6: 125 Hz +/// +/// Band 7: 175 Hz +/// +/// Band 8: 250 Hz +/// +/// Band 9: 350 Hz +/// +/// Band 10: 500 Hz +/// +/// Band 11: 700 Hz +/// +/// Band 12: 1000 Hz +/// +/// Band 13: 1400 Hz +/// +/// Band 14: 2000 Hz +/// +/// Band 15: 2800 Hz +/// +/// Band 16: 4000 Hz +/// +/// Band 17: 5600 Hz +/// +/// Band 18: 8000 Hz +/// +/// Band 19: 11000 Hz +/// +/// Band 20: 16000 Hz +/// +/// Band 21: 22000 Hz +/// +/// See also ``AudioEffectEQ``, ``AudioEffectEQ6``, ``AudioEffectEQ10``. +/// +open class AudioEffectEQ21: AudioEffectEQ { + override open class var godotClassName: StringName { "AudioEffectEQ21" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectEQ6.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ6.swift new file mode 100644 index 000000000..62817097f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectEQ6.swift @@ -0,0 +1,45 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. +/// +/// Each frequency can be modulated between -60/+24 dB. +/// +/// +/// Frequency bands: +/// +/// Band 1: 32 Hz +/// +/// Band 2: 100 Hz +/// +/// Band 3: 320 Hz +/// +/// Band 4: 1000 Hz +/// +/// Band 5: 3200 Hz +/// +/// Band 6: 10000 Hz +/// +/// See also ``AudioEffectEQ``, ``AudioEffectEQ10``, ``AudioEffectEQ21``. +/// +open class AudioEffectEQ6: AudioEffectEQ { + override open class var godotClassName: StringName { "AudioEffectEQ6" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectFilter.swift new file mode 100644 index 000000000..134bd9b2d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectFilter.swift @@ -0,0 +1,276 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a filter to the audio bus. +/// +/// Allows frequencies other than the ``cutoffHz`` to pass. +open class AudioEffectFilter: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectFilter" } + public enum FilterDB: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case filter6db = 0 // FILTER_6DB + /// + case filter12db = 1 // FILTER_12DB + /// + case filter18db = 2 // FILTER_18DB + /// + case filter24db = 3 // FILTER_24DB + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .filter6db: return ".filter6db" + case .filter12db: return ".filter12db" + case .filter18db: return ".filter18db" + case .filter24db: return ".filter24db" + } + + } + + } + + + /* Properties */ + + /// Threshold frequency for the filter, in Hz. + final public var cutoffHz: Double { + get { + return get_cutoff () + } + + set { + set_cutoff (newValue) + } + + } + + /// Amount of boost in the frequency range near the cutoff frequency. + final public var resonance: Double { + get { + return get_resonance () + } + + set { + set_resonance (newValue) + } + + } + + /// Gain amount of the frequencies after the filter. + final public var gain: Double { + get { + return get_gain () + } + + set { + set_gain (newValue) + } + + } + + final public var db: AudioEffectFilter.FilterDB { + get { + return get_db () + } + + set { + set_db (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_cutoff: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cutoff") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cutoff(_ freq: Double) { + withUnsafePointer(to: freq) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectFilter.method_set_cutoff, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cutoff: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cutoff") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cutoff() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectFilter.method_get_cutoff, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_resonance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resonance") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resonance(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectFilter.method_set_resonance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_resonance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resonance") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_resonance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectFilter.method_get_resonance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gain") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gain(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectFilter.method_set_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gain") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectFilter.method_get_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_db") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 771740901)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_db(_ amount: AudioEffectFilter.FilterDB) { + withUnsafePointer(to: amount.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectFilter.method_set_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_db") + return withUnsafePointer(to: &AudioEffectFilter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3981721890)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_db() -> AudioEffectFilter.FilterDB { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioEffectFilter.method_get_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioEffectFilter.FilterDB (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectHardLimiter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectHardLimiter.swift new file mode 100644 index 000000000..bd70bc89d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectHardLimiter.swift @@ -0,0 +1,202 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a hard limiter audio effect to an Audio bus. +/// +/// A limiter is an effect designed to disallow sound from going over a given dB threshold. Hard limiters predict volume peaks, and will smoothly apply gain reduction when a peak crosses the ceiling threshold to prevent clipping and distortion. It preserves the waveform and prevents it from crossing the ceiling threshold. Adding one in the Master bus is recommended as a safety measure to prevent sudden volume peaks from occurring, and to prevent distortion caused by clipping. +open class AudioEffectHardLimiter: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectHardLimiter" } + + /* Properties */ + + /// Gain to apply before limiting, in decibels. + final public var preGainDb: Double { + get { + return get_pre_gain_db () + } + + set { + set_pre_gain_db (newValue) + } + + } + + /// The waveform's maximum allowed value, in decibels. This value can range from `-24.0` to `0.0`. + /// + /// The default value of `-0.3` prevents potential inter-sample peaks (ISP) from crossing over 0 dB, which can cause slight distortion on some older hardware. + /// + final public var ceilingDb: Double { + get { + return get_ceiling_db () + } + + set { + set_ceiling_db (newValue) + } + + } + + /// Time it takes in seconds for the gain reduction to fully release. + final public var release: Double { + get { + return get_release () + } + + set { + set_release (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_ceiling_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ceiling_db") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ceiling_db(_ ceiling: Double) { + withUnsafePointer(to: ceiling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_set_ceiling_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ceiling_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ceiling_db") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ceiling_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_get_ceiling_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pre_gain_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_gain_db") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_gain_db(_ pPreGain: Double) { + withUnsafePointer(to: pPreGain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_set_pre_gain_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pre_gain_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_gain_db") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_gain_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_get_pre_gain_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_release: GDExtensionMethodBindPtr = { + let methodName = StringName("set_release") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_release(_ pRelease: Double) { + withUnsafePointer(to: pRelease) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_set_release, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_release: GDExtensionMethodBindPtr = { + let methodName = StringName("get_release") + return withUnsafePointer(to: &AudioEffectHardLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_release() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectHardLimiter.method_get_release, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectHighPassFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectHighPassFilter.swift new file mode 100644 index 000000000..8749efba1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectHighPassFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a high-pass filter to the audio bus. +/// +/// Cuts frequencies lower than the ``AudioEffectFilter/cutoffHz`` and allows higher frequencies to pass. +open class AudioEffectHighPassFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectHighPassFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectHighShelfFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectHighShelfFilter.swift new file mode 100644 index 000000000..6bab54333 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectHighShelfFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a high-shelf filter to the audio bus. +/// +/// Reduces all frequencies above the ``AudioEffectFilter/cutoffHz``. +open class AudioEffectHighShelfFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectHighShelfFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectInstance.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectInstance.swift new file mode 100644 index 000000000..c2df05b76 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectInstance.swift @@ -0,0 +1,73 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Manipulates the audio it receives for a given effect. +/// +/// An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an ``AudioEffect`` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with ``AudioServer/getBusEffectInstance(busIdx:effectIdx:channel:)``. +open class AudioEffectInstance: RefCounted { + override open class var godotClassName: StringName { "AudioEffectInstance" } + /* Methods */ + /// Called by the ``AudioServer`` to process this effect. When ``_processSilence()`` is not overridden or it returns `false`, this method is called only when the bus is active. + /// + /// > Note: It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. + /// + @_documentation(visibility: public) + open func _process(srcBuffer: OpaquePointer?, dstBuffer: OpaquePointer?, frameCount: Int32) { + } + + /// Override this method to customize the processing behavior of this effect instance. + /// + /// Should return `true` to force the ``AudioServer`` to always call ``_process(srcBuffer:dstBuffer:frameCount:)``, even if the bus has been muted or cannot otherwise be heard. + /// + @_documentation(visibility: public) + open func _processSilence() -> Bool { + return false + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_process": + return _AudioEffectInstance_proxy_process + case "_process_silence": + return _AudioEffectInstance_proxy_process_silence + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AudioEffectInstance_proxy_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._process (srcBuffer: args [0]!.assumingMemoryBound (to: OpaquePointer?.self).pointee, dstBuffer: args [1]!.assumingMemoryBound (to: OpaquePointer?.self).pointee, frameCount: args [2]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _AudioEffectInstance_proxy_process_silence (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._processSilence () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectLimiter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectLimiter.swift new file mode 100644 index 000000000..9f7d573df --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectLimiter.swift @@ -0,0 +1,257 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a soft-clip limiter audio effect to an Audio bus. +/// +/// A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. +/// +/// Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. +/// +open class AudioEffectLimiter: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectLimiter" } + + /* Properties */ + + /// The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. + final public var ceilingDb: Double { + get { + return get_ceiling_db () + } + + set { + set_ceiling_db (newValue) + } + + } + + /// Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. + final public var thresholdDb: Double { + get { + return get_threshold_db () + } + + set { + set_threshold_db (newValue) + } + + } + + /// Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. + final public var softClipDb: Double { + get { + return get_soft_clip_db () + } + + set { + set_soft_clip_db (newValue) + } + + } + + final public var softClipRatio: Double { + get { + return get_soft_clip_ratio () + } + + set { + set_soft_clip_ratio (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_ceiling_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ceiling_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ceiling_db(_ ceiling: Double) { + withUnsafePointer(to: ceiling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_set_ceiling_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ceiling_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ceiling_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ceiling_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_get_ceiling_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_threshold_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_threshold_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_threshold_db(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_set_threshold_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_threshold_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_threshold_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_threshold_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_get_threshold_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_soft_clip_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_soft_clip_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_soft_clip_db(_ softClip: Double) { + withUnsafePointer(to: softClip) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_set_soft_clip_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_soft_clip_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_soft_clip_db") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_soft_clip_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_get_soft_clip_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_soft_clip_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_soft_clip_ratio") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_soft_clip_ratio(_ softClip: Double) { + withUnsafePointer(to: softClip) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_set_soft_clip_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_soft_clip_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_soft_clip_ratio") + return withUnsafePointer(to: &AudioEffectLimiter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_soft_clip_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectLimiter.method_get_soft_clip_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectLowPassFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectLowPassFilter.swift new file mode 100644 index 000000000..79c155a05 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectLowPassFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a low-pass filter to the audio bus. +/// +/// Cuts frequencies higher than the ``AudioEffectFilter/cutoffHz`` and allows lower frequencies to pass. +open class AudioEffectLowPassFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectLowPassFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectLowShelfFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectLowShelfFilter.swift new file mode 100644 index 000000000..bea5f3d37 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectLowShelfFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a low-shelf filter to the audio bus. +/// +/// Reduces all frequencies below the ``AudioEffectFilter/cutoffHz``. +open class AudioEffectLowShelfFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectLowShelfFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectNotchFilter.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectNotchFilter.swift new file mode 100644 index 000000000..fa8d3e3d1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectNotchFilter.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a notch filter to the Audio bus. +/// +/// Attenuates frequencies in a narrow band around the ``AudioEffectFilter/cutoffHz`` and cuts frequencies outside of this range. +open class AudioEffectNotchFilter: AudioEffectFilter { + override open class var godotClassName: StringName { "AudioEffectNotchFilter" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectPanner.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectPanner.swift new file mode 100644 index 000000000..dba850fe9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectPanner.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a panner audio effect to an audio bus. Pans sound left or right. +/// +/// Determines how much of an audio signal is sent to the left and right buses. +open class AudioEffectPanner: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectPanner" } + + /* Properties */ + + /// Pan position. Value can range from -1 (fully left) to 1 (fully right). + final public var pan: Double { + get { + return get_pan () + } + + set { + set_pan (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pan") + return withUnsafePointer(to: &AudioEffectPanner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pan(_ cpanume: Double) { + withUnsafePointer(to: cpanume) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPanner.method_set_pan, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pan: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pan") + return withUnsafePointer(to: &AudioEffectPanner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pan() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPanner.method_get_pan, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectPhaser.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectPhaser.swift new file mode 100644 index 000000000..59c568311 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectPhaser.swift @@ -0,0 +1,314 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a phaser audio effect to an audio bus. +/// +/// Combines the original signal with a copy that is slightly out of phase with the original. +/// +/// +/// Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. +open class AudioEffectPhaser: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectPhaser" } + + /* Properties */ + + /// Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. + final public var rangeMinHz: Double { + get { + return get_range_min_hz () + } + + set { + set_range_min_hz (newValue) + } + + } + + /// Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. + final public var rangeMaxHz: Double { + get { + return get_range_max_hz () + } + + set { + set_range_max_hz (newValue) + } + + } + + /// Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. + final public var rateHz: Double { + get { + return get_rate_hz () + } + + set { + set_rate_hz (newValue) + } + + } + + /// Output percent of modified sound. Value can range from 0.1 to 0.9. + final public var feedback: Double { + get { + return get_feedback () + } + + set { + set_feedback (newValue) + } + + } + + /// Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. + final public var depth: Double { + get { + return get_depth () + } + + set { + set_depth (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_range_min_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_range_min_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_range_min_hz(_ hz: Double) { + withUnsafePointer(to: hz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_set_range_min_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_range_min_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_range_min_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_range_min_hz() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_get_range_min_hz, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_range_max_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_range_max_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_range_max_hz(_ hz: Double) { + withUnsafePointer(to: hz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_set_range_max_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_range_max_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_range_max_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_range_max_hz() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_get_range_max_hz, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rate_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rate_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rate_hz(_ hz: Double) { + withUnsafePointer(to: hz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_set_rate_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rate_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rate_hz") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rate_hz() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_get_rate_hz, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feedback") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_feedback(_ fbk: Double) { + withUnsafePointer(to: fbk) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_set_feedback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feedback") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_feedback() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_get_feedback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth(_ depth: Double) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_set_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &AudioEffectPhaser.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPhaser.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectPitchShift.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectPitchShift.swift new file mode 100644 index 000000000..c338e1c34 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectPitchShift.swift @@ -0,0 +1,230 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a pitch-shifting audio effect to an audio bus. +/// +/// Raises or lowers the pitch of original sound. +/// +/// +/// Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients. +open class AudioEffectPitchShift: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectPitchShift" } + public enum FFTSize: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. + case fftSize256 = 0 // FFT_SIZE_256 + /// Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. + case fftSize512 = 1 // FFT_SIZE_512 + /// Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. + case fftSize1024 = 2 // FFT_SIZE_1024 + /// Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. + case fftSize2048 = 3 // FFT_SIZE_2048 + /// Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. + case fftSize4096 = 4 // FFT_SIZE_4096 + /// Represents the size of the ``AudioEffectPitchShift/FFTSize`` enum. + case max = 5 // FFT_SIZE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .fftSize256: return ".fftSize256" + case .fftSize512: return ".fftSize512" + case .fftSize1024: return ".fftSize1024" + case .fftSize2048: return ".fftSize2048" + case .fftSize4096: return ".fftSize4096" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// The pitch scale to use. `1.0` is the default pitch and plays sounds unaffected. ``pitchScale`` can range from `0.0` (infinitely low pitch, inaudible) to `16` (16 times higher than the initial pitch). + final public var pitchScale: Double { + get { + return get_pitch_scale () + } + + set { + set_pitch_scale (newValue) + } + + } + + /// The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up. + final public var oversampling: Int32 { + get { + return get_oversampling () + } + + set { + set_oversampling (newValue) + } + + } + + /// The size of the Fast Fourier transform buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes. + final public var fftSize: AudioEffectPitchShift.FFTSize { + get { + return get_fft_size () + } + + set { + set_fft_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pitch_scale") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pitch_scale(_ rate: Double) { + withUnsafePointer(to: rate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_set_pitch_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pitch_scale") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pitch_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_get_pitch_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_oversampling: GDExtensionMethodBindPtr = { + let methodName = StringName("set_oversampling") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_oversampling(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_set_oversampling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_oversampling: GDExtensionMethodBindPtr = { + let methodName = StringName("get_oversampling") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_oversampling() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_get_oversampling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fft_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fft_size") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323518741)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fft_size(_ size: AudioEffectPitchShift.FFTSize) { + withUnsafePointer(to: size.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_set_fft_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fft_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fft_size") + return withUnsafePointer(to: &AudioEffectPitchShift.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2361246789)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fft_size() -> AudioEffectPitchShift.FFTSize { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioEffectPitchShift.method_get_fft_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioEffectPitchShift.FFTSize (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectRecord.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectRecord.swift new file mode 100644 index 000000000..f9258d531 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectRecord.swift @@ -0,0 +1,156 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Audio effect used for recording the sound from an audio bus. +/// +/// Allows the user to record the sound from an audio bus into an ``AudioStreamWAV``. When used on the "Master" audio bus, this includes all audio output by Godot. +/// +/// Unlike ``AudioEffectCapture``, this effect encodes the recording with the given format (8-bit, 16-bit, or compressed) instead of giving access to the raw audio samples. +/// +/// Can be used (with an ``AudioStreamMicrophone``) to record from a microphone. +/// +/// > Note: ``ProjectSettings/audio/driver/enableInput`` must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. +/// +open class AudioEffectRecord: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectRecord" } + + /* Properties */ + + /// Specifies the format in which the sample will be recorded. See ``AudioStreamWAV.Format`` for available formats. + final public var format: AudioStreamWAV.Format { + get { + return get_format () + } + + set { + set_format (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_recording_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recording_active") + return withUnsafePointer(to: &AudioEffectRecord.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true`, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. + public final func setRecordingActive(record: Bool) { + withUnsafePointer(to: record) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectRecord.method_set_recording_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_recording_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_recording_active") + return withUnsafePointer(to: &AudioEffectRecord.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the recording is active or not. + public final func isRecordingActive() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioEffectRecord.method_is_recording_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format") + return withUnsafePointer(to: &AudioEffectRecord.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 60648488)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format(_ format: AudioStreamWAV.Format) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectRecord.method_set_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &AudioEffectRecord.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3151724922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format() -> AudioStreamWAV.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioEffectRecord.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamWAV.Format (rawValue: _result)! + } + + fileprivate static var method_get_recording: GDExtensionMethodBindPtr = { + let methodName = StringName("get_recording") + return withUnsafePointer(to: &AudioEffectRecord.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2964110865)! + } + + } + + }() + + /// Returns the recorded sample. + public final func getRecording() -> AudioStreamWAV? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioEffectRecord.method_get_recording, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectReverb.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectReverb.swift new file mode 100644 index 000000000..097007dcd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectReverb.swift @@ -0,0 +1,479 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Adds a reverberation audio effect to an Audio bus. +/// +/// Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. +open class AudioEffectReverb: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectReverb" } + + /* Properties */ + + /// Time between the original signal and the early reflections of the reverb signal, in milliseconds. + final public var predelayMsec: Double { + get { + return get_predelay_msec () + } + + set { + set_predelay_msec (newValue) + } + + } + + /// Output percent of predelay. Value can range from 0 to 1. + final public var predelayFeedback: Double { + get { + return get_predelay_feedback () + } + + set { + set_predelay_feedback (newValue) + } + + } + + /// Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. + final public var roomSize: Double { + get { + return get_room_size () + } + + set { + set_room_size (newValue) + } + + } + + /// Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. + final public var damping: Double { + get { + return get_damping () + } + + set { + set_damping (newValue) + } + + } + + /// Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. + final public var spread: Double { + get { + return get_spread () + } + + set { + set_spread (newValue) + } + + } + + /// High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. + final public var hipass: Double { + get { + return get_hpf () + } + + set { + set_hpf (newValue) + } + + } + + /// Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. + final public var dry: Double { + get { + return get_dry () + } + + set { + set_dry (newValue) + } + + } + + /// Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. + final public var wet: Double { + get { + return get_wet () + } + + set { + set_wet (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_predelay_msec: GDExtensionMethodBindPtr = { + let methodName = StringName("set_predelay_msec") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_predelay_msec(_ msec: Double) { + withUnsafePointer(to: msec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_predelay_msec, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_predelay_msec: GDExtensionMethodBindPtr = { + let methodName = StringName("get_predelay_msec") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_predelay_msec() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_predelay_msec, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_predelay_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_predelay_feedback") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_predelay_feedback(_ feedback: Double) { + withUnsafePointer(to: feedback) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_predelay_feedback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_predelay_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_predelay_feedback") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_predelay_feedback() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_predelay_feedback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_room_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_room_size") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_room_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_room_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_room_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_room_size") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_room_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_room_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_damping: GDExtensionMethodBindPtr = { + let methodName = StringName("set_damping") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_damping(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_damping, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_damping: GDExtensionMethodBindPtr = { + let methodName = StringName("get_damping") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_damping() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_damping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spread") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spread(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_spread, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spread") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spread() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_spread, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dry") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dry(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_dry, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dry: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dry") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dry() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_dry, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wet: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wet") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wet(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_wet, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wet: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wet") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wet() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_wet, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hpf: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hpf") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hpf(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectReverb.method_set_hpf, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_hpf: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hpf") + return withUnsafePointer(to: &AudioEffectReverb.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_hpf() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectReverb.method_get_hpf, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzer.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzer.swift new file mode 100644 index 000000000..023e7a4d2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzer.swift @@ -0,0 +1,231 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Audio effect that can be used for real-time audio visualizations. +/// +/// This audio effect does not affect sound output, but can be used for real-time audio visualizations. +/// +/// This resource configures an ``AudioEffectSpectrumAnalyzerInstance``, which performs the actual analysis at runtime. An instance can be acquired with ``AudioServer/getBusEffectInstance(busIdx:effectIdx:channel:)``. +/// +/// See also ``AudioStreamGenerator`` for procedurally generating sounds. +/// +open class AudioEffectSpectrumAnalyzer: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectSpectrumAnalyzer" } + public enum FFTSize: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. + case fftSize256 = 0 // FFT_SIZE_256 + /// Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. + case fftSize512 = 1 // FFT_SIZE_512 + /// Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. + case fftSize1024 = 2 // FFT_SIZE_1024 + /// Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. + case fftSize2048 = 3 // FFT_SIZE_2048 + /// Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. + case fftSize4096 = 4 // FFT_SIZE_4096 + /// Represents the size of the ``AudioEffectSpectrumAnalyzer/FFTSize`` enum. + case max = 5 // FFT_SIZE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .fftSize256: return ".fftSize256" + case .fftSize512: return ".fftSize512" + case .fftSize1024: return ".fftSize1024" + case .fftSize2048: return ".fftSize2048" + case .fftSize4096: return ".fftSize4096" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory. + final public var bufferLength: Double { + get { + return get_buffer_length () + } + + set { + set_buffer_length (newValue) + } + + } + + final public var tapBackPos: Double { + get { + return get_tap_back_pos () + } + + set { + set_tap_back_pos (newValue) + } + + } + + /// The size of the Fast Fourier transform buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes. + final public var fftSize: AudioEffectSpectrumAnalyzer.FFTSize { + get { + return get_fft_size () + } + + set { + set_fft_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer_length") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer_length(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_set_buffer_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer_length") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffer_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_get_buffer_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tap_back_pos: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tap_back_pos") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tap_back_pos(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_set_tap_back_pos, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tap_back_pos: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tap_back_pos") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tap_back_pos() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_get_tap_back_pos, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fft_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fft_size") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1202879215)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fft_size(_ size: AudioEffectSpectrumAnalyzer.FFTSize) { + withUnsafePointer(to: size.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_set_fft_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fft_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fft_size") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3925405343)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fft_size() -> AudioEffectSpectrumAnalyzer.FFTSize { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzer.method_get_fft_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioEffectSpectrumAnalyzer.FFTSize (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzerInstance.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzerInstance.swift new file mode 100644 index 000000000..4cff7869f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectSpectrumAnalyzerInstance.swift @@ -0,0 +1,83 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Queryable instance of an ``AudioEffectSpectrumAnalyzer``. +/// +/// The runtime part of an ``AudioEffectSpectrumAnalyzer``, which can be used to query the magnitude of a frequency range on its host bus. +/// +/// An instance of this class can be acquired with ``AudioServer/getBusEffectInstance(busIdx:effectIdx:channel:)``. +/// +open class AudioEffectSpectrumAnalyzerInstance: AudioEffectInstance { + override open class var godotClassName: StringName { "AudioEffectSpectrumAnalyzerInstance" } + public enum MagnitudeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use the average value across the frequency range as magnitude. + case average = 0 // MAGNITUDE_AVERAGE + /// Use the maximum value of the frequency range as magnitude. + case max = 1 // MAGNITUDE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .average: return ".average" + case .max: return ".max" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_magnitude_for_frequency_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_magnitude_for_frequency_range") + return withUnsafePointer(to: &AudioEffectSpectrumAnalyzerInstance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797993915)! + } + + } + + }() + + /// Returns the magnitude of the frequencies from `fromHz` to `toHz` in linear energy as a Vector2. The `x` component of the return value represents the left stereo channel, and `y` represents the right channel. + /// + /// `mode` determines how the frequency range will be processed. See ``AudioEffectSpectrumAnalyzerInstance/MagnitudeMode``. + /// + public final func getMagnitudeForFrequencyRange(fromHz: Double, toHz: Double, mode: AudioEffectSpectrumAnalyzerInstance.MagnitudeMode = .max) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: fromHz) { pArg0 in + withUnsafePointer(to: toHz) { pArg1 in + withUnsafePointer(to: mode.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectSpectrumAnalyzerInstance.method_get_magnitude_for_frequency_range, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioEffectStereoEnhance.swift b/Sources/SwiftGodot/Generated/Api/AudioEffectStereoEnhance.swift new file mode 100644 index 000000000..5ea1e99df --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioEffectStereoEnhance.swift @@ -0,0 +1,197 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An audio effect that can be used to adjust the intensity of stereo panning. +/// +/// An audio effect that can be used to adjust the intensity of stereo panning. +open class AudioEffectStereoEnhance: AudioEffect { + override open class var godotClassName: StringName { "AudioEffectStereoEnhance" } + + /* Properties */ + + /// Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. + final public var panPullout: Double { + get { + return get_pan_pullout () + } + + set { + set_pan_pullout (newValue) + } + + } + + final public var timePulloutMs: Double { + get { + return get_time_pullout () + } + + set { + set_time_pullout (newValue) + } + + } + + final public var surround: Double { + get { + return get_surround () + } + + set { + set_surround (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pan_pullout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pan_pullout") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pan_pullout(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_set_pan_pullout, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pan_pullout: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pan_pullout") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pan_pullout() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_get_pan_pullout, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_pullout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_pullout") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_pullout(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_set_time_pullout, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_pullout: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_pullout") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_pullout() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_get_time_pullout, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_surround: GDExtensionMethodBindPtr = { + let methodName = StringName("set_surround") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_surround(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_set_surround, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_surround: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surround") + return withUnsafePointer(to: &AudioEffectStereoEnhance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_surround() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioEffectStereoEnhance.method_get_surround, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioListener2D.swift b/Sources/SwiftGodot/Generated/Api/AudioListener2D.swift new file mode 100644 index 000000000..1ebda7353 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioListener2D.swift @@ -0,0 +1,86 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Overrides the location sounds are heard from. +/// +/// Once added to the scene tree and enabled using ``makeCurrent()``, this node will override the location sounds are heard from. Only one ``AudioListener2D`` can be current. Using ``makeCurrent()`` will disable the previous ``AudioListener2D``. +/// +/// If there is no active ``AudioListener2D`` in the current ``Viewport``, center of the screen will be used as a hearing point for the audio. ``AudioListener2D`` needs to be inside ``SceneTree`` to function. +/// +open class AudioListener2D: Node2D { + override open class var godotClassName: StringName { "AudioListener2D" } + /* Methods */ + fileprivate static var method_make_current: GDExtensionMethodBindPtr = { + let methodName = StringName("make_current") + return withUnsafePointer(to: &AudioListener2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Makes the ``AudioListener2D`` active, setting it as the hearing point for the sounds. If there is already another active ``AudioListener2D``, it will be disabled. + /// + /// This method will have no effect if the ``AudioListener2D`` is not added to ``SceneTree``. + /// + public final func makeCurrent() { + gi.object_method_bind_ptrcall(AudioListener2D.method_make_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_clear_current: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_current") + return withUnsafePointer(to: &AudioListener2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Disables the ``AudioListener2D``. If it's not set as current, this method will have no effect. + public final func clearCurrent() { + gi.object_method_bind_ptrcall(AudioListener2D.method_clear_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_current: GDExtensionMethodBindPtr = { + let methodName = StringName("is_current") + return withUnsafePointer(to: &AudioListener2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this ``AudioListener2D`` is currently active. + public final func isCurrent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioListener2D.method_is_current, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioListener3D.swift b/Sources/SwiftGodot/Generated/Api/AudioListener3D.swift new file mode 100644 index 000000000..a7ffbe9d3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioListener3D.swift @@ -0,0 +1,101 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Overrides the location sounds are heard from. +/// +/// Once added to the scene tree and enabled using ``makeCurrent()``, this node will override the location sounds are heard from. This can be used to listen from a location different from the ``Camera3D``. +open class AudioListener3D: Node3D { + override open class var godotClassName: StringName { "AudioListener3D" } + /* Methods */ + fileprivate static var method_make_current: GDExtensionMethodBindPtr = { + let methodName = StringName("make_current") + return withUnsafePointer(to: &AudioListener3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Enables the listener. This will override the current camera's listener. + public final func makeCurrent() { + gi.object_method_bind_ptrcall(AudioListener3D.method_make_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_clear_current: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_current") + return withUnsafePointer(to: &AudioListener3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Disables the listener to use the current camera's listener instead. + public final func clearCurrent() { + gi.object_method_bind_ptrcall(AudioListener3D.method_clear_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_current: GDExtensionMethodBindPtr = { + let methodName = StringName("is_current") + return withUnsafePointer(to: &AudioListener3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the listener was made current using ``makeCurrent()``, `false` otherwise. + /// + /// > Note: There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. + /// + public final func isCurrent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioListener3D.method_is_current, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_listener_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_listener_transform") + return withUnsafePointer(to: &AudioListener3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + /// Returns the listener's global orthonormalized ``Transform3D``. + public final func getListenerTransform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(AudioListener3D.method_get_listener_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioSample.swift b/Sources/SwiftGodot/Generated/Api/AudioSample.swift new file mode 100644 index 000000000..0dfe1044e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioSample.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for audio samples. +/// +/// Base class for audio samples. +open class AudioSample: RefCounted { + override open class var godotClassName: StringName { "AudioSample" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioSamplePlayback.swift b/Sources/SwiftGodot/Generated/Api/AudioSamplePlayback.swift new file mode 100644 index 000000000..591d740d8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioSamplePlayback.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Meta class for playing back audio samples. +/// +/// Meta class for playing back audio samples. +open class AudioSamplePlayback: RefCounted { + override open class var godotClassName: StringName { "AudioSamplePlayback" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioServer.swift b/Sources/SwiftGodot/Generated/Api/AudioServer.swift new file mode 100644 index 000000000..7973192d3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioServer.swift @@ -0,0 +1,1501 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Server interface for low-level audio access. +/// +/// ``AudioServer`` is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. +/// +/// +/// This object emits the following signals: +/// +/// - ``busLayoutChanged`` +/// - ``busRenamed`` +open class AudioServer: Object { + /// The shared instance of this class + public static var shared: AudioServer = { + return withUnsafePointer (to: &AudioServer.godotClassName.content) { ptr in + AudioServer (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "AudioServer" } + public enum SpeakerMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Two or fewer speakers were detected. + case modeStereo = 0 // SPEAKER_MODE_STEREO + /// A 3.1 channel surround setup was detected. + case surround31 = 1 // SPEAKER_SURROUND_31 + /// A 5.1 channel surround setup was detected. + case surround51 = 2 // SPEAKER_SURROUND_51 + /// A 7.1 channel surround setup was detected. + case surround71 = 3 // SPEAKER_SURROUND_71 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .modeStereo: return ".modeStereo" + case .surround31: return ".surround31" + case .surround51: return ".surround51" + case .surround71: return ".surround71" + } + + } + + } + + public enum PlaybackType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The playback will be considered of the type declared at ``ProjectSettings/audio/general/defaultPlaybackType``. + case `default` = 0 // PLAYBACK_TYPE_DEFAULT + /// Force the playback to be considered as a stream. + case stream = 1 // PLAYBACK_TYPE_STREAM + /// Force the playback to be considered as a sample. This can provide lower latency and more stable playback (with less risk of audio crackling), at the cost of having less flexibility. + /// + /// > Note: Only currently supported on the web platform. + /// + /// > Note: ``AudioEffect``s are not supported when playback is considered as a sample. + /// + case sample = 2 // PLAYBACK_TYPE_SAMPLE + /// Represents the size of the ``AudioServer/PlaybackType`` enum. + case max = 3 // PLAYBACK_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .stream: return ".stream" + case .sample: return ".sample" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// Number of available audio buses. + static public var busCount: Int32 { + get { + return get_bus_count () + } + + set { + set_bus_count (newValue) + } + + } + + /// Name of the current device for audio output (see ``getOutputDeviceList()``). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value `"Default"` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to `"Default"`. + static public var outputDevice: String { + get { + return get_output_device () + } + + set { + set_output_device (newValue) + } + + } + + /// Name of the current device for audio input (see ``getInputDeviceList()``). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value `"Default"` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to `"Default"`. + /// + /// > Note: ``ProjectSettings/audio/driver/enableInput`` must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. + /// + static public var inputDevice: String { + get { + return get_input_device () + } + + set { + set_input_device (newValue) + } + + } + + /// Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played at half its speed). See also ``Engine/timeScale`` to affect the general simulation speed, which is independent from ``AudioServer/playbackSpeedScale``. + static public var playbackSpeedScale: Double { + get { + return get_playback_speed_scale () + } + + set { + set_playback_speed_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_bus_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_count") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_bus_count(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bus_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_count") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_bus_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_bus_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_remove_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_bus") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the bus at index `index`. + public static func removeBus(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_bus, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("add_bus") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1025054187)! + } + + } + + }() + + /// Adds a bus at `atPosition`. + public static func addBus(atPosition: Int32 = -1) { + withUnsafePointer(to: atPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_add_bus, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_move_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("move_bus") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Moves the bus from index `index` to index `toIndex`. + public static func moveBus(index: Int32, toIndex: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: toIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_move_bus, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_name") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the name of the bus at index `busIdx` to `name`. + public static func setBusName(busIdx: Int32, name: String) { + withUnsafePointer(to: busIdx) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bus_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_name") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the bus with the index `busIdx`. + public static func getBusName(busIdx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_bus_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_index") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2458036349)! + } + + } + + }() + + /// Returns the index of the bus with the name `busName`. Returns `-1` if no bus with the specified name exist. + public static func getBusIndex(busName: StringName) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: busName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_index, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_bus_channels: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_channels") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of channels of the bus at index `busIdx`. + public static func getBusChannels(busIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_channels, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bus_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_volume_db") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the volume of the bus at index `busIdx` to `volumeDb`. + public static func setBusVolumeDb(busIdx: Int32, volumeDb: Double) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: volumeDb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_volume_db, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bus_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_volume_db") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the volume of the bus at index `busIdx` in dB. + public static func getBusVolumeDb(busIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_volume_db, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bus_send: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_send") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780747571)! + } + + } + + }() + + /// Connects the output of the bus at `busIdx` to the bus named `send`. + public static func setBusSend(busIdx: Int32, send: StringName) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: send.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_send, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bus_send: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_send") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the name of the bus that the bus at index `busIdx` sends to. + public static func getBusSend(busIdx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_send, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bus_solo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_solo") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is in solo mode. + public static func setBusSolo(busIdx: Int32, enable: Bool) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_solo, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_bus_solo: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bus_solo") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is in solo mode. + public static func isBusSolo(busIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_bus_solo, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bus_mute: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_mute") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is muted. + public static func setBusMute(busIdx: Int32, enable: Bool) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_mute, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_bus_mute: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bus_mute") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is muted. + public static func isBusMute(busIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_bus_mute, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bus_bypass_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_bypass_effects") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is bypassing effects. + public static func setBusBypassEffects(busIdx: Int32, enable: Bool) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_bypass_effects, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_bus_bypassing_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bus_bypassing_effects") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// If `true`, the bus at index `busIdx` is bypassing effects. + public static func isBusBypassingEffects(busIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_bus_bypassing_effects, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_bus_effect: GDExtensionMethodBindPtr = { + let methodName = StringName("add_bus_effect") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4068819785)! + } + + } + + }() + + /// Adds an ``AudioEffect`` effect to the bus `busIdx` at `atPosition`. + public static func addBusEffect(busIdx: Int32, effect: AudioEffect?, atPosition: Int32 = -1) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effect?.handle) { pArg1 in + withUnsafePointer(to: atPosition) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_add_bus_effect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_bus_effect: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_bus_effect") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Removes the effect at index `effectIdx` from the bus at index `busIdx`. + public static func removeBusEffect(busIdx: Int32, effectIdx: Int32) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_remove_bus_effect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bus_effect_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_effect_count") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the number of effects on the bus at `busIdx`. + public static func getBusEffectCount(busIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_effect_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_bus_effect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_effect") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 726064442)! + } + + } + + }() + + /// Returns the ``AudioEffect`` at position `effectIdx` in bus `busIdx`. + public static func getBusEffect(busIdx: Int32, effectIdx: Int32) -> AudioEffect? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_effect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_bus_effect_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_effect_instance") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1829771234)! + } + + } + + }() + + /// Returns the ``AudioEffectInstance`` assigned to the given bus and effect indices (and optionally channel). + public static func getBusEffectInstance(busIdx: Int32, effectIdx: Int32, channel: Int32 = 0) -> AudioEffectInstance? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: channel) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_effect_instance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_swap_bus_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("swap_bus_effects") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1649997291)! + } + + } + + }() + + /// Swaps the position of two effects in bus `busIdx`. + public static func swapBusEffects(busIdx: Int32, effectIdx: Int32, byEffectIdx: Int32) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: byEffectIdx) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_swap_bus_effects, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_bus_effect_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_effect_enabled") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1383440665)! + } + + } + + }() + + /// If `true`, the effect at index `effectIdx` on the bus at index `busIdx` is enabled. + public static func setBusEffectEnabled(busIdx: Int32, effectIdx: Int32, enabled: Bool) { + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: enabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_effect_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_bus_effect_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bus_effect_enabled") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// If `true`, the effect at index `effectIdx` on the bus at index `busIdx` is enabled. + public static func isBusEffectEnabled(busIdx: Int32, effectIdx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: effectIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_bus_effect_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_bus_peak_volume_left_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_peak_volume_left_db") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the peak volume of the left speaker at bus index `busIdx` and channel index `channel`. + public static func getBusPeakVolumeLeftDb(busIdx: Int32, channel: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: channel) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_peak_volume_left_db, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_bus_peak_volume_right_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus_peak_volume_right_db") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the peak volume of the right speaker at bus index `busIdx` and channel index `channel`. + public static func getBusPeakVolumeRightDb(busIdx: Int32, channel: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: busIdx) { pArg0 in + withUnsafePointer(to: channel) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_bus_peak_volume_right_db, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_playback_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_playback_speed_scale") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_playback_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_playback_speed_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_playback_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_speed_scale") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_playback_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_playback_speed_scale, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("lock") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Locks the audio driver's main loop. + /// + /// > Note: Remember to unlock it afterwards. + /// + public static func lock() { + gi.object_method_bind_ptrcall(method_lock, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_unlock: GDExtensionMethodBindPtr = { + let methodName = StringName("unlock") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) + public static func unlock() { + gi.object_method_bind_ptrcall(method_unlock, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_get_speaker_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speaker_mode") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2549190337)! + } + + } + + }() + + /// Returns the speaker configuration. + public static func getSpeakerMode() -> AudioServer.SpeakerMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_speaker_mode, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return AudioServer.SpeakerMode (rawValue: _result)! + } + + fileprivate static var method_get_mix_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix_rate") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the sample rate at the output of the ``AudioServer``. + public static func getMixRate() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_mix_rate, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_output_device_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_device_list") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns the names of all audio output devices detected on the system. + public static func getOutputDeviceList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_output_device_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_output_device: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_device") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_output_device() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_output_device, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_output_device: GDExtensionMethodBindPtr = { + let methodName = StringName("set_output_device") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_output_device(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_output_device, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_to_next_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_to_next_mix") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the relative time until the next mix occurs. + public static func getTimeToNextMix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_time_to_next_mix, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_time_since_last_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_since_last_mix") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the relative time since the last mix occurred. + public static func getTimeSinceLastMix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_time_since_last_mix, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_output_latency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_latency") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the audio driver's effective output latency. This is based on ``ProjectSettings/audio/driver/outputLatency``, but the exact returned value will differ depending on the operating system and audio driver. + /// + /// > Note: This can be expensive; it is not recommended to call ``getOutputLatency()`` every frame. + /// + public static func getOutputLatency() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_output_latency, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_input_device_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_device_list") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns the names of all audio input devices detected on the system. + /// + /// > Note: ``ProjectSettings/audio/driver/enableInput`` must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. + /// + public static func getInputDeviceList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_input_device_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_input_device: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_device") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_input_device() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_input_device, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_input_device: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_device") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_input_device(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_input_device, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_bus_layout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus_layout") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3319058824)! + } + + } + + }() + + /// Overwrites the currently used ``AudioBusLayout``. + public static func setBusLayout(_ busLayout: AudioBusLayout?) { + withUnsafePointer(to: busLayout?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_bus_layout, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_generate_bus_layout: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_bus_layout") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3769973890)! + } + + } + + }() + + /// Generates an ``AudioBusLayout`` using the available buses and effects. + public static func generateBusLayout() -> AudioBusLayout? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_generate_bus_layout, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_enable_tagging_used_audio_streams: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_tagging_used_audio_streams") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, all instances of ``AudioStreamPlayback`` will call ``AudioStreamPlayback/_tagUsedStreams()`` every mix step. + /// + /// > Note: This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews. + /// + public static func setEnableTaggingUsedAudioStreams(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_enable_tagging_used_audio_streams, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_stream_registered_as_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("is_stream_registered_as_sample") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 500225754)! + } + + } + + }() + + /// If `true`, the stream is registered as a sample. The engine will not have to register it before playing the sample. + /// + /// If `false`, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with ``registerStreamAsSample(stream:)``. + /// + public static func isStreamRegisteredAsSample(stream: AudioStream?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_stream_registered_as_sample, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_register_stream_as_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("register_stream_as_sample") + return withUnsafePointer(to: &AudioServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2210767741)! + } + + } + + }() + + /// Forces the registration of a stream as a sample. + /// + /// > Note: Lag spikes may occur when calling this method, especially on single-threaded builds. It is suggested to call this method while loading assets, where the lag spike could be masked, instead of registering the sample right before it needs to be played. + /// + public static func registerStreamAsSample(stream: AudioStream?) { + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_register_stream_as_sample, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted when an audio bus is added, deleted, or moved. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.busLayoutChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var busLayoutChanged: SimpleSignal { SimpleSignal (target: self, signalName: "bus_layout_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ busIndex: Int64, _ oldName: StringName, _ newName: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = StringName (args [1]!)! + let arg_2 = StringName (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the audio bus at `busIndex` is renamed from `oldName` to `newName`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.busRenamed.connect { busIndex, oldName, newName in + /// print ("caught signal") + /// } + /// ``` + public var busRenamed: Signal1 { Signal1 (target: self, signalName: "bus_renamed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStream.swift b/Sources/SwiftGodot/Generated/Api/AudioStream.swift new file mode 100644 index 000000000..9a72d369a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStream.swift @@ -0,0 +1,280 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for audio streams. +/// +/// Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via ``AudioStreamWAV``) and Ogg (via ``AudioStreamOggVorbis``) file formats. +/// +/// +/// This object emits the following signals: +/// +/// - ``parameterListChanged`` +open class AudioStream: Resource { + override open class var godotClassName: StringName { "AudioStream" } + /* Methods */ + /// Override this method to customize the returned value of ``instantiatePlayback()``. Should returned a new ``AudioStreamPlayback`` created when the stream is played (such as by an ``AudioStreamPlayer``).. + @_documentation(visibility: public) + open func _instantiatePlayback() -> AudioStreamPlayback? { + return AudioStreamPlayback () + } + + /// Override this method to customize the name assigned to this audio stream. Unused by the engine. + @_documentation(visibility: public) + open func _getStreamName() -> String { + return String () + } + + /// Override this method to customize the returned value of ``getLength()``. Should return the length of this audio stream, in seconds. + @_documentation(visibility: public) + open func _getLength() -> Double { + return 0.0 + } + + /// Override this method to customize the returned value of ``isMonophonic()``. Should return `true` if this audio stream only supports one channel. + @_documentation(visibility: public) + open func _isMonophonic() -> Bool { + return false + } + + /// Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat. + /// + /// Ideally, the returned value should be based off the stream's sample rate (``AudioStreamWAV/mixRate``, for example). + /// + @_documentation(visibility: public) + open func _getBpm() -> Double { + return 0.0 + } + + /// Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat. + /// + /// Ideally, the returned value should be based off the stream's sample rate (``AudioStreamWAV/mixRate``, for example). + /// + @_documentation(visibility: public) + open func _getBeatCount() -> Int32 { + return 0 + } + + /// Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see ``Object/getPropertyList()``). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. + @_documentation(visibility: public) + open func _getParameterList() -> VariantCollection { + return VariantCollection() + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the length of the audio stream in seconds. + public final func getLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStream.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_monophonic: GDExtensionMethodBindPtr = { + let methodName = StringName("is_monophonic") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this audio stream only supports one channel (_monophony_), or `false` if the audio stream supports two or more channels (_polyphony_). + public final func isMonophonic() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStream.method_is_monophonic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_instantiate_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("instantiate_playback") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 210135309)! + } + + } + + }() + + /// Returns a newly created ``AudioStreamPlayback`` intended to play this audio stream. Useful for when you want to extend ``_instantiatePlayback()`` but call ``instantiatePlayback()`` from an internally held AudioStream subresource. An example of this can be found in the source code for `AudioStreamRandomPitch::instantiate_playback`. + public final func instantiatePlayback() -> AudioStreamPlayback? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStream.method_instantiate_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_can_be_sampled: GDExtensionMethodBindPtr = { + let methodName = StringName("can_be_sampled") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns if the current ``AudioStream`` can be used as a sample. Only static streams can be sampled. + public final func canBeSampled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStream.method_can_be_sampled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_generate_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_sample") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2646048999)! + } + + } + + }() + + /// Generates an ``AudioSample`` based on the current stream. + public final func generateSample() -> AudioSample? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStream.method_generate_sample, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_meta_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("is_meta_stream") + return withUnsafePointer(to: &AudioStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the stream is a collection of other streams, `false` otherwise. + public final func isMetaStream() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStream.method_is_meta_stream, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_beat_count": + return _AudioStream_proxy_get_beat_count + case "_get_bpm": + return _AudioStream_proxy_get_bpm + case "_get_length": + return _AudioStream_proxy_get_length + case "_get_parameter_list": + return _AudioStream_proxy_get_parameter_list + case "_get_stream_name": + return _AudioStream_proxy_get_stream_name + case "_instantiate_playback": + return _AudioStream_proxy_instantiate_playback + case "_is_monophonic": + return _AudioStream_proxy_is_monophonic + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal to be emitted to notify when the parameter list changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.parameterListChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var parameterListChanged: SimpleSignal { SimpleSignal (target: self, signalName: "parameter_list_changed") } + +} + +// Support methods for proxies +func _AudioStream_proxy_get_beat_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBeatCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _AudioStream_proxy_get_bpm (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBpm () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AudioStream_proxy_get_length (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getLength () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AudioStream_proxy_get_parameter_list (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getParameterList () + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _AudioStream_proxy_get_stream_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getStreamName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _AudioStream_proxy_instantiate_playback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._instantiatePlayback () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // AudioStreamPlayback +} + +func _AudioStream_proxy_is_monophonic (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isMonophonic () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamGenerator.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamGenerator.swift new file mode 100644 index 000000000..67bfa6f5a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamGenerator.swift @@ -0,0 +1,157 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An audio stream with utilities for procedural sound generation. +/// +/// ``AudioStreamGenerator`` is a type of audio stream that does not play back sounds on its own; instead, it expects a script to generate audio data for it. See also ``AudioStreamGeneratorPlayback``. +/// +/// Here's a sample on how to use it to generate a sine wave: +/// +/// In the example above, the "AudioStreamPlayer" node must use an ``AudioStreamGenerator`` as its stream. The `fill_buffer` function provides audio data for approximating a sine wave. +/// +/// See also ``AudioEffectSpectrumAnalyzer`` for performing real-time audio spectrum analysis. +/// +/// > Note: Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower ``mixRate`` such as 11,025 Hz or 22,050 Hz. +/// +open class AudioStreamGenerator: AudioStream { + override open class var godotClassName: StringName { "AudioStreamGenerator" } + + /* Properties */ + + /// The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality. + /// + /// In games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`. + /// + /// According to the Nyquist-Shannon sampling theorem, there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality. + /// + final public var mixRate: Double { + get { + return get_mix_rate () + } + + set { + set_mix_rate (newValue) + } + + } + + /// The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up. + final public var bufferLength: Double { + get { + return get_buffer_length () + } + + set { + set_buffer_length (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mix_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mix_rate") + return withUnsafePointer(to: &AudioStreamGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mix_rate(_ hz: Double) { + withUnsafePointer(to: hz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamGenerator.method_set_mix_rate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mix_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix_rate") + return withUnsafePointer(to: &AudioStreamGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mix_rate() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamGenerator.method_get_mix_rate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer_length") + return withUnsafePointer(to: &AudioStreamGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer_length(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamGenerator.method_set_buffer_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_buffer_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer_length") + return withUnsafePointer(to: &AudioStreamGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffer_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamGenerator.method_get_buffer_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamGeneratorPlayback.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamGeneratorPlayback.swift new file mode 100644 index 000000000..b884d489c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamGeneratorPlayback.swift @@ -0,0 +1,162 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plays back audio generated using ``AudioStreamGenerator``. +/// +/// This class is meant to be used with ``AudioStreamGenerator`` to play back the generated audio in real-time. +open class AudioStreamGeneratorPlayback: AudioStreamPlaybackResampled { + override open class var godotClassName: StringName { "AudioStreamGeneratorPlayback" } + /* Methods */ + fileprivate static var method_push_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("push_frame") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3975407249)! + } + + } + + }() + + /// Pushes a single audio data frame to the buffer. This is usually less efficient than ``pushBuffer(frames:)`` in C# and compiled languages via GDExtension, but ``pushFrame(_:)`` may be _more_ efficient in GDScript. + public final func pushFrame(_ frame: Vector2) -> Bool { + var _result: Bool = false + withUnsafePointer(to: frame) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_push_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_can_push_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("can_push_buffer") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if a buffer of the size `amount` can be pushed to the audio sample data buffer without overflowing it, `false` otherwise. + public final func canPushBuffer(amount: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_can_push_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_push_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("push_buffer") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1361156557)! + } + + } + + }() + + /// Pushes several audio data frames to the buffer. This is usually more efficient than ``pushFrame(_:)`` in C# and compiled languages via GDExtension, but ``pushBuffer(frames:)`` may be _less_ efficient in GDScript. + public final func pushBuffer(frames: PackedVector2Array) -> Bool { + var _result: Bool = false + withUnsafePointer(to: frames.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_push_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_frames_available: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frames_available") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is `0`, the buffer is full. + public final func getFramesAvailable() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_get_frames_available, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_skips: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skips") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of times the playback skipped due to a buffer underrun in the audio sample data. This value is reset at the start of the playback. + public final func getSkips() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_get_skips, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_buffer") + return withUnsafePointer(to: &AudioStreamGeneratorPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the audio sample data buffer. + public final func clearBuffer() { + gi.object_method_bind_ptrcall(AudioStreamGeneratorPlayback.method_clear_buffer, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamInteractive.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamInteractive.swift new file mode 100644 index 000000000..2cd6a8b1f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamInteractive.swift @@ -0,0 +1,807 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Audio stream that can playback music interactively, combining clips and a transition table. +/// +/// This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and the transition rules via the ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``. Additionally, this stream export a property parameter to control the playback via ``AudioStreamPlayer``, ``AudioStreamPlayer2D``, or ``AudioStreamPlayer3D``. +/// +/// The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. +/// +open class AudioStreamInteractive: AudioStream { + override open class var godotClassName: StringName { "AudioStreamInteractive" } + public enum TransitionFromTime: Int64, CaseIterable, CustomDebugStringConvertible { + /// Start transition as soon as possible, don't wait for any specific time position. + case immediate = 0 // TRANSITION_FROM_TIME_IMMEDIATE + /// Transition when the clip playback position reaches the next beat. + case nextBeat = 1 // TRANSITION_FROM_TIME_NEXT_BEAT + /// Transition when the clip playback position reaches the next bar. + case nextBar = 2 // TRANSITION_FROM_TIME_NEXT_BAR + /// Transition when the current clip finished playing. + case end = 3 // TRANSITION_FROM_TIME_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .immediate: return ".immediate" + case .nextBeat: return ".nextBeat" + case .nextBar: return ".nextBar" + case .end: return ".end" + } + + } + + } + + public enum TransitionToTime: Int64, CaseIterable, CustomDebugStringConvertible { + /// Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them. + case samePosition = 0 // TRANSITION_TO_TIME_SAME_POSITION + /// Transition to the start of the destination clip. + case start = 1 // TRANSITION_TO_TIME_START + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .samePosition: return ".samePosition" + case .start: return ".start" + } + + } + + } + + public enum FadeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end. + case disabled = 0 // FADE_DISABLED + /// Use a fade-in in the next clip, let the current clip finish. + case `in` = 1 // FADE_IN + /// Use a fade-out in the current clip, the next clip will start by itself. + case out = 2 // FADE_OUT + /// Use a cross-fade between clips. + case cross = 3 // FADE_CROSS + /// Use automatic fade logic depending on the transition from/to. It is recommended to use this by default. + case automatic = 4 // FADE_AUTOMATIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`in`: return ".`in`" + case .out: return ".out" + case .cross: return ".cross" + case .automatic: return ".automatic" + } + + } + + } + + public enum AutoAdvanceMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disable auto-advance (default). + case disabled = 0 // AUTO_ADVANCE_DISABLED + /// Enable auto-advance, a clip must be specified. + case enabled = 1 // AUTO_ADVANCE_ENABLED + /// Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + case returnToHold = 2 // AUTO_ADVANCE_RETURN_TO_HOLD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .returnToHold: return ".returnToHold" + } + + } + + } + + /* Constants */ + /// This constant describes that any clip is valid for a specific transition as either source or destination. + public static let clipAny = -1 + + /* Properties */ + + /// Index of the initial clip, which will be played first when this stream is played. + final public var initialClip: Int32 { + get { + return get_initial_clip () + } + + set { + set_initial_clip (newValue) + } + + } + + /// Amount of clips contained in this interactive player. + final public var clipCount: Int32 { + get { + return get_clip_count () + } + + set { + set_clip_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_clip_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_count") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clip_count(_ clipCount: Int32) { + withUnsafePointer(to: clipCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_clip_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clip_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_count") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clip_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_clip_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_initial_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_initial_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_initial_clip(_ clipIndex: Int32) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_initial_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_initial_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_initial_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_initial_clip() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_initial_clip, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clip_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_name") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780747571)! + } + + } + + }() + + /// Set the name of the current clip (for easier identification). + public final func setClipName(clipIndex: Int32, name: StringName) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_clip_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_clip_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_name") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Return the name of a clip. + public final func getClipName(clipIndex: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_clip_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_clip_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_stream") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 111075094)! + } + + } + + }() + + /// Set the ``AudioStream`` associated with the current clip. + public final func setClipStream(clipIndex: Int32, stream: AudioStream?) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: stream?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_clip_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_clip_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_stream") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2739380747)! + } + + } + + }() + + /// Return the ``AudioStream`` associated with a clip. + public final func getClipStream(clipIndex: Int32) -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_clip_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_clip_auto_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_auto_advance") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 57217598)! + } + + } + + }() + + /// Set whether a clip will auto-advance by changing the auto-advance mode. + public final func setClipAutoAdvance(clipIndex: Int32, mode: AudioStreamInteractive.AutoAdvanceMode) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_clip_auto_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_clip_auto_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_auto_advance") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1778634807)! + } + + } + + }() + + /// Return whether a clip has auto-advance enabled. See ``setClipAutoAdvance(clipIndex:mode:)``. + public final func getClipAutoAdvance(clipIndex: Int32) -> AudioStreamInteractive.AutoAdvanceMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_clip_auto_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return AudioStreamInteractive.AutoAdvanceMode (rawValue: _result)! + } + + fileprivate static var method_set_clip_auto_advance_next_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_auto_advance_next_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored. + public final func setClipAutoAdvanceNextClip(clipIndex: Int32, autoAdvanceNextClip: Int32) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: autoAdvanceNextClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_set_clip_auto_advance_next_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_clip_auto_advance_next_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_auto_advance_next_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Return the clip towards which the clip referenced by `clipIndex` will auto-advance to. + public final func getClipAutoAdvanceNextClip(clipIndex: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_clip_auto_advance_next_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("add_transition") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1630280552)! + } + + } + + }() + + /// Add a transition between two clips. Provide the indices of the source and destination clips, or use the ``clipAny`` constant to indicate that transition happens to/from any clip to this one. + /// + /// * `fromTime` indicates the moment in the current clip the transition will begin after triggered. + /// + /// * `toTime` indicates the time in the next clip that the playback will start from. + /// + /// * `fadeMode` indicates how the fade will happen between clips. If unsure, just use ``FadeMode/automatic`` which uses the most common type of fade for each situation. + /// + /// * `fadeBeats` indicates how many beats the fade will take. Using decimals is allowed. + /// + /// * `useFillerClip` indicates that there will be a filler clip used between the source and destination clips. + /// + /// * `fillerClip` the index of the filler clip. + /// + /// * If `holdPrevious` is used, then this clip will be remembered. This can be used together with ``AutoAdvanceMode/returnToHold`` to return to this clip after another is done playing. + /// + public final func addTransition(fromClip: Int32, toClip: Int32, fromTime: AudioStreamInteractive.TransitionFromTime, toTime: AudioStreamInteractive.TransitionToTime, fadeMode: AudioStreamInteractive.FadeMode, fadeBeats: Double, useFillerClip: Bool = false, fillerClip: Int32 = -1, holdPrevious: Bool = false) { + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: fromTime.rawValue) { pArg2 in + withUnsafePointer(to: toTime.rawValue) { pArg3 in + withUnsafePointer(to: fadeMode.rawValue) { pArg4 in + withUnsafePointer(to: fadeBeats) { pArg5 in + withUnsafePointer(to: useFillerClip) { pArg6 in + withUnsafePointer(to: fillerClip) { pArg7 in + withUnsafePointer(to: holdPrevious) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_add_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_has_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("has_transition") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Return true if a given transition exists (was added via ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func hasTransition(fromClip: Int32, toClip: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_has_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_erase_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_transition") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Erase a transition by providing `fromClip` and `toClip` clip indices. ``clipAny`` can be used for either argument or both. + public final func eraseTransition(fromClip: Int32, toClip: Int32) { + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_erase_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_transition_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_list") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Return the list of transitions (from, to interleaved). + public final func getTransitionList() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_transition_from_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_from_time") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3453338158)! + } + + } + + }() + + /// Return the source time position for a transition (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func getTransitionFromTime(fromClip: Int32, toClip: Int32) -> AudioStreamInteractive.TransitionFromTime { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_from_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return AudioStreamInteractive.TransitionFromTime (rawValue: _result)! + } + + fileprivate static var method_get_transition_to_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_to_time") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1369651373)! + } + + } + + }() + + /// Return the destination time position for a transition (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func getTransitionToTime(fromClip: Int32, toClip: Int32) -> AudioStreamInteractive.TransitionToTime { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_to_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return AudioStreamInteractive.TransitionToTime (rawValue: _result)! + } + + fileprivate static var method_get_transition_fade_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_fade_mode") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4065396087)! + } + + } + + }() + + /// Return the mode for a transition (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func getTransitionFadeMode(fromClip: Int32, toClip: Int32) -> AudioStreamInteractive.FadeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_fade_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return AudioStreamInteractive.FadeMode (rawValue: _result)! + } + + fileprivate static var method_get_transition_fade_beats: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_fade_beats") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Return the time (in beats) for a transition (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func getTransitionFadeBeats(fromClip: Int32, toClip: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_fade_beats, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_transition_using_filler_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("is_transition_using_filler_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Return whether a transition uses the _filler clip_ functionality (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func isTransitionUsingFillerClip(fromClip: Int32, toClip: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_is_transition_using_filler_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_transition_filler_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transition_filler_clip") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Return the filler clip for a transition (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func getTransitionFillerClip(fromClip: Int32, toClip: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_get_transition_filler_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_transition_holding_previous: GDExtensionMethodBindPtr = { + let methodName = StringName("is_transition_holding_previous") + return withUnsafePointer(to: &AudioStreamInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Return whether a transition uses the _hold previous_ functionality (see ``addTransition(fromClip:toClip:fromTime:toTime:fadeMode:fadeBeats:useFillerClip:fillerClip:holdPrevious:)``). + public final func isTransitionHoldingPrevious(fromClip: Int32, toClip: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: fromClip) { pArg0 in + withUnsafePointer(to: toClip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamInteractive.method_is_transition_holding_previous, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamMP3.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamMP3.swift new file mode 100644 index 000000000..2e66ad452 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamMP3.swift @@ -0,0 +1,367 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// MP3 audio stream driver. +/// +/// MP3 audio stream driver. See ``data`` if you want to load an MP3 file at run-time. +open class AudioStreamMP3: AudioStream { + override open class var godotClassName: StringName { "AudioStreamMP3" } + + /* Properties */ + + /// Contains the audio data in bytes. + /// + /// You can load a file without having to import it beforehand using the code snippet below. Keep in mind that this snippet loads the whole file into memory and may not be ideal for huge files (hundreds of megabytes or more). + /// + final public var data: PackedByteArray { + get { + return get_data () + } + + set { + set_data (newValue) + } + + } + + final public var bpm: Double { + get { + return get_bpm () + } + + set { + set_bpm (newValue) + } + + } + + final public var beatCount: Int32 { + get { + return get_beat_count () + } + + set { + set_beat_count (newValue) + } + + } + + final public var barBeats: Int32 { + get { + return get_bar_beats () + } + + set { + set_bar_beats (newValue) + } + + } + + /// If `true`, the stream will automatically loop when it reaches the end. + final public var loop: Bool { + get { + return has_loop () + } + + set { + set_loop (newValue) + } + + } + + /// Time in seconds at which the stream starts after being looped. + final public var loopOffset: Double { + get { + return get_loop_offset () + } + + set { + set_loop_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_data") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2971499966)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_data(_ data: PackedByteArray) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2362200018)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_data() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(AudioStreamMP3.method_get_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("has_loop") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamMP3.method_has_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_offset") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_offset(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_loop_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_offset") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamMP3.method_get_loop_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bpm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bpm") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bpm(_ bpm: Double) { + withUnsafePointer(to: bpm) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_bpm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bpm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bpm") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bpm() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamMP3.method_get_bpm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_beat_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_beat_count") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_beat_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_beat_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_beat_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_beat_count") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_beat_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamMP3.method_get_beat_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bar_beats: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bar_beats") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bar_beats(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamMP3.method_set_bar_beats, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bar_beats: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bar_beats") + return withUnsafePointer(to: &AudioStreamMP3.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bar_beats() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamMP3.method_get_bar_beats, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamMicrophone.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamMicrophone.swift new file mode 100644 index 000000000..e6204b997 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamMicrophone.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plays real-time audio input data. +/// +/// When used directly in an ``AudioStreamPlayer`` node, ``AudioStreamMicrophone`` plays back microphone input in real-time. This can be used in conjunction with ``AudioEffectCapture`` to process the data or save it. +/// +/// > Note: ``ProjectSettings/audio/driver/enableInput`` must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. +/// +open class AudioStreamMicrophone: AudioStream { + override open class var godotClassName: StringName { "AudioStreamMicrophone" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamOggVorbis.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamOggVorbis.swift new file mode 100644 index 000000000..74208537e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamOggVorbis.swift @@ -0,0 +1,419 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class representing an Ogg Vorbis audio stream. +/// +/// The AudioStreamOggVorbis class is a specialized ``AudioStream`` for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the ``AudioStreamWAV`` class. +open class AudioStreamOggVorbis: AudioStream { + override open class var godotClassName: StringName { "AudioStreamOggVorbis" } + + /* Properties */ + + /// Contains the raw Ogg data for this stream. + final public var packetSequence: OggPacketSequence? { + get { + return get_packet_sequence () + } + + set { + set_packet_sequence (newValue) + } + + } + + final public var bpm: Double { + get { + return get_bpm () + } + + set { + set_bpm (newValue) + } + + } + + final public var beatCount: Int32 { + get { + return get_beat_count () + } + + set { + set_beat_count (newValue) + } + + } + + final public var barBeats: Int32 { + get { + return get_bar_beats () + } + + set { + set_bar_beats (newValue) + } + + } + + /// If `true`, the audio will play again from the specified ``loopOffset`` once it is done playing. Useful for ambient sounds and background music. + final public var loop: Bool { + get { + return has_loop () + } + + set { + set_loop (newValue) + } + + } + + /// Time in seconds at which the stream starts after being looped. + final public var loopOffset: Double { + get { + return get_loop_offset () + } + + set { + set_loop_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_buffer") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 354904730)! + } + + } + + }() + + /// Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data. + public static func loadFromBuffer(_ buffer: PackedByteArray) -> AudioStreamOggVorbis? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_from_buffer, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_load_from_file: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_file") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797568536)! + } + + } + + }() + + /// Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format. + public static func loadFromFile(path: String) -> AudioStreamOggVorbis? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_from_file, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_packet_sequence: GDExtensionMethodBindPtr = { + let methodName = StringName("set_packet_sequence") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 438882457)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_packet_sequence(_ packetSequence: OggPacketSequence?) { + withUnsafePointer(to: packetSequence?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_packet_sequence, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_packet_sequence: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_sequence") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2801636033)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_packet_sequence() -> OggPacketSequence? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_get_packet_sequence, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("has_loop") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_has_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_offset") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_offset(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_loop_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_offset") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_get_loop_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bpm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bpm") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bpm(_ bpm: Double) { + withUnsafePointer(to: bpm) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_bpm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bpm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bpm") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bpm() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_get_bpm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_beat_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_beat_count") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_beat_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_beat_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_beat_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_beat_count") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_beat_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_get_beat_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bar_beats: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bar_beats") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bar_beats(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_set_bar_beats, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bar_beats: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bar_beats") + return withUnsafePointer(to: &AudioStreamOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bar_beats() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamOggVorbis.method_get_bar_beats, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlayback.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayback.swift new file mode 100644 index 000000000..9072d6aa7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayback.swift @@ -0,0 +1,231 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Meta class for playing back audio. +/// +/// Can play, loop, pause a scroll through audio. See ``AudioStream`` and ``AudioStreamOggVorbis`` for usage. +open class AudioStreamPlayback: RefCounted { + override open class var godotClassName: StringName { "AudioStreamPlayback" } + /* Methods */ + /// Override this method to customize what happens when the playback starts at the given position, such as by calling ``AudioStreamPlayer/play(fromPosition:)``. + @_documentation(visibility: public) + open func _start(fromPos: Double) { + } + + /// Override this method to customize what happens when the playback is stopped, such as by calling ``AudioStreamPlayer/stop()``. + @_documentation(visibility: public) + open func _stop() { + } + + /// Overridable method. Should return `true` if this playback is active and playing its audio stream. + @_documentation(visibility: public) + open func _isPlaying() -> Bool { + return false + } + + /// Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return `0`. + @_documentation(visibility: public) + open func _getLoopCount() -> Int32 { + return 0 + } + + /// Overridable method. Should return the current progress along the audio stream, in seconds. + @_documentation(visibility: public) + open func _getPlaybackPosition() -> Double { + return 0.0 + } + + /// Override this method to customize what happens when seeking this audio stream at the given `position`, such as by calling ``AudioStreamPlayer/seek(toPosition:)``. + @_documentation(visibility: public) + open func _seek(position: Double) { + } + + /// Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. + /// + /// > Note: It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. + /// + @_documentation(visibility: public) + open func _mix(buffer: OpaquePointer?, rateScale: Double, frames: Int32) -> Int32 { + return 0 + } + + /// Overridable method. Called whenever the audio stream is mixed if the playback is active and ``AudioServer/setEnableTaggingUsedAudioStreams(enable:)`` has been set to `true`. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. + @_documentation(visibility: public) + open func _tagUsedStreams() { + } + + /// Set the current value of a playback parameter by name (see ``AudioStream/_getParameterList()``). + @_documentation(visibility: public) + open func _setParameter(name: StringName, value: Variant?) { + } + + /// Return the current value of a playback parameter by name (see ``AudioStream/_getParameterList()``). + @_documentation(visibility: public) + open func _getParameter(name: StringName) -> Variant? { + return nil + } + + fileprivate static var method_set_sample_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sample_playback") + return withUnsafePointer(to: &AudioStreamPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3195455091)! + } + + } + + }() + + /// Associates ``AudioSamplePlayback`` to this ``AudioStreamPlayback`` for playing back the audio sample of this stream. + public final func setSamplePlayback(playbackSample: AudioSamplePlayback?) { + withUnsafePointer(to: playbackSample?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayback.method_set_sample_playback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sample_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sample_playback") + return withUnsafePointer(to: &AudioStreamPlayback.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3482738536)! + } + + } + + }() + + /// Returns the ``AudioSamplePlayback`` associated with this ``AudioStreamPlayback`` for playing back the audio sample of this stream. + public final func getSamplePlayback() -> AudioSamplePlayback? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayback.method_get_sample_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_loop_count": + return _AudioStreamPlayback_proxy_get_loop_count + case "_get_parameter": + return _AudioStreamPlayback_proxy_get_parameter + case "_get_playback_position": + return _AudioStreamPlayback_proxy_get_playback_position + case "_is_playing": + return _AudioStreamPlayback_proxy_is_playing + case "_mix": + return _AudioStreamPlayback_proxy_mix + case "_seek": + return _AudioStreamPlayback_proxy_seek + case "_set_parameter": + return _AudioStreamPlayback_proxy_set_parameter + case "_start": + return _AudioStreamPlayback_proxy_start + case "_stop": + return _AudioStreamPlayback_proxy_stop + case "_tag_used_streams": + return _AudioStreamPlayback_proxy_tag_used_streams + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AudioStreamPlayback_proxy_get_loop_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getLoopCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _AudioStreamPlayback_proxy_get_parameter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getParameter (name: StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _AudioStreamPlayback_proxy_get_playback_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPlaybackPosition () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AudioStreamPlayback_proxy_is_playing (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isPlaying () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _AudioStreamPlayback_proxy_mix (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._mix (buffer: args [0]!.assumingMemoryBound (to: OpaquePointer?.self).pointee, rateScale: args [1]!.assumingMemoryBound (to: Double.self).pointee, frames: args [2]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _AudioStreamPlayback_proxy_seek (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._seek (position: args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _AudioStreamPlayback_proxy_set_parameter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setParameter (name: StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), value: args [1]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _AudioStreamPlayback_proxy_start (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._start (fromPos: args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _AudioStreamPlayback_proxy_stop (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._stop () +} + +func _AudioStreamPlayback_proxy_tag_used_streams (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._tagUsedStreams () +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackInteractive.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackInteractive.swift new file mode 100644 index 000000000..1215ad3af --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackInteractive.swift @@ -0,0 +1,80 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Playback component of ``AudioStreamInteractive``. +/// +/// Playback component of ``AudioStreamInteractive``. Contains functions to change the currently played clip. +open class AudioStreamPlaybackInteractive: AudioStreamPlayback { + override open class var godotClassName: StringName { "AudioStreamPlaybackInteractive" } + /* Methods */ + fileprivate static var method_switch_to_clip_by_name: GDExtensionMethodBindPtr = { + let methodName = StringName("switch_to_clip_by_name") + return withUnsafePointer(to: &AudioStreamPlaybackInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Switch to a clip (by name). + public final func switchToClipByName(clipName: StringName) { + withUnsafePointer(to: clipName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackInteractive.method_switch_to_clip_by_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_switch_to_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("switch_to_clip") + return withUnsafePointer(to: &AudioStreamPlaybackInteractive.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Switch to a clip (by index). + public final func switchToClip(clipIndex: Int32) { + withUnsafePointer(to: clipIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackInteractive.method_switch_to_clip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackOggVorbis.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackOggVorbis.swift new file mode 100644 index 000000000..ba94193d8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackOggVorbis.swift @@ -0,0 +1,24 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class AudioStreamPlaybackOggVorbis: AudioStreamPlaybackResampled { + override open class var godotClassName: StringName { "AudioStreamPlaybackOggVorbis" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPlaylist.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPlaylist.swift new file mode 100644 index 000000000..771694db6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPlaylist.swift @@ -0,0 +1,25 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Playback class used for ``AudioStreamPlaylist``. +open class AudioStreamPlaybackPlaylist: AudioStreamPlayback { + override open class var godotClassName: StringName { "AudioStreamPlaybackPlaylist" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPolyphonic.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPolyphonic.swift new file mode 100644 index 000000000..f901dc565 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackPolyphonic.swift @@ -0,0 +1,191 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Playback instance for ``AudioStreamPolyphonic``. +/// +/// Playback instance for ``AudioStreamPolyphonic``. After setting the `stream` property of ``AudioStreamPlayer``, ``AudioStreamPlayer2D``, or ``AudioStreamPlayer3D``, the playback instance can be obtained by calling ``AudioStreamPlayer/getStreamPlayback()``, ``AudioStreamPlayer2D/getStreamPlayback()`` or ``AudioStreamPlayer3D/getStreamPlayback()`` methods. +open class AudioStreamPlaybackPolyphonic: AudioStreamPlayback { + override open class var godotClassName: StringName { "AudioStreamPlaybackPolyphonic" } + /* Constants */ + /// Returned by ``playStream(_:fromOffset:volumeDb:pitchScale:playbackType:bus:)`` in case it could not allocate a stream for playback. + public static let invalidId = -1 + /* Methods */ + fileprivate static var method_play_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("play_stream") + return withUnsafePointer(to: &AudioStreamPlaybackPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1846744803)! + } + + } + + }() + + /// Play an ``AudioStream`` at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. + /// + /// The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. + /// + /// This ID becomes invalid when the stream ends (if it does not loop), when the ``AudioStreamPlaybackPolyphonic`` is stopped, or when ``stopStream(_:)`` is called. + /// + /// This function returns ``invalidId`` if the amount of streams currently playing equals ``AudioStreamPolyphonic/polyphony``. If you need a higher amount of maximum polyphony, raise this value. + /// + public final func playStream(_ stream: AudioStream?, fromOffset: Double = 0, volumeDb: Double = 0, pitchScale: Double = 1.0, playbackType: AudioServer.PlaybackType = .`default`, bus: StringName = StringName ("Master")) -> Int { + var _result: Int = 0 + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: fromOffset) { pArg1 in + withUnsafePointer(to: volumeDb) { pArg2 in + withUnsafePointer(to: pitchScale) { pArg3 in + withUnsafePointer(to: playbackType.rawValue) { pArg4 in + withUnsafePointer(to: bus.content) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackPolyphonic.method_play_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_stream_volume: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_volume") + return withUnsafePointer(to: &AudioStreamPlaybackPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Change the stream volume (in db). The `stream` argument is an integer ID returned by ``playStream(_:fromOffset:volumeDb:pitchScale:playbackType:bus:)``. + public final func setStreamVolume(stream: Int, volumeDb: Double) { + withUnsafePointer(to: stream) { pArg0 in + withUnsafePointer(to: volumeDb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackPolyphonic.method_set_stream_volume, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_stream_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlaybackPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Change the stream pitch scale. The `stream` argument is an integer ID returned by ``playStream(_:fromOffset:volumeDb:pitchScale:playbackType:bus:)``. + public final func setStreamPitchScale(stream: Int, pitchScale: Double) { + withUnsafePointer(to: stream) { pArg0 in + withUnsafePointer(to: pitchScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackPolyphonic.method_set_stream_pitch_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_stream_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_stream_playing") + return withUnsafePointer(to: &AudioStreamPlaybackPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Return true whether the stream associated with an integer ID is still playing. Check ``playStream(_:fromOffset:volumeDb:pitchScale:playbackType:bus:)`` for information on when this ID becomes invalid. + public final func isStreamPlaying(stream: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: stream) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackPolyphonic.method_is_stream_playing, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_stop_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("stop_stream") + return withUnsafePointer(to: &AudioStreamPlaybackPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stop a stream. The `stream` argument is an integer ID returned by ``playStream(_:fromOffset:volumeDb:pitchScale:playbackType:bus:)``, which becomes invalid after calling this function. + public final func stopStream(_ stream: Int) { + withUnsafePointer(to: stream) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaybackPolyphonic.method_stop_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackResampled.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackResampled.swift new file mode 100644 index 000000000..fb0507770 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackResampled.swift @@ -0,0 +1,83 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class AudioStreamPlaybackResampled: AudioStreamPlayback { + override open class var godotClassName: StringName { "AudioStreamPlaybackResampled" } + /* Methods */ + /// + @_documentation(visibility: public) + open func _mixResampled(dstBuffer: OpaquePointer?, frameCount: Int32) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getStreamSamplingRate() -> Double { + return 0.0 + } + + fileprivate static var method_begin_resample: GDExtensionMethodBindPtr = { + let methodName = StringName("begin_resample") + return withUnsafePointer(to: &AudioStreamPlaybackResampled.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// + public final func beginResample() { + gi.object_method_bind_ptrcall(AudioStreamPlaybackResampled.method_begin_resample, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_stream_sampling_rate": + return _AudioStreamPlaybackResampled_proxy_get_stream_sampling_rate + case "_mix_resampled": + return _AudioStreamPlaybackResampled_proxy_mix_resampled + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _AudioStreamPlaybackResampled_proxy_get_stream_sampling_rate (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getStreamSamplingRate () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _AudioStreamPlaybackResampled_proxy_mix_resampled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._mixResampled (dstBuffer: args [0]!.assumingMemoryBound (to: OpaquePointer?.self).pointee, frameCount: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackSynchronized.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackSynchronized.swift new file mode 100644 index 000000000..9c0784fed --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaybackSynchronized.swift @@ -0,0 +1,24 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class AudioStreamPlaybackSynchronized: AudioStreamPlayback { + override open class var godotClassName: StringName { "AudioStreamPlaybackSynchronized" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer.swift new file mode 100644 index 000000000..c730f92ea --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer.swift @@ -0,0 +1,733 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node for audio playback. +/// +/// The ``AudioStreamPlayer`` node plays an audio stream non-positionally. It is ideal for user interfaces, menus, or background music. +/// +/// To use this node, ``stream`` needs to be set to a valid ``AudioStream`` resource. Playing more than one sound at the time is also supported, see ``maxPolyphony``. +/// +/// If you need to play audio at a specific position, use ``AudioStreamPlayer2D`` or ``AudioStreamPlayer3D`` instead. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class AudioStreamPlayer: Node { + override open class var godotClassName: StringName { "AudioStreamPlayer" } + public enum MixTarget: Int64, CaseIterable, CustomDebugStringConvertible { + /// The audio will be played only on the first channel. This is the default. + case stereo = 0 // MIX_TARGET_STEREO + /// The audio will be played on all surround channels. + case surround = 1 // MIX_TARGET_SURROUND + /// The audio will be played on the second channel, which is usually the center. + case center = 2 // MIX_TARGET_CENTER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .stereo: return ".stereo" + case .surround: return ".surround" + case .center: return ".center" + } + + } + + } + + + /* Properties */ + + /// The ``AudioStream`` resource to be played. Setting this property stops all currently playing sounds. If left empty, the ``AudioStreamPlayer`` does not work. + final public var stream: AudioStream? { + get { + return get_stream () + } + + set { + set_stream (newValue) + } + + } + + /// Volume of sound, in decibel. This is an offset of the ``stream``'s volume. + /// + /// > Note: To convert between decibel and linear energy (like most volume sliders do), use ``@GlobalScope.db_to_linear`` and ``@GlobalScope.linear_to_db``. + /// + final public var volumeDb: Double { + get { + return get_volume_db () + } + + set { + set_volume_db (newValue) + } + + } + + /// The audio's pitch and tempo, as a multiplier of the ``stream``'s sample rate. A value of `2.0` doubles the audio's pitch, while a value of `0.5` halves the pitch. + final public var pitchScale: Double { + get { + return get_pitch_scale () + } + + set { + set_pitch_scale (newValue) + } + + } + + /// If `true`, this node calls ``play(fromPosition:)`` when entering the tree. + final public var autoplay: Bool { + get { + return is_autoplay_enabled () + } + + set { + set_autoplay (newValue) + } + + } + + /// If `true`, the sounds are paused. Setting ``streamPaused`` to `false` resumes all sounds. + /// + /// > Note: This property is automatically changed when exiting or entering the tree, or this node is paused (see ``Node/processMode``). + /// + final public var streamPaused: Bool { + get { + return get_stream_paused () + } + + set { + set_stream_paused (newValue) + } + + } + + /// The mix target channels, as one of the ``AudioStreamPlayer/MixTarget`` constants. Has no effect when two speakers or less are detected (see ``AudioServer.SpeakerMode``). + final public var mixTarget: AudioStreamPlayer.MixTarget { + get { + return get_mix_target () + } + + set { + set_mix_target (newValue) + } + + } + + /// The maximum number of sounds this node can play at the same time. Calling ``play(fromPosition:)`` after this value is reached will cut off the oldest sounds. + final public var maxPolyphony: Int32 { + get { + return get_max_polyphony () + } + + set { + set_max_polyphony (newValue) + } + + } + + /// The target bus name. All sounds from this node will be playing on this bus. + /// + /// > Note: At runtime, if no bus with the given name exists, all sounds will fall back on `"Master"`. See also ``AudioServer/getBusName(busIdx:)``. + /// + final public var bus: StringName { + get { + return get_bus () + } + + set { + set_bus (newValue) + } + + } + + /// The playback type of the stream player. If set other than to the default value, it will force that playback type. + final public var playbackType: AudioServer.PlaybackType { + get { + return get_playback_type () + } + + set { + set_playback_type (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2210767741)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream(_ stream: AudioStream?) { + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 160907539)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream() -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_stream, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volume_db(_ volumeDb: Double) { + withUnsafePointer(to: volumeDb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_volume_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volume_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_volume_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pitch_scale(_ pitchScale: Double) { + withUnsafePointer(to: pitchScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_pitch_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pitch_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_pitch_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1958160172)! + } + + } + + }() + + /// Plays a sound from the beginning, or the given `fromPosition` in seconds. + public final func play(fromPosition: Double = 0.0) { + withUnsafePointer(to: fromPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_seek: GDExtensionMethodBindPtr = { + let methodName = StringName("seek") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Restarts all sounds to be played from the given `toPosition`, in seconds. Does nothing if no sounds are playing. + public final func seek(toPosition: Double) { + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_seek, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops all sounds from this node. + public final func stop() { + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playback_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_position") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + /// Returns the position in the ``AudioStream`` of the latest sound, in seconds. Returns `0.0` if no sounds are playing. + /// + /// > Note: The position is not always accurate, as the ``AudioServer`` does not mix audio every processed frame. To get more accurate results, add ``AudioServer/getTimeSinceLastMix()`` to the returned position. + /// + public final func getPlaybackPosition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_playback_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bus(_ bus: StringName) { + withUnsafePointer(to: bus.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_bus, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bus() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_autoplay_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_autoplay_enabled") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_autoplay_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_is_autoplay_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mix_target: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mix_target") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2300306138)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mix_target(_ mixTarget: AudioStreamPlayer.MixTarget) { + withUnsafePointer(to: mixTarget.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_mix_target, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mix_target: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix_target") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 172807476)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mix_target() -> AudioStreamPlayer.MixTarget { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_mix_target, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamPlayer.MixTarget (rawValue: _result)! + } + + fileprivate static var method_set_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_paused(_ pause: Bool) { + withUnsafePointer(to: pause) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_stream_paused, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_paused() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_stream_paused, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_polyphony(_ maxPolyphony: Int32) { + withUnsafePointer(to: maxPolyphony) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_max_polyphony, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_polyphony() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_max_polyphony, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("has_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if any sound is active, even if ``streamPaused`` is set to `true`. See also ``playing`` and ``getStreamPlayback()``. + public final func hasStreamPlayback() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_has_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 210135309)! + } + + } + + }() + + /// Returns the latest ``AudioStreamPlayback`` of this node, usually the most recently created by ``play(fromPosition:)``. If no sounds are playing, this method fails and returns an empty playback. + public final func getStreamPlayback() -> AudioStreamPlayback? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 725473817)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_playback_type(_ playbackType: AudioServer.PlaybackType) { + withUnsafePointer(to: playbackType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_set_playback_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4011264623)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_playback_type() -> AudioServer.PlaybackType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer.method_get_playback_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioServer.PlaybackType (rawValue: _result)! + } + + // Signals + /// Emitted when a sound finishes playing without interruptions. This signal is _not_ emitted when calling ``stop()``, or when exiting the tree while sounds are playing. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer2D.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer2D.swift new file mode 100644 index 000000000..4d1be2f2d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer2D.swift @@ -0,0 +1,875 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plays positional sound in 2D space. +/// +/// Plays audio that is attenuated with distance to the listener. +/// +/// By default, audio is heard from the screen center. This can be changed by adding an ``AudioListener2D`` node to the scene and enabling it by calling ``AudioListener2D/makeCurrent()`` on it. +/// +/// See also ``AudioStreamPlayer`` to play a sound non-positionally. +/// +/// > Note: Hiding an ``AudioStreamPlayer2D`` node does not disable its audio output. To temporarily disable an ``AudioStreamPlayer2D``'s audio output, set ``volumeDb`` to a very low value like `-100` (which isn't audible to human hearing). +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class AudioStreamPlayer2D: Node2D { + override open class var godotClassName: StringName { "AudioStreamPlayer2D" } + + /* Properties */ + + /// The ``AudioStream`` object to be played. + final public var stream: AudioStream? { + get { + return get_stream () + } + + set { + set_stream (newValue) + } + + } + + /// Base volume before attenuation. + final public var volumeDb: Double { + get { + return get_volume_db () + } + + set { + set_volume_db (newValue) + } + + } + + /// The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. + final public var pitchScale: Double { + get { + return get_pitch_scale () + } + + set { + set_pitch_scale (newValue) + } + + } + + /// If `true`, audio plays when added to scene tree. + final public var autoplay: Bool { + get { + return is_autoplay_enabled () + } + + set { + set_autoplay (newValue) + } + + } + + /// If `true`, the playback is paused. You can resume it by setting ``streamPaused`` to `false`. + final public var streamPaused: Bool { + get { + return get_stream_paused () + } + + set { + set_stream_paused (newValue) + } + + } + + /// Maximum distance from which audio is still hearable. + final public var maxDistance: Double { + get { + return get_max_distance () + } + + set { + set_max_distance (newValue) + } + + } + + /// The volume is attenuated over distance with this as an exponent. + final public var attenuation: Double { + get { + return get_attenuation () + } + + set { + set_attenuation (newValue) + } + + } + + /// The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + final public var maxPolyphony: Int32 { + get { + return get_max_polyphony () + } + + set { + set_max_polyphony (newValue) + } + + } + + /// Scales the panning strength for this node by multiplying the base ``ProjectSettings/audio/general/2dPanningStrength`` with this factor. Higher values will pan audio from left to right more dramatically than lower values. + final public var panningStrength: Double { + get { + return get_panning_strength () + } + + set { + set_panning_strength (newValue) + } + + } + + /// Bus on which this audio is playing. + /// + /// > Note: When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `"Master"`. + /// + final public var bus: StringName { + get { + return get_bus () + } + + set { + set_bus (newValue) + } + + } + + /// Determines which ``Area2D`` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect ``AudioStream``s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. + final public var areaMask: UInt32 { + get { + return get_area_mask () + } + + set { + set_area_mask (newValue) + } + + } + + /// The playback type of the stream player. If set other than to the default value, it will force that playback type. + final public var playbackType: AudioServer.PlaybackType { + get { + return get_playback_type () + } + + set { + set_playback_type (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2210767741)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream(_ stream: AudioStream?) { + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 160907539)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream() -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_stream, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volume_db(_ volumeDb: Double) { + withUnsafePointer(to: volumeDb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_volume_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volume_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_volume_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pitch_scale(_ pitchScale: Double) { + withUnsafePointer(to: pitchScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_pitch_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pitch_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_pitch_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1958160172)! + } + + } + + }() + + /// Queues the audio to play on the next physics frame, from the given position `fromPosition`, in seconds. + public final func play(fromPosition: Double = 0.0) { + withUnsafePointer(to: fromPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_seek: GDExtensionMethodBindPtr = { + let methodName = StringName("seek") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the position from which audio will be played, in seconds. + public final func seek(toPosition: Double) { + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_seek, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the audio. + public final func stop() { + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playback_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_position") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + /// Returns the position in the ``AudioStream``. + public final func getPlaybackPosition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_playback_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bus(_ bus: StringName) { + withUnsafePointer(to: bus.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_bus, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bus() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_autoplay_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_autoplay_enabled") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_autoplay_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_is_autoplay_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_distance") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_distance(_ pixels: Double) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_distance") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attenuation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attenuation") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attenuation(_ curve: Double) { + withUnsafePointer(to: curve) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_attenuation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attenuation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attenuation") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attenuation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_attenuation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_area_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_area_mask") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_area_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_area_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_area_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_area_mask") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_area_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_area_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_paused(_ pause: Bool) { + withUnsafePointer(to: pause) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_stream_paused, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_paused() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_stream_paused, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_polyphony(_ maxPolyphony: Int32) { + withUnsafePointer(to: maxPolyphony) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_max_polyphony, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_polyphony() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_max_polyphony, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_panning_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_panning_strength") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_panning_strength(_ panningStrength: Double) { + withUnsafePointer(to: panningStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_panning_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_panning_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_panning_strength") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_panning_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_panning_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("has_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns whether the ``AudioStreamPlayer`` can return the ``AudioStreamPlayback`` object or not. + public final func hasStreamPlayback() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_has_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 210135309)! + } + + } + + }() + + /// Returns the ``AudioStreamPlayback`` object associated with this ``AudioStreamPlayer2D``. + public final func getStreamPlayback() -> AudioStreamPlayback? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 725473817)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_playback_type(_ playbackType: AudioServer.PlaybackType) { + withUnsafePointer(to: playbackType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_set_playback_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4011264623)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_playback_type() -> AudioServer.PlaybackType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer2D.method_get_playback_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioServer.PlaybackType (rawValue: _result)! + } + + // Signals + /// Emitted when the audio stops playing. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer3D.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer3D.swift new file mode 100644 index 000000000..5aa868236 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlayer3D.swift @@ -0,0 +1,1364 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plays positional sound in 3D space. +/// +/// Plays audio with positional sound effects, based on the relative position of the audio listener. Positional effects include distance attenuation, directionality, and the Doppler effect. For greater realism, a low-pass filter is applied to distant sounds. This can be disabled by setting ``attenuationFilterCutoffHz`` to `20500`. +/// +/// By default, audio is heard from the camera position. This can be changed by adding an ``AudioListener3D`` node to the scene and enabling it by calling ``AudioListener3D/makeCurrent()`` on it. +/// +/// See also ``AudioStreamPlayer`` to play a sound non-positionally. +/// +/// > Note: Hiding an ``AudioStreamPlayer3D`` node does not disable its audio output. To temporarily disable an ``AudioStreamPlayer3D``'s audio output, set ``volumeDb`` to a very low value like `-100` (which isn't audible to human hearing). +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class AudioStreamPlayer3D: Node3D { + override open class var godotClassName: StringName { "AudioStreamPlayer3D" } + public enum AttenuationModel: Int64, CaseIterable, CustomDebugStringConvertible { + /// Attenuation of loudness according to linear distance. + case inverseDistance = 0 // ATTENUATION_INVERSE_DISTANCE + /// Attenuation of loudness according to squared distance. + case inverseSquareDistance = 1 // ATTENUATION_INVERSE_SQUARE_DISTANCE + /// Attenuation of loudness according to logarithmic distance. + case logarithmic = 2 // ATTENUATION_LOGARITHMIC + /// No attenuation of loudness according to distance. The sound will still be heard positionally, unlike an ``AudioStreamPlayer``. ``AttenuationModel/disabled`` can be combined with a ``maxDistance`` value greater than `0.0` to achieve linear attenuation clamped to a sphere of a defined size. + case disabled = 3 // ATTENUATION_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inverseDistance: return ".inverseDistance" + case .inverseSquareDistance: return ".inverseSquareDistance" + case .logarithmic: return ".logarithmic" + case .disabled: return ".disabled" + } + + } + + } + + public enum DopplerTracking: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables doppler tracking. + case disabled = 0 // DOPPLER_TRACKING_DISABLED + /// Executes doppler tracking during process frames (see ``Node/notificationInternalProcess``). + case idleStep = 1 // DOPPLER_TRACKING_IDLE_STEP + /// Executes doppler tracking during physics frames (see ``Node/notificationInternalPhysicsProcess``). + case physicsStep = 2 // DOPPLER_TRACKING_PHYSICS_STEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .idleStep: return ".idleStep" + case .physicsStep: return ".physicsStep" + } + + } + + } + + + /* Properties */ + + /// The ``AudioStream`` resource to be played. + final public var stream: AudioStream? { + get { + return get_stream () + } + + set { + set_stream (newValue) + } + + } + + /// Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation. + final public var attenuationModel: AudioStreamPlayer3D.AttenuationModel { + get { + return get_attenuation_model () + } + + set { + set_attenuation_model (newValue) + } + + } + + /// The base sound level before attenuation, in decibels. + final public var volumeDb: Double { + get { + return get_volume_db () + } + + set { + set_volume_db (newValue) + } + + } + + /// The factor for the attenuation effect. Higher values make the sound audible over a larger distance. + final public var unitSize: Double { + get { + return get_unit_size () + } + + set { + set_unit_size (newValue) + } + + } + + /// Sets the absolute maximum of the sound level, in decibels. + final public var maxDb: Double { + get { + return get_max_db () + } + + set { + set_max_db (newValue) + } + + } + + /// The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. + final public var pitchScale: Double { + get { + return get_pitch_scale () + } + + set { + set_pitch_scale (newValue) + } + + } + + /// If `true`, audio plays when the AudioStreamPlayer3D node is added to scene tree. + final public var autoplay: Bool { + get { + return is_autoplay_enabled () + } + + set { + set_autoplay (newValue) + } + + } + + /// If `true`, the playback is paused. You can resume it by setting ``streamPaused`` to `false`. + final public var streamPaused: Bool { + get { + return get_stream_paused () + } + + set { + set_stream_paused (newValue) + } + + } + + /// The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than `0.0`. ``maxDistance`` works in tandem with ``unitSize``. However, unlike ``unitSize`` whose behavior depends on the ``attenuationModel``, ``maxDistance`` always works in a linear fashion. This can be used to prevent the ``AudioStreamPlayer3D`` from requiring audio mixing when the listener is far away, which saves CPU resources. + final public var maxDistance: Double { + get { + return get_max_distance () + } + + set { + set_max_distance (newValue) + } + + } + + /// The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + final public var maxPolyphony: Int32 { + get { + return get_max_polyphony () + } + + set { + set_max_polyphony (newValue) + } + + } + + /// Scales the panning strength for this node by multiplying the base ``ProjectSettings/audio/general/3dPanningStrength`` with this factor. Higher values will pan audio from left to right more dramatically than lower values. + final public var panningStrength: Double { + get { + return get_panning_strength () + } + + set { + set_panning_strength (newValue) + } + + } + + /// The bus on which this audio is playing. + /// + /// > Note: When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `"Master"`. + /// + final public var bus: StringName { + get { + return get_bus () + } + + set { + set_bus (newValue) + } + + } + + /// Determines which ``Area3D`` layers affect the sound for reverb and audio bus effects. Areas can be used to redirect ``AudioStream``s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. + final public var areaMask: UInt32 { + get { + return get_area_mask () + } + + set { + set_area_mask (newValue) + } + + } + + /// The playback type of the stream player. If set other than to the default value, it will force that playback type. + final public var playbackType: AudioServer.PlaybackType { + get { + return get_playback_type () + } + + set { + set_playback_type (newValue) + } + + } + + /// If `true`, the audio should be attenuated according to the direction of the sound. + final public var emissionAngleEnabled: Bool { + get { + return is_emission_angle_enabled () + } + + set { + set_emission_angle_enabled (newValue) + } + + } + + /// The angle in which the audio reaches a listener unattenuated. + final public var emissionAngleDegrees: Double { + get { + return get_emission_angle () + } + + set { + set_emission_angle (newValue) + } + + } + + /// Attenuation factor used if listener is outside of ``emissionAngleDegrees`` and ``emissionAngleEnabled`` is set, in decibels. + final public var emissionAngleFilterAttenuationDb: Double { + get { + return get_emission_angle_filter_attenuation_db () + } + + set { + set_emission_angle_filter_attenuation_db (newValue) + } + + } + + /// The cutoff frequency of the attenuation low-pass filter, in Hz. A sound above this frequency is attenuated more than a sound below this frequency. To disable this effect, set this to `20500` as this frequency is above the human hearing limit. + final public var attenuationFilterCutoffHz: Double { + get { + return get_attenuation_filter_cutoff_hz () + } + + set { + set_attenuation_filter_cutoff_hz (newValue) + } + + } + + /// Amount how much the filter affects the loudness, in decibels. + final public var attenuationFilterDb: Double { + get { + return get_attenuation_filter_db () + } + + set { + set_attenuation_filter_db (newValue) + } + + } + + /// Decides in which step the Doppler effect should be calculated. + final public var dopplerTracking: AudioStreamPlayer3D.DopplerTracking { + get { + return get_doppler_tracking () + } + + set { + set_doppler_tracking (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2210767741)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream(_ stream: AudioStream?) { + withUnsafePointer(to: stream?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 160907539)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream() -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_stream, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volume_db(_ volumeDb: Double) { + withUnsafePointer(to: volumeDb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_volume_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volume_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volume_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volume_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_volume_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_unit_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unit_size") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_unit_size(_ unitSize: Double) { + withUnsafePointer(to: unitSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_unit_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unit_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unit_size") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_unit_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_unit_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_db(_ maxDb: Double) { + withUnsafePointer(to: maxDb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_max_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_max_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pitch_scale(_ pitchScale: Double) { + withUnsafePointer(to: pitchScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_pitch_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pitch_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pitch_scale") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pitch_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_pitch_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_play: GDExtensionMethodBindPtr = { + let methodName = StringName("play") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1958160172)! + } + + } + + }() + + /// Queues the audio to play on the next physics frame, from the given position `fromPosition`, in seconds. + public final func play(fromPosition: Double = 0.0) { + withUnsafePointer(to: fromPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_play, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_seek: GDExtensionMethodBindPtr = { + let methodName = StringName("seek") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the position from which audio will be played, in seconds. + public final func seek(toPosition: Double) { + withUnsafePointer(to: toPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_seek, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("stop") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the audio. + public final func stop() { + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_stop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_playing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + public final func isPlaying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_is_playing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playback_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_position") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + /// Returns the position in the ``AudioStream``. + public final func getPlaybackPosition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_playback_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bus") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bus(_ bus: StringName) { + withUnsafePointer(to: bus.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_bus, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bus: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bus") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bus() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_bus, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_autoplay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoplay") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoplay(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_autoplay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_autoplay_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_autoplay_enabled") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_autoplay_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_is_autoplay_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_distance") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_distance(_ meters: Double) { + withUnsafePointer(to: meters) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_distance") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_area_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_area_mask") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_area_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_area_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_area_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_area_mask") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_area_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_area_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_angle") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_angle(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_emission_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_angle") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_emission_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_angle_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_angle_enabled") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_angle_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_emission_angle_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emission_angle_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emission_angle_enabled") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_emission_angle_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_is_emission_angle_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_angle_filter_attenuation_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_angle_filter_attenuation_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_angle_filter_attenuation_db(_ db: Double) { + withUnsafePointer(to: db) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_emission_angle_filter_attenuation_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_angle_filter_attenuation_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_angle_filter_attenuation_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_angle_filter_attenuation_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_emission_angle_filter_attenuation_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attenuation_filter_cutoff_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attenuation_filter_cutoff_hz") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attenuation_filter_cutoff_hz(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_attenuation_filter_cutoff_hz, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attenuation_filter_cutoff_hz: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attenuation_filter_cutoff_hz") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attenuation_filter_cutoff_hz() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_attenuation_filter_cutoff_hz, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attenuation_filter_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attenuation_filter_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attenuation_filter_db(_ db: Double) { + withUnsafePointer(to: db) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_attenuation_filter_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attenuation_filter_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attenuation_filter_db") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attenuation_filter_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_attenuation_filter_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attenuation_model: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attenuation_model") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2988086229)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attenuation_model(_ model: AudioStreamPlayer3D.AttenuationModel) { + withUnsafePointer(to: model.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_attenuation_model, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attenuation_model: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attenuation_model") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3035106060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attenuation_model() -> AudioStreamPlayer3D.AttenuationModel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_attenuation_model, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamPlayer3D.AttenuationModel (rawValue: _result)! + } + + fileprivate static var method_set_doppler_tracking: GDExtensionMethodBindPtr = { + let methodName = StringName("set_doppler_tracking") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3968161450)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_doppler_tracking(_ mode: AudioStreamPlayer3D.DopplerTracking) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_doppler_tracking, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_doppler_tracking: GDExtensionMethodBindPtr = { + let methodName = StringName("get_doppler_tracking") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1702418664)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_doppler_tracking() -> AudioStreamPlayer3D.DopplerTracking { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_doppler_tracking, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamPlayer3D.DopplerTracking (rawValue: _result)! + } + + fileprivate static var method_set_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_paused(_ pause: Bool) { + withUnsafePointer(to: pause) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_stream_paused, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_paused") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_paused() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_stream_paused, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_polyphony(_ maxPolyphony: Int32) { + withUnsafePointer(to: maxPolyphony) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_max_polyphony, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_polyphony") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_polyphony() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_max_polyphony, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_panning_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_panning_strength") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_panning_strength(_ panningStrength: Double) { + withUnsafePointer(to: panningStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_panning_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_panning_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_panning_strength") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_panning_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_panning_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("has_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns whether the ``AudioStreamPlayer`` can return the ``AudioStreamPlayback`` object or not. + public final func hasStreamPlayback() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_has_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_stream_playback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_playback") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 210135309)! + } + + } + + }() + + /// Returns the ``AudioStreamPlayback`` object associated with this ``AudioStreamPlayer3D``. + public final func getStreamPlayback() -> AudioStreamPlayback? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_stream_playback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 725473817)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_playback_type(_ playbackType: AudioServer.PlaybackType) { + withUnsafePointer(to: playbackType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_set_playback_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_playback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_type") + return withUnsafePointer(to: &AudioStreamPlayer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4011264623)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_playback_type() -> AudioServer.PlaybackType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamPlayer3D.method_get_playback_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioServer.PlaybackType (rawValue: _result)! + } + + // Signals + /// Emitted when the audio stops playing. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPlaylist.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaylist.swift new file mode 100644 index 000000000..e095ed487 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPlaylist.swift @@ -0,0 +1,1036 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// ``AudioStream`` that includes sub-streams and plays them back like a playlist. +open class AudioStreamPlaylist: AudioStream { + override open class var godotClassName: StringName { "AudioStreamPlaylist" } + /* Constants */ + /// Maximum amount of streams supported in the playlist. + public static let maxStreams = 64 + + /* Properties */ + + /// If `true`, the playlist will shuffle each time playback starts and each time it loops. + final public var shuffle: Bool { + get { + return get_shuffle () + } + + set { + set_shuffle (newValue) + } + + } + + /// If `true`, the playlist will loop, otherwise the playlist will end when the last stream is finished. + final public var loop: Bool { + get { + return has_loop () + } + + set { + set_loop (newValue) + } + + } + + /// Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading. + final public var fadeTime: Double { + get { + return get_fade_time () + } + + set { + set_fade_time (newValue) + } + + } + + /// Amount of streams in the playlist. + final public var streamCount: Int32 { + get { + return get_stream_count () + } + + set { + set_stream_count (newValue) + } + + } + + final public var stream0: AudioStream? { + get { + return get_list_stream (0) + } + + set { + set_list_stream (0, newValue) + } + + } + + final public var stream1: AudioStream? { + get { + return get_list_stream (1) + } + + set { + set_list_stream (1, newValue) + } + + } + + final public var stream2: AudioStream? { + get { + return get_list_stream (2) + } + + set { + set_list_stream (2, newValue) + } + + } + + final public var stream3: AudioStream? { + get { + return get_list_stream (3) + } + + set { + set_list_stream (3, newValue) + } + + } + + final public var stream4: AudioStream? { + get { + return get_list_stream (4) + } + + set { + set_list_stream (4, newValue) + } + + } + + final public var stream5: AudioStream? { + get { + return get_list_stream (5) + } + + set { + set_list_stream (5, newValue) + } + + } + + final public var stream6: AudioStream? { + get { + return get_list_stream (6) + } + + set { + set_list_stream (6, newValue) + } + + } + + final public var stream7: AudioStream? { + get { + return get_list_stream (7) + } + + set { + set_list_stream (7, newValue) + } + + } + + final public var stream8: AudioStream? { + get { + return get_list_stream (8) + } + + set { + set_list_stream (8, newValue) + } + + } + + final public var stream9: AudioStream? { + get { + return get_list_stream (9) + } + + set { + set_list_stream (9, newValue) + } + + } + + final public var stream10: AudioStream? { + get { + return get_list_stream (10) + } + + set { + set_list_stream (10, newValue) + } + + } + + final public var stream11: AudioStream? { + get { + return get_list_stream (11) + } + + set { + set_list_stream (11, newValue) + } + + } + + final public var stream12: AudioStream? { + get { + return get_list_stream (12) + } + + set { + set_list_stream (12, newValue) + } + + } + + final public var stream13: AudioStream? { + get { + return get_list_stream (13) + } + + set { + set_list_stream (13, newValue) + } + + } + + final public var stream14: AudioStream? { + get { + return get_list_stream (14) + } + + set { + set_list_stream (14, newValue) + } + + } + + final public var stream15: AudioStream? { + get { + return get_list_stream (15) + } + + set { + set_list_stream (15, newValue) + } + + } + + final public var stream16: AudioStream? { + get { + return get_list_stream (16) + } + + set { + set_list_stream (16, newValue) + } + + } + + final public var stream17: AudioStream? { + get { + return get_list_stream (17) + } + + set { + set_list_stream (17, newValue) + } + + } + + final public var stream18: AudioStream? { + get { + return get_list_stream (18) + } + + set { + set_list_stream (18, newValue) + } + + } + + final public var stream19: AudioStream? { + get { + return get_list_stream (19) + } + + set { + set_list_stream (19, newValue) + } + + } + + final public var stream20: AudioStream? { + get { + return get_list_stream (20) + } + + set { + set_list_stream (20, newValue) + } + + } + + final public var stream21: AudioStream? { + get { + return get_list_stream (21) + } + + set { + set_list_stream (21, newValue) + } + + } + + final public var stream22: AudioStream? { + get { + return get_list_stream (22) + } + + set { + set_list_stream (22, newValue) + } + + } + + final public var stream23: AudioStream? { + get { + return get_list_stream (23) + } + + set { + set_list_stream (23, newValue) + } + + } + + final public var stream24: AudioStream? { + get { + return get_list_stream (24) + } + + set { + set_list_stream (24, newValue) + } + + } + + final public var stream25: AudioStream? { + get { + return get_list_stream (25) + } + + set { + set_list_stream (25, newValue) + } + + } + + final public var stream26: AudioStream? { + get { + return get_list_stream (26) + } + + set { + set_list_stream (26, newValue) + } + + } + + final public var stream27: AudioStream? { + get { + return get_list_stream (27) + } + + set { + set_list_stream (27, newValue) + } + + } + + final public var stream28: AudioStream? { + get { + return get_list_stream (28) + } + + set { + set_list_stream (28, newValue) + } + + } + + final public var stream29: AudioStream? { + get { + return get_list_stream (29) + } + + set { + set_list_stream (29, newValue) + } + + } + + final public var stream30: AudioStream? { + get { + return get_list_stream (30) + } + + set { + set_list_stream (30, newValue) + } + + } + + final public var stream31: AudioStream? { + get { + return get_list_stream (31) + } + + set { + set_list_stream (31, newValue) + } + + } + + final public var stream32: AudioStream? { + get { + return get_list_stream (32) + } + + set { + set_list_stream (32, newValue) + } + + } + + final public var stream33: AudioStream? { + get { + return get_list_stream (33) + } + + set { + set_list_stream (33, newValue) + } + + } + + final public var stream34: AudioStream? { + get { + return get_list_stream (34) + } + + set { + set_list_stream (34, newValue) + } + + } + + final public var stream35: AudioStream? { + get { + return get_list_stream (35) + } + + set { + set_list_stream (35, newValue) + } + + } + + final public var stream36: AudioStream? { + get { + return get_list_stream (36) + } + + set { + set_list_stream (36, newValue) + } + + } + + final public var stream37: AudioStream? { + get { + return get_list_stream (37) + } + + set { + set_list_stream (37, newValue) + } + + } + + final public var stream38: AudioStream? { + get { + return get_list_stream (38) + } + + set { + set_list_stream (38, newValue) + } + + } + + final public var stream39: AudioStream? { + get { + return get_list_stream (39) + } + + set { + set_list_stream (39, newValue) + } + + } + + final public var stream40: AudioStream? { + get { + return get_list_stream (40) + } + + set { + set_list_stream (40, newValue) + } + + } + + final public var stream41: AudioStream? { + get { + return get_list_stream (41) + } + + set { + set_list_stream (41, newValue) + } + + } + + final public var stream42: AudioStream? { + get { + return get_list_stream (42) + } + + set { + set_list_stream (42, newValue) + } + + } + + final public var stream43: AudioStream? { + get { + return get_list_stream (43) + } + + set { + set_list_stream (43, newValue) + } + + } + + final public var stream44: AudioStream? { + get { + return get_list_stream (44) + } + + set { + set_list_stream (44, newValue) + } + + } + + final public var stream45: AudioStream? { + get { + return get_list_stream (45) + } + + set { + set_list_stream (45, newValue) + } + + } + + final public var stream46: AudioStream? { + get { + return get_list_stream (46) + } + + set { + set_list_stream (46, newValue) + } + + } + + final public var stream47: AudioStream? { + get { + return get_list_stream (47) + } + + set { + set_list_stream (47, newValue) + } + + } + + final public var stream48: AudioStream? { + get { + return get_list_stream (48) + } + + set { + set_list_stream (48, newValue) + } + + } + + final public var stream49: AudioStream? { + get { + return get_list_stream (49) + } + + set { + set_list_stream (49, newValue) + } + + } + + final public var stream50: AudioStream? { + get { + return get_list_stream (50) + } + + set { + set_list_stream (50, newValue) + } + + } + + final public var stream51: AudioStream? { + get { + return get_list_stream (51) + } + + set { + set_list_stream (51, newValue) + } + + } + + final public var stream52: AudioStream? { + get { + return get_list_stream (52) + } + + set { + set_list_stream (52, newValue) + } + + } + + final public var stream53: AudioStream? { + get { + return get_list_stream (53) + } + + set { + set_list_stream (53, newValue) + } + + } + + final public var stream54: AudioStream? { + get { + return get_list_stream (54) + } + + set { + set_list_stream (54, newValue) + } + + } + + final public var stream55: AudioStream? { + get { + return get_list_stream (55) + } + + set { + set_list_stream (55, newValue) + } + + } + + final public var stream56: AudioStream? { + get { + return get_list_stream (56) + } + + set { + set_list_stream (56, newValue) + } + + } + + final public var stream57: AudioStream? { + get { + return get_list_stream (57) + } + + set { + set_list_stream (57, newValue) + } + + } + + final public var stream58: AudioStream? { + get { + return get_list_stream (58) + } + + set { + set_list_stream (58, newValue) + } + + } + + final public var stream59: AudioStream? { + get { + return get_list_stream (59) + } + + set { + set_list_stream (59, newValue) + } + + } + + final public var stream60: AudioStream? { + get { + return get_list_stream (60) + } + + set { + set_list_stream (60, newValue) + } + + } + + final public var stream61: AudioStream? { + get { + return get_list_stream (61) + } + + set { + set_list_stream (61, newValue) + } + + } + + final public var stream62: AudioStream? { + get { + return get_list_stream (62) + } + + set { + set_list_stream (62, newValue) + } + + } + + final public var stream63: AudioStream? { + get { + return get_list_stream (63) + } + + set { + set_list_stream (63, newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_count") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_count(_ streamCount: Int32) { + withUnsafePointer(to: streamCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_set_stream_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_count") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_get_stream_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_bpm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bpm") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the BPM of the playlist, which can vary depending on the clip being played. + public final func getBpm() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_get_bpm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_list_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_list_stream") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 111075094)! + } + + } + + }() + + @inline(__always) + /// Sets the stream at playback position index. + fileprivate final func set_list_stream(_ streamIndex: Int32, _ audioStream: AudioStream?) { + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: audioStream?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_set_list_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_list_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_list_stream") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2739380747)! + } + + } + + }() + + @inline(__always) + /// Returns the stream at playback position index. + fileprivate final func get_list_stream(_ streamIndex: Int32) -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_get_list_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_shuffle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shuffle") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shuffle(_ shuffle: Bool) { + withUnsafePointer(to: shuffle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_set_shuffle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shuffle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shuffle") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shuffle() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_get_shuffle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fade_time") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fade_time(_ dec: Double) { + withUnsafePointer(to: dec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_set_fade_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fade_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fade_time") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fade_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_get_fade_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("has_loop") + return withUnsafePointer(to: &AudioStreamPlaylist.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamPlaylist.method_has_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamPolyphonic.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamPolyphonic.swift new file mode 100644 index 000000000..3129d0f25 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamPolyphonic.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. +/// +/// AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. +/// +/// Playback control is done via the ``AudioStreamPlaybackPolyphonic`` instance set inside the player, which can be obtained via ``AudioStreamPlayer/getStreamPlayback()``, ``AudioStreamPlayer2D/getStreamPlayback()`` or ``AudioStreamPlayer3D/getStreamPlayback()`` methods. Obtaining the playback instance is only valid after the `stream` property is set as an ``AudioStreamPolyphonic`` in those players. +/// +open class AudioStreamPolyphonic: AudioStream { + override open class var godotClassName: StringName { "AudioStreamPolyphonic" } + + /* Properties */ + + /// Maximum amount of simultaneous streams that can be played. + final public var polyphony: Int32 { + get { + return get_polyphony () + } + + set { + set_polyphony (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polyphony") + return withUnsafePointer(to: &AudioStreamPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polyphony(_ voices: Int32) { + withUnsafePointer(to: voices) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamPolyphonic.method_set_polyphony, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polyphony: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polyphony") + return withUnsafePointer(to: &AudioStreamPolyphonic.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polyphony() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamPolyphonic.method_get_polyphony, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamRandomizer.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamRandomizer.swift new file mode 100644 index 000000000..c50776c90 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamRandomizer.swift @@ -0,0 +1,473 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Wraps a pool of audio streams with pitch and volume shifting. +/// +/// Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback. +open class AudioStreamRandomizer: AudioStream { + override open class var godotClassName: StringName { "AudioStreamRandomizer" } + public enum PlaybackMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur. + case randomNoRepeats = 0 // PLAYBACK_RANDOM_NO_REPEATS + /// Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play. + case random = 1 // PLAYBACK_RANDOM + /// Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play. + case sequential = 2 // PLAYBACK_SEQUENTIAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .randomNoRepeats: return ".randomNoRepeats" + case .random: return ".random" + case .sequential: return ".sequential" + } + + } + + } + + + /* Properties */ + + /// Controls how this AudioStreamRandomizer picks which AudioStream to play next. + final public var playbackMode: AudioStreamRandomizer.PlaybackMode { + get { + return get_playback_mode () + } + + set { + set_playback_mode (newValue) + } + + } + + /// The intensity of random pitch variation. A value of 1 means no variation. + final public var randomPitch: Double { + get { + return get_random_pitch () + } + + set { + set_random_pitch (newValue) + } + + } + + /// The intensity of random volume variation. A value of 0 means no variation. + final public var randomVolumeOffsetDb: Double { + get { + return get_random_volume_offset_db () + } + + set { + set_random_volume_offset_db (newValue) + } + + } + + /// The number of streams in the stream pool. + final public var streamsCount: Int32 { + get { + return get_streams_count () + } + + set { + set_streams_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("add_stream") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1892018854)! + } + + } + + }() + + /// Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. + public final func addStream(index: Int32, stream: AudioStream?, weight: Double = 1.0) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: stream?.handle) { pArg1 in + withUnsafePointer(to: weight) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_add_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_move_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("move_stream") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Move a stream from one index to another. + public final func moveStream(indexFrom: Int32, indexTo: Int32) { + withUnsafePointer(to: indexFrom) { pArg0 in + withUnsafePointer(to: indexTo) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_move_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_stream") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Remove the stream at the specified index. + public final func removeStream(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_remove_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 111075094)! + } + + } + + }() + + /// Set the AudioStream at the specified index. + public final func setStream(index: Int32, stream: AudioStream?) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: stream?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2739380747)! + } + + } + + }() + + /// Returns the stream at the specified index. + public final func getStream(index: Int32) -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_stream_probability_weight: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_probability_weight") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes. + public final func setStreamProbabilityWeight(index: Int32, weight: Double) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: weight) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_stream_probability_weight, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_stream_probability_weight: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_probability_weight") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the probability weight associated with the stream at the given index. + public final func getStreamProbabilityWeight(index: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_stream_probability_weight, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_streams_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_streams_count") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_streams_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_streams_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_streams_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_streams_count") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_streams_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_streams_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_random_pitch: GDExtensionMethodBindPtr = { + let methodName = StringName("set_random_pitch") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_random_pitch(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_random_pitch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_random_pitch: GDExtensionMethodBindPtr = { + let methodName = StringName("get_random_pitch") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_random_pitch() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_random_pitch, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_random_volume_offset_db: GDExtensionMethodBindPtr = { + let methodName = StringName("set_random_volume_offset_db") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_random_volume_offset_db(_ dbOffset: Double) { + withUnsafePointer(to: dbOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_random_volume_offset_db, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_random_volume_offset_db: GDExtensionMethodBindPtr = { + let methodName = StringName("get_random_volume_offset_db") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_random_volume_offset_db() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_random_volume_offset_db, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_playback_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_playback_mode") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3950967023)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_playback_mode(_ mode: AudioStreamRandomizer.PlaybackMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_set_playback_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_playback_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playback_mode") + return withUnsafePointer(to: &AudioStreamRandomizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3943055077)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_playback_mode() -> AudioStreamRandomizer.PlaybackMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamRandomizer.method_get_playback_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamRandomizer.PlaybackMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamSynchronized.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamSynchronized.swift new file mode 100644 index 000000000..8c4bc2234 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamSynchronized.swift @@ -0,0 +1,202 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Stream that can be fitted with sub-streams, which will be played in-sync. +/// +/// This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams being at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. +open class AudioStreamSynchronized: AudioStream { + override open class var godotClassName: StringName { "AudioStreamSynchronized" } + /* Constants */ + /// Maximum amount of streams that can be synchrohized. + public static let maxStreams = 32 + + /* Properties */ + + /// Set the total amount of streams that will be played back synchronized. + final public var streamCount: Int32 { + get { + return get_stream_count () + } + + set { + set_stream_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_count") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_count(_ streamCount: Int32) { + withUnsafePointer(to: streamCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_set_stream_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_count") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_get_stream_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sync_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sync_stream") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 111075094)! + } + + } + + }() + + /// Set one of the synchronized streams, by index. + public final func setSyncStream(streamIndex: Int32, audioStream: AudioStream?) { + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: audioStream?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_set_sync_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_sync_stream: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sync_stream") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2739380747)! + } + + } + + }() + + /// Get one of the synchronized streams, by index. + public final func getSyncStream(streamIndex: Int32) -> AudioStream? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_get_sync_stream, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_sync_stream_volume: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sync_stream_volume") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Set the volume of one of the synchronized streams, by index. + public final func setSyncStreamVolume(streamIndex: Int32, volumeDb: Double) { + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: volumeDb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_set_sync_stream_volume, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_sync_stream_volume: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sync_stream_volume") + return withUnsafePointer(to: &AudioStreamSynchronized.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Get the volume of one of the synchronized streams, by index. + public final func getSyncStreamVolume(streamIndex: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: streamIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamSynchronized.method_get_sync_stream_volume, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/AudioStreamWAV.swift b/Sources/SwiftGodot/Generated/Api/AudioStreamWAV.swift new file mode 100644 index 000000000..6b46bfd26 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/AudioStreamWAV.swift @@ -0,0 +1,509 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Stores audio data loaded from WAV files. +/// +/// AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an ``AudioStreamPlayer`` (for non-positional audio) or ``AudioStreamPlayer2D``/``AudioStreamPlayer3D`` (for positional audio). The sound can be looped. +/// +/// This class can also be used to store dynamically-generated PCM audio data. See also ``AudioStreamGenerator`` for procedural audio generation. +/// +open class AudioStreamWAV: AudioStream { + override open class var godotClassName: StringName { "AudioStreamWAV" } + public enum Format: Int64, CaseIterable, CustomDebugStringConvertible { + /// 8-bit audio codec. + case format8Bits = 0 // FORMAT_8_BITS + /// 16-bit audio codec. + case format16Bits = 1 // FORMAT_16_BITS + /// Audio is compressed using IMA ADPCM. + case imaAdpcm = 2 // FORMAT_IMA_ADPCM + /// Audio is compressed as QOA (Quite OK Audio). + case qoa = 3 // FORMAT_QOA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .format8Bits: return ".format8Bits" + case .format16Bits: return ".format16Bits" + case .imaAdpcm: return ".imaAdpcm" + case .qoa: return ".qoa" + } + + } + + } + + public enum LoopMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Audio does not loop. + case disabled = 0 // LOOP_DISABLED + /// Audio loops the data between ``loopBegin`` and ``loopEnd``, playing forward only. + case forward = 1 // LOOP_FORWARD + /// Audio loops the data between ``loopBegin`` and ``loopEnd``, playing back and forth. + case pingpong = 2 // LOOP_PINGPONG + /// Audio loops the data between ``loopBegin`` and ``loopEnd``, playing backward only. + case backward = 3 // LOOP_BACKWARD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .forward: return ".forward" + case .pingpong: return ".pingpong" + case .backward: return ".backward" + } + + } + + } + + + /* Properties */ + + /// Contains the audio data in bytes. + /// + /// > Note: This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. + /// + final public var data: PackedByteArray { + get { + return get_data () + } + + set { + set_data (newValue) + } + + } + + /// Audio format. See ``AudioStreamWAV/Format`` constants for values. + final public var format: AudioStreamWAV.Format { + get { + return get_format () + } + + set { + set_format (newValue) + } + + } + + /// The loop mode. This information will be imported automatically from the WAV file if present. See ``AudioStreamWAV/LoopMode`` constants for values. + final public var loopMode: AudioStreamWAV.LoopMode { + get { + return get_loop_mode () + } + + set { + set_loop_mode (newValue) + } + + } + + /// The loop start point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. + final public var loopBegin: Int32 { + get { + return get_loop_begin () + } + + set { + set_loop_begin (newValue) + } + + } + + /// The loop end point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. + final public var loopEnd: Int32 { + get { + return get_loop_end () + } + + set { + set_loop_end (newValue) + } + + } + + /// The sample rate for mixing this audio. Higher values require more storage space, but result in better quality. + /// + /// In games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`. + /// + /// According to the Nyquist-Shannon sampling theorem, there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality. + /// + final public var mixRate: Int32 { + get { + return get_mix_rate () + } + + set { + set_mix_rate (newValue) + } + + } + + /// If `true`, audio is stereo. + final public var stereo: Bool { + get { + return is_stereo () + } + + set { + set_stereo (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_data") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2971499966)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_data(_ data: PackedByteArray) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2362200018)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_data() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 60648488)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format(_ format: AudioStreamWAV.Format) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3151724922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format() -> AudioStreamWAV.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamWAV.Format (rawValue: _result)! + } + + fileprivate static var method_set_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_mode") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2444882972)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_mode(_ loopMode: AudioStreamWAV.LoopMode) { + withUnsafePointer(to: loopMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_loop_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_mode") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 393560655)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_mode() -> AudioStreamWAV.LoopMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_loop_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return AudioStreamWAV.LoopMode (rawValue: _result)! + } + + fileprivate static var method_set_loop_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_begin") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_begin(_ loopBegin: Int32) { + withUnsafePointer(to: loopBegin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_loop_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_begin") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_begin() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_loop_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop_end") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop_end(_ loopEnd: Int32) { + withUnsafePointer(to: loopEnd) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_loop_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop_end") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop_end() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_loop_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mix_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mix_rate") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mix_rate(_ mixRate: Int32) { + withUnsafePointer(to: mixRate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_mix_rate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mix_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mix_rate") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mix_rate() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(AudioStreamWAV.method_get_mix_rate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stereo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stereo") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stereo(_ stereo: Bool) { + withUnsafePointer(to: stereo) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_set_stereo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_stereo: GDExtensionMethodBindPtr = { + let methodName = StringName("is_stereo") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_stereo() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(AudioStreamWAV.method_is_stereo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_save_to_wav: GDExtensionMethodBindPtr = { + let methodName = StringName("save_to_wav") + return withUnsafePointer(to: &AudioStreamWAV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Saves the AudioStreamWAV as a WAV file to `path`. Samples with IMA ADPCM or QOA formats can't be saved. + /// + /// > Note: A `.wav` extension is automatically appended to `path` if it is missing. + /// + public final func saveToWav(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(AudioStreamWAV.method_save_to_wav, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BackBufferCopy.swift b/Sources/SwiftGodot/Generated/Api/BackBufferCopy.swift new file mode 100644 index 000000000..eca3802b7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BackBufferCopy.swift @@ -0,0 +1,165 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that copies a region of the screen to a buffer for access in shader code. +/// +/// Node for back-buffering the currently-displayed screen. The region defined in the ``BackBufferCopy`` node is buffered with the content of the screen it covers, or the entire screen according to the ``copyMode``. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with `hint_screen_texture`). +/// +/// > Note: Since this node inherits from ``Node2D`` (and not ``Control``), anchors and margins won't apply to child ``Control``-derived nodes. This can be problematic when resizing the window. To avoid this, add ``Control``-derived nodes as _siblings_ to the ``BackBufferCopy`` node instead of adding them as children. +/// +open class BackBufferCopy: Node2D { + override open class var godotClassName: StringName { "BackBufferCopy" } + public enum CopyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables the buffering mode. This means the ``BackBufferCopy`` node will directly use the portion of screen it covers. + case disabled = 0 // COPY_MODE_DISABLED + /// ``BackBufferCopy`` buffers a rectangular region. + case rect = 1 // COPY_MODE_RECT + /// ``BackBufferCopy`` buffers the entire screen. + case viewport = 2 // COPY_MODE_VIEWPORT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .rect: return ".rect" + case .viewport: return ".viewport" + } + + } + + } + + + /* Properties */ + + /// Buffer mode. See ``BackBufferCopy/CopyMode`` constants. + final public var copyMode: BackBufferCopy.CopyMode { + get { + return get_copy_mode () + } + + set { + set_copy_mode (newValue) + } + + } + + /// The area covered by the ``BackBufferCopy``. Only used if ``copyMode`` is ``CopyMode/rect``. + final public var rect: Rect2 { + get { + return get_rect () + } + + set { + set_rect (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rect") + return withUnsafePointer(to: &BackBufferCopy.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rect(_ rect: Rect2) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BackBufferCopy.method_set_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rect") + return withUnsafePointer(to: &BackBufferCopy.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(BackBufferCopy.method_get_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_copy_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_copy_mode") + return withUnsafePointer(to: &BackBufferCopy.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1713538590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_copy_mode(_ copyMode: BackBufferCopy.CopyMode) { + withUnsafePointer(to: copyMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BackBufferCopy.method_set_copy_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_copy_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_copy_mode") + return withUnsafePointer(to: &BackBufferCopy.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3271169440)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_copy_mode() -> BackBufferCopy.CopyMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BackBufferCopy.method_get_copy_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BackBufferCopy.CopyMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BaseButton.swift b/Sources/SwiftGodot/Generated/Api/BaseButton.swift new file mode 100644 index 000000000..afc0544a7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BaseButton.swift @@ -0,0 +1,887 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for GUI buttons. +/// +/// ``BaseButton`` is an abstract base class for GUI buttons. It doesn't display anything by itself. +/// +/// +/// This object emits the following signals: +/// +/// - ``pressed`` +/// - ``buttonUp`` +/// - ``buttonDown`` +/// - ``toggled`` +open class BaseButton: Control { + override open class var godotClassName: StringName { "BaseButton" } + public enum DrawMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. + case normal = 0 // DRAW_NORMAL + /// The state of buttons are pressed. + case pressed = 1 // DRAW_PRESSED + /// The state of buttons are hovered. + case hover = 2 // DRAW_HOVER + /// The state of buttons are disabled. + case disabled = 3 // DRAW_DISABLED + /// The state of buttons are both hovered and pressed. + case hoverPressed = 4 // DRAW_HOVER_PRESSED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .normal: return ".normal" + case .pressed: return ".pressed" + case .hover: return ".hover" + case .disabled: return ".disabled" + case .hoverPressed: return ".hoverPressed" + } + + } + + } + + public enum ActionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Require just a press to consider the button clicked. + case press = 0 // ACTION_MODE_BUTTON_PRESS + /// Require a press and a subsequent release before considering the button clicked. + case release = 1 // ACTION_MODE_BUTTON_RELEASE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .press: return ".press" + case .release: return ".release" + } + + } + + } + + + /* Properties */ + + /// If `true`, the button is in disabled state and can't be clicked or toggled. + final public var disabled: Bool { + get { + return is_disabled () + } + + set { + set_disabled (newValue) + } + + } + + /// If `true`, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. + final public var toggleMode: Bool { + get { + return is_toggle_mode () + } + + set { + set_toggle_mode (newValue) + } + + } + + /// If `true`, the button's state is pressed. Means the button is pressed down or toggled (if ``toggleMode`` is active). Only works if ``toggleMode`` is `true`. + /// + /// > Note: Setting ``buttonPressed`` will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use ``setPressedNoSignal(pressed:)``. + /// + final public var buttonPressed: Bool { + get { + return is_pressed () + } + + set { + set_pressed (newValue) + } + + } + + /// Determines when the button is considered clicked, one of the ``BaseButton/ActionMode`` constants. + final public var actionMode: BaseButton.ActionMode { + get { + return get_action_mode () + } + + set { + set_action_mode (newValue) + } + + } + + /// Binary mask to choose which mouse buttons this button will respond to. + /// + /// To allow both left-click and right-click, use `MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT`. + /// + final public var buttonMask: MouseButtonMask { + get { + return get_button_mask () + } + + set { + set_button_mask (newValue) + } + + } + + /// If `true`, the button stays pressed when moving the cursor outside the button while pressing it. + /// + /// > Note: This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. + /// + final public var keepPressedOutside: Bool { + get { + return is_keep_pressed_outside () + } + + set { + set_keep_pressed_outside (newValue) + } + + } + + /// The ``ButtonGroup`` associated with the button. Not to be confused with node groups. + /// + /// > Note: The button will be configured as a radio button if a ``ButtonGroup`` is assigned to it. + /// + final public var buttonGroup: ButtonGroup? { + get { + return get_button_group () + } + + set { + set_button_group (newValue) + } + + } + + /// ``Shortcut`` associated to the button. + final public var shortcut: Shortcut? { + get { + return get_shortcut () + } + + set { + set_shortcut (newValue) + } + + } + + /// If `true`, the button will highlight for a short amount of time when its shortcut is activated. If `false` and ``toggleMode`` is `false`, the shortcut will activate without any visual feedback. + final public var shortcutFeedback: Bool { + get { + return is_shortcut_feedback () + } + + set { + set_shortcut_feedback (newValue) + } + + } + + /// If `true`, the button will add information about its shortcut in the tooltip. + final public var shortcutInTooltip: Bool { + get { + return is_shortcut_in_tooltip_enabled () + } + + set { + set_shortcut_in_tooltip (newValue) + } + + } + + /* Methods */ + /// Called when the button is pressed. If you need to know the button's pressed state (and ``toggleMode`` is active), use ``_toggled(toggledOn:)`` instead. + @_documentation(visibility: public) + open func _pressed() { + } + + /// Called when the button is toggled (only if ``toggleMode`` is active). + @_documentation(visibility: public) + open func _toggled(toggledOn: Bool) { + } + + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_pressed") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_pressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressed_no_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed_no_signal") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Changes the ``buttonPressed`` state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if ``toggleMode`` is `true`. + /// + /// > Note: This method doesn't unpress other buttons in ``buttonGroup``. + /// + public final func setPressedNoSignal(pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_pressed_no_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hovered: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hovered") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the mouse has entered the button and has not left it yet. + public final func isHovered() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_hovered, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_toggle_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_toggle_mode") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_toggle_mode(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_toggle_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_toggle_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_toggle_mode") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_toggle_mode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_toggle_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shortcut_in_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut_in_tooltip") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut_in_tooltip(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_shortcut_in_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shortcut_in_tooltip_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shortcut_in_tooltip_enabled") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shortcut_in_tooltip_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_shortcut_in_tooltip_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disabled") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disabled(_ disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_disabled") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_action_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action_mode") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1985162088)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_action_mode(_ mode: BaseButton.ActionMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_action_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_action_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_mode") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2589712189)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_action_mode() -> BaseButton.ActionMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseButton.method_get_action_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseButton.ActionMode (rawValue: _result)! + } + + fileprivate static var method_set_button_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_mask") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3950145251)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_mask(_ mask: MouseButtonMask) { + withUnsafePointer(to: mask.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_button_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_mask") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2512161324)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_mask() -> MouseButtonMask { + var _result: MouseButtonMask = MouseButtonMask () + gi.object_method_bind_ptrcall(BaseButton.method_get_button_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_draw_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_mode") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2492721305)! + } + + } + + }() + + /// Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the ``BaseButton/DrawMode`` enum. + public final func getDrawMode() -> BaseButton.DrawMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseButton.method_get_draw_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseButton.DrawMode (rawValue: _result)! + } + + fileprivate static var method_set_keep_pressed_outside: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_pressed_outside") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keep_pressed_outside(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_keep_pressed_outside, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_keep_pressed_outside: GDExtensionMethodBindPtr = { + let methodName = StringName("is_keep_pressed_outside") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_keep_pressed_outside() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_keep_pressed_outside, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shortcut_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut_feedback") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut_feedback(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_shortcut_feedback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shortcut_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shortcut_feedback") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shortcut_feedback() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseButton.method_is_shortcut_feedback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 857163497)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut(_ shortcut: Shortcut?) { + withUnsafePointer(to: shortcut?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shortcut") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3415666916)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shortcut() -> Shortcut? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(BaseButton.method_get_shortcut, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_button_group: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_group") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794463739)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_group(_ buttonGroup: ButtonGroup?) { + withUnsafePointer(to: buttonGroup?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseButton.method_set_button_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_group: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_group") + return withUnsafePointer(to: &BaseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 281644053)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_group() -> ButtonGroup? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(BaseButton.method_get_button_group, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_pressed": + return _BaseButton_proxy_pressed + case "_toggled": + return _BaseButton_proxy_toggled + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when the button is toggled or pressed. This is on [signal button_down] if ``actionMode`` is ``ActionMode/press`` and on [signal button_up] otherwise. + /// + /// If you need to know the button's pressed state (and ``toggleMode`` is active), use [signal toggled] instead. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pressed.connect { + /// print ("caught signal") + /// } + /// ``` + public var pressed: SimpleSignal { SimpleSignal (target: self, signalName: "pressed") } + + /// Emitted when the button stops being held down. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.buttonUp.connect { + /// print ("caught signal") + /// } + /// ``` + public var buttonUp: SimpleSignal { SimpleSignal (target: self, signalName: "button_up") } + + /// Emitted when the button starts being held down. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.buttonDown.connect { + /// print ("caught signal") + /// } + /// ``` + public var buttonDown: SimpleSignal { SimpleSignal (target: self, signalName: "button_down") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ toggledOn: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Bool (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the button was just toggled between pressed and normal states (only if ``toggleMode`` is active). The new state is contained in the `toggledOn` argument. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.toggled.connect { toggledOn in + /// print ("caught signal") + /// } + /// ``` + public var toggled: Signal1 { Signal1 (target: self, signalName: "toggled") } + +} + +// Support methods for proxies +func _BaseButton_proxy_pressed (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pressed () +} + +func _BaseButton_proxy_toggled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._toggled (toggledOn: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/BaseMaterial3D.swift b/Sources/SwiftGodot/Generated/Api/BaseMaterial3D.swift new file mode 100644 index 000000000..5af305cee --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BaseMaterial3D.swift @@ -0,0 +1,5075 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for defining the 3D rendering properties of meshes. +/// +/// This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. +open class BaseMaterial3D: Material { + override open class var godotClassName: StringName { "BaseMaterial3D" } + public enum TextureParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// Texture specifying per-pixel color. + case albedo = 0 // TEXTURE_ALBEDO + /// Texture specifying per-pixel metallic value. + case metallic = 1 // TEXTURE_METALLIC + /// Texture specifying per-pixel roughness value. + case roughness = 2 // TEXTURE_ROUGHNESS + /// Texture specifying per-pixel emission color. + case emission = 3 // TEXTURE_EMISSION + /// Texture specifying per-pixel normal vector. + case normal = 4 // TEXTURE_NORMAL + /// Texture specifying per-pixel rim value. + case rim = 5 // TEXTURE_RIM + /// Texture specifying per-pixel clearcoat value. + case clearcoat = 6 // TEXTURE_CLEARCOAT + /// Texture specifying per-pixel flowmap direction for use with ``anisotropy``. + case flowmap = 7 // TEXTURE_FLOWMAP + /// Texture specifying per-pixel ambient occlusion value. + case ambientOcclusion = 8 // TEXTURE_AMBIENT_OCCLUSION + /// Texture specifying per-pixel height. + case heightmap = 9 // TEXTURE_HEIGHTMAP + /// Texture specifying per-pixel subsurface scattering. + case subsurfaceScattering = 10 // TEXTURE_SUBSURFACE_SCATTERING + /// Texture specifying per-pixel transmittance for subsurface scattering. + case subsurfaceTransmittance = 11 // TEXTURE_SUBSURFACE_TRANSMITTANCE + /// Texture specifying per-pixel backlight color. + case backlight = 12 // TEXTURE_BACKLIGHT + /// Texture specifying per-pixel refraction strength. + case refraction = 13 // TEXTURE_REFRACTION + /// Texture specifying per-pixel detail mask blending value. + case detailMask = 14 // TEXTURE_DETAIL_MASK + /// Texture specifying per-pixel detail color. + case detailAlbedo = 15 // TEXTURE_DETAIL_ALBEDO + /// Texture specifying per-pixel detail normal. + case detailNormal = 16 // TEXTURE_DETAIL_NORMAL + /// Texture holding ambient occlusion, roughness, and metallic. + case orm = 17 // TEXTURE_ORM + /// Represents the size of the ``BaseMaterial3D/TextureParam`` enum. + case max = 18 // TEXTURE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .albedo: return ".albedo" + case .metallic: return ".metallic" + case .roughness: return ".roughness" + case .emission: return ".emission" + case .normal: return ".normal" + case .rim: return ".rim" + case .clearcoat: return ".clearcoat" + case .flowmap: return ".flowmap" + case .ambientOcclusion: return ".ambientOcclusion" + case .heightmap: return ".heightmap" + case .subsurfaceScattering: return ".subsurfaceScattering" + case .subsurfaceTransmittance: return ".subsurfaceTransmittance" + case .backlight: return ".backlight" + case .refraction: return ".refraction" + case .detailMask: return ".detailMask" + case .detailAlbedo: return ".detailAlbedo" + case .detailNormal: return ".detailNormal" + case .orm: return ".orm" + case .max: return ".max" + } + + } + + } + + public enum TextureFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). + case nearest = 0 // TEXTURE_FILTER_NEAREST + /// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). + case linear = 1 // TEXTURE_FILTER_LINEAR + /// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look pixelated from up close, and smooth from a distance. + case nearestWithMipmaps = 2 // TEXTURE_FILTER_NEAREST_WITH_MIPMAPS + /// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look smooth from up close, and smooth from a distance. + case linearWithMipmaps = 3 // TEXTURE_FILTER_LINEAR_WITH_MIPMAPS + /// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case nearestWithMipmapsAnisotropic = 4 // TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC + /// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case linearWithMipmapsAnisotropic = 5 // TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC + /// Represents the size of the ``BaseMaterial3D/TextureFilter`` enum. + case max = 6 // TEXTURE_FILTER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .linear: return ".linear" + case .nearestWithMipmaps: return ".nearestWithMipmaps" + case .linearWithMipmaps: return ".linearWithMipmaps" + case .nearestWithMipmapsAnisotropic: return ".nearestWithMipmapsAnisotropic" + case .linearWithMipmapsAnisotropic: return ".linearWithMipmapsAnisotropic" + case .max: return ".max" + } + + } + + } + + public enum DetailUV: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use `UV` with the detail texture. + case detailUv1 = 0 // DETAIL_UV_1 + /// Use `UV2` with the detail texture. + case detailUv2 = 1 // DETAIL_UV_2 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .detailUv1: return ".detailUv1" + case .detailUv2: return ".detailUv2" + } + + } + + } + + public enum Transparency: Int64, CaseIterable, CustomDebugStringConvertible { + /// The material will not use transparency. This is the fastest to render. + case disabled = 0 // TRANSPARENCY_DISABLED + /// The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting. + case alpha = 1 // TRANSPARENCY_ALPHA + /// The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. + case alphaScissor = 2 // TRANSPARENCY_ALPHA_SCISSOR + /// The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering. + case alphaHash = 3 // TRANSPARENCY_ALPHA_HASH + /// The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. This also supports casting shadows. + case alphaDepthPrePass = 4 // TRANSPARENCY_ALPHA_DEPTH_PRE_PASS + /// Represents the size of the ``BaseMaterial3D/Transparency`` enum. + case max = 5 // TRANSPARENCY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .alpha: return ".alpha" + case .alphaScissor: return ".alphaScissor" + case .alphaHash: return ".alphaHash" + case .alphaDepthPrePass: return ".alphaDepthPrePass" + case .max: return ".max" + } + + } + + } + + public enum ShadingMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights. + case unshaded = 0 // SHADING_MODE_UNSHADED + /// The object will be shaded per pixel. Useful for realistic shading effects. + case perPixel = 1 // SHADING_MODE_PER_PIXEL + /// The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. Not implemented yet (this mode will act like ``ShadingMode/perPixel``). + case perVertex = 2 // SHADING_MODE_PER_VERTEX + /// Represents the size of the ``BaseMaterial3D/ShadingMode`` enum. + case max = 3 // SHADING_MODE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unshaded: return ".unshaded" + case .perPixel: return ".perPixel" + case .perVertex: return ".perVertex" + case .max: return ".max" + } + + } + + } + + public enum Feature: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant for setting ``emissionEnabled``. + case emission = 0 // FEATURE_EMISSION + /// Constant for setting ``normalEnabled``. + case normalMapping = 1 // FEATURE_NORMAL_MAPPING + /// Constant for setting ``rimEnabled``. + case rim = 2 // FEATURE_RIM + /// Constant for setting ``clearcoatEnabled``. + case clearcoat = 3 // FEATURE_CLEARCOAT + /// Constant for setting ``anisotropyEnabled``. + case anisotropy = 4 // FEATURE_ANISOTROPY + /// Constant for setting ``aoEnabled``. + case ambientOcclusion = 5 // FEATURE_AMBIENT_OCCLUSION + /// Constant for setting ``heightmapEnabled``. + case heightMapping = 6 // FEATURE_HEIGHT_MAPPING + /// Constant for setting ``subsurfScatterEnabled``. + case subsurfaceScattering = 7 // FEATURE_SUBSURFACE_SCATTERING + /// Constant for setting ``subsurfScatterTransmittanceEnabled``. + case subsurfaceTransmittance = 8 // FEATURE_SUBSURFACE_TRANSMITTANCE + /// Constant for setting ``backlightEnabled``. + case backlight = 9 // FEATURE_BACKLIGHT + /// Constant for setting ``refractionEnabled``. + case refraction = 10 // FEATURE_REFRACTION + /// Constant for setting ``detailEnabled``. + case detail = 11 // FEATURE_DETAIL + /// Represents the size of the ``BaseMaterial3D/Feature`` enum. + case max = 12 // FEATURE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .emission: return ".emission" + case .normalMapping: return ".normalMapping" + case .rim: return ".rim" + case .clearcoat: return ".clearcoat" + case .anisotropy: return ".anisotropy" + case .ambientOcclusion: return ".ambientOcclusion" + case .heightMapping: return ".heightMapping" + case .subsurfaceScattering: return ".subsurfaceScattering" + case .subsurfaceTransmittance: return ".subsurfaceTransmittance" + case .backlight: return ".backlight" + case .refraction: return ".refraction" + case .detail: return ".detail" + case .max: return ".max" + } + + } + + } + + public enum BlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default blend mode. The color of the object is blended over the background based on the object's alpha value. + case mix = 0 // BLEND_MODE_MIX + /// The color of the object is added to the background. + case add = 1 // BLEND_MODE_ADD + /// The color of the object is subtracted from the background. + case sub = 2 // BLEND_MODE_SUB + /// The color of the object is multiplied by the background. + case mul = 3 // BLEND_MODE_MUL + /// The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the `PREMUL_ALPHA_FACTOR` built-in so that lighting can be modulated as well. + case premultAlpha = 4 // BLEND_MODE_PREMULT_ALPHA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .mix: return ".mix" + case .add: return ".add" + case .sub: return ".sub" + case .mul: return ".mul" + case .premultAlpha: return ".premultAlpha" + } + + } + + } + + public enum AlphaAntiAliasing: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables Alpha AntiAliasing for the material. + case off = 0 // ALPHA_ANTIALIASING_OFF + /// Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask. + case alphaToCoverage = 1 // ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE + /// Enables AlphaToCoverage and forces all non-zero alpha values to `1`. Alpha values in the material are passed to the AntiAliasing sample mask. + case alphaToCoverageAndToOne = 2 // ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .off: return ".off" + case .alphaToCoverage: return ".alphaToCoverage" + case .alphaToCoverageAndToOne: return ".alphaToCoverageAndToOne" + } + + } + + } + + public enum DepthDrawMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. + case opaqueOnly = 0 // DEPTH_DRAW_OPAQUE_ONLY + /// Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. + /// + /// > Note: This does not influence whether transparent objects are included in the depth prepass or not. For that, see ``BaseMaterial3D/Transparency``. + /// + case always = 1 // DEPTH_DRAW_ALWAYS + /// Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). + case disabled = 2 // DEPTH_DRAW_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .opaqueOnly: return ".opaqueOnly" + case .always: return ".always" + case .disabled: return ".disabled" + } + + } + + } + + public enum CullMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible. + case back = 0 // CULL_BACK + /// Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes, this means that the interior of the mesh will be drawn instead of the exterior. + case front = 1 // CULL_FRONT + /// No face culling is performed; both the front face and back face will be visible. + case disabled = 2 // CULL_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .back: return ".back" + case .front: return ".front" + case .disabled: return ".disabled" + } + + } + + } + + public enum Flags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. + case disableDepthTest = 0 // FLAG_DISABLE_DEPTH_TEST + /// Set `ALBEDO` to the per-vertex color specified in the mesh. + case albedoFromVertexColor = 1 // FLAG_ALBEDO_FROM_VERTEX_COLOR + /// Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also ``vertexColorIsSrgb``. + /// + /// > Note: Only effective when using the Forward+ and Mobile rendering methods. + /// + case srgbVertexColor = 2 // FLAG_SRGB_VERTEX_COLOR + /// Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use `POINT_COORD` instead of `UV`. + case usePointSize = 3 // FLAG_USE_POINT_SIZE + /// Object is scaled by depth so that it always appears the same size on screen. + case fixedSize = 4 // FLAG_FIXED_SIZE + /// Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when ``billboardMode`` is ``BillboardMode/enabled``. + case billboardKeepScale = 5 // FLAG_BILLBOARD_KEEP_SCALE + /// Use triplanar texture lookup for all texture lookups that would normally use `UV`. + case uv1UseTriplanar = 6 // FLAG_UV1_USE_TRIPLANAR + /// Use triplanar texture lookup for all texture lookups that would normally use `UV2`. + case uv2UseTriplanar = 7 // FLAG_UV2_USE_TRIPLANAR + /// Use triplanar texture lookup for all texture lookups that would normally use `UV`. + case uv1UseWorldTriplanar = 8 // FLAG_UV1_USE_WORLD_TRIPLANAR + /// Use triplanar texture lookup for all texture lookups that would normally use `UV2`. + case uv2UseWorldTriplanar = 9 // FLAG_UV2_USE_WORLD_TRIPLANAR + /// Use `UV2` coordinates to look up from the ``aoTexture``. + case aoOnUv2 = 10 // FLAG_AO_ON_UV2 + /// Use `UV2` coordinates to look up from the ``emissionTexture``. + case emissionOnUv2 = 11 // FLAG_EMISSION_ON_UV2 + /// Forces the shader to convert albedo from sRGB space to linear space. See also ``albedoTextureForceSrgb``. + case albedoTextureForceSrgb = 12 // FLAG_ALBEDO_TEXTURE_FORCE_SRGB + /// Disables receiving shadows from other objects. + case dontReceiveShadows = 13 // FLAG_DONT_RECEIVE_SHADOWS + /// Disables receiving ambient light. + case disableAmbientLight = 14 // FLAG_DISABLE_AMBIENT_LIGHT + /// Enables the shadow to opacity feature. + case useShadowToOpacity = 15 // FLAG_USE_SHADOW_TO_OPACITY + /// Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. + case useTextureRepeat = 16 // FLAG_USE_TEXTURE_REPEAT + /// Invert values read from a depth texture to convert them to height values (heightmap). + case invertHeightmap = 17 // FLAG_INVERT_HEIGHTMAP + /// Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. + case subsurfaceModeSkin = 18 // FLAG_SUBSURFACE_MODE_SKIN + /// Enables parts of the shader required for ``GPUParticles3D`` trails to function. This also requires using a mesh with appropriate skinning, such as ``RibbonTrailMesh`` or ``TubeTrailMesh``. Enabling this feature outside of materials used in ``GPUParticles3D`` meshes will break material rendering. + case particleTrailsMode = 19 // FLAG_PARTICLE_TRAILS_MODE + /// Enables multichannel signed distance field rendering shader. + case albedoTextureMsdf = 20 // FLAG_ALBEDO_TEXTURE_MSDF + /// Disables receiving depth-based or volumetric fog. + case disableFog = 21 // FLAG_DISABLE_FOG + /// Represents the size of the ``BaseMaterial3D/Flags`` enum. + case max = 22 // FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disableDepthTest: return ".disableDepthTest" + case .albedoFromVertexColor: return ".albedoFromVertexColor" + case .srgbVertexColor: return ".srgbVertexColor" + case .usePointSize: return ".usePointSize" + case .fixedSize: return ".fixedSize" + case .billboardKeepScale: return ".billboardKeepScale" + case .uv1UseTriplanar: return ".uv1UseTriplanar" + case .uv2UseTriplanar: return ".uv2UseTriplanar" + case .uv1UseWorldTriplanar: return ".uv1UseWorldTriplanar" + case .uv2UseWorldTriplanar: return ".uv2UseWorldTriplanar" + case .aoOnUv2: return ".aoOnUv2" + case .emissionOnUv2: return ".emissionOnUv2" + case .albedoTextureForceSrgb: return ".albedoTextureForceSrgb" + case .dontReceiveShadows: return ".dontReceiveShadows" + case .disableAmbientLight: return ".disableAmbientLight" + case .useShadowToOpacity: return ".useShadowToOpacity" + case .useTextureRepeat: return ".useTextureRepeat" + case .invertHeightmap: return ".invertHeightmap" + case .subsurfaceModeSkin: return ".subsurfaceModeSkin" + case .particleTrailsMode: return ".particleTrailsMode" + case .albedoTextureMsdf: return ".albedoTextureMsdf" + case .disableFog: return ".disableFog" + case .max: return ".max" + } + + } + + } + + public enum DiffuseMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default diffuse scattering algorithm. + case burley = 0 // DIFFUSE_BURLEY + /// Diffuse scattering ignores roughness. + case lambert = 1 // DIFFUSE_LAMBERT + /// Extends Lambert to cover more than 90 degrees when roughness increases. + case lambertWrap = 2 // DIFFUSE_LAMBERT_WRAP + /// Uses a hard cut for lighting, with smoothing affected by roughness. + case toon = 3 // DIFFUSE_TOON + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .burley: return ".burley" + case .lambert: return ".lambert" + case .lambertWrap: return ".lambertWrap" + case .toon: return ".toon" + } + + } + + } + + public enum SpecularMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default specular blob. + case schlickGgx = 0 // SPECULAR_SCHLICK_GGX + /// Toon blob which changes size based on roughness. + case toon = 1 // SPECULAR_TOON + /// No specular blob. This is slightly faster to render than other specular modes. + case disabled = 2 // SPECULAR_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .schlickGgx: return ".schlickGgx" + case .toon: return ".toon" + case .disabled: return ".disabled" + } + + } + + } + + public enum BillboardMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Billboard mode is disabled. + case disabled = 0 // BILLBOARD_DISABLED + /// The object's Z axis will always face the camera. + case enabled = 1 // BILLBOARD_ENABLED + /// The object's X axis will always face the camera. + case fixedY = 2 // BILLBOARD_FIXED_Y + /// Used for particle systems when assigned to ``GPUParticles3D`` and ``CPUParticles3D`` nodes (flipbook animation). Enables `particles_anim_*` properties. + /// + /// The ``ParticleProcessMaterial/animSpeedMin`` or ``CPUParticles3D/animSpeedMin`` should also be set to a value bigger than zero for the animation to play. + /// + case particles = 3 // BILLBOARD_PARTICLES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .fixedY: return ".fixedY" + case .particles: return ".particles" + } + + } + + } + + public enum TextureChannel: Int64, CaseIterable, CustomDebugStringConvertible { + /// Used to read from the red channel of a texture. + case red = 0 // TEXTURE_CHANNEL_RED + /// Used to read from the green channel of a texture. + case green = 1 // TEXTURE_CHANNEL_GREEN + /// Used to read from the blue channel of a texture. + case blue = 2 // TEXTURE_CHANNEL_BLUE + /// Used to read from the alpha channel of a texture. + case alpha = 3 // TEXTURE_CHANNEL_ALPHA + /// Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. + case grayscale = 4 // TEXTURE_CHANNEL_GRAYSCALE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .red: return ".red" + case .green: return ".green" + case .blue: return ".blue" + case .alpha: return ".alpha" + case .grayscale: return ".grayscale" + } + + } + + } + + public enum EmissionOperator: Int64, CaseIterable, CustomDebugStringConvertible { + /// Adds the emission color to the color from the emission texture. + case add = 0 // EMISSION_OP_ADD + /// Multiplies the emission color by the color from the emission texture. + case multiply = 1 // EMISSION_OP_MULTIPLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .add: return ".add" + case .multiply: return ".multiply" + } + + } + + } + + public enum DistanceFadeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not use distance fade. + case disabled = 0 // DISTANCE_FADE_DISABLED + /// Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. + case pixelAlpha = 1 // DISTANCE_FADE_PIXEL_ALPHA + /// Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than ``DistanceFadeMode/pixelAlpha``. + case pixelDither = 2 // DISTANCE_FADE_PIXEL_DITHER + /// Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than ``DistanceFadeMode/pixelAlpha`` and ``DistanceFadeMode/pixelDither``. + case objectDither = 3 // DISTANCE_FADE_OBJECT_DITHER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .pixelAlpha: return ".pixelAlpha" + case .pixelDither: return ".pixelDither" + case .objectDither: return ".objectDither" + } + + } + + } + + + /* Properties */ + + /// The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than ``Transparency/disabled`` has a greater performance impact compared to opaque rendering. See also ``blendMode``. + final public var transparency: BaseMaterial3D.Transparency { + get { + return get_transparency () + } + + set { + set_transparency (newValue) + } + + } + + /// Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing ``alphaScissorThreshold``. If the material disappears at a distance, try decreasing ``alphaScissorThreshold``. + final public var alphaScissorThreshold: Double { + get { + return get_alpha_scissor_threshold () + } + + set { + set_alpha_scissor_threshold (newValue) + } + + } + + /// The hashing scale for Alpha Hash. Recommended values between `0` and `2`. + final public var alphaHashScale: Double { + get { + return get_alpha_hash_scale () + } + + set { + set_alpha_hash_scale (newValue) + } + + } + + /// The type of alpha antialiasing to apply. See ``BaseMaterial3D/AlphaAntiAliasing``. + final public var alphaAntialiasingMode: BaseMaterial3D.AlphaAntiAliasing { + get { + return get_alpha_antialiasing () + } + + set { + set_alpha_antialiasing (newValue) + } + + } + + /// Threshold at which antialiasing will be applied on the alpha channel. + final public var alphaAntialiasingEdge: Double { + get { + return get_alpha_antialiasing_edge () + } + + set { + set_alpha_antialiasing_edge (newValue) + } + + } + + /// The material's blend mode. + /// + /// > Note: Values other than `Mix` force the object into the transparent pipeline. See ``BaseMaterial3D/BlendMode``. + /// + final public var blendMode: BaseMaterial3D.BlendMode { + get { + return get_blend_mode () + } + + set { + set_blend_mode (newValue) + } + + } + + /// Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See ``BaseMaterial3D/CullMode``. + final public var cullMode: BaseMaterial3D.CullMode { + get { + return get_cull_mode () + } + + set { + set_cull_mode (newValue) + } + + } + + /// Determines when depth rendering takes place. See ``BaseMaterial3D/DepthDrawMode``. See also ``transparency``. + final public var depthDrawMode: BaseMaterial3D.DepthDrawMode { + get { + return get_depth_draw_mode () + } + + set { + set_depth_draw_mode (newValue) + } + + } + + /// If `true`, depth testing is disabled and the object will be drawn in render order. + final public var noDepthTest: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 0)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 0)!, newValue) + } + + } + + /// Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. Unshaded rendering is the fastest, but disables all interactions with lights. + /// + /// > Note: Setting the shading mode vertex shading currently has no effect, as vertex shading is not implemented yet. + /// + final public var shadingMode: BaseMaterial3D.ShadingMode { + get { + return get_shading_mode () + } + + set { + set_shading_mode (newValue) + } + + } + + /// The algorithm used for diffuse light scattering. See ``BaseMaterial3D/DiffuseMode``. + final public var diffuseMode: BaseMaterial3D.DiffuseMode { + get { + return get_diffuse_mode () + } + + set { + set_diffuse_mode (newValue) + } + + } + + /// The method for rendering the specular blob. See ``BaseMaterial3D/SpecularMode``. + /// + /// > Note: ``specularMode`` only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, ``VoxelGI``, SDFGI or ``ReflectionProbe``s. To disable reflections from these sources as well, set ``metallicSpecular`` to `0.0` instead. + /// + final public var specularMode: BaseMaterial3D.SpecularMode { + get { + return get_specular_mode () + } + + set { + set_specular_mode (newValue) + } + + } + + /// If `true`, the object receives no ambient light. + final public var disableAmbientLight: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 14)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 14)!, newValue) + } + + } + + /// If `true`, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent. + final public var disableFog: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 21)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 21)!, newValue) + } + + } + + /// If `true`, the vertex color is used as albedo color. + final public var vertexColorUseAsAlbedo: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 1)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 1)!, newValue) + } + + } + + /// If `true`, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If `false`, vertex colors are considered to be stored in linear color space and are rendered as-is. See also ``albedoTextureForceSrgb``. + /// + /// > Note: Only effective when using the Forward+ and Mobile rendering methods, not Compatibility. + /// + final public var vertexColorIsSrgb: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 2)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 2)!, newValue) + } + + } + + /// The material's base color. + /// + /// > Note: If ``detailEnabled`` is `true` and a ``detailAlbedo`` texture is specified, ``albedoColor`` will _not_ modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent ``detailAlbedo`` texture instead. + /// + final public var albedoColor: Color { + get { + return get_albedo () + } + + set { + set_albedo (newValue) + } + + } + + /// Texture to multiply by ``albedoColor``. Used for basic texturing of objects. + /// + /// If the texture appears unexpectedly too dark or too bright, check ``albedoTextureForceSrgb``. + /// + final public var albedoTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 0)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 0)!, newValue) + } + + } + + /// If `true`, forces a conversion of the ``albedoTexture`` from sRGB color space to linear color space. See also ``vertexColorIsSrgb``. + /// + /// This should only be enabled when needed (typically when using a ``ViewportTexture`` as ``albedoTexture``). If ``albedoTextureForceSrgb`` is `true` when it shouldn't be, the texture will appear to be too dark. If ``albedoTextureForceSrgb`` is `false` when it shouldn't be, the texture will appear to be too bright. + /// + final public var albedoTextureForceSrgb: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 12)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 12)!, newValue) + } + + } + + /// Enables multichannel signed distance field rendering shader. Use ``msdfPixelRange`` and ``msdfOutlineSize`` to configure MSDF parameters. + final public var albedoTextureMsdf: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 20)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 20)!, newValue) + } + + } + + /// The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of ``aoTexture``, ``roughnessTexture`` and ``metallicTexture`` in ``ORMMaterial3D``. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored. + final public var ormTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 17)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 17)!, newValue) + } + + } + + /// A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between `0` and `1` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use ``roughness``. + final public var metallic: Double { + get { + return get_metallic () + } + + set { + set_metallic (newValue) + } + + } + + /// Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to `0.0`, no specular reflections will be visible. This differs from the ``SpecularMode/disabled`` ``BaseMaterial3D/SpecularMode`` as ``SpecularMode/disabled`` only applies to the specular lobe from the light source. + /// + /// > Note: Unlike ``metallic``, this is not energy-conserving, so it should be left at `0.5` in most cases. See also ``roughness``. + /// + final public var metallicSpecular: Double { + get { + return get_specular () + } + + set { + set_specular (newValue) + } + + } + + /// Texture used to specify metallic for an object. This is multiplied by ``metallic``. + final public var metallicTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 1)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 1)!, newValue) + } + + } + + /// Specifies the channel of the ``metallicTexture`` in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + final public var metallicTextureChannel: BaseMaterial3D.TextureChannel { + get { + return get_metallic_texture_channel () + } + + set { + set_metallic_texture_channel (newValue) + } + + } + + /// Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also ``metallic``. + final public var roughness: Double { + get { + return get_roughness () + } + + set { + set_roughness (newValue) + } + + } + + /// Texture used to control the roughness per-pixel. Multiplied by ``roughness``. + final public var roughnessTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 2)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 2)!, newValue) + } + + } + + /// Specifies the channel of the ``roughnessTexture`` in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + final public var roughnessTextureChannel: BaseMaterial3D.TextureChannel { + get { + return get_roughness_texture_channel () + } + + set { + set_roughness_texture_channel (newValue) + } + + } + + /// If `true`, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a ``VoxelGI``, SDFGI, or ``LightmapGI`` is used and this object is used in baked lighting. + final public var emissionEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 0)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 0)!, newValue) + } + + } + + /// The emitted light's color. See ``emissionEnabled``. + final public var emission: Color { + get { + return get_emission () + } + + set { + set_emission (newValue) + } + + } + + /// Multiplier for emitted light. See ``emissionEnabled``. + final public var emissionEnergyMultiplier: Double { + get { + return get_emission_energy_multiplier () + } + + set { + set_emission_energy_multiplier (newValue) + } + + } + + /// Luminance of emitted light, measured in nits (candela per square meter). Only available when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is enabled. The default is roughly equivalent to an indoor lightbulb. + final public var emissionIntensity: Double { + get { + return get_emission_intensity () + } + + set { + set_emission_intensity (newValue) + } + + } + + /// Sets how ``emission`` interacts with ``emissionTexture``. Can either add or multiply. See ``BaseMaterial3D/EmissionOperator`` for options. + final public var emissionOperator: BaseMaterial3D.EmissionOperator { + get { + return get_emission_operator () + } + + set { + set_emission_operator (newValue) + } + + } + + /// Use `UV2` to read from the ``emissionTexture``. + final public var emissionOnUv2: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 11)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 11)!, newValue) + } + + } + + /// Texture that specifies how much surface emits light at a given point. + final public var emissionTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 3)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 3)!, newValue) + } + + } + + /// If `true`, normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs. + final public var normalEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 1)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 1)!, newValue) + } + + } + + /// The strength of the normal map's effect. + final public var normalScale: Double { + get { + return get_normal_scale () + } + + set { + set_normal_scale (newValue) + } + + } + + /// Texture used to specify the normal at a given pixel. The ``normalTexture`` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from ``normalTexture`` is oriented around the surface normal provided by the ``Mesh``. + /// + /// > Note: The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with ``SurfaceTool``, you can use ``SurfaceTool/generateNormals(flip:)`` and ``SurfaceTool/generateTangents()`` to automatically generate normals and tangents respectively. + /// + /// > Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines. + /// + /// > Note: If ``detailEnabled`` is `true`, the ``detailAlbedo`` texture is drawn _below_ the ``normalTexture``. To display a normal map _above_ the ``detailAlbedo`` texture, use ``detailNormal`` instead. + /// + final public var normalTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 4)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 4)!, newValue) + } + + } + + /// If `true`, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. + /// + /// > Note: Rim lighting is not visible if the material's ``shadingMode`` is ``ShadingMode/unshaded``. + /// + final public var rimEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 2)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 2)!, newValue) + } + + } + + /// Sets the strength of the rim lighting effect. + final public var rim: Double { + get { + return get_rim () + } + + set { + set_rim (newValue) + } + + } + + /// The amount of to blend light and albedo color when rendering rim effect. If `0` the light color is used, while `1` means albedo color is used. An intermediate value generally works best. + final public var rimTint: Double { + get { + return get_rim_tint () + } + + set { + set_rim_tint (newValue) + } + + } + + /// Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by ``rim``. + final public var rimTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 5)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 5)!, newValue) + } + + } + + /// If `true`, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. + /// + /// > Note: Clearcoat rendering is not visible if the material's ``shadingMode`` is ``ShadingMode/unshaded``. + /// + final public var clearcoatEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 3)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 3)!, newValue) + } + + } + + /// Sets the strength of the clearcoat effect. Setting to `0` looks the same as disabling the clearcoat effect. + final public var clearcoat: Double { + get { + return get_clearcoat () + } + + set { + set_clearcoat (newValue) + } + + } + + /// Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat. + final public var clearcoatRoughness: Double { + get { + return get_clearcoat_roughness () + } + + set { + set_clearcoat_roughness (newValue) + } + + } + + /// Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. + final public var clearcoatTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 6)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 6)!, newValue) + } + + } + + /// If `true`, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. + /// + /// > Note: Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. + /// + /// > Note: Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting ``textureFilter`` to ``TextureFilter/linearWithMipmapsAnisotropic``. + /// + final public var anisotropyEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 4)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 4)!, newValue) + } + + } + + /// The strength of the anisotropy effect. This is multiplied by ``anisotropyFlowmap``'s alpha channel if a texture is defined there and the texture contains an alpha channel. + final public var anisotropy: Double { + get { + return get_anisotropy () + } + + set { + set_anisotropy (newValue) + } + + } + + /// Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion. + /// + /// If present, the texture's alpha channel will be used to multiply the strength of the ``anisotropy`` effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored. + /// + final public var anisotropyFlowmap: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 7)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 7)!, newValue) + } + + } + + /// If `true`, ambient occlusion is enabled. Ambient occlusion darkens areas based on the ``aoTexture``. + final public var aoEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 5)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 5)!, newValue) + } + + } + + /// Amount that ambient occlusion affects lighting from lights. If `0`, ambient occlusion only affects ambient light. If `1`, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. + final public var aoLightAffect: Double { + get { + return get_ao_light_affect () + } + + set { + set_ao_light_affect (newValue) + } + + } + + /// Texture that defines the amount of ambient occlusion for a given point on the object. + final public var aoTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 8)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 8)!, newValue) + } + + } + + /// If `true`, use `UV2` coordinates to look up from the ``aoTexture``. + final public var aoOnUv2: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 10)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 10)!, newValue) + } + + } + + /// Specifies the channel of the ``aoTexture`` in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + final public var aoTextureChannel: BaseMaterial3D.TextureChannel { + get { + return get_ao_texture_channel () + } + + set { + set_ao_texture_channel (newValue) + } + + } + + /// If `true`, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also ``normalEnabled``. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. + /// + /// > Note: Height mapping is not supported if triplanar mapping is used on the same material. The value of ``heightmapEnabled`` will be ignored if ``uv1Triplanar`` is enabled. + /// + final public var heightmapEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 6)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 6)!, newValue) + } + + } + + /// The heightmap scale to use for the parallax effect (see ``heightmapEnabled``). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using ``heightmapFlipTexture`` as the material will also appear to be "closer" to the camera. In most cases, ``heightmapScale`` should be kept to a positive value. + /// + /// > Note: If the height map effect looks strange regardless of this value, try adjusting ``heightmapFlipBinormal`` and ``heightmapFlipTangent``. See also ``heightmapTexture`` for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how ``heightmapScale`` behaves. + /// + final public var heightmapScale: Double { + get { + return get_heightmap_scale () + } + + set { + set_heightmap_scale (newValue) + } + + } + + /// If `true`, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see ``heightmapEnabled``). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference. + final public var heightmapDeepParallax: Bool { + get { + return is_heightmap_deep_parallax_enabled () + } + + set { + set_heightmap_deep_parallax (newValue) + } + + } + + /// The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + /// + /// > Note: Only effective if ``heightmapDeepParallax`` is `true`. + /// + final public var heightmapMinLayers: Int32 { + get { + return get_heightmap_deep_parallax_min_layers () + } + + set { + set_heightmap_deep_parallax_min_layers (newValue) + } + + } + + /// The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + /// + /// > Note: Only effective if ``heightmapDeepParallax`` is `true`. + /// + final public var heightmapMaxLayers: Int32 { + get { + return get_heightmap_deep_parallax_max_layers () + } + + set { + set_heightmap_deep_parallax_max_layers (newValue) + } + + } + + /// If `true`, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable ``heightmapScale``), try setting this to `true`. + final public var heightmapFlipTangent: Bool { + get { + return get_heightmap_deep_parallax_flip_tangent () + } + + set { + set_heightmap_deep_parallax_flip_tangent (newValue) + } + + } + + /// If `true`, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable ``heightmapScale``), try setting this to `true`. + final public var heightmapFlipBinormal: Bool { + get { + return get_heightmap_deep_parallax_flip_binormal () + } + + set { + set_heightmap_deep_parallax_flip_binormal (newValue) + } + + } + + /// The texture to use as a height map. See also ``heightmapEnabled``. + /// + /// For best results, the texture should be normalized (with ``heightmapScale`` reduced to compensate). In GIMP, this can be done using **Colors > Auto > Equalize**. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves. + /// + /// > Note: To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data. + /// + final public var heightmapTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 9)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 9)!, newValue) + } + + } + + /// If `true`, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. + /// + /// This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case ``heightmapFlipTexture`` should remain `false`. + /// + final public var heightmapFlipTexture: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 17)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 17)!, newValue) + } + + } + + /// If `true`, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by ``ProjectSettings/rendering/environment/subsurfaceScattering/subsurfaceScatteringQuality``. + final public var subsurfScatterEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 7)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 7)!, newValue) + } + + } + + /// The strength of the subsurface scattering effect. The depth of the effect is also controlled by ``ProjectSettings/rendering/environment/subsurfaceScattering/subsurfaceScatteringScale``, which is set globally. + final public var subsurfScatterStrength: Double { + get { + return get_subsurface_scattering_strength () + } + + set { + set_subsurface_scattering_strength (newValue) + } + + } + + /// If `true`, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering. + final public var subsurfScatterSkinMode: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 18)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 18)!, newValue) + } + + } + + /// Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by ``subsurfScatterStrength``. + final public var subsurfScatterTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 10)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 10)!, newValue) + } + + } + + /// If `true`, enables subsurface scattering transmittance. Only effective if ``subsurfScatterEnabled`` is `true`. See also ``backlightEnabled``. + final public var subsurfScatterTransmittanceEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 8)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 8)!, newValue) + } + + } + + /// The color to multiply the subsurface scattering transmittance effect with. Ignored if ``subsurfScatterSkinMode`` is `true`. + final public var subsurfScatterTransmittanceColor: Color { + get { + return get_transmittance_color () + } + + set { + set_transmittance_color (newValue) + } + + } + + /// The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also ``subsurfScatterTexture``. Ignored if ``subsurfScatterSkinMode`` is `true`. + final public var subsurfScatterTransmittanceTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 11)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 11)!, newValue) + } + + } + + /// The depth of the subsurface scattering transmittance effect. + final public var subsurfScatterTransmittanceDepth: Double { + get { + return get_transmittance_depth () + } + + set { + set_transmittance_depth (newValue) + } + + } + + /// The intensity of the subsurface scattering transmittance effect. + final public var subsurfScatterTransmittanceBoost: Double { + get { + return get_transmittance_boost () + } + + set { + set_transmittance_boost (newValue) + } + + } + + /// If `true`, the backlight effect is enabled. See also ``subsurfScatterTransmittanceEnabled``. + final public var backlightEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 9)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 9)!, newValue) + } + + } + + /// The color used by the backlight effect. Represents the light passing through an object. + final public var backlight: Color { + get { + return get_backlight () + } + + set { + set_backlight (newValue) + } + + } + + /// Texture used to control the backlight effect per-pixel. Added to ``backlight``. + final public var backlightTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 12)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 12)!, newValue) + } + + } + + /// If `true`, the refraction effect is enabled. Distorts transparency based on light from behind the object. + final public var refractionEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 10)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 10)!, newValue) + } + + } + + /// The strength of the refraction effect. + final public var refractionScale: Double { + get { + return get_refraction () + } + + set { + set_refraction (newValue) + } + + } + + /// Texture that controls the strength of the refraction per-pixel. Multiplied by ``refractionScale``. + final public var refractionTexture: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 13)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 13)!, newValue) + } + + } + + /// Specifies the channel of the ``refractionTexture`` in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. + final public var refractionTextureChannel: BaseMaterial3D.TextureChannel { + get { + return get_refraction_texture_channel () + } + + set { + set_refraction_texture_channel (newValue) + } + + } + + /// If `true`, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on ``detailMask`` and ``detailAlbedo``'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. + final public var detailEnabled: Bool { + get { + return get_feature (BaseMaterial3D.Feature (rawValue: 11)!) + } + + set { + set_feature (BaseMaterial3D.Feature (rawValue: 11)!, newValue) + } + + } + + /// Texture used to specify how the detail textures get blended with the base textures. ``detailMask`` can be used together with ``detailAlbedo``'s alpha channel (if any). + final public var detailMask: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 14)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 14)!, newValue) + } + + } + + /// Specifies how the ``detailAlbedo`` should blend with the current `ALBEDO`. See ``BaseMaterial3D/BlendMode`` for options. + final public var detailBlendMode: BaseMaterial3D.BlendMode { + get { + return get_detail_blend_mode () + } + + set { + set_detail_blend_mode (newValue) + } + + } + + /// Specifies whether to use `UV` or `UV2` for the detail layer. See ``BaseMaterial3D/DetailUV`` for options. + final public var detailUvLayer: BaseMaterial3D.DetailUV { + get { + return get_detail_uv () + } + + set { + set_detail_uv (newValue) + } + + } + + /// Texture that specifies the color of the detail overlay. ``detailAlbedo``'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see ``detailMask``. + /// + /// > Note: ``detailAlbedo`` is _not_ modulated by ``albedoColor``. + /// + final public var detailAlbedo: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 15)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 15)!, newValue) + } + + } + + /// Texture that specifies the per-pixel normal of the detail overlay. The ``detailNormal`` texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from ``detailNormal`` is oriented around the surface normal provided by the ``Mesh``. + /// + /// > Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines. + /// + final public var detailNormal: Texture2D? { + get { + return get_texture (BaseMaterial3D.TextureParam (rawValue: 16)!) + } + + set { + set_texture (BaseMaterial3D.TextureParam (rawValue: 16)!, newValue) + } + + } + + /// How much to scale the `UV` coordinates. This is multiplied by `UV` in the vertex function. The Z component is used when ``uv1Triplanar`` is enabled, but it is not used anywhere else. + final public var uv1Scale: Vector3 { + get { + return get_uv1_scale () + } + + set { + set_uv1_scale (newValue) + } + + } + + /// How much to offset the `UV` coordinates. This amount will be added to `UV` in the vertex function. This can be used to offset a texture. The Z component is used when ``uv1Triplanar`` is enabled, but it is not used anywhere else. + final public var uv1Offset: Vector3 { + get { + return get_uv1_offset () + } + + set { + set_uv1_offset (newValue) + } + + } + + /// If `true`, instead of using `UV` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. + final public var uv1Triplanar: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 6)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 6)!, newValue) + } + + } + + /// A lower number blends the texture more softly while a higher number blends the texture more sharply. + /// + /// > Note: ``uv1TriplanarSharpness`` is clamped between `0.0` and `150.0` (inclusive) as values outside that range can look broken depending on the mesh. + /// + final public var uv1TriplanarSharpness: Double { + get { + return get_uv1_triplanar_blend_sharpness () + } + + set { + set_uv1_triplanar_blend_sharpness (newValue) + } + + } + + /// If `true`, triplanar mapping for `UV` is calculated in world space rather than object local space. See also ``uv1Triplanar``. + final public var uv1WorldTriplanar: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 8)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 8)!, newValue) + } + + } + + /// How much to scale the `UV2` coordinates. This is multiplied by `UV2` in the vertex function. The Z component is used when ``uv2Triplanar`` is enabled, but it is not used anywhere else. + final public var uv2Scale: Vector3 { + get { + return get_uv2_scale () + } + + set { + set_uv2_scale (newValue) + } + + } + + /// How much to offset the `UV2` coordinates. This amount will be added to `UV2` in the vertex function. This can be used to offset a texture. The Z component is used when ``uv2Triplanar`` is enabled, but it is not used anywhere else. + final public var uv2Offset: Vector3 { + get { + return get_uv2_offset () + } + + set { + set_uv2_offset (newValue) + } + + } + + /// If `true`, instead of using `UV2` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. + final public var uv2Triplanar: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 7)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 7)!, newValue) + } + + } + + /// A lower number blends the texture more softly while a higher number blends the texture more sharply. + /// + /// > Note: ``uv2TriplanarSharpness`` is clamped between `0.0` and `150.0` (inclusive) as values outside that range can look broken depending on the mesh. + /// + final public var uv2TriplanarSharpness: Double { + get { + return get_uv2_triplanar_blend_sharpness () + } + + set { + set_uv2_triplanar_blend_sharpness (newValue) + } + + } + + /// If `true`, triplanar mapping for `UV2` is calculated in world space rather than object local space. See also ``uv2Triplanar``. + final public var uv2WorldTriplanar: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 9)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 9)!, newValue) + } + + } + + /// Filter flags for the texture. See ``BaseMaterial3D/TextureFilter`` for options. + /// + /// > Note: ``heightmapTexture`` is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering. + /// + final public var textureFilter: BaseMaterial3D.TextureFilter { + get { + return get_texture_filter () + } + + set { + set_texture_filter (newValue) + } + + } + + /// Repeat flags for the texture. See ``BaseMaterial3D/TextureFilter`` for options. + final public var textureRepeat: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 16)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 16)!, newValue) + } + + } + + /// If `true`, the object receives no shadow that would otherwise be cast onto it. + final public var disableReceiveShadows: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 13)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 13)!, newValue) + } + + } + + /// If `true`, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. + final public var shadowToOpacity: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 15)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 15)!, newValue) + } + + } + + /// Controls how the object faces the camera. See ``BaseMaterial3D/BillboardMode``. + /// + /// > Note: When billboarding is enabled and the material also casts shadows, billboards will face **the** camera in the scene when rendering shadows. In scenes with multiple cameras, the intended shadow cannot be determined and this will result in undefined behavior. See GitHub Pull Request #72638 for details. + /// + /// > Note: Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See GitHub issue #41567 for details. + /// + final public var billboardMode: BaseMaterial3D.BillboardMode { + get { + return get_billboard_mode () + } + + set { + set_billboard_mode (newValue) + } + + } + + /// If `true`, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when ``billboardMode`` is not ``BillboardMode/disabled``. + final public var billboardKeepScale: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 5)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 5)!, newValue) + } + + } + + /// The number of horizontal frames in the particle sprite sheet. Only enabled when using ``BillboardMode/particles``. See ``billboardMode``. + final public var particlesAnimHFrames: Int32 { + get { + return get_particles_anim_h_frames () + } + + set { + set_particles_anim_h_frames (newValue) + } + + } + + /// The number of vertical frames in the particle sprite sheet. Only enabled when using ``BillboardMode/particles``. See ``billboardMode``. + final public var particlesAnimVFrames: Int32 { + get { + return get_particles_anim_v_frames () + } + + set { + set_particles_anim_v_frames (newValue) + } + + } + + /// If `true`, particle animations are looped. Only enabled when using ``BillboardMode/particles``. See ``billboardMode``. + final public var particlesAnimLoop: Bool { + get { + return get_particles_anim_loop () + } + + set { + set_particles_anim_loop (newValue) + } + + } + + /// If `true`, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its ``cullMode`` set to ``CullMode/front``. See also ``growAmount``. + /// + /// > Note: Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using face weighted normals in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. + /// + final public var grow: Bool { + get { + return is_grow_enabled () + } + + set { + set_grow_enabled (newValue) + } + + } + + /// Grows object vertices in the direction of their normals. Only effective if ``grow`` is `true`. + final public var growAmount: Double { + get { + return get_grow () + } + + set { + set_grow (newValue) + } + + } + + /// If `true`, the object is rendered at the same size regardless of distance. + final public var fixedSize: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 4)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 4)!, newValue) + } + + } + + /// If `true`, render point size can be changed. + /// + /// > Note: This is only effective for objects whose geometry is point-based rather than triangle-based. See also ``pointSize``. + /// + final public var usePointSize: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 3)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 3)!, newValue) + } + + } + + /// The point size in pixels. See ``usePointSize``. + final public var pointSize: Double { + get { + return get_point_size () + } + + set { + set_point_size (newValue) + } + + } + + /// If `true`, enables parts of the shader required for ``GPUParticles3D`` trails to function. This also requires using a mesh with appropriate skinning, such as ``RibbonTrailMesh`` or ``TubeTrailMesh``. Enabling this feature outside of materials used in ``GPUParticles3D`` meshes will break material rendering. + final public var useParticleTrails: Bool { + get { + return get_flag (BaseMaterial3D.Flags (rawValue: 19)!) + } + + set { + set_flag (BaseMaterial3D.Flags (rawValue: 19)!, newValue) + } + + } + + /// If `true`, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. + final public var proximityFadeEnabled: Bool { + get { + return is_proximity_fade_enabled () + } + + set { + set_proximity_fade_enabled (newValue) + } + + } + + /// Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. + final public var proximityFadeDistance: Double { + get { + return get_proximity_fade_distance () + } + + set { + set_proximity_fade_distance (newValue) + } + + } + + /// The width of the range around the shape between the minimum and maximum representable signed distance. + final public var msdfPixelRange: Double { + get { + return get_msdf_pixel_range () + } + + set { + set_msdf_pixel_range (newValue) + } + + } + + /// The width of the shape outline. + final public var msdfOutlineSize: Double { + get { + return get_msdf_outline_size () + } + + set { + set_msdf_outline_size (newValue) + } + + } + + /// Specifies which type of fade to use. Can be any of the ``BaseMaterial3D/DistanceFadeMode``s. + final public var distanceFadeMode: BaseMaterial3D.DistanceFadeMode { + get { + return get_distance_fade () + } + + set { + set_distance_fade (newValue) + } + + } + + /// Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. + /// + /// > Note: If ``distanceFadeMinDistance`` is greater than ``distanceFadeMaxDistance``, the behavior will be reversed. The object will start to fade away at ``distanceFadeMaxDistance`` and will fully disappear once it reaches ``distanceFadeMinDistance``. + /// + final public var distanceFadeMinDistance: Double { + get { + return get_distance_fade_min_distance () + } + + set { + set_distance_fade_min_distance (newValue) + } + + } + + /// Distance at which the object appears fully opaque. + /// + /// > Note: If ``distanceFadeMaxDistance`` is less than ``distanceFadeMinDistance``, the behavior will be reversed. The object will start to fade away at ``distanceFadeMaxDistance`` and will fully disappear once it reaches ``distanceFadeMinDistance``. + /// + final public var distanceFadeMaxDistance: Double { + get { + return get_distance_fade_max_distance () + } + + set { + set_distance_fade_max_distance (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_albedo") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_albedo(_ albedo: Color) { + withUnsafePointer(to: albedo) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_albedo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("get_albedo") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_albedo() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_albedo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transparency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transparency") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3435651667)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transparency(_ transparency: BaseMaterial3D.Transparency) { + withUnsafePointer(to: transparency.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_transparency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transparency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transparency") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 990903061)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transparency() -> BaseMaterial3D.Transparency { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_transparency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.Transparency (rawValue: _result)! + } + + fileprivate static var method_set_alpha_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_antialiasing") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3212649852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_antialiasing(_ alphaAa: BaseMaterial3D.AlphaAntiAliasing) { + withUnsafePointer(to: alphaAa.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_alpha_antialiasing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_antialiasing") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2889939400)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_antialiasing() -> BaseMaterial3D.AlphaAntiAliasing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_alpha_antialiasing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.AlphaAntiAliasing (rawValue: _result)! + } + + fileprivate static var method_set_alpha_antialiasing_edge: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_antialiasing_edge") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_antialiasing_edge(_ edge: Double) { + withUnsafePointer(to: edge) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_alpha_antialiasing_edge, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_antialiasing_edge: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_antialiasing_edge") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_antialiasing_edge() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_alpha_antialiasing_edge, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shading_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shading_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3368750322)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shading_mode(_ shadingMode: BaseMaterial3D.ShadingMode) { + withUnsafePointer(to: shadingMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_shading_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shading_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shading_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2132070559)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shading_mode() -> BaseMaterial3D.ShadingMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_shading_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.ShadingMode (rawValue: _result)! + } + + fileprivate static var method_set_specular: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular(_ specular: Double) { + withUnsafePointer(to: specular) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_specular, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_specular, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_metallic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_metallic") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_metallic(_ metallic: Double) { + withUnsafePointer(to: metallic) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_metallic, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_metallic: GDExtensionMethodBindPtr = { + let methodName = StringName("get_metallic") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_metallic() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_metallic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_roughness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_roughness(_ roughness: Double) { + withUnsafePointer(to: roughness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_roughness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_roughness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_roughness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_roughness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission(_ emission: Color) { + withUnsafePointer(to: emission) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_emission, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_emission, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_energy_multiplier") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_energy_multiplier(_ emissionEnergyMultiplier: Double) { + withUnsafePointer(to: emissionEnergyMultiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_emission_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_energy_multiplier") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_emission_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_intensity") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_intensity(_ emissionEnergyMultiplier: Double) { + withUnsafePointer(to: emissionEnergyMultiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_emission_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_intensity") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_emission_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normal_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normal_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normal_scale(_ normalScale: Double) { + withUnsafePointer(to: normalScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_normal_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_normal_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normal_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_normal_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_normal_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rim: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rim") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rim(_ rim: Double) { + withUnsafePointer(to: rim) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_rim, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rim: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rim") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rim() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_rim, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rim_tint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rim_tint") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rim_tint(_ rimTint: Double) { + withUnsafePointer(to: rimTint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_rim_tint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rim_tint: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rim_tint") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rim_tint() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_rim_tint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clearcoat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clearcoat") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clearcoat(_ clearcoat: Double) { + withUnsafePointer(to: clearcoat) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_clearcoat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clearcoat: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clearcoat") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clearcoat() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_clearcoat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clearcoat_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clearcoat_roughness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clearcoat_roughness(_ clearcoatRoughness: Double) { + withUnsafePointer(to: clearcoatRoughness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_clearcoat_roughness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clearcoat_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clearcoat_roughness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clearcoat_roughness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_clearcoat_roughness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anisotropy") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_anisotropy(_ anisotropy: Double) { + withUnsafePointer(to: anisotropy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_anisotropy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_anisotropy") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_anisotropy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_anisotropy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_scale(_ heightmapScale: Double) { + withUnsafePointer(to: heightmapScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_heightmap_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_heightmap_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_heightmap_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_heightmap_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subsurface_scattering_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subsurface_scattering_strength") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subsurface_scattering_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_subsurface_scattering_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subsurface_scattering_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subsurface_scattering_strength") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subsurface_scattering_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_subsurface_scattering_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transmittance_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transmittance_color") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transmittance_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_transmittance_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transmittance_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transmittance_color") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transmittance_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_transmittance_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transmittance_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transmittance_depth") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transmittance_depth(_ depth: Double) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_transmittance_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transmittance_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transmittance_depth") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transmittance_depth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_transmittance_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transmittance_boost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transmittance_boost") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transmittance_boost(_ boost: Double) { + withUnsafePointer(to: boost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_transmittance_boost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transmittance_boost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transmittance_boost") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transmittance_boost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_transmittance_boost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_backlight: GDExtensionMethodBindPtr = { + let methodName = StringName("set_backlight") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_backlight(_ backlight: Color) { + withUnsafePointer(to: backlight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_backlight, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_backlight: GDExtensionMethodBindPtr = { + let methodName = StringName("get_backlight") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_backlight() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_backlight, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_refraction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_refraction") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_refraction(_ refraction: Double) { + withUnsafePointer(to: refraction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_refraction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_refraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_refraction") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_refraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_refraction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_size") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_point_size(_ pointSize: Double) { + withUnsafePointer(to: pointSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_point_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_size") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_point_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_point_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_detail_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("set_detail_uv") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 456801921)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_detail_uv(_ detailUv: BaseMaterial3D.DetailUV) { + withUnsafePointer(to: detailUv.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_detail_uv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_detail_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_detail_uv") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2306920512)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_detail_uv() -> BaseMaterial3D.DetailUV { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_detail_uv, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.DetailUV (rawValue: _result)! + } + + fileprivate static var method_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2830186259)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_mode(_ blendMode: BaseMaterial3D.BlendMode) { + withUnsafePointer(to: blendMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4022690962)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_mode() -> BaseMaterial3D.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_depth_draw_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_draw_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1456584748)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_draw_mode(_ depthDrawMode: BaseMaterial3D.DepthDrawMode) { + withUnsafePointer(to: depthDrawMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_depth_draw_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_draw_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_draw_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2578197639)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_draw_mode() -> BaseMaterial3D.DepthDrawMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_depth_draw_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.DepthDrawMode (rawValue: _result)! + } + + fileprivate static var method_set_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2338909218)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mode(_ cullMode: BaseMaterial3D.CullMode) { + withUnsafePointer(to: cullMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_cull_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1941499586)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mode() -> BaseMaterial3D.CullMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_cull_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.CullMode (rawValue: _result)! + } + + fileprivate static var method_set_diffuse_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_diffuse_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1045299638)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_diffuse_mode(_ diffuseMode: BaseMaterial3D.DiffuseMode) { + withUnsafePointer(to: diffuseMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_diffuse_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_diffuse_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_diffuse_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3973617136)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_diffuse_mode() -> BaseMaterial3D.DiffuseMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_diffuse_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.DiffuseMode (rawValue: _result)! + } + + fileprivate static var method_set_specular_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 584737147)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular_mode(_ specularMode: BaseMaterial3D.SpecularMode) { + withUnsafePointer(to: specularMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_specular_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2569953298)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular_mode() -> BaseMaterial3D.SpecularMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_specular_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.SpecularMode (rawValue: _result)! + } + + fileprivate static var method_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flag") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3070159527)! + } + + } + + }() + + @inline(__always) + /// If `true`, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to `true`. See ``BaseMaterial3D/Flags`` enumerator for options. + fileprivate final func set_flag(_ flag: BaseMaterial3D.Flags, _ enable: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flag") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410065)! + } + + } + + }() + + @inline(__always) + /// Returns `true`, if the specified flag is enabled. See ``BaseMaterial3D/Flags`` enumerator for options. + fileprivate final func get_flag(_ flag: BaseMaterial3D.Flags) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_filter") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 22904437)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_filter(_ mode: BaseMaterial3D.TextureFilter) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_texture_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_filter") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289213076)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_filter() -> BaseMaterial3D.TextureFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_texture_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureFilter (rawValue: _result)! + } + + fileprivate static var method_set_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("set_feature") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2819288693)! + } + + } + + }() + + @inline(__always) + /// If `true`, enables the specified ``BaseMaterial3D/Feature``. Many features that are available in ``BaseMaterial3D``s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to `true`. + fileprivate final func set_feature(_ feature: BaseMaterial3D.Feature, _ enable: Bool) { + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_feature, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feature") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965241794)! + } + + } + + }() + + @inline(__always) + /// Returns `true`, if the specified ``BaseMaterial3D/Feature`` is enabled. + fileprivate final func get_feature(_ feature: BaseMaterial3D.Feature) -> Bool { + var _result: Bool = false + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_feature, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 464208135)! + } + + } + + }() + + @inline(__always) + /// Sets the texture for the slot specified by `param`. See ``BaseMaterial3D/TextureParam`` for available slots. + fileprivate final func set_texture(_ param: BaseMaterial3D.TextureParam, _ texture: Texture2D?) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 329605813)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Texture2D`` associated with the specified ``BaseMaterial3D/TextureParam``. + fileprivate final func get_texture(_ param: BaseMaterial3D.TextureParam) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_detail_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_detail_blend_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2830186259)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_detail_blend_mode(_ detailBlendMode: BaseMaterial3D.BlendMode) { + withUnsafePointer(to: detailBlendMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_detail_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_detail_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_detail_blend_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4022690962)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_detail_blend_mode() -> BaseMaterial3D.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_detail_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_uv1_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv1_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv1_scale(_ scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv1_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv1_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv1_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv1_scale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv1_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv1_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv1_offset") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv1_offset(_ offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv1_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv1_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv1_offset") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv1_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv1_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv1_triplanar_blend_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv1_triplanar_blend_sharpness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv1_triplanar_blend_sharpness(_ sharpness: Double) { + withUnsafePointer(to: sharpness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv1_triplanar_blend_sharpness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv1_triplanar_blend_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv1_triplanar_blend_sharpness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv1_triplanar_blend_sharpness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv1_triplanar_blend_sharpness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv2_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv2_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv2_scale(_ scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv2_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv2_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv2_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv2_scale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv2_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv2_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv2_offset") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv2_offset(_ offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv2_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv2_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv2_offset") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv2_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv2_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv2_triplanar_blend_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv2_triplanar_blend_sharpness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv2_triplanar_blend_sharpness(_ sharpness: Double) { + withUnsafePointer(to: sharpness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_uv2_triplanar_blend_sharpness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv2_triplanar_blend_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv2_triplanar_blend_sharpness") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv2_triplanar_blend_sharpness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_uv2_triplanar_blend_sharpness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_billboard_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_billboard_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4202036497)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_billboard_mode(_ mode: BaseMaterial3D.BillboardMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_billboard_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_billboard_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_billboard_mode") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1283840139)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_billboard_mode() -> BaseMaterial3D.BillboardMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_billboard_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.BillboardMode (rawValue: _result)! + } + + fileprivate static var method_set_particles_anim_h_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_h_frames") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_h_frames(_ frames: Int32) { + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_particles_anim_h_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_h_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_h_frames") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_h_frames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_particles_anim_h_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_particles_anim_v_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_v_frames") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_v_frames(_ frames: Int32) { + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_particles_anim_v_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_v_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_v_frames") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_v_frames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_particles_anim_v_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_particles_anim_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_loop") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_particles_anim_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_loop") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_particles_anim_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_deep_parallax: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_deep_parallax") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_deep_parallax(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_deep_parallax, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_heightmap_deep_parallax_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_heightmap_deep_parallax_enabled") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_heightmap_deep_parallax_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_is_heightmap_deep_parallax_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_deep_parallax_min_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_deep_parallax_min_layers") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_deep_parallax_min_layers(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_deep_parallax_min_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_heightmap_deep_parallax_min_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_heightmap_deep_parallax_min_layers") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_heightmap_deep_parallax_min_layers() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_heightmap_deep_parallax_min_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_deep_parallax_max_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_deep_parallax_max_layers") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_deep_parallax_max_layers(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_deep_parallax_max_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_heightmap_deep_parallax_max_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_heightmap_deep_parallax_max_layers") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_heightmap_deep_parallax_max_layers() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_heightmap_deep_parallax_max_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_deep_parallax_flip_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_deep_parallax_flip_tangent") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_deep_parallax_flip_tangent(_ flip: Bool) { + withUnsafePointer(to: flip) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_deep_parallax_flip_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_heightmap_deep_parallax_flip_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_heightmap_deep_parallax_flip_tangent") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_heightmap_deep_parallax_flip_tangent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_heightmap_deep_parallax_flip_tangent, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_heightmap_deep_parallax_flip_binormal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_heightmap_deep_parallax_flip_binormal") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_heightmap_deep_parallax_flip_binormal(_ flip: Bool) { + withUnsafePointer(to: flip) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_heightmap_deep_parallax_flip_binormal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_heightmap_deep_parallax_flip_binormal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_heightmap_deep_parallax_flip_binormal") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_heightmap_deep_parallax_flip_binormal() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_heightmap_deep_parallax_flip_binormal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_grow: GDExtensionMethodBindPtr = { + let methodName = StringName("set_grow") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_grow(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_grow, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_grow: GDExtensionMethodBindPtr = { + let methodName = StringName("get_grow") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_grow() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_grow, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_operator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_operator") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3825128922)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_operator(_ `operator`: BaseMaterial3D.EmissionOperator) { + withUnsafePointer(to: `operator`.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_emission_operator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_operator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_operator") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974205018)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_operator() -> BaseMaterial3D.EmissionOperator { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_emission_operator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.EmissionOperator (rawValue: _result)! + } + + fileprivate static var method_set_ao_light_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ao_light_affect") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ao_light_affect(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_ao_light_affect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ao_light_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ao_light_affect") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ao_light_affect() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_ao_light_affect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alpha_scissor_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_scissor_threshold") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_scissor_threshold(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_alpha_scissor_threshold, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_scissor_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_scissor_threshold") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_scissor_threshold() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_alpha_scissor_threshold, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alpha_hash_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_hash_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_hash_scale(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_alpha_hash_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_hash_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_hash_scale") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_hash_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_alpha_hash_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_grow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_grow_enabled") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_grow_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_grow_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_grow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_grow_enabled") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_grow_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_is_grow_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_metallic_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_metallic_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 744167988)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_metallic_texture_channel(_ channel: BaseMaterial3D.TextureChannel) { + withUnsafePointer(to: channel.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_metallic_texture_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_metallic_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_metallic_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 568133867)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_metallic_texture_channel() -> BaseMaterial3D.TextureChannel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_metallic_texture_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureChannel (rawValue: _result)! + } + + fileprivate static var method_set_roughness_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_roughness_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 744167988)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_roughness_texture_channel(_ channel: BaseMaterial3D.TextureChannel) { + withUnsafePointer(to: channel.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_roughness_texture_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_roughness_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_roughness_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 568133867)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_roughness_texture_channel() -> BaseMaterial3D.TextureChannel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_roughness_texture_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureChannel (rawValue: _result)! + } + + fileprivate static var method_set_ao_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ao_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 744167988)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ao_texture_channel(_ channel: BaseMaterial3D.TextureChannel) { + withUnsafePointer(to: channel.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_ao_texture_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ao_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ao_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 568133867)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ao_texture_channel() -> BaseMaterial3D.TextureChannel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_ao_texture_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureChannel (rawValue: _result)! + } + + fileprivate static var method_set_refraction_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_refraction_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 744167988)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_refraction_texture_channel(_ channel: BaseMaterial3D.TextureChannel) { + withUnsafePointer(to: channel.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_refraction_texture_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_refraction_texture_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_refraction_texture_channel") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 568133867)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_refraction_texture_channel() -> BaseMaterial3D.TextureChannel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_refraction_texture_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureChannel (rawValue: _result)! + } + + fileprivate static var method_set_proximity_fade_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_proximity_fade_enabled") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_proximity_fade_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_proximity_fade_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_proximity_fade_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_proximity_fade_enabled") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_proximity_fade_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BaseMaterial3D.method_is_proximity_fade_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_proximity_fade_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_proximity_fade_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_proximity_fade_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_proximity_fade_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_proximity_fade_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_proximity_fade_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_proximity_fade_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_proximity_fade_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_msdf_pixel_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_msdf_pixel_range") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_msdf_pixel_range(_ range: Double) { + withUnsafePointer(to: range) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_msdf_pixel_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_msdf_pixel_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msdf_pixel_range") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_msdf_pixel_range() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_msdf_pixel_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_msdf_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_msdf_outline_size") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_msdf_outline_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_msdf_outline_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_msdf_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msdf_outline_size") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_msdf_outline_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_msdf_outline_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1379478617)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade(_ mode: BaseMaterial3D.DistanceFadeMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_distance_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2694575734)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade() -> BaseMaterial3D.DistanceFadeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_distance_fade, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.DistanceFadeMode (rawValue: _result)! + } + + fileprivate static var method_set_distance_fade_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_max_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_max_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_distance_fade_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_max_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_distance_fade_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_min_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_min_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_min_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BaseMaterial3D.method_set_distance_fade_min_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_min_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_min_distance") + return withUnsafePointer(to: &BaseMaterial3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_min_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(BaseMaterial3D.method_get_distance_fade_min_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BitMap.swift b/Sources/SwiftGodot/Generated/Api/BitMap.swift new file mode 100644 index 000000000..b3d9755b1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BitMap.swift @@ -0,0 +1,377 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Boolean matrix. +/// +/// A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates. +open class BitMap: Resource { + override open class var godotClassName: StringName { "BitMap" } + + /* Properties */ + + /* Methods */ + fileprivate static var method_create: GDExtensionMethodBindPtr = { + let methodName = StringName("create") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + /// Creates a bitmap with the specified size, filled with `false`. + public final func create(size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_create, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_create_from_image_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_image_alpha") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 106271684)! + } + + } + + }() + + /// Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to `false` if the alpha value of the image at that position is equal to `threshold` or less, and `true` in other case. + public final func createFromImageAlpha(image: Image?, threshold: Double = 0.1) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: threshold) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_create_from_image_alpha, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_bitv: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bitv") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4153096796)! + } + + } + + }() + + /// Sets the bitmap's element at the specified position, to the specified value. + public final func setBitv(position: Vector2i, bit: Bool) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: bit) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_set_bitv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_bit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bit") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1383440665)! + } + + } + + }() + + /// Sets the bitmap's element at the specified position, to the specified value. + public final func setBit(x: Int32, y: Int32, bit: Bool) { + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: bit) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_set_bit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_bitv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bitv") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3900751641)! + } + + } + + }() + + /// Returns bitmap's value at the specified position. + public final func getBitv(position: Vector2i) -> Bool { + var _result: Bool = false + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_get_bitv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_bit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bit") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Returns bitmap's value at the specified position. + public final func getBit(x: Int32, y: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_get_bit, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_bit_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bit_rect") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 472162941)! + } + + } + + }() + + /// Sets a rectangular portion of the bitmap to the specified value. + public final func setBitRect(_ rect: Rect2i, bit: Bool) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: bit) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_set_bit_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_true_bit_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_true_bit_count") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of bitmap elements that are set to `true`. + public final func getTrueBitCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BitMap.method_get_true_bit_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns bitmap's dimensions. + public final func getSize() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(BitMap.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_resize: GDExtensionMethodBindPtr = { + let methodName = StringName("resize") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + /// Resizes the image to `newSize`. + public final func resize(newSize: Vector2i) { + withUnsafePointer(to: newSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_resize, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_grow_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("grow_mask") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3317281434)! + } + + } + + }() + + /// Applies morphological dilation or erosion to the bitmap. If `pixels` is positive, dilation is applied to the bitmap. If `pixels` is negative, erosion is applied to the bitmap. `rect` defines the area where the morphological operation is applied. Pixels located outside the `rect` are unaffected by ``growMask(pixels:rect:)``. + public final func growMask(pixels: Int32, rect: Rect2i) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_grow_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_convert_to_image: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_to_image") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4190603485)! + } + + } + + }() + + /// Returns an image of the same size as the bitmap and with a ``Image.Format`` of type ``Image/Format/l8``. `true` bits of the bitmap are being converted into white pixels, and `false` bits into black. + public final func convertToImage() -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(BitMap.method_convert_to_image, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_opaque_to_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("opaque_to_polygons") + return withUnsafePointer(to: &BitMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 48478126)! + } + + } + + }() + + /// Creates an ``GArray`` of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a ``PackedVector2Array`` of its vertices. + /// + /// To get polygons covering the whole bitmap, pass: + /// + /// `epsilon` is passed to RDP to control how accurately the polygons cover the bitmap: a lower `epsilon` corresponds to more points in the polygons. + /// + public final func opaqueToPolygons(rect: Rect2i, epsilon: Double = 2.0) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: epsilon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BitMap.method_opaque_to_polygons, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Bone2D.swift b/Sources/SwiftGodot/Generated/Api/Bone2D.swift new file mode 100644 index 000000000..8da02c49f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Bone2D.swift @@ -0,0 +1,285 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A joint used with ``Skeleton2D`` to control and animate other nodes. +/// +/// A hierarchy of ``Bone2D``s can be bound to a ``Skeleton2D`` to control and animate other ``Node2D`` nodes. +/// +/// You can use ``Bone2D`` and ``Skeleton2D`` nodes to animate 2D meshes created with the ``Polygon2D`` UV editor. +/// +/// Each bone has a ``rest`` transform that you can reset to with ``applyRest()``. These rest poses are relative to the bone's parent. +/// +/// If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. +/// +open class Bone2D: Node2D { + override open class var godotClassName: StringName { "Bone2D" } + + /* Properties */ + + /// Rest transform of the bone. You can reset the node's transforms to this value using ``applyRest()``. + final public var rest: Transform2D { + get { + return get_rest () + } + + set { + set_rest (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_rest: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rest") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rest(_ rest: Transform2D) { + withUnsafePointer(to: rest) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Bone2D.method_set_rest, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rest: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rest") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rest() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(Bone2D.method_get_rest, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_apply_rest: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_rest") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Resets the bone to the rest pose. This is equivalent to setting ``Node2D/transform`` to ``rest``. + public final func applyRest() { + gi.object_method_bind_ptrcall(Bone2D.method_apply_rest, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_skeleton_rest: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton_rest") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the node's ``rest`` ``Transform2D`` if it doesn't have a parent, or its rest pose relative to its parent. + public final func getSkeletonRest() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(Bone2D.method_get_skeleton_rest, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_index_in_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_index_in_skeleton") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the node's index as part of the entire skeleton. See ``Skeleton2D``. + public final func getIndexInSkeleton() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Bone2D.method_get_index_in_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autocalculate_length_and_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autocalculate_length_and_angle") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// When set to `true`, the ``Bone2D`` node will attempt to automatically calculate the bone angle and length using the first child ``Bone2D`` node, if one exists. If none exist, the ``Bone2D`` cannot automatically calculate these values and will print a warning. + public final func setAutocalculateLengthAndAngle(autoCalculate: Bool) { + withUnsafePointer(to: autoCalculate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Bone2D.method_set_autocalculate_length_and_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autocalculate_length_and_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autocalculate_length_and_angle") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether this ``Bone2D`` is going to autocalculate its length and bone angle using its first ``Bone2D`` child node, if one exists. If there are no ``Bone2D`` children, then it cannot autocalculate these values and will print a warning. + public final func getAutocalculateLengthAndAngle() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Bone2D.method_get_autocalculate_length_and_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_length") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the length of the bone in the ``Bone2D``. + public final func setLength(_ length: Double) { + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Bone2D.method_set_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the length of the bone in the ``Bone2D`` node. + public final func getLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Bone2D.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_angle") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the bone angle for the ``Bone2D``. This is typically set to the rotation from the ``Bone2D`` to a child ``Bone2D`` node. + /// + /// > Note: This is different from the ``Bone2D``'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the ``Bone2D``'s ``Node2D/transform``. + /// + public final func setBoneAngle(_ angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Bone2D.method_set_bone_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_angle") + return withUnsafePointer(to: &Bone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the angle of the bone in the ``Bone2D``. + /// + /// > Note: This is different from the ``Bone2D``'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the ``Bone2D``'s ``Node2D/transform``. + /// + public final func getBoneAngle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Bone2D.method_get_bone_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoneAttachment3D.swift b/Sources/SwiftGodot/Generated/Api/BoneAttachment3D.swift new file mode 100644 index 000000000..5da55b4f2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoneAttachment3D.swift @@ -0,0 +1,308 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// А node that dynamically copies or overrides the 3D transform of a bone in its parent ``Skeleton3D``. +/// +/// This node selects a bone in a ``Skeleton3D`` and attaches to it. This means that the ``BoneAttachment3D`` node will either dynamically copy or override the 3D transform of the selected bone. +open class BoneAttachment3D: Node3D { + override open class var godotClassName: StringName { "BoneAttachment3D" } + + /* Properties */ + + /// The name of the attached bone. + final public var boneName: String { + get { + return get_bone_name () + } + + set { + set_bone_name (newValue) + } + + } + + /// The index of the attached bone. + final public var boneIdx: Int32 { + get { + return get_bone_idx () + } + + set { + set_bone_idx (newValue) + } + + } + + /// Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to `true`, the BoneAttachment3D node can change the pose of the bone. When set to `false`, the BoneAttachment3D will always be set to the bone's transform. + /// + /// > Note: This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with ``SkeletonModifier3D``. + /// + final public var overridePose: Bool { + get { + return get_override_pose () + } + + set { + set_override_pose (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_bone_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_name") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bone_name(_ boneName: String) { + let boneName = GString(boneName) + withUnsafePointer(to: boneName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneAttachment3D.method_set_bone_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_name") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bone_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(BoneAttachment3D.method_get_bone_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_bone_idx: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_idx") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bone_idx(_ boneIdx: Int32) { + withUnsafePointer(to: boneIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneAttachment3D.method_set_bone_idx, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone_idx: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_idx") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bone_idx() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BoneAttachment3D.method_get_bone_idx, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_on_skeleton_update: GDExtensionMethodBindPtr = { + let methodName = StringName("on_skeleton_update") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// A function that is called automatically when the ``Skeleton3D`` is updated. This function is where the ``BoneAttachment3D`` node updates its position so it is correctly bound when it is _not_ set to override the bone pose. + public final func onSkeletonUpdate() { + gi.object_method_bind_ptrcall(BoneAttachment3D.method_on_skeleton_update, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_override_pose: GDExtensionMethodBindPtr = { + let methodName = StringName("set_override_pose") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_override_pose(_ overridePose: Bool) { + withUnsafePointer(to: overridePose) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneAttachment3D.method_set_override_pose, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_override_pose: GDExtensionMethodBindPtr = { + let methodName = StringName("get_override_pose") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_override_pose() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BoneAttachment3D.method_get_override_pose, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_external_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_external_skeleton") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the BoneAttachment3D node will use an external ``Skeleton3D`` node rather than attempting to use its parent node as the ``Skeleton3D``. When set to `true`, the BoneAttachment3D node will use the external ``Skeleton3D`` node set in ``setExternalSkeleton(_:)``. + public final func setUseExternalSkeleton(_ useExternalSkeleton: Bool) { + withUnsafePointer(to: useExternalSkeleton) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneAttachment3D.method_set_use_external_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_external_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_external_skeleton") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the BoneAttachment3D node is using an external ``Skeleton3D`` rather than attempting to use its parent node as the ``Skeleton3D``. + public final func getUseExternalSkeleton() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BoneAttachment3D.method_get_use_external_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_external_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_external_skeleton") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + /// Sets the ``NodePath`` to the external skeleton that the BoneAttachment3D node should use. See ``setUseExternalSkeleton(_:)`` to enable the external ``Skeleton3D`` node. + public final func setExternalSkeleton(_ externalSkeleton: NodePath) { + withUnsafePointer(to: externalSkeleton.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneAttachment3D.method_set_external_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_external_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_external_skeleton") + return withUnsafePointer(to: &BoneAttachment3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + /// Returns the ``NodePath`` to the external ``Skeleton3D`` node, if one has been set. + public final func getExternalSkeleton() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(BoneAttachment3D.method_get_external_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoneMap.swift b/Sources/SwiftGodot/Generated/Api/BoneMap.swift new file mode 100644 index 000000000..5e165a072 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoneMap.swift @@ -0,0 +1,221 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Describes a mapping of bone names for retargeting ``Skeleton3D`` into common names defined by a ``SkeletonProfile``. +/// +/// This class contains a dictionary that uses a list of bone names in ``SkeletonProfile`` as key names. +/// +/// By assigning the actual ``Skeleton3D`` bone name as the key value, it maps the ``Skeleton3D`` to the ``SkeletonProfile``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``boneMapUpdated`` +/// - ``profileUpdated`` +open class BoneMap: Resource { + override open class var godotClassName: StringName { "BoneMap" } + + /* Properties */ + + /// A ``SkeletonProfile`` of the mapping target. Key names in the ``BoneMap`` are synchronized with it. + final public var profile: SkeletonProfile? { + get { + return get_profile () + } + + set { + set_profile (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("get_profile") + return withUnsafePointer(to: &BoneMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4291782652)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_profile() -> SkeletonProfile? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(BoneMap.method_get_profile, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("set_profile") + return withUnsafePointer(to: &BoneMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3870374136)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_profile(_ profile: SkeletonProfile?) { + withUnsafePointer(to: profile?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneMap.method_set_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton_bone_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton_bone_name") + return withUnsafePointer(to: &BoneMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965194235)! + } + + } + + }() + + /// Returns a skeleton bone name is mapped to `profileBoneName`. + /// + /// In the retargeting process, the returned bone name is the bone name of the source skeleton. + /// + public final func getSkeletonBoneName(profileBoneName: StringName) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: profileBoneName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneMap.method_get_skeleton_bone_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_skeleton_bone_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton_bone_name") + return withUnsafePointer(to: &BoneMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Maps a skeleton bone name to `profileBoneName`. + /// + /// In the retargeting process, the setting bone name is the bone name of the source skeleton. + /// + public final func setSkeletonBoneName(profileBoneName: StringName, skeletonBoneName: StringName) { + withUnsafePointer(to: profileBoneName.content) { pArg0 in + withUnsafePointer(to: skeletonBoneName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(BoneMap.method_set_skeleton_bone_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_find_profile_bone_name: GDExtensionMethodBindPtr = { + let methodName = StringName("find_profile_bone_name") + return withUnsafePointer(to: &BoneMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965194235)! + } + + } + + }() + + /// Returns a profile bone name having `skeletonBoneName`. If not found, an empty ``StringName`` will be returned. + /// + /// In the retargeting process, the returned bone name is the bone name of the target skeleton. + /// + public final func findProfileBoneName(skeletonBoneName: StringName) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: skeletonBoneName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoneMap.method_find_profile_bone_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + // Signals + /// This signal is emitted when change the key value in the ``BoneMap``. This is used to validate mapping and to update ``BoneMap`` editor. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.boneMapUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var boneMapUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "bone_map_updated") } + + /// This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the ``BoneMap`` and to redraw the ``BoneMap`` editor. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.profileUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var profileUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "profile_updated") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoxContainer.swift b/Sources/SwiftGodot/Generated/Api/BoxContainer.swift new file mode 100644 index 000000000..20bdfe963 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoxContainer.swift @@ -0,0 +1,192 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that arranges its child controls horizontally or vertically. +/// +/// A container that arranges its child controls horizontally or vertically, rearranging them automatically when their minimum size changes. +open class BoxContainer: Container { + override open class var godotClassName: StringName { "BoxContainer" } + public enum AlignmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). + case begin = 0 // ALIGNMENT_BEGIN + /// The child controls will be centered in the container. + case center = 1 // ALIGNMENT_CENTER + /// The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). + case end = 2 // ALIGNMENT_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .begin: return ".begin" + case .center: return ".center" + case .end: return ".end" + } + + } + + } + + + /* Properties */ + + /// The alignment of the container's children (must be one of ``AlignmentMode/begin``, ``AlignmentMode/center``, or ``AlignmentMode/end``). + final public var alignment: BoxContainer.AlignmentMode { + get { + return get_alignment () + } + + set { + set_alignment (newValue) + } + + } + + /// If `true`, the ``BoxContainer`` will arrange its children vertically, rather than horizontally. + /// + /// Can't be changed when using ``HBoxContainer`` and ``VBoxContainer``. + /// + final public var vertical: Bool { + get { + return is_vertical () + } + + set { + set_vertical (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_spacer: GDExtensionMethodBindPtr = { + let methodName = StringName("add_spacer") + return withUnsafePointer(to: &BoxContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1326660695)! + } + + } + + }() + + /// Adds a ``Control`` node to the box as a spacer. If `begin` is `true`, it will insert the ``Control`` node in front of all other children. + public final func addSpacer(begin: Bool) -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: begin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxContainer.method_add_spacer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alignment") + return withUnsafePointer(to: &BoxContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2456745134)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alignment(_ alignment: BoxContainer.AlignmentMode) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxContainer.method_set_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alignment") + return withUnsafePointer(to: &BoxContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1915476527)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alignment() -> BoxContainer.AlignmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(BoxContainer.method_get_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BoxContainer.AlignmentMode (rawValue: _result)! + } + + fileprivate static var method_set_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertical") + return withUnsafePointer(to: &BoxContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertical(_ vertical: Bool) { + withUnsafePointer(to: vertical) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxContainer.method_set_vertical, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("is_vertical") + return withUnsafePointer(to: &BoxContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_vertical() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(BoxContainer.method_is_vertical, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoxMesh.swift b/Sources/SwiftGodot/Generated/Api/BoxMesh.swift new file mode 100644 index 000000000..94065ab8c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoxMesh.swift @@ -0,0 +1,260 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Generate an axis-aligned box ``PrimitiveMesh``. +/// +/// Generate an axis-aligned box ``PrimitiveMesh``. +/// +/// The box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to `Vector3(3, 2, 1)`. This is equivalent to adding `UV *= vec2(3.0, 2.0)` in a vertex shader. +/// +/// > Note: When using a large textured ``BoxMesh`` (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase ``subdivideDepth``, ``subdivideHeight`` and ``subdivideWidth`` until you no longer notice UV jittering. +/// +open class BoxMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "BoxMesh" } + + /* Properties */ + + /// The box's width, height and depth. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// Number of extra edge loops inserted along the X axis. + final public var subdivideWidth: Int32 { + get { + return get_subdivide_width () + } + + set { + set_subdivide_width (newValue) + } + + } + + /// Number of extra edge loops inserted along the Y axis. + final public var subdivideHeight: Int32 { + get { + return get_subdivide_height () + } + + set { + set_subdivide_height (newValue) + } + + } + + /// Number of extra edge loops inserted along the Z axis. + final public var subdivideDepth: Int32 { + get { + return get_subdivide_depth () + } + + set { + set_subdivide_depth (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxMesh.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BoxMesh.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_width") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_width(_ subdivide: Int32) { + withUnsafePointer(to: subdivide) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxMesh.method_set_subdivide_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_width") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_width() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BoxMesh.method_get_subdivide_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_height") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_height(_ divisions: Int32) { + withUnsafePointer(to: divisions) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxMesh.method_set_subdivide_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_height") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_height() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BoxMesh.method_get_subdivide_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_depth") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_depth(_ divisions: Int32) { + withUnsafePointer(to: divisions) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxMesh.method_set_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_depth") + return withUnsafePointer(to: &BoxMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_depth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(BoxMesh.method_get_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoxOccluder3D.swift b/Sources/SwiftGodot/Generated/Api/BoxOccluder3D.swift new file mode 100644 index 000000000..a8e1de536 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoxOccluder3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Cuboid shape for use with occlusion culling in ``OccluderInstance3D``. +/// +/// ``BoxOccluder3D`` stores a cuboid shape that can be used by the engine's occlusion culling system. +/// +/// See ``OccluderInstance3D``'s documentation for instructions on setting up occlusion culling. +/// +open class BoxOccluder3D: Occluder3D { + override open class var godotClassName: StringName { "BoxOccluder3D" } + + /* Properties */ + + /// The box's size in 3D units. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &BoxOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxOccluder3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &BoxOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BoxOccluder3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/BoxShape3D.swift b/Sources/SwiftGodot/Generated/Api/BoxShape3D.swift new file mode 100644 index 000000000..9d91d1aca --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/BoxShape3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D box shape used for physics collision. +/// +/// A 3D box shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. +/// +/// **Performance:** ``BoxShape3D`` is fast to check collisions against. It is faster than ``CapsuleShape3D`` and ``CylinderShape3D``, but slower than ``SphereShape3D``. +/// +open class BoxShape3D: Shape3D { + override open class var godotClassName: StringName { "BoxShape3D" } + + /* Properties */ + + /// The box's width, height and depth. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &BoxShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(BoxShape3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &BoxShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(BoxShape3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Button.swift b/Sources/SwiftGodot/Generated/Api/Button.swift new file mode 100644 index 000000000..0da5d11fb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Button.swift @@ -0,0 +1,715 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A themed button that can contain text and an icon. +/// +/// ``Button`` is the standard themed button. It can contain text and an icon, and it will display them according to the current ``Theme``. +/// +/// **Example of creating a button and assigning an action when pressed by code:** +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +/// > Note: Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use ``TouchScreenButton`` for buttons that trigger gameplay movement or actions. +/// +open class Button: BaseButton { + override open class var godotClassName: StringName { "Button" } + + /* Properties */ + + /// The button's text that will be displayed inside the button's area. + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// Button's icon, if text is present the icon will be placed before the text. + /// + /// To edit margin and spacing of the icon, use [theme_item h_separation] theme property and `content_margin_*` properties of the used ``StyleBox``es. + /// + final public var icon: Texture2D? { + get { + return get_button_icon () + } + + set { + set_button_icon (newValue) + } + + } + + /// Flat buttons don't display decoration. + final public var flat: Bool { + get { + return is_flat () + } + + set { + set_flat (newValue) + } + + } + + /// Text alignment policy for the button's text, use one of the ``HorizontalAlignment`` constants. + final public var alignment: HorizontalAlignment { + get { + return get_text_alignment () + } + + set { + set_text_alignment (newValue) + } + + } + + /// Sets the clipping behavior when the text exceeds the node's bounding rectangle. See ``TextServer.OverrunBehavior`` for a description of all modes. + final public var textOverrunBehavior: TextServer.OverrunBehavior { + get { + return get_text_overrun_behavior () + } + + set { + set_text_overrun_behavior (newValue) + } + + } + + /// If set to something other than ``TextServer/AutowrapMode/off``, the text gets wrapped inside the node's bounding rectangle. + final public var autowrapMode: TextServer.AutowrapMode { + get { + return get_autowrap_mode () + } + + set { + set_autowrap_mode (newValue) + } + + } + + /// When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. + final public var clipText: Bool { + get { + return get_clip_text () + } + + set { + set_clip_text (newValue) + } + + } + + /// Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same ``HorizontalAlignment`` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. + final public var iconAlignment: HorizontalAlignment { + get { + return get_icon_alignment () + } + + set { + set_icon_alignment (newValue) + } + + } + + /// Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same ``VerticalAlignment`` constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. + final public var verticalIconAlignment: VerticalAlignment { + get { + return get_vertical_icon_alignment () + } + + set { + set_vertical_icon_alignment (newValue) + } + + } + + /// When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also [theme_item icon_max_width]. + final public var expandIcon: Bool { + get { + return is_expand_icon () + } + + set { + set_expand_icon (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Button.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_overrun_behavior") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1008890932)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_overrun_behavior(_ overrunBehavior: TextServer.OverrunBehavior) { + withUnsafePointer(to: overrunBehavior.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_overrun_behavior") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3779142101)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_overrun_behavior() -> TextServer.OverrunBehavior { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.OverrunBehavior (rawValue: _result)! + } + + fileprivate static var method_set_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autowrap_mode") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289138044)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autowrap_mode(_ autowrapMode: TextServer.AutowrapMode) { + withUnsafePointer(to: autowrapMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autowrap_mode") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1549071663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autowrap_mode() -> TextServer.AutowrapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.AutowrapMode (rawValue: _result)! + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Button.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_button_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_icon") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_icon(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_button_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_icon") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_icon() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Button.method_get_button_icon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flat") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flat(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_flat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flat") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flat() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Button.method_is_flat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clip_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_text") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clip_text(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_clip_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clip_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_text") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clip_text() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Button.method_get_clip_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_text_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312603777)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_alignment(_ alignment: HorizontalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_text_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 341400642)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_alignment() -> HorizontalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_text_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HorizontalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_icon_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_icon_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312603777)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_icon_alignment(_ iconAlignment: HorizontalAlignment) { + withUnsafePointer(to: iconAlignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_icon_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_icon_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_icon_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 341400642)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_icon_alignment() -> HorizontalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_icon_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HorizontalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_vertical_icon_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertical_icon_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1796458609)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertical_icon_alignment(_ verticalIconAlignment: VerticalAlignment) { + withUnsafePointer(to: verticalIconAlignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_vertical_icon_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertical_icon_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertical_icon_alignment") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3274884059)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertical_icon_alignment() -> VerticalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Button.method_get_vertical_icon_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VerticalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_expand_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_expand_icon") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_expand_icon(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Button.method_set_expand_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_expand_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("is_expand_icon") + return withUnsafePointer(to: &Button.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_expand_icon() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Button.method_is_expand_icon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ButtonGroup.swift b/Sources/SwiftGodot/Generated/Api/ButtonGroup.swift new file mode 100644 index 000000000..36cc9c241 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ButtonGroup.swift @@ -0,0 +1,215 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A group of buttons that doesn't allow more than one button to be pressed at a time. +/// +/// A group of ``BaseButton``-derived buttons. The buttons in a ``ButtonGroup`` are treated like radio buttons: No more than one button can be pressed at a time. Some types of buttons (such as ``CheckBox``) may have a special appearance in this state. +/// +/// Every member of a ``ButtonGroup`` should have ``BaseButton/toggleMode`` set to `true`. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``pressed`` +open class ButtonGroup: Resource { + override open class var godotClassName: StringName { "ButtonGroup" } + + /* Properties */ + + /// If `true`, it is possible to unpress all buttons in this ``ButtonGroup``. + final public var allowUnpress: Bool { + get { + return is_allow_unpress () + } + + set { + set_allow_unpress (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_pressed_button: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pressed_button") + return withUnsafePointer(to: &ButtonGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3886434893)! + } + + } + + }() + + /// Returns the current pressed button. + public final func getPressedButton() -> BaseButton? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ButtonGroup.method_get_pressed_button, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_buttons: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buttons") + return withUnsafePointer(to: &ButtonGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an ``GArray`` of ``Button``s who have this as their ``ButtonGroup`` (see ``BaseButton/buttonGroup``). + public final func getButtons() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(ButtonGroup.method_get_buttons, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_allow_unpress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_unpress") + return withUnsafePointer(to: &ButtonGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_unpress(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ButtonGroup.method_set_allow_unpress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_allow_unpress: GDExtensionMethodBindPtr = { + let methodName = StringName("is_allow_unpress") + return withUnsafePointer(to: &ButtonGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_allow_unpress() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ButtonGroup.method_is_allow_unpress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ button: BaseButton) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? BaseButton ?? BaseButton (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when one of the buttons of the group is pressed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pressed.connect { button in + /// print ("caught signal") + /// } + /// ``` + public var pressed: Signal1 { Signal1 (target: self, signalName: "pressed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CPUParticles2D.swift b/Sources/SwiftGodot/Generated/Api/CPUParticles2D.swift new file mode 100644 index 000000000..cb78f17dd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CPUParticles2D.swift @@ -0,0 +1,2514 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CPU-based 2D particle emitter. +/// +/// CPU-based 2D particle node used to create a variety of particle systems and effects. +/// +/// See also ``GPUParticles2D``, which provides the same functionality with hardware acceleration, but may not run on older devices. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class CPUParticles2D: Node2D { + override open class var godotClassName: StringName { "CPUParticles2D" } + public enum DrawOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particles are drawn in the order emitted. + case index = 0 // DRAW_ORDER_INDEX + /// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. + case lifetime = 1 // DRAW_ORDER_LIFETIME + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .index: return ".index" + case .lifetime: return ".lifetime" + } + + } + + } + + public enum Parameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set initial velocity properties. + case initialLinearVelocity = 0 // PARAM_INITIAL_LINEAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set angular velocity properties. + case angularVelocity = 1 // PARAM_ANGULAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set orbital velocity properties. + case orbitVelocity = 2 // PARAM_ORBIT_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set linear acceleration properties. + case linearAccel = 3 // PARAM_LINEAR_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set radial acceleration properties. + case radialAccel = 4 // PARAM_RADIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set tangential acceleration properties. + case tangentialAccel = 5 // PARAM_TANGENTIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set damping properties. + case damping = 6 // PARAM_DAMPING + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set angle properties. + case angle = 7 // PARAM_ANGLE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set scale properties. + case scale = 8 // PARAM_SCALE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set hue variation properties. + case hueVariation = 9 // PARAM_HUE_VARIATION + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set animation speed properties. + case animSpeed = 10 // PARAM_ANIM_SPEED + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set animation offset properties. + case animOffset = 11 // PARAM_ANIM_OFFSET + /// Represents the size of the ``CPUParticles2D/Parameter`` enum. + case max = 12 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .initialLinearVelocity: return ".initialLinearVelocity" + case .angularVelocity: return ".angularVelocity" + case .orbitVelocity: return ".orbitVelocity" + case .linearAccel: return ".linearAccel" + case .radialAccel: return ".radialAccel" + case .tangentialAccel: return ".tangentialAccel" + case .damping: return ".damping" + case .angle: return ".angle" + case .scale: return ".scale" + case .hueVariation: return ".hueVariation" + case .animSpeed: return ".animSpeed" + case .animOffset: return ".animOffset" + case .max: return ".max" + } + + } + + } + + public enum ParticleFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagAlignY``. + case alignYToVelocity = 0 // PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY + /// Present for consistency with 3D particle nodes, not used in 2D. + case rotateY = 1 // PARTICLE_FLAG_ROTATE_Y + /// Present for consistency with 3D particle nodes, not used in 2D. + case disableZ = 2 // PARTICLE_FLAG_DISABLE_Z + /// Represents the size of the ``CPUParticles2D/ParticleFlags`` enum. + case max = 3 // PARTICLE_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .alignYToVelocity: return ".alignYToVelocity" + case .rotateY: return ".rotateY" + case .disableZ: return ".disableZ" + case .max: return ".max" + } + + } + + } + + public enum EmissionShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// All particles will be emitted from a single point. + case point = 0 // EMISSION_SHAPE_POINT + /// Particles will be emitted in the volume of a sphere flattened to two dimensions. + case sphere = 1 // EMISSION_SHAPE_SPHERE + /// Particles will be emitted on the surface of a sphere flattened to two dimensions. + case sphereSurface = 2 // EMISSION_SHAPE_SPHERE_SURFACE + /// Particles will be emitted in the area of a rectangle. + case rectangle = 3 // EMISSION_SHAPE_RECTANGLE + /// Particles will be emitted at a position chosen randomly among ``emissionPoints``. Particle color will be modulated by ``emissionColors``. + case points = 4 // EMISSION_SHAPE_POINTS + /// Particles will be emitted at a position chosen randomly among ``emissionPoints``. Particle velocity and rotation will be set based on ``emissionNormals``. Particle color will be modulated by ``emissionColors``. + case directedPoints = 5 // EMISSION_SHAPE_DIRECTED_POINTS + /// Represents the size of the ``CPUParticles2D/EmissionShape`` enum. + case max = 6 // EMISSION_SHAPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .point: return ".point" + case .sphere: return ".sphere" + case .sphereSurface: return ".sphereSurface" + case .rectangle: return ".rectangle" + case .points: return ".points" + case .directedPoints: return ".directedPoints" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// If `true`, particles are being emitted. ``emitting`` can be used to start and stop particles from emitting. However, if ``oneShot`` is `true` setting ``emitting`` to `true` will not restart the emission cycle until after all active particles finish processing. You can use the [signal finished] signal to be notified once all active particles finish processing. + final public var emitting: Bool { + get { + return is_emitting () + } + + set { + set_emitting (newValue) + } + + } + + /// Number of particles emitted in one emission cycle. + final public var amount: Int32 { + get { + return get_amount () + } + + set { + set_amount (newValue) + } + + } + + /// Amount of time each particle will exist. + final public var lifetime: Double { + get { + return get_lifetime () + } + + set { + set_lifetime (newValue) + } + + } + + /// If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. + final public var oneShot: Bool { + get { + return get_one_shot () + } + + set { + set_one_shot (newValue) + } + + } + + /// Particle system starts as if it had already run for this many seconds. + final public var preprocess: Double { + get { + return get_pre_process_time () + } + + set { + set_pre_process_time (newValue) + } + + } + + /// Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins. + final public var explosiveness: Double { + get { + return get_explosiveness_ratio () + } + + set { + set_explosiveness_ratio (newValue) + } + + } + + /// Emission lifetime randomness ratio. + final public var randomness: Double { + get { + return get_randomness_ratio () + } + + set { + set_randomness_ratio (newValue) + } + + } + + /// Particle lifetime randomness ratio. + final public var lifetimeRandomness: Double { + get { + return get_lifetime_randomness () + } + + set { + set_lifetime_randomness (newValue) + } + + } + + /// The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. + final public var fixedFps: Int32 { + get { + return get_fixed_fps () + } + + set { + set_fixed_fps (newValue) + } + + } + + /// If `true`, results in fractional delta calculation which has a smoother particles display effect. + final public var fractDelta: Bool { + get { + return get_fractional_delta () + } + + set { + set_fractional_delta (newValue) + } + + } + + /// If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``CPUParticles2D`` node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the ``CPUParticles2D`` node (and its parents) when it is moved or rotated. + final public var localCoords: Bool { + get { + return get_use_local_coordinates () + } + + set { + set_use_local_coordinates (newValue) + } + + } + + /// Particle draw order. Uses ``CPUParticles2D/DrawOrder`` values. + final public var drawOrder: CPUParticles2D.DrawOrder { + get { + return get_draw_order () + } + + set { + set_draw_order (newValue) + } + + } + + /// Particle texture. If `null`, particles will be squares. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// Particles will be emitted inside this region. See ``CPUParticles2D/EmissionShape`` for possible values. + final public var emissionShape: CPUParticles2D.EmissionShape { + get { + return get_emission_shape () + } + + set { + set_emission_shape (newValue) + } + + } + + /// The sphere's radius if ``emissionShape`` is set to ``EmissionShape/sphere``. + final public var emissionSphereRadius: Double { + get { + return get_emission_sphere_radius () + } + + set { + set_emission_sphere_radius (newValue) + } + + } + + /// The rectangle's extents if ``emissionShape`` is set to ``EmissionShape/rectangle``. + final public var emissionRectExtents: Vector2 { + get { + return get_emission_rect_extents () + } + + set { + set_emission_rect_extents (newValue) + } + + } + + /// Sets the initial positions to spawn particles when using ``EmissionShape/points`` or ``EmissionShape/directedPoints``. + final public var emissionPoints: PackedVector2Array { + get { + return get_emission_points () + } + + set { + set_emission_points (newValue) + } + + } + + /// Sets the direction the particles will be emitted in when using ``EmissionShape/directedPoints``. + final public var emissionNormals: PackedVector2Array { + get { + return get_emission_normals () + } + + set { + set_emission_normals (newValue) + } + + } + + /// Sets the ``Color``s to modulate particles by when using ``EmissionShape/points`` or ``EmissionShape/directedPoints``. + final public var emissionColors: PackedColorArray { + get { + return get_emission_colors () + } + + set { + set_emission_colors (newValue) + } + + } + + /// Align Y axis of particle with the direction of its velocity. + final public var particleFlagAlignY: Bool { + get { + return get_particle_flag (CPUParticles2D.ParticleFlags (rawValue: 0)!) + } + + set { + set_particle_flag (CPUParticles2D.ParticleFlags (rawValue: 0)!, newValue) + } + + } + + /// Unit vector specifying the particles' emission direction. + final public var direction: Vector2 { + get { + return get_direction () + } + + set { + set_direction (newValue) + } + + } + + /// Each particle's initial direction range from `+spread` to `-spread` degrees. + final public var spread: Double { + get { + return get_spread () + } + + set { + set_spread (newValue) + } + + } + + /// Gravity applied to every particle. + final public var gravity: Vector2 { + get { + return get_gravity () + } + + set { + set_gravity (newValue) + } + + } + + /// Minimum equivalent of ``initialVelocityMax``. + final public var initialVelocityMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 0)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Maximum initial velocity magnitude for each particle. Direction comes from ``direction`` and ``spread``. + final public var initialVelocityMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 0)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Minimum equivalent of ``angularVelocityMax``. + final public var angularVelocityMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 1)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Maximum initial angular velocity (rotation speed) applied to each particle in _degrees_ per second. + final public var angularVelocityMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 1)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Each particle's angular velocity will vary along this ``Curve``. + final public var angularVelocityCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 1)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Minimum equivalent of ``orbitVelocityMax``. + final public var orbitVelocityMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 2)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + final public var orbitVelocityMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 2)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Each particle's orbital velocity will vary along this ``Curve``. + final public var orbitVelocityCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 2)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Minimum equivalent of ``linearAccelMax``. + final public var linearAccelMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 3)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Maximum linear acceleration applied to each particle in the direction of motion. + final public var linearAccelMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 3)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Each particle's linear acceleration will vary along this ``Curve``. + final public var linearAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 3)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Minimum equivalent of ``radialAccelMax``. + final public var radialAccelMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 4)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. + final public var radialAccelMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 4)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Each particle's radial acceleration will vary along this ``Curve``. + final public var radialAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 4)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Minimum equivalent of ``tangentialAccelMax``. + final public var tangentialAccelMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 5)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. + final public var tangentialAccelMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 5)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Each particle's tangential acceleration will vary along this ``Curve``. + final public var tangentialAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 5)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Minimum equivalent of ``dampingMax``. + final public var dampingMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 6)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// The maximum rate at which particles lose velocity. For example value of `100` means that the particle will go from `100` velocity to `0` in `1` second. + final public var dampingMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 6)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Damping will vary along this ``Curve``. + final public var dampingCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 6)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Minimum equivalent of ``angleMax``. + final public var angleMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 7)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Maximum initial rotation applied to each particle, in degrees. + final public var angleMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 7)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Each particle's rotation will be animated along this ``Curve``. + final public var angleCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 7)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Minimum equivalent of ``scaleAmountMax``. + final public var scaleAmountMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 8)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Maximum initial scale applied to each particle. + final public var scaleAmountMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 8)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Each particle's scale will vary along this ``Curve``. + final public var scaleAmountCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 8)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// If `true`, the scale curve will be split into x and y components. See ``scaleCurveX`` and ``scaleCurveY``. + final public var splitScale: Bool { + get { + return get_split_scale () + } + + set { + set_split_scale (newValue) + } + + } + + /// Each particle's horizontal scale will vary along this ``Curve``. + /// + /// ``splitScale`` must be enabled. + /// + final public var scaleCurveX: Curve? { + get { + return get_scale_curve_x () + } + + set { + set_scale_curve_x (newValue) + } + + } + + /// Each particle's vertical scale will vary along this ``Curve``. + /// + /// ``splitScale`` must be enabled. + /// + final public var scaleCurveY: Curve? { + get { + return get_scale_curve_y () + } + + set { + set_scale_curve_y (newValue) + } + + } + + /// Each particle's initial color. If ``texture`` is defined, it will be multiplied by this color. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// Each particle's color will vary along this ``Gradient`` (multiplied with ``color``). + final public var colorRamp: Gradient? { + get { + return get_color_ramp () + } + + set { + set_color_ramp (newValue) + } + + } + + /// Each particle's initial color will vary along this ``GradientTexture1D`` (multiplied with ``color``). + final public var colorInitialRamp: Gradient? { + get { + return get_color_initial_ramp () + } + + set { + set_color_initial_ramp (newValue) + } + + } + + /// Minimum equivalent of ``hueVariationMax``. + final public var hueVariationMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 9)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Maximum initial hue variation applied to each particle. It will shift the particle color's hue. + final public var hueVariationMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 9)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Each particle's hue will vary along this ``Curve``. + final public var hueVariationCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 9)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Minimum equivalent of ``animSpeedMax``. + final public var animSpeedMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 10)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Maximum particle animation speed. Animation speed of `1` means that the particles will make full `0` to `1` offset cycle during lifetime, `2` means `2` cycles etc. + /// + /// With animation speed greater than `1`, remember to enable ``CanvasItemMaterial/particlesAnimLoop`` property if you want the animation to repeat. + /// + final public var animSpeedMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 10)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Each particle's animation speed will vary along this ``Curve``. + final public var animSpeedCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 10)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Minimum equivalent of ``animOffsetMax``. + final public var animOffsetMin: Double { + get { + return get_param_min (CPUParticles2D.Parameter (rawValue: 11)!) + } + + set { + set_param_min (CPUParticles2D.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Maximum animation offset that corresponds to frame index in the texture. `0` is the first frame, `1` is the last one. See ``CanvasItemMaterial/particlesAnimation``. + final public var animOffsetMax: Double { + get { + return get_param_max (CPUParticles2D.Parameter (rawValue: 11)!) + } + + set { + set_param_max (CPUParticles2D.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Each particle's animation offset will vary along this ``Curve``. + final public var animOffsetCurve: Curve? { + get { + return get_param_curve (CPUParticles2D.Parameter (rawValue: 11)!) + } + + set { + set_param_curve (CPUParticles2D.Parameter (rawValue: 11)!, newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emitting") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emitting(_ emitting: Bool) { + withUnsafePointer(to: emitting) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emitting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_shot") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_shot(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_one_shot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_process_time") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_process_time(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_pre_process_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_explosiveness_ratio") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_explosiveness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_randomness_ratio") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_randomness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime_randomness") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime_randomness(_ random: Double) { + withUnsafePointer(to: random) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_local_coordinates") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_local_coordinates(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_fps") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_fps(_ fps: Int32) { + withUnsafePointer(to: fps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_fixed_fps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractional_delta") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractional_delta(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_fractional_delta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emitting") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_emitting() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles2D.method_is_emitting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_shot") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_shot() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_one_shot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_process_time") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_process_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_pre_process_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_explosiveness_ratio") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_explosiveness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_randomness_ratio") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_randomness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime_randomness") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime_randomness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_local_coordinates") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_local_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_fps") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_fps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_fixed_fps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractional_delta") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractional_delta() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_fractional_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_order") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4183193490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_order(_ order: CPUParticles2D.DrawOrder) { + withUnsafePointer(to: order.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_draw_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_order") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1668655735)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_order() -> CPUParticles2D.DrawOrder { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_draw_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CPUParticles2D.DrawOrder (rawValue: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_restart: GDExtensionMethodBindPtr = { + let methodName = StringName("restart") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Restarts the particle emitter. + public final func restart() { + gi.object_method_bind_ptrcall(CPUParticles2D.method_restart, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_direction") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_direction(_ direction: Vector2) { + withUnsafePointer(to: direction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_direction") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_direction() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spread") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spread(_ spread: Double) { + withUnsafePointer(to: spread) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_spread, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spread") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spread() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_spread, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_min") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3320615296)! + } + + } + + }() + + @inline(__always) + /// Sets the minimum value for the given parameter. + fileprivate final func set_param_min(_ param: CPUParticles2D.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_min") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2038050600)! + } + + } + + }() + + @inline(__always) + /// Returns the minimum value range for the given parameter. + fileprivate final func get_param_min(_ param: CPUParticles2D.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_max") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3320615296)! + } + + } + + }() + + @inline(__always) + /// Sets the maximum value for the given parameter. + fileprivate final func set_param_max(_ param: CPUParticles2D.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_max") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2038050600)! + } + + } + + }() + + @inline(__always) + /// Returns the maximum value range for the given parameter. + fileprivate final func get_param_max(_ param: CPUParticles2D.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_curve") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2959350143)! + } + + } + + }() + + @inline(__always) + /// Sets the ``Curve`` of the parameter specified by ``CPUParticles2D/Parameter``. + fileprivate final func set_param_curve(_ param: CPUParticles2D.Parameter, _ curve: Curve?) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: curve?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_param_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_curve") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2603158474)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Curve`` of the parameter specified by ``CPUParticles2D/Parameter``. + fileprivate final func get_param_curve(_ param: CPUParticles2D.Parameter) -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_param_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_ramp") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_ramp(_ ramp: Gradient?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_color_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_ramp") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_color_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_initial_ramp") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_initial_ramp(_ ramp: Gradient?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_initial_ramp") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_initial_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particle_flag") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4178137949)! + } + + } + + }() + + @inline(__always) + /// Enables or disables the given flag (see ``CPUParticles2D/ParticleFlags`` for options). + fileprivate final func set_particle_flag(_ particleFlag: CPUParticles2D.ParticleFlags, _ enable: Bool) { + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particle_flag") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2829976507)! + } + + } + + }() + + @inline(__always) + /// Returns the enabled state of the given flag (see ``CPUParticles2D/ParticleFlags`` for options). + fileprivate final func get_particle_flag(_ particleFlag: CPUParticles2D.ParticleFlags) -> Bool { + var _result: Bool = false + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_shape") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 393763892)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_shape(_ shape: CPUParticles2D.EmissionShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_shape") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740246024)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_shape() -> CPUParticles2D.EmissionShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CPUParticles2D.EmissionShape (rawValue: _result)! + } + + fileprivate static var method_set_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_sphere_radius") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_sphere_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_sphere_radius") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_sphere_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_rect_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_rect_extents") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_rect_extents(_ extents: Vector2) { + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_rect_extents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_rect_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_rect_extents") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_rect_extents() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_rect_extents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_points") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_points(_ array: PackedVector2Array) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_points") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_points() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_emission_normals: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_normals") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_normals(_ array: PackedVector2Array) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_normals, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_normals: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_normals") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_normals() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_normals, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_emission_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_colors") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3546319833)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_colors(_ array: PackedColorArray) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_emission_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_colors") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_colors() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_emission_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity(_ accelVec: Vector2) { + withUnsafePointer(to: accelVec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_gravity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_split_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_split_scale") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_split_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_split_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_split_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_split_scale") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_split_scale(_ splitScale: Bool) { + withUnsafePointer(to: splitScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_split_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale_curve_x") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale_curve_x() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_scale_curve_x, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_scale_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale_curve_x") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale_curve_x(_ scaleCurve: Curve?) { + withUnsafePointer(to: scaleCurve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_scale_curve_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale_curve_y") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale_curve_y() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles2D.method_get_scale_curve_y, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_scale_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale_curve_y") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale_curve_y(_ scaleCurve: Curve?) { + withUnsafePointer(to: scaleCurve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_set_scale_curve_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_convert_from_particles: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_from_particles") + return withUnsafePointer(to: &CPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets this node's properties to match a given ``GPUParticles2D`` node with an assigned ``ParticleProcessMaterial``. + public final func convertFromParticles(_ particles: Node?) { + withUnsafePointer(to: particles?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles2D.method_convert_from_particles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted when all active particles have finished processing. When ``oneShot`` is disabled, particles will process continuously, so this is never emitted. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CPUParticles3D.swift b/Sources/SwiftGodot/Generated/Api/CPUParticles3D.swift new file mode 100644 index 000000000..693b6c350 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CPUParticles3D.swift @@ -0,0 +1,2942 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CPU-based 3D particle emitter. +/// +/// CPU-based 3D particle node used to create a variety of particle systems and effects. +/// +/// See also ``GPUParticles3D``, which provides the same functionality with hardware acceleration, but may not run on older devices. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class CPUParticles3D: GeometryInstance3D { + override open class var godotClassName: StringName { "CPUParticles3D" } + public enum DrawOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particles are drawn in the order emitted. + case index = 0 // DRAW_ORDER_INDEX + /// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. + case lifetime = 1 // DRAW_ORDER_LIFETIME + /// Particles are drawn in order of depth. + case viewDepth = 2 // DRAW_ORDER_VIEW_DEPTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .index: return ".index" + case .lifetime: return ".lifetime" + case .viewDepth: return ".viewDepth" + } + + } + + } + + public enum Parameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set initial velocity properties. + case initialLinearVelocity = 0 // PARAM_INITIAL_LINEAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set angular velocity properties. + case angularVelocity = 1 // PARAM_ANGULAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set orbital velocity properties. + case orbitVelocity = 2 // PARAM_ORBIT_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set linear acceleration properties. + case linearAccel = 3 // PARAM_LINEAR_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set radial acceleration properties. + case radialAccel = 4 // PARAM_RADIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set tangential acceleration properties. + case tangentialAccel = 5 // PARAM_TANGENTIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set damping properties. + case damping = 6 // PARAM_DAMPING + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set angle properties. + case angle = 7 // PARAM_ANGLE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set scale properties. + case scale = 8 // PARAM_SCALE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set hue variation properties. + case hueVariation = 9 // PARAM_HUE_VARIATION + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set animation speed properties. + case animSpeed = 10 // PARAM_ANIM_SPEED + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamCurve(param:curve:)`` to set animation offset properties. + case animOffset = 11 // PARAM_ANIM_OFFSET + /// Represents the size of the ``CPUParticles3D/Parameter`` enum. + case max = 12 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .initialLinearVelocity: return ".initialLinearVelocity" + case .angularVelocity: return ".angularVelocity" + case .orbitVelocity: return ".orbitVelocity" + case .linearAccel: return ".linearAccel" + case .radialAccel: return ".radialAccel" + case .tangentialAccel: return ".tangentialAccel" + case .damping: return ".damping" + case .angle: return ".angle" + case .scale: return ".scale" + case .hueVariation: return ".hueVariation" + case .animSpeed: return ".animSpeed" + case .animOffset: return ".animOffset" + case .max: return ".max" + } + + } + + } + + public enum ParticleFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagAlignY``. + case alignYToVelocity = 0 // PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagRotateY``. + case rotateY = 1 // PARTICLE_FLAG_ROTATE_Y + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagDisableZ``. + case disableZ = 2 // PARTICLE_FLAG_DISABLE_Z + /// Represents the size of the ``CPUParticles3D/ParticleFlags`` enum. + case max = 3 // PARTICLE_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .alignYToVelocity: return ".alignYToVelocity" + case .rotateY: return ".rotateY" + case .disableZ: return ".disableZ" + case .max: return ".max" + } + + } + + } + + public enum EmissionShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// All particles will be emitted from a single point. + case point = 0 // EMISSION_SHAPE_POINT + /// Particles will be emitted in the volume of a sphere. + case sphere = 1 // EMISSION_SHAPE_SPHERE + /// Particles will be emitted on the surface of a sphere. + case sphereSurface = 2 // EMISSION_SHAPE_SPHERE_SURFACE + /// Particles will be emitted in the volume of a box. + case box = 3 // EMISSION_SHAPE_BOX + /// Particles will be emitted at a position chosen randomly among ``emissionPoints``. Particle color will be modulated by ``emissionColors``. + case points = 4 // EMISSION_SHAPE_POINTS + /// Particles will be emitted at a position chosen randomly among ``emissionPoints``. Particle velocity and rotation will be set based on ``emissionNormals``. Particle color will be modulated by ``emissionColors``. + case directedPoints = 5 // EMISSION_SHAPE_DIRECTED_POINTS + /// Particles will be emitted in a ring or cylinder. + case ring = 6 // EMISSION_SHAPE_RING + /// Represents the size of the ``CPUParticles3D/EmissionShape`` enum. + case max = 7 // EMISSION_SHAPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .point: return ".point" + case .sphere: return ".sphere" + case .sphereSurface: return ".sphereSurface" + case .box: return ".box" + case .points: return ".points" + case .directedPoints: return ".directedPoints" + case .ring: return ".ring" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// If `true`, particles are being emitted. ``emitting`` can be used to start and stop particles from emitting. However, if ``oneShot`` is `true` setting ``emitting`` to `true` will not restart the emission cycle until after all active particles finish processing. You can use the [signal finished] signal to be notified once all active particles finish processing. + final public var emitting: Bool { + get { + return is_emitting () + } + + set { + set_emitting (newValue) + } + + } + + /// Number of particles emitted in one emission cycle. + final public var amount: Int32 { + get { + return get_amount () + } + + set { + set_amount (newValue) + } + + } + + /// Amount of time each particle will exist. + final public var lifetime: Double { + get { + return get_lifetime () + } + + set { + set_lifetime (newValue) + } + + } + + /// If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. + final public var oneShot: Bool { + get { + return get_one_shot () + } + + set { + set_one_shot (newValue) + } + + } + + /// Particle system starts as if it had already run for this many seconds. + final public var preprocess: Double { + get { + return get_pre_process_time () + } + + set { + set_pre_process_time (newValue) + } + + } + + /// Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins. + final public var explosiveness: Double { + get { + return get_explosiveness_ratio () + } + + set { + set_explosiveness_ratio (newValue) + } + + } + + /// Emission lifetime randomness ratio. + final public var randomness: Double { + get { + return get_randomness_ratio () + } + + set { + set_randomness_ratio (newValue) + } + + } + + /// Particle lifetime randomness ratio. + final public var lifetimeRandomness: Double { + get { + return get_lifetime_randomness () + } + + set { + set_lifetime_randomness (newValue) + } + + } + + /// The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. + final public var fixedFps: Int32 { + get { + return get_fixed_fps () + } + + set { + set_fixed_fps (newValue) + } + + } + + /// If `true`, results in fractional delta calculation which has a smoother particles display effect. + final public var fractDelta: Bool { + get { + return get_fractional_delta () + } + + set { + set_fractional_delta (newValue) + } + + } + + /// The ``AABB`` that determines the node's region which needs to be visible on screen for the particle system to be active. + /// + /// Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The ``AABB`` can be grown via code or with the **Particles → Generate AABB** editor tool. + /// + final public var visibilityAabb: AABB { + get { + return get_visibility_aabb () + } + + set { + set_visibility_aabb (newValue) + } + + } + + /// If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``CPUParticles3D`` node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the ``CPUParticles3D`` node (and its parents) when it is moved or rotated. + final public var localCoords: Bool { + get { + return get_use_local_coordinates () + } + + set { + set_use_local_coordinates (newValue) + } + + } + + /// Particle draw order. Uses ``CPUParticles3D/DrawOrder`` values. + final public var drawOrder: CPUParticles3D.DrawOrder { + get { + return get_draw_order () + } + + set { + set_draw_order (newValue) + } + + } + + /// The ``Mesh`` used for each particle. If `null`, particles will be spheres. + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// Particles will be emitted inside this region. See ``CPUParticles3D/EmissionShape`` for possible values. + final public var emissionShape: CPUParticles3D.EmissionShape { + get { + return get_emission_shape () + } + + set { + set_emission_shape (newValue) + } + + } + + /// The sphere's radius if ``CPUParticles3D/EmissionShape`` is set to ``EmissionShape/sphere``. + final public var emissionSphereRadius: Double { + get { + return get_emission_sphere_radius () + } + + set { + set_emission_sphere_radius (newValue) + } + + } + + /// The rectangle's extents if ``emissionShape`` is set to ``EmissionShape/box``. + final public var emissionBoxExtents: Vector3 { + get { + return get_emission_box_extents () + } + + set { + set_emission_box_extents (newValue) + } + + } + + /// Sets the initial positions to spawn particles when using ``EmissionShape/points`` or ``EmissionShape/directedPoints``. + final public var emissionPoints: PackedVector3Array { + get { + return get_emission_points () + } + + set { + set_emission_points (newValue) + } + + } + + /// Sets the direction the particles will be emitted in when using ``EmissionShape/directedPoints``. + final public var emissionNormals: PackedVector3Array { + get { + return get_emission_normals () + } + + set { + set_emission_normals (newValue) + } + + } + + /// Sets the ``Color``s to modulate particles by when using ``EmissionShape/points`` or ``EmissionShape/directedPoints``. + /// + /// > Note: ``emissionColors`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``emissionColors`` will have no visible effect. + /// + final public var emissionColors: PackedColorArray { + get { + return get_emission_colors () + } + + set { + set_emission_colors (newValue) + } + + } + + /// The axis of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingAxis: Vector3 { + get { + return get_emission_ring_axis () + } + + set { + set_emission_ring_axis (newValue) + } + + } + + /// The height of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingHeight: Double { + get { + return get_emission_ring_height () + } + + set { + set_emission_ring_height (newValue) + } + + } + + /// The radius of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingRadius: Double { + get { + return get_emission_ring_radius () + } + + set { + set_emission_ring_radius (newValue) + } + + } + + /// The inner radius of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingInnerRadius: Double { + get { + return get_emission_ring_inner_radius () + } + + set { + set_emission_ring_inner_radius (newValue) + } + + } + + /// Align Y axis of particle with the direction of its velocity. + final public var particleFlagAlignY: Bool { + get { + return get_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 0)!) + } + + set { + set_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 0)!, newValue) + } + + } + + /// If `true`, particles rotate around Y axis by ``angleMin``. + final public var particleFlagRotateY: Bool { + get { + return get_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 1)!) + } + + set { + set_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 1)!, newValue) + } + + } + + /// If `true`, particles will not move on the Z axis. + final public var particleFlagDisableZ: Bool { + get { + return get_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 2)!) + } + + set { + set_particle_flag (CPUParticles3D.ParticleFlags (rawValue: 2)!, newValue) + } + + } + + /// Unit vector specifying the particles' emission direction. + final public var direction: Vector3 { + get { + return get_direction () + } + + set { + set_direction (newValue) + } + + } + + /// Each particle's initial direction range from `+spread` to `-spread` degrees. Applied to X/Z plane and Y/Z planes. + final public var spread: Double { + get { + return get_spread () + } + + set { + set_spread (newValue) + } + + } + + /// Amount of ``spread`` in Y/Z plane. A value of `1` restricts particles to X/Z plane. + final public var flatness: Double { + get { + return get_flatness () + } + + set { + set_flatness (newValue) + } + + } + + /// Gravity applied to every particle. + final public var gravity: Vector3 { + get { + return get_gravity () + } + + set { + set_gravity (newValue) + } + + } + + /// Minimum value of the initial velocity. + final public var initialVelocityMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 0)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Maximum value of the initial velocity. + final public var initialVelocityMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 0)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Minimum initial angular velocity (rotation speed) applied to each particle in _degrees_ per second. + final public var angularVelocityMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 1)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Maximum initial angular velocity (rotation speed) applied to each particle in _degrees_ per second. + final public var angularVelocityMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 1)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Each particle's angular velocity (rotation speed) will vary along this ``Curve`` over its lifetime. + final public var angularVelocityCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 1)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Minimum orbit velocity. + final public var orbitVelocityMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 2)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Maximum orbit velocity. + final public var orbitVelocityMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 2)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Each particle's orbital velocity will vary along this ``Curve``. + final public var orbitVelocityCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 2)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Minimum linear acceleration. + final public var linearAccelMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 3)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Maximum linear acceleration. + final public var linearAccelMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 3)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Each particle's linear acceleration will vary along this ``Curve``. + final public var linearAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 3)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Minimum radial acceleration. + final public var radialAccelMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 4)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Maximum radial acceleration. + final public var radialAccelMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 4)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Each particle's radial acceleration will vary along this ``Curve``. + final public var radialAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 4)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Minimum tangent acceleration. + final public var tangentialAccelMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 5)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Maximum tangent acceleration. + final public var tangentialAccelMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 5)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Each particle's tangential acceleration will vary along this ``Curve``. + final public var tangentialAccelCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 5)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Minimum damping. + final public var dampingMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 6)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Maximum damping. + final public var dampingMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 6)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Damping will vary along this ``Curve``. + final public var dampingCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 6)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Minimum angle. + final public var angleMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 7)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Maximum angle. + final public var angleMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 7)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Each particle's rotation will be animated along this ``Curve``. + final public var angleCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 7)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Minimum scale. + final public var scaleAmountMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 8)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Maximum scale. + final public var scaleAmountMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 8)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Each particle's scale will vary along this ``Curve``. + final public var scaleAmountCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 8)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 8)!, newValue) + } + + } + + /// If set to `true`, three different scale curves can be specified, one per scale axis. + final public var splitScale: Bool { + get { + return get_split_scale () + } + + set { + set_split_scale (newValue) + } + + } + + /// Curve for the scale over life, along the x axis. + final public var scaleCurveX: Curve? { + get { + return get_scale_curve_x () + } + + set { + set_scale_curve_x (newValue) + } + + } + + /// Curve for the scale over life, along the y axis. + final public var scaleCurveY: Curve? { + get { + return get_scale_curve_y () + } + + set { + set_scale_curve_y (newValue) + } + + } + + /// Curve for the scale over life, along the z axis. + final public var scaleCurveZ: Curve? { + get { + return get_scale_curve_z () + } + + set { + set_scale_curve_z (newValue) + } + + } + + /// Each particle's initial color. + /// + /// > Note: ``color`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``color`` will have no visible effect. + /// + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// Each particle's color will vary along this ``GradientTexture1D`` over its lifetime (multiplied with ``color``). + /// + /// > Note: ``colorRamp`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``colorRamp`` will have no visible effect. + /// + final public var colorRamp: Gradient? { + get { + return get_color_ramp () + } + + set { + set_color_ramp (newValue) + } + + } + + /// Each particle's initial color will vary along this ``GradientTexture1D`` (multiplied with ``color``). + /// + /// > Note: ``colorInitialRamp`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``colorInitialRamp`` will have no visible effect. + /// + final public var colorInitialRamp: Gradient? { + get { + return get_color_initial_ramp () + } + + set { + set_color_initial_ramp (newValue) + } + + } + + /// Minimum hue variation. + final public var hueVariationMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 9)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Maximum hue variation. + final public var hueVariationMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 9)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Each particle's hue will vary along this ``Curve``. + final public var hueVariationCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 9)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Minimum particle animation speed. + final public var animSpeedMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 10)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Maximum particle animation speed. + final public var animSpeedMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 10)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Each particle's animation speed will vary along this ``Curve``. + final public var animSpeedCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 10)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Minimum animation offset. + final public var animOffsetMin: Double { + get { + return get_param_min (CPUParticles3D.Parameter (rawValue: 11)!) + } + + set { + set_param_min (CPUParticles3D.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Maximum animation offset. + final public var animOffsetMax: Double { + get { + return get_param_max (CPUParticles3D.Parameter (rawValue: 11)!) + } + + set { + set_param_max (CPUParticles3D.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Each particle's animation offset will vary along this ``Curve``. + final public var animOffsetCurve: Curve? { + get { + return get_param_curve (CPUParticles3D.Parameter (rawValue: 11)!) + } + + set { + set_param_curve (CPUParticles3D.Parameter (rawValue: 11)!, newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emitting") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emitting(_ emitting: Bool) { + withUnsafePointer(to: emitting) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emitting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_shot") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_shot(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_one_shot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_process_time") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_process_time(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_pre_process_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_explosiveness_ratio") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_explosiveness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_randomness_ratio") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_randomness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visibility_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_aabb") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_visibility_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime_randomness") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime_randomness(_ random: Double) { + withUnsafePointer(to: random) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_local_coordinates") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_local_coordinates(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_fps") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_fps(_ fps: Int32) { + withUnsafePointer(to: fps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_fixed_fps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractional_delta") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractional_delta(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_fractional_delta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emitting") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_emitting() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles3D.method_is_emitting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_shot") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_shot() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_one_shot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_process_time") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_process_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_pre_process_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_explosiveness_ratio") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_explosiveness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_randomness_ratio") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_randomness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visibility_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_aabb") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_visibility_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime_randomness") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime_randomness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_local_coordinates") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_local_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_fps") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_fps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_fixed_fps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractional_delta") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractional_delta() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_fractional_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_order") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1427401774)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_order(_ order: CPUParticles3D.DrawOrder) { + withUnsafePointer(to: order.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_draw_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_order") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321900776)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_order() -> CPUParticles3D.DrawOrder { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_draw_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CPUParticles3D.DrawOrder (rawValue: _result)! + } + + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808005922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_restart: GDExtensionMethodBindPtr = { + let methodName = StringName("restart") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Restarts the particle emitter. + public final func restart() { + gi.object_method_bind_ptrcall(CPUParticles3D.method_restart, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_direction") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_direction(_ direction: Vector3) { + withUnsafePointer(to: direction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_direction") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_direction() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spread") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spread(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_spread, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spread") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spread() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_spread, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flatness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flatness") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flatness(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_flatness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_flatness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flatness") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_flatness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_flatness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_min") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 557936109)! + } + + } + + }() + + @inline(__always) + /// Sets the minimum value for the given parameter. + fileprivate final func set_param_min(_ param: CPUParticles3D.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_min") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 597646162)! + } + + } + + }() + + @inline(__always) + /// Returns the minimum value range for the given parameter. + fileprivate final func get_param_min(_ param: CPUParticles3D.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_max") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 557936109)! + } + + } + + }() + + @inline(__always) + /// Sets the maximum value for the given parameter. + fileprivate final func set_param_max(_ param: CPUParticles3D.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_max") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 597646162)! + } + + } + + }() + + @inline(__always) + /// Returns the maximum value range for the given parameter. + fileprivate final func get_param_max(_ param: CPUParticles3D.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_curve") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4044142537)! + } + + } + + }() + + @inline(__always) + /// Sets the ``Curve`` of the parameter specified by ``CPUParticles3D/Parameter``. + fileprivate final func set_param_curve(_ param: CPUParticles3D.Parameter, _ curve: Curve?) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: curve?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_param_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_curve") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4132790277)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Curve`` of the parameter specified by ``CPUParticles3D/Parameter``. + fileprivate final func get_param_curve(_ param: CPUParticles3D.Parameter) -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_param_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_ramp") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_ramp(_ ramp: Gradient?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_color_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_ramp") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_color_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_initial_ramp") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_initial_ramp(_ ramp: Gradient?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_initial_ramp") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_initial_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particle_flag") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3515406498)! + } + + } + + }() + + @inline(__always) + /// Enables or disables the given particle flag (see ``CPUParticles3D/ParticleFlags`` for options). + fileprivate final func set_particle_flag(_ particleFlag: CPUParticles3D.ParticleFlags, _ enable: Bool) { + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particle_flag") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2845201987)! + } + + } + + }() + + @inline(__always) + /// Returns the enabled state of the given particle flag (see ``CPUParticles3D/ParticleFlags`` for options). + fileprivate final func get_particle_flag(_ particleFlag: CPUParticles3D.ParticleFlags) -> Bool { + var _result: Bool = false + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_shape") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 491823814)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_shape(_ shape: CPUParticles3D.EmissionShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_shape") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961454842)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_shape() -> CPUParticles3D.EmissionShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CPUParticles3D.EmissionShape (rawValue: _result)! + } + + fileprivate static var method_set_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_sphere_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_sphere_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_sphere_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_sphere_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_box_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_box_extents") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_box_extents(_ extents: Vector3) { + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_box_extents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_box_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_box_extents") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_box_extents() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_box_extents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_points") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_points(_ array: PackedVector3Array) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_points") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_points() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_emission_normals: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_normals") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_normals(_ array: PackedVector3Array) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_normals, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_normals: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_normals") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_normals() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_normals, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_emission_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_colors") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3546319833)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_colors(_ array: PackedColorArray) { + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_colors") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_colors() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_emission_ring_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_axis") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_axis(_ axis: Vector3) { + withUnsafePointer(to: axis) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_ring_axis, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_axis") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_axis() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_ring_axis, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_height") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_ring_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_height") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_ring_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_ring_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_ring_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_inner_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_inner_radius(_ innerRadius: Double) { + withUnsafePointer(to: innerRadius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_emission_ring_inner_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_inner_radius") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_inner_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_emission_ring_inner_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity(_ accelVec: Vector3) { + withUnsafePointer(to: accelVec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_gravity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_split_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_split_scale") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_split_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_split_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_split_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_split_scale") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_split_scale(_ splitScale: Bool) { + withUnsafePointer(to: splitScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_split_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale_curve_x") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale_curve_x() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_scale_curve_x, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_scale_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale_curve_x") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale_curve_x(_ scaleCurve: Curve?) { + withUnsafePointer(to: scaleCurve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_scale_curve_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale_curve_y") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale_curve_y() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_scale_curve_y, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_scale_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale_curve_y") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale_curve_y(_ scaleCurve: Curve?) { + withUnsafePointer(to: scaleCurve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_scale_curve_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale_curve_z: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale_curve_z") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale_curve_z() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CPUParticles3D.method_get_scale_curve_z, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_scale_curve_z: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale_curve_z") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale_curve_z(_ scaleCurve: Curve?) { + withUnsafePointer(to: scaleCurve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_set_scale_curve_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_convert_from_particles: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_from_particles") + return withUnsafePointer(to: &CPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets this node's properties to match a given ``GPUParticles3D`` node with an assigned ``ParticleProcessMaterial``. + public final func convertFromParticles(_ particles: Node?) { + withUnsafePointer(to: particles?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CPUParticles3D.method_convert_from_particles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted when all active particles have finished processing. When ``oneShot`` is disabled, particles will process continuously, so this is never emitted. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGBox3D.swift b/Sources/SwiftGodot/Generated/Api/CSGBox3D.swift new file mode 100644 index 000000000..e6d0beea9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGBox3D.swift @@ -0,0 +1,146 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG Box shape. +/// +/// This node allows you to create a box for use with the CSG system. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGBox3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGBox3D" } + + /* Properties */ + + /// The box's width, height and depth. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The material used to render the box. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &CSGBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGBox3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &CSGBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CSGBox3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGBox3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGBox3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGCombiner3D.swift b/Sources/SwiftGodot/Generated/Api/CSGCombiner3D.swift new file mode 100644 index 000000000..ca58bc801 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGCombiner3D.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG node that allows you to combine other CSG modifiers. +/// +/// For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner3D node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner3D node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner3D node, and then do an operation that takes the two end results as its input to create the final shape. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGCombiner3D: CSGShape3D { + override open class var godotClassName: StringName { "CSGCombiner3D" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGCylinder3D.swift b/Sources/SwiftGodot/Generated/Api/CSGCylinder3D.swift new file mode 100644 index 000000000..9e6ee3b3a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGCylinder3D.swift @@ -0,0 +1,370 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG Cylinder shape. +/// +/// This node allows you to create a cylinder (or cone) for use with the CSG system. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGCylinder3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGCylinder3D" } + + /* Properties */ + + /// The radius of the cylinder. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The height of the cylinder. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. + final public var sides: Int32 { + get { + return get_sides () + } + + set { + set_sides (newValue) + } + + } + + /// If `true` a cone is created, the ``radius`` will only apply to one side. + final public var cone: Bool { + get { + return is_cone () + } + + set { + set_cone (newValue) + } + + } + + /// If `true` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If `false` the cylinder will have a flat shaded look. + final public var smoothFaces: Bool { + get { + return get_smooth_faces () + } + + set { + set_smooth_faces (newValue) + } + + } + + /// The material used to render the cylinder. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGCylinder3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGCylinder3D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sides") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sides(_ sides: Int32) { + withUnsafePointer(to: sides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_sides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sides") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGCylinder3D.method_get_sides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cone: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cone") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cone(_ cone: Bool) { + withUnsafePointer(to: cone) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_cone, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_cone: GDExtensionMethodBindPtr = { + let methodName = StringName("is_cone") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_cone() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGCylinder3D.method_is_cone, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGCylinder3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_smooth_faces") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_smooth_faces(_ smoothFaces: Bool) { + withUnsafePointer(to: smoothFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGCylinder3D.method_set_smooth_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_smooth_faces") + return withUnsafePointer(to: &CSGCylinder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_smooth_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGCylinder3D.method_get_smooth_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGMesh3D.swift b/Sources/SwiftGodot/Generated/Api/CSGMesh3D.swift new file mode 100644 index 000000000..856d4495a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGMesh3D.swift @@ -0,0 +1,151 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG Mesh shape that uses a mesh resource. +/// +/// This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also ``CSGPolygon3D`` for drawing 2D extruded polygons to be used as CSG nodes. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGMesh3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGMesh3D" } + + /* Properties */ + + /// The ``Mesh`` resource to use as a CSG shape. + /// + /// > Note: When using an ``ArrayMesh``, all vertex attributes except ``Mesh/ArrayType/vertex``, ``Mesh/ArrayType/normal`` and ``Mesh/ArrayType/texUv`` are left unused. Only ``Mesh/ArrayType/vertex`` and ``Mesh/ArrayType/texUv`` will be passed to the GPU. + /// + /// ``Mesh/ArrayType/normal`` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. + /// + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// The ``Material`` used in drawing the CSG shape. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &CSGMesh3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGMesh3D.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &CSGMesh3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4081188045)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGMesh3D.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGMesh3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGMesh3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGMesh3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGMesh3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGPolygon3D.swift b/Sources/SwiftGodot/Generated/Api/CSGPolygon3D.swift new file mode 100644 index 000000000..6ae74d9a4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGPolygon3D.swift @@ -0,0 +1,993 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Extrudes a 2D polygon shape to create a 3D mesh. +/// +/// An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also ``CSGMesh3D`` for using 3D meshes as CSG nodes. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGPolygon3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGPolygon3D" } + public enum Mode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``polygon`` shape is extruded along the negative Z axis. + case depth = 0 // MODE_DEPTH + /// The ``polygon`` shape is extruded by rotating it around the Y axis. + case spin = 1 // MODE_SPIN + /// The ``polygon`` shape is extruded along the ``Path3D`` specified in ``pathNode``. + case path = 2 // MODE_PATH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .depth: return ".depth" + case .spin: return ".spin" + case .path: return ".path" + } + + } + + } + + public enum PathRotation: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``polygon`` shape is not rotated. + /// + /// > Note: Requires the path Z coordinates to continually decrease to ensure viable shapes. + /// + case polygon = 0 // PATH_ROTATION_POLYGON + /// The ``polygon`` shape is rotated along the path, but it is not rotated around the path axis. + /// + /// > Note: Requires the path Z coordinates to continually decrease to ensure viable shapes. + /// + case path = 1 // PATH_ROTATION_PATH + /// The ``polygon`` shape follows the path and its rotations around the path axis. + case pathFollow = 2 // PATH_ROTATION_PATH_FOLLOW + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .polygon: return ".polygon" + case .path: return ".path" + case .pathFollow: return ".pathFollow" + } + + } + + } + + public enum PathIntervalType: Int64, CaseIterable, CustomDebugStringConvertible { + /// When ``mode`` is set to ``Mode/path``, ``pathInterval`` will determine the distance, in meters, each interval of the path will extrude. + case distance = 0 // PATH_INTERVAL_DISTANCE + /// When ``mode`` is set to ``Mode/path``, ``pathInterval`` will subdivide the polygons along the path. + case subdivide = 1 // PATH_INTERVAL_SUBDIVIDE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .distance: return ".distance" + case .subdivide: return ".subdivide" + } + + } + + } + + + /* Properties */ + + /// The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must _not_ have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated. + /// + /// > Note: If only 1 or 2 points are defined in ``polygon``, no mesh will be generated. + /// + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /// The ``mode`` used to extrude the ``polygon``. + final public var mode: CSGPolygon3D.Mode { + get { + return get_mode () + } + + set { + set_mode (newValue) + } + + } + + /// When ``mode`` is ``Mode/depth``, the depth of the extrusion. + final public var depth: Double { + get { + return get_depth () + } + + set { + set_depth (newValue) + } + + } + + /// When ``mode`` is ``Mode/spin``, the total number of degrees the ``polygon`` is rotated when extruding. + final public var spinDegrees: Double { + get { + return get_spin_degrees () + } + + set { + set_spin_degrees (newValue) + } + + } + + /// When ``mode`` is ``Mode/spin``, the number of extrusions made. + final public var spinSides: Int32 { + get { + return get_spin_sides () + } + + set { + set_spin_sides (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, the location of the ``Path3D`` object used to extrude the ``polygon``. + final public var pathNode: NodePath { + get { + return get_path_node () + } + + set { + set_path_node (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, this will determine if the interval should be by distance (``PathIntervalType/distance``) or subdivision fractions (``PathIntervalType/subdivide``). + final public var pathIntervalType: CSGPolygon3D.PathIntervalType { + get { + return get_path_interval_type () + } + + set { + set_path_interval_type (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, the path interval or ratio of path points to extrusions. + final public var pathInterval: Double { + get { + return get_path_interval () + } + + set { + set_path_interval (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, extrusions that are less than this angle, will be merged together to reduce polygon count. + final public var pathSimplifyAngle: Double { + get { + return get_path_simplify_angle () + } + + set { + set_path_simplify_angle (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, the path rotation method used to rotate the ``polygon`` as it is extruded. + final public var pathRotation: CSGPolygon3D.PathRotation { + get { + return get_path_rotation () + } + + set { + set_path_rotation (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, if `true` the ``Transform3D`` of the ``CSGPolygon3D`` is used as the starting point for the extrusions, not the ``Transform3D`` of the ``pathNode``. + final public var pathLocal: Bool { + get { + return is_path_local () + } + + set { + set_path_local (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, by default, the top half of the ``material`` is stretched along the entire length of the extruded shape. If `false` the top half of the material is repeated every step of the extrusion. + final public var pathContinuousU: Bool { + get { + return is_path_continuous_u () + } + + set { + set_path_continuous_u (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling. + final public var pathUDistance: Double { + get { + return get_path_u_distance () + } + + set { + set_path_u_distance (newValue) + } + + } + + /// When ``mode`` is ``Mode/path``, if `true` the ends of the path are joined, by adding an extrusion between the last and first points of the path. + final public var pathJoined: Bool { + get { + return is_path_joined () + } + + set { + set_path_joined (newValue) + } + + } + + /// If `true`, applies smooth shading to the extrusions. + final public var smoothFaces: Bool { + get { + return get_smooth_faces () + } + + set { + set_smooth_faces (newValue) + } + + } + + /// Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the length of the extrusions and V around the outline of the ``polygon``), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mode") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3158377035)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mode(_ mode: CSGPolygon3D.Mode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mode") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1201612222)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mode() -> CSGPolygon3D.Mode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CSGPolygon3D.Mode (rawValue: _result)! + } + + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth(_ depth: Double) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spin_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spin_degrees") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spin_degrees(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_spin_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spin_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spin_degrees") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spin_degrees() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_spin_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spin_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spin_sides") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spin_sides(_ spinSides: Int32) { + withUnsafePointer(to: spinSides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_spin_sides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spin_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spin_sides") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spin_sides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_spin_sides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_node") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_node(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_node") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_node() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_path_interval_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_interval_type") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744240707)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_interval_type(_ intervalType: CSGPolygon3D.PathIntervalType) { + withUnsafePointer(to: intervalType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_interval_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_interval_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_interval_type") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3434618397)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_interval_type() -> CSGPolygon3D.PathIntervalType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_interval_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CSGPolygon3D.PathIntervalType (rawValue: _result)! + } + + fileprivate static var method_set_path_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_interval") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_interval(_ interval: Double) { + withUnsafePointer(to: interval) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_interval") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_simplify_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_simplify_angle") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_simplify_angle(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_simplify_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_simplify_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_simplify_angle") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_simplify_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_simplify_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_rotation") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1412947288)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_rotation(_ pathRotation: CSGPolygon3D.PathRotation) { + withUnsafePointer(to: pathRotation.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_rotation") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 647219346)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_rotation() -> CSGPolygon3D.PathRotation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CSGPolygon3D.PathRotation (rawValue: _result)! + } + + fileprivate static var method_set_path_local: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_local") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_local(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_local, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_path_local: GDExtensionMethodBindPtr = { + let methodName = StringName("is_path_local") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_path_local() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGPolygon3D.method_is_path_local, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_continuous_u: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_continuous_u") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_continuous_u(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_continuous_u, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_path_continuous_u: GDExtensionMethodBindPtr = { + let methodName = StringName("is_path_continuous_u") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_path_continuous_u() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGPolygon3D.method_is_path_continuous_u, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_u_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_u_distance") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_u_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_u_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_u_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_u_distance") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_u_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_path_u_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_joined: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_joined") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_joined(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_path_joined, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_path_joined: GDExtensionMethodBindPtr = { + let methodName = StringName("is_path_joined") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_path_joined() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGPolygon3D.method_is_path_joined, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_smooth_faces") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_smooth_faces(_ smoothFaces: Bool) { + withUnsafePointer(to: smoothFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPolygon3D.method_set_smooth_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_smooth_faces") + return withUnsafePointer(to: &CSGPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_smooth_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGPolygon3D.method_get_smooth_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGPrimitive3D.swift b/Sources/SwiftGodot/Generated/Api/CSGPrimitive3D.swift new file mode 100644 index 000000000..421106839 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGPrimitive3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for CSG primitives. +/// +/// Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGPrimitive3D: CSGShape3D { + override open class var godotClassName: StringName { "CSGPrimitive3D" } + + /* Properties */ + + /// If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + final public var flipFaces: Bool { + get { + return get_flip_faces () + } + + set { + set_flip_faces (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_flip_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flip_faces") + return withUnsafePointer(to: &CSGPrimitive3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flip_faces(_ flipFaces: Bool) { + withUnsafePointer(to: flipFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGPrimitive3D.method_set_flip_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_flip_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flip_faces") + return withUnsafePointer(to: &CSGPrimitive3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_flip_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGPrimitive3D.method_get_flip_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGShape3D.swift b/Sources/SwiftGodot/Generated/Api/CSGShape3D.swift new file mode 100644 index 000000000..e2eff776e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGShape3D.swift @@ -0,0 +1,598 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// The CSG base class. +/// +/// This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGShape3D: GeometryInstance3D { + override open class var godotClassName: StringName { "CSGShape3D" } + public enum Operation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Geometry of both primitives is merged, intersecting geometry is removed. + case union = 0 // OPERATION_UNION + /// Only intersecting geometry remains, the rest is removed. + case intersection = 1 // OPERATION_INTERSECTION + /// The second shape is subtracted from the first, leaving a dent with its shape. + case subtraction = 2 // OPERATION_SUBTRACTION + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .union: return ".union" + case .intersection: return ".intersection" + case .subtraction: return ".subtraction" + } + + } + + } + + + /* Properties */ + + /// The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. + final public var operation: CSGShape3D.Operation { + get { + return get_operation () + } + + set { + set_operation (newValue) + } + + } + + /// Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. The top-level CSG shape's snap value is used for the entire CSG tree. + final public var snap: Double { + get { + return get_snap () + } + + set { + set_snap (newValue) + } + + } + + /// Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. + final public var calculateTangents: Bool { + get { + return is_calculating_tangents () + } + + set { + set_calculate_tangents (newValue) + } + + } + + /// Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also ``collisionMask`` and ``collisionPriority``. + final public var useCollision: Bool { + get { + return is_using_collision () + } + + set { + set_use_collision (newValue) + } + + } + + /// The physics layers this area is in. + /// + /// Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. + /// + /// A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See Collision layers and masks in the documentation for more information. + /// + final public var collisionLayer: UInt32 { + get { + return get_collision_layer () + } + + set { + set_collision_layer (newValue) + } + + } + + /// The physics layers this CSG shape scans for collisions. Only effective if ``useCollision`` is `true`. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The priority used to solve colliding when occurring penetration. Only effective if ``useCollision`` is `true`. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + final public var collisionPriority: Double { + get { + return get_collision_priority () + } + + set { + set_collision_priority (newValue) + } + + } + + /* Methods */ + fileprivate static var method_is_root_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("is_root_shape") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this is a root shape and is thus the object that is rendered. + public final func isRootShape() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGShape3D.method_is_root_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_operation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_operation") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 811425055)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_operation(_ operation: CSGShape3D.Operation) { + withUnsafePointer(to: operation.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_operation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_operation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_operation") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2662425879)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_operation() -> CSGShape3D.Operation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CSGShape3D.method_get_operation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CSGShape3D.Operation (rawValue: _result)! + } + + fileprivate static var method_set_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_snap") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_snap(_ snap: Double) { + withUnsafePointer(to: snap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_snap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("get_snap") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_snap() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGShape3D.method_get_snap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_collision") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_collision(_ operation: Bool) { + withUnsafePointer(to: operation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_use_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_collision") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_collision() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGShape3D.method_is_using_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_layer(_ layer: UInt32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_collision_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_layer() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CSGShape3D.method_get_collision_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CSGShape3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer_value") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionLayer``, given a `layerNumber` between 1 and 32. + public final func setCollisionLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer_value") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionLayer`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_get_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_priority") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_collision_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_priority") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGShape3D.method_get_collision_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_calculate_tangents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_calculate_tangents") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_calculate_tangents(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGShape3D.method_set_calculate_tangents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_calculating_tangents: GDExtensionMethodBindPtr = { + let methodName = StringName("is_calculating_tangents") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_calculating_tangents() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGShape3D.method_is_calculating_tangents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_meshes") + return withUnsafePointer(to: &CSGShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` with two elements, the first is the ``Transform3D`` of this node and the second is the root ``Mesh`` of this node. Only works when this node is the root shape. + public final func getMeshes() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(CSGShape3D.method_get_meshes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGSphere3D.swift b/Sources/SwiftGodot/Generated/Api/CSGSphere3D.swift new file mode 100644 index 000000000..14fb271ae --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGSphere3D.swift @@ -0,0 +1,314 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG Sphere shape. +/// +/// This node allows you to create a sphere for use with the CSG system. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGSphere3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGSphere3D" } + + /* Properties */ + + /// Radius of the sphere. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// Number of vertical slices for the sphere. + final public var radialSegments: Int32 { + get { + return get_radial_segments () + } + + set { + set_radial_segments (newValue) + } + + } + + /// Number of horizontal slices for the sphere. + final public var rings: Int32 { + get { + return get_rings () + } + + set { + set_rings (newValue) + } + + } + + /// If `true` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If `false` the sphere will have a flat shaded look. + final public var smoothFaces: Bool { + get { + return get_smooth_faces () + } + + set { + set_smooth_faces (newValue) + } + + } + + /// The material used to render the sphere. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGSphere3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGSphere3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radial_segments") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radial_segments(_ radialSegments: Int32) { + withUnsafePointer(to: radialSegments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGSphere3D.method_set_radial_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radial_segments") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radial_segments() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGSphere3D.method_get_radial_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rings") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rings(_ rings: Int32) { + withUnsafePointer(to: rings) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGSphere3D.method_set_rings, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rings") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rings() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGSphere3D.method_get_rings, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_smooth_faces") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_smooth_faces(_ smoothFaces: Bool) { + withUnsafePointer(to: smoothFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGSphere3D.method_set_smooth_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_smooth_faces") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_smooth_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGSphere3D.method_get_smooth_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGSphere3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGSphere3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CSGTorus3D.swift b/Sources/SwiftGodot/Generated/Api/CSGTorus3D.swift new file mode 100644 index 000000000..c46a73b8c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CSGTorus3D.swift @@ -0,0 +1,370 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A CSG Torus shape. +/// +/// This node allows you to create a torus for use with the CSG system. +/// +/// > Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a ``MeshInstance3D`` with a ``PrimitiveMesh``. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay. +/// +open class CSGTorus3D: CSGPrimitive3D { + override open class var godotClassName: StringName { "CSGTorus3D" } + + /* Properties */ + + /// The inner radius of the torus. + final public var innerRadius: Double { + get { + return get_inner_radius () + } + + set { + set_inner_radius (newValue) + } + + } + + /// The outer radius of the torus. + final public var outerRadius: Double { + get { + return get_outer_radius () + } + + set { + set_outer_radius (newValue) + } + + } + + /// The number of slices the torus is constructed of. + final public var sides: Int32 { + get { + return get_sides () + } + + set { + set_sides (newValue) + } + + } + + /// The number of edges each ring of the torus is constructed of. + final public var ringSides: Int32 { + get { + return get_ring_sides () + } + + set { + set_ring_sides (newValue) + } + + } + + /// If `true` the normals of the torus are set to give a smooth effect making the torus seem rounded. If `false` the torus will have a flat shaded look. + final public var smoothFaces: Bool { + get { + return get_smooth_faces () + } + + set { + set_smooth_faces (newValue) + } + + } + + /// The material used to render the torus. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inner_radius") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inner_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_inner_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inner_radius") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inner_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_inner_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outer_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outer_radius") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outer_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_outer_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outer_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outer_radius") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outer_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_outer_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sides") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sides(_ sides: Int32) { + withUnsafePointer(to: sides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_sides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sides") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_sides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ring_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ring_sides") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ring_sides(_ sides: Int32) { + withUnsafePointer(to: sides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_ring_sides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ring_sides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ring_sides") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ring_sides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_ring_sides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_smooth_faces") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_smooth_faces(_ smoothFaces: Bool) { + withUnsafePointer(to: smoothFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CSGTorus3D.method_set_smooth_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_smooth_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_smooth_faces") + return withUnsafePointer(to: &CSGTorus3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_smooth_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CSGTorus3D.method_get_smooth_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CallbackTweener.swift b/Sources/SwiftGodot/Generated/Api/CallbackTweener.swift new file mode 100644 index 000000000..9668bce9e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CallbackTweener.swift @@ -0,0 +1,63 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Calls the specified method after optional delay. +/// +/// ``CallbackTweener`` is used to call a method in a tweening sequence. See ``Tween/tweenCallback(_:)`` for more usage information. +/// +/// The tweener will finish automatically if the callback's target object is freed. +/// +/// > Note: ``Tween/tweenCallback(_:)`` is the only correct way to create ``CallbackTweener``. Any ``CallbackTweener`` created manually will not function correctly. +/// +open class CallbackTweener: Tweener { + override open class var godotClassName: StringName { "CallbackTweener" } + /* Methods */ + fileprivate static var method_set_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delay") + return withUnsafePointer(to: &CallbackTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3008182292)! + } + + } + + }() + + /// Makes the callback call delayed by given time in seconds. + /// + /// **Example:** + /// + public final func setDelay(_ delay: Double) -> CallbackTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: delay) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CallbackTweener.method_set_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Camera2D.swift b/Sources/SwiftGodot/Generated/Api/Camera2D.swift new file mode 100644 index 000000000..a4d740967 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Camera2D.swift @@ -0,0 +1,1497 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Camera node for 2D scenes. +/// +/// Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of ``CanvasItem``-based nodes. +/// +/// Cameras register themselves in the nearest ``Viewport`` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. +/// +/// This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from ``Node2D`` and change the transform of the canvas by setting ``Viewport/canvasTransform`` in ``Viewport`` (you can obtain the current ``Viewport`` by using ``Node/getViewport()``). +/// +/// Note that the ``Camera2D`` node's `position` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use ``getScreenCenterPosition()`` to get the real position. +/// +open class Camera2D: Node2D { + override open class var godotClassName: StringName { "Camera2D" } + public enum AnchorMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The camera's position is fixed so that the top-left corner is always at the origin. + case fixedTopLeft = 0 // ANCHOR_MODE_FIXED_TOP_LEFT + /// The camera's position takes into account vertical/horizontal offsets and the screen size. + case dragCenter = 1 // ANCHOR_MODE_DRAG_CENTER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .fixedTopLeft: return ".fixedTopLeft" + case .dragCenter: return ".dragCenter" + } + + } + + } + + public enum Camera2DProcessCallback: Int64, CaseIterable, CustomDebugStringConvertible { + /// The camera updates during physics frames (see ``Node/notificationInternalPhysicsProcess``). + case physics = 0 // CAMERA2D_PROCESS_PHYSICS + /// The camera updates during process frames (see ``Node/notificationInternalProcess``). + case idle = 1 // CAMERA2D_PROCESS_IDLE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .physics: return ".physics" + case .idle: return ".idle" + } + + } + + } + + + /* Properties */ + + /// The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in ``limitTop``, ``limitBottom``, ``limitLeft`` and ``limitRight``. + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The Camera2D's anchor point. See ``Camera2D/AnchorMode`` constants. + final public var anchorMode: Camera2D.AnchorMode { + get { + return get_anchor_mode () + } + + set { + set_anchor_mode (newValue) + } + + } + + /// If `true`, the camera's rendered view is not affected by its ``Node2D/rotation`` and ``Node2D/globalRotation``. + final public var ignoreRotation: Bool { + get { + return is_ignoring_rotation () + } + + set { + set_ignore_rotation (newValue) + } + + } + + /// Controls whether the camera can be active or not. If `true`, the ``Camera2D`` will become the main camera when it enters the scene tree and there is no active camera currently (see ``Viewport/getCamera2d()``). + /// + /// When the camera is currently active and ``enabled`` is set to `false`, the next enabled ``Camera2D`` in the scene tree will become active. + /// + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// The camera's zoom. A zoom of `Vector(2, 2)` doubles the size seen in the viewport. A zoom of `Vector(0.5, 0.5)` halves the size seen in the viewport. + /// + /// > Note: ``FontFile/oversampling`` does _not_ take ``Camera2D`` zoom into account. This means that zooming in/out will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated unless the font is part of a ``CanvasLayer`` that makes it ignore camera zoom. To ensure text remains crisp regardless of zoom, you can enable MSDF font rendering by enabling ``ProjectSettings/gui/theme/defaultFontMultichannelSignedDistanceField`` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, ``SystemFont/multichannelSignedDistanceField`` can be enabled in the inspector. + /// + final public var zoom: Vector2 { + get { + return get_zoom () + } + + set { + set_zoom (newValue) + } + + } + + /// The custom ``Viewport`` node attached to the ``Camera2D``. If `null` or not a ``Viewport``, uses the default viewport instead. + final public var customViewport: Node? { + get { + return get_custom_viewport () + } + + set { + set_custom_viewport (newValue) + } + + } + + /// The camera's process callback. See ``Camera2D/Camera2DProcessCallback``. + final public var processCallback: Camera2D.Camera2DProcessCallback { + get { + return get_process_callback () + } + + set { + set_process_callback (newValue) + } + + } + + /// Left scroll limit in pixels. The camera stops moving when reaching this value, but ``offset`` can push the view past the limit. + final public var limitLeft: Int32 { + get { + return get_limit (Side (rawValue: 0)!) + } + + set { + set_limit (Side (rawValue: 0)!, newValue) + } + + } + + /// Top scroll limit in pixels. The camera stops moving when reaching this value, but ``offset`` can push the view past the limit. + final public var limitTop: Int32 { + get { + return get_limit (Side (rawValue: 1)!) + } + + set { + set_limit (Side (rawValue: 1)!, newValue) + } + + } + + /// Right scroll limit in pixels. The camera stops moving when reaching this value, but ``offset`` can push the view past the limit. + final public var limitRight: Int32 { + get { + return get_limit (Side (rawValue: 2)!) + } + + set { + set_limit (Side (rawValue: 2)!, newValue) + } + + } + + /// Bottom scroll limit in pixels. The camera stops moving when reaching this value, but ``offset`` can push the view past the limit. + final public var limitBottom: Int32 { + get { + return get_limit (Side (rawValue: 3)!) + } + + set { + set_limit (Side (rawValue: 3)!, newValue) + } + + } + + /// If `true`, the camera smoothly stops when reaches its limits. + /// + /// This property has no effect if ``positionSmoothingEnabled`` is `false`. + /// + /// > Note: To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke ``resetSmoothing()``. + /// + final public var limitSmoothed: Bool { + get { + return is_limit_smoothing_enabled () + } + + set { + set_limit_smoothing_enabled (newValue) + } + + } + + /// If `true`, the camera's view smoothly moves towards its target position at ``positionSmoothingSpeed``. + final public var positionSmoothingEnabled: Bool { + get { + return is_position_smoothing_enabled () + } + + set { + set_position_smoothing_enabled (newValue) + } + + } + + /// Speed in pixels per second of the camera's smoothing effect when ``positionSmoothingEnabled`` is `true`. + final public var positionSmoothingSpeed: Double { + get { + return get_position_smoothing_speed () + } + + set { + set_position_smoothing_speed (newValue) + } + + } + + /// If `true`, the camera's view smoothly rotates, via asymptotic smoothing, to align with its target rotation at ``rotationSmoothingSpeed``. + /// + /// > Note: This property has no effect if ``ignoreRotation`` is `true`. + /// + final public var rotationSmoothingEnabled: Bool { + get { + return is_rotation_smoothing_enabled () + } + + set { + set_rotation_smoothing_enabled (newValue) + } + + } + + /// The angular, asymptotic speed of the camera's rotation smoothing effect when ``rotationSmoothingEnabled`` is `true`. + final public var rotationSmoothingSpeed: Double { + get { + return get_rotation_smoothing_speed () + } + + set { + set_rotation_smoothing_speed (newValue) + } + + } + + /// If `true`, the camera only moves when reaching the horizontal (left and right) drag margins. If `false`, the camera moves horizontally regardless of margins. + final public var dragHorizontalEnabled: Bool { + get { + return is_drag_horizontal_enabled () + } + + set { + set_drag_horizontal_enabled (newValue) + } + + } + + /// If `true`, the camera only moves when reaching the vertical (top and bottom) drag margins. If `false`, the camera moves vertically regardless of the drag margins. + final public var dragVerticalEnabled: Bool { + get { + return is_drag_vertical_enabled () + } + + set { + set_drag_vertical_enabled (newValue) + } + + } + + /// The relative horizontal drag offset of the camera between the right (`-1`) and left (`1`) drag margins. + /// + /// > Note: Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when ``dragHorizontalEnabled`` is `true` or the drag margins are changed. + /// + final public var dragHorizontalOffset: Double { + get { + return get_drag_horizontal_offset () + } + + set { + set_drag_horizontal_offset (newValue) + } + + } + + /// The relative vertical drag offset of the camera between the bottom (`-1`) and top (`1`) drag margins. + /// + /// > Note: Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when ``dragVerticalEnabled`` is `true` or the drag margins are changed. + /// + final public var dragVerticalOffset: Double { + get { + return get_drag_vertical_offset () + } + + set { + set_drag_vertical_offset (newValue) + } + + } + + /// Left margin needed to drag the camera. A value of `1` makes the camera move only when reaching the left edge of the screen. + final public var dragLeftMargin: Double { + get { + return get_drag_margin (Side (rawValue: 0)!) + } + + set { + set_drag_margin (Side (rawValue: 0)!, newValue) + } + + } + + /// Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the top edge of the screen. + final public var dragTopMargin: Double { + get { + return get_drag_margin (Side (rawValue: 1)!) + } + + set { + set_drag_margin (Side (rawValue: 1)!, newValue) + } + + } + + /// Right margin needed to drag the camera. A value of `1` makes the camera move only when reaching the right edge of the screen. + final public var dragRightMargin: Double { + get { + return get_drag_margin (Side (rawValue: 2)!) + } + + set { + set_drag_margin (Side (rawValue: 2)!, newValue) + } + + } + + /// Bottom margin needed to drag the camera. A value of `1` makes the camera move only when reaching the bottom edge of the screen. + final public var dragBottomMargin: Double { + get { + return get_drag_margin (Side (rawValue: 3)!) + } + + set { + set_drag_margin (Side (rawValue: 3)!, newValue) + } + + } + + /// If `true`, draws the camera's screen rectangle in the editor. + final public var editorDrawScreen: Bool { + get { + return is_screen_drawing_enabled () + } + + set { + set_screen_drawing_enabled (newValue) + } + + } + + /// If `true`, draws the camera's limits rectangle in the editor. + final public var editorDrawLimits: Bool { + get { + return is_limit_drawing_enabled () + } + + set { + set_limit_drawing_enabled (newValue) + } + + } + + /// If `true`, draws the camera's drag margin rectangle in the editor. + final public var editorDrawDragMargin: Bool { + get { + return is_margin_drawing_enabled () + } + + set { + set_margin_drawing_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Camera2D.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_anchor_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anchor_mode") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2050398218)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_anchor_mode(_ anchorMode: Camera2D.AnchorMode) { + withUnsafePointer(to: anchorMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_anchor_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_anchor_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_anchor_mode") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 155978067)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_anchor_mode() -> Camera2D.AnchorMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Camera2D.method_get_anchor_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Camera2D.AnchorMode (rawValue: _result)! + } + + fileprivate static var method_set_ignore_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_rotation") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ignore_rotation(_ ignore: Bool) { + withUnsafePointer(to: ignore) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_ignore_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ignoring_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ignoring_rotation") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ignoring_rotation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_ignoring_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_callback") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4201947462)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_callback(_ mode: Camera2D.Camera2DProcessCallback) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_process_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_callback") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2325344499)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_callback() -> Camera2D.Camera2DProcessCallback { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Camera2D.method_get_process_callback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Camera2D.Camera2DProcessCallback (rawValue: _result)! + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_make_current: GDExtensionMethodBindPtr = { + let methodName = StringName("make_current") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces this ``Camera2D`` to become the current active one. ``enabled`` must be `true`. + public final func makeCurrent() { + gi.object_method_bind_ptrcall(Camera2D.method_make_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_current: GDExtensionMethodBindPtr = { + let methodName = StringName("is_current") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this ``Camera2D`` is the active camera (see ``Viewport/getCamera2d()``). + public final func isCurrent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_current, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 437707142)! + } + + } + + }() + + @inline(__always) + /// Sets the camera limit for the specified ``Side``. See also ``limitBottom``, ``limitTop``, ``limitLeft``, and ``limitRight``. + fileprivate final func set_limit(_ margin: Side, _ limit: Int32) { + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: limit) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_limit") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1983885014)! + } + + } + + }() + + @inline(__always) + /// Returns the camera limit for the specified ``Side``. See also ``limitBottom``, ``limitTop``, ``limitLeft``, and ``limitRight``. + fileprivate final func get_limit(_ margin: Side) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_get_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_limit_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_smoothing_enabled(_ limitSmoothingEnabled: Bool) { + withUnsafePointer(to: limitSmoothingEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_limit_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_limit_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_limit_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_limit_smoothing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_limit_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_vertical_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_vertical_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_vertical_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_drag_vertical_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drag_vertical_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drag_vertical_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drag_vertical_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_drag_vertical_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_horizontal_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_horizontal_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_horizontal_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_drag_horizontal_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drag_horizontal_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drag_horizontal_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drag_horizontal_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_drag_horizontal_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_vertical_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_vertical_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_vertical_offset(_ offset: Double) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_drag_vertical_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_drag_vertical_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drag_vertical_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_drag_vertical_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera2D.method_get_drag_vertical_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_horizontal_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_horizontal_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_horizontal_offset(_ offset: Double) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_drag_horizontal_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_drag_horizontal_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drag_horizontal_offset") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_drag_horizontal_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera2D.method_get_drag_horizontal_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_margin") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4290182280)! + } + + } + + }() + + @inline(__always) + /// Sets the specified ``Side``'s margin. See also ``dragBottomMargin``, ``dragTopMargin``, ``dragLeftMargin``, and ``dragRightMargin``. + fileprivate final func set_drag_margin(_ margin: Side, _ dragMargin: Double) { + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: dragMargin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_drag_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_drag_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drag_margin") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2869120046)! + } + + } + + }() + + @inline(__always) + /// Returns the specified ``Side``'s margin. See also ``dragBottomMargin``, ``dragTopMargin``, ``dragLeftMargin``, and ``dragRightMargin``. + fileprivate final func get_drag_margin(_ margin: Side) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_get_drag_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns this camera's target position, in global coordinates. + /// + /// > Note: The returned value is not the same as ``Node2D/globalPosition``, as it is affected by the drag properties. It is also not the same as the current position if ``positionSmoothingEnabled`` is `true` (see ``getScreenCenterPosition()``). + /// + public final func getTargetPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Camera2D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_screen_center_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_center_position") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the center of the screen from this camera's point of view, in global coordinates. + /// + /// > Note: The exact targeted position of the camera may be different. See ``getTargetPosition()``. + /// + public final func getScreenCenterPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Camera2D.method_get_screen_center_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zoom") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zoom(_ zoom: Vector2) { + withUnsafePointer(to: zoom) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_zoom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zoom") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zoom() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Camera2D.method_get_zoom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_custom_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_viewport") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_viewport(_ viewport: Node?) { + withUnsafePointer(to: viewport?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_custom_viewport, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_viewport") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_viewport() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Camera2D.method_get_custom_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_position_smoothing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position_smoothing_speed") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position_smoothing_speed(_ positionSmoothingSpeed: Double) { + withUnsafePointer(to: positionSmoothingSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_position_smoothing_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position_smoothing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position_smoothing_speed") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position_smoothing_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera2D.method_get_position_smoothing_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position_smoothing_enabled(_ positionSmoothingSpeed: Bool) { + withUnsafePointer(to: positionSmoothingSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_position_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_position_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_position_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_position_smoothing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_position_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_smoothing_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_rotation_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_rotation_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_rotation_smoothing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_rotation_smoothing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_rotation_smoothing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation_smoothing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_smoothing_speed") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_smoothing_speed(_ speed: Double) { + withUnsafePointer(to: speed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_rotation_smoothing_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation_smoothing_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_smoothing_speed") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_smoothing_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera2D.method_get_rotation_smoothing_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_force_update_scroll: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_scroll") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces the camera to update scroll immediately. + public final func forceUpdateScroll() { + gi.object_method_bind_ptrcall(Camera2D.method_force_update_scroll, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_reset_smoothing: GDExtensionMethodBindPtr = { + let methodName = StringName("reset_smoothing") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sets the camera's position immediately to its current smoothing destination. + /// + /// This method has no effect if ``positionSmoothingEnabled`` is `false`. + /// + public final func resetSmoothing() { + gi.object_method_bind_ptrcall(Camera2D.method_reset_smoothing, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_align: GDExtensionMethodBindPtr = { + let methodName = StringName("align") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Aligns the camera to the tracked node. + public final func align() { + gi.object_method_bind_ptrcall(Camera2D.method_align, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_screen_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_drawing_enabled(_ screenDrawingEnabled: Bool) { + withUnsafePointer(to: screenDrawingEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_screen_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_screen_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_screen_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_screen_drawing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_screen_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_drawing_enabled(_ limitDrawingEnabled: Bool) { + withUnsafePointer(to: limitDrawingEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_limit_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_limit_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_limit_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_limit_drawing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_limit_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin_drawing_enabled(_ marginDrawingEnabled: Bool) { + withUnsafePointer(to: marginDrawingEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera2D.method_set_margin_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_margin_drawing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_margin_drawing_enabled") + return withUnsafePointer(to: &Camera2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_margin_drawing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera2D.method_is_margin_drawing_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Camera3D.swift b/Sources/SwiftGodot/Generated/Api/Camera3D.swift new file mode 100644 index 000000000..b0667dbbe --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Camera3D.swift @@ -0,0 +1,1435 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Camera node, displays from a point of view. +/// +/// ``Camera3D`` is a special node that displays what is visible from its current location. Cameras register themselves in the nearest ``Viewport`` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a ``Viewport``, and, without one, a scene registered in that ``Viewport`` (or higher viewports) can't be displayed. +open class Camera3D: Node3D { + override open class var godotClassName: StringName { "Camera3D" } + public enum ProjectionType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Perspective projection. Objects on the screen becomes smaller when they are far away. + case perspective = 0 // PROJECTION_PERSPECTIVE + /// Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. + case orthogonal = 1 // PROJECTION_ORTHOGONAL + /// Frustum projection. This mode allows adjusting ``frustumOffset`` to create "tilted frustum" effects. + case frustum = 2 // PROJECTION_FRUSTUM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .perspective: return ".perspective" + case .orthogonal: return ".orthogonal" + case .frustum: return ".frustum" + } + + } + + } + + public enum KeepAspect: Int64, CaseIterable, CustomDebugStringConvertible { + /// Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. + case width = 0 // KEEP_WIDTH + /// Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. + case height = 1 // KEEP_HEIGHT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .width: return ".width" + case .height: return ".height" + } + + } + + } + + public enum DopplerTracking: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables Doppler effect simulation (default). + case disabled = 0 // DOPPLER_TRACKING_DISABLED + /// Simulate Doppler effect by tracking positions of objects that are changed in `_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's ``AudioStreamPlayer3D/pitchScale``). + case idleStep = 1 // DOPPLER_TRACKING_IDLE_STEP + /// Simulate Doppler effect by tracking positions of objects that are changed in `_physics_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's ``AudioStreamPlayer3D/pitchScale``). + case physicsStep = 2 // DOPPLER_TRACKING_PHYSICS_STEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .idleStep: return ".idleStep" + case .physicsStep: return ".physicsStep" + } + + } + + } + + + /* Properties */ + + /// The axis to lock during ``fov``/``size`` adjustments. Can be either ``KeepAspect/width`` or ``KeepAspect/height``. + final public var keepAspect: Camera3D.KeepAspect { + get { + return get_keep_aspect_mode () + } + + set { + set_keep_aspect_mode (newValue) + } + + } + + /// The culling mask that describes which ``VisualInstance3D/layers`` are rendered by this camera. By default, all 20 user-visible layers are rendered. + /// + /// > Note: Since the ``cullMask`` allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting ``cullMask`` using a script allows you to toggle those reserved layers, which can be useful for editor plugins. + /// + /// To adjust ``cullMask`` more easily using a script, use ``getCullMaskValue(layerNumber:)`` and ``setCullMaskValue(layerNumber:value:)``. + /// + /// > Note: ``VoxelGI``, SDFGI and ``LightmapGI`` will always take all layers into account to determine what contributes to global illumination. If this is an issue, set ``GeometryInstance3D/giMode`` to ``GeometryInstance3D/GIMode/disabled`` for meshes and ``Light3D/lightBakeMode`` to ``Light3D/BakeMode/disabled`` for lights to exclude them from global illumination. + /// + final public var cullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /// The ``Environment`` to use for this camera. + final public var environment: Environment? { + get { + return get_environment () + } + + set { + set_environment (newValue) + } + + } + + /// The ``CameraAttributes`` to use for this camera. + final public var attributes: CameraAttributes? { + get { + return get_attributes () + } + + set { + set_attributes (newValue) + } + + } + + /// The ``Compositor`` to use for this camera. + final public var compositor: Compositor? { + get { + return get_compositor () + } + + set { + set_compositor (newValue) + } + + } + + /// The horizontal (X) offset of the camera viewport. + final public var hOffset: Double { + get { + return get_h_offset () + } + + set { + set_h_offset (newValue) + } + + } + + /// The vertical (Y) offset of the camera viewport. + final public var vOffset: Double { + get { + return get_v_offset () + } + + set { + set_v_offset (newValue) + } + + } + + /// If not ``DopplerTracking/disabled``, this camera will simulate the Doppler effect for objects changed in particular `_process` methods. See ``Camera3D/DopplerTracking`` for possible values. + final public var dopplerTracking: Camera3D.DopplerTracking { + get { + return get_doppler_tracking () + } + + set { + set_doppler_tracking (newValue) + } + + } + + /// The camera's projection mode. In ``ProjectionType/perspective`` mode, objects' Z distance from the camera's local space scales their perceived size. + final public var projection: Camera3D.ProjectionType { + get { + return get_projection () + } + + set { + set_projection (newValue) + } + + } + + /// If `true`, the ancestor ``Viewport`` is currently using this camera. + /// + /// If multiple cameras are in the scene, one will always be made current. For example, if two ``Camera3D`` nodes are present in the scene and only one is current, setting one camera's ``current`` to `false` will cause the other camera to be made current. + /// + final public var current: Bool { + get { + return is_current () + } + + set { + set_current (newValue) + } + + } + + /// The camera's field of view angle (in degrees). Only applicable in perspective mode. Since ``keepAspect`` locks one axis, ``fov`` sets the other axis' field of view angle. + /// + /// For reference, the default vertical field of view value (`75.0`) is equivalent to a horizontal FOV of: + /// + /// - ~91.31 degrees in a 4:3 viewport + /// + /// - ~101.67 degrees in a 16:10 viewport + /// + /// - ~107.51 degrees in a 16:9 viewport + /// + /// - ~121.63 degrees in a 21:9 viewport + /// + final public var fov: Double { + get { + return get_fov () + } + + set { + set_fov (newValue) + } + + } + + /// The camera's size in meters measured as the diameter of the width or height, depending on ``keepAspect``. Only applicable in orthogonal and frustum modes. + final public var size: Double { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as Y-shearing. + /// + /// > Note: Only effective if ``projection`` is ``ProjectionType/frustum``. + /// + final public var frustumOffset: Vector2 { + get { + return get_frustum_offset () + } + + set { + set_frustum_offset (newValue) + } + + } + + /// The distance to the near culling boundary for this camera relative to its local Z axis. Lower values allow the camera to see objects more up close to its origin, at the cost of lower precision across the _entire_ range. Values lower than the default can lead to increased Z-fighting. + final public var near: Double { + get { + return get_near () + } + + set { + set_near (newValue) + } + + } + + /// The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing ``far`` can improve performance if it results in objects being partially or fully culled. + final public var far: Double { + get { + return get_far () + } + + set { + set_far (newValue) + } + + } + + /* Methods */ + fileprivate static var method_project_ray_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("project_ray_normal") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1718073306)! + } + + } + + }() + + /// Returns a normal vector in world space, that is the result of projecting a point on the ``Viewport`` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + public final func projectRayNormal(screenPoint: Vector2) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: screenPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_project_ray_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_project_local_ray_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("project_local_ray_normal") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1718073306)! + } + + } + + }() + + /// Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. + public final func projectLocalRayNormal(screenPoint: Vector2) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: screenPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_project_local_ray_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_project_ray_origin: GDExtensionMethodBindPtr = { + let methodName = StringName("project_ray_origin") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1718073306)! + } + + } + + }() + + /// Returns a 3D position in world space, that is the result of projecting a point on the ``Viewport`` rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + public final func projectRayOrigin(screenPoint: Vector2) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: screenPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_project_ray_origin, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_unproject_position: GDExtensionMethodBindPtr = { + let methodName = StringName("unproject_position") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3758901831)! + } + + } + + }() + + /// Returns the 2D coordinate in the ``Viewport`` rectangle that maps to the given 3D point in world space. + /// + /// > Note: When using this to position GUI elements over a 3D viewport, use ``isPositionBehind(worldPoint:)`` to prevent them from appearing if the 3D point is behind the camera: + /// + public final func unprojectPosition(worldPoint: Vector3) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: worldPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_unproject_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_position_behind: GDExtensionMethodBindPtr = { + let methodName = StringName("is_position_behind") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3108956480)! + } + + } + + }() + + /// Returns `true` if the given position is behind the camera (the blue part of the linked diagram). See this diagram for an overview of position query methods. + /// + /// > Note: A position which returns `false` may still be outside the camera's field of view. + /// + public final func isPositionBehind(worldPoint: Vector3) -> Bool { + var _result: Bool = false + withUnsafePointer(to: worldPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_is_position_behind, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_project_position: GDExtensionMethodBindPtr = { + let methodName = StringName("project_position") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2171975744)! + } + + } + + }() + + /// Returns the 3D point in world space that maps to the given 2D coordinate in the ``Viewport`` rectangle on a plane that is the given `zDepth` distance into the scene away from the camera. + public final func projectPosition(screenPoint: Vector2, zDepth: Double) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: screenPoint) { pArg0 in + withUnsafePointer(to: zDepth) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_project_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("set_perspective") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2385087082)! + } + + } + + }() + + /// Sets the camera projection to perspective mode (see ``ProjectionType/perspective``), by specifying a `fov` (field of view) angle in degrees, and the `zNear` and `zFar` clip planes in world space units. + public final func setPerspective(fov: Double, zNear: Double, zFar: Double) { + withUnsafePointer(to: fov) { pArg0 in + withUnsafePointer(to: zNear) { pArg1 in + withUnsafePointer(to: zFar) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_perspective, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_orthogonal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_orthogonal") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2385087082)! + } + + } + + }() + + /// Sets the camera projection to orthogonal mode (see ``ProjectionType/orthogonal``), by specifying a `size`, and the `zNear` and `zFar` clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) + public final func setOrthogonal(size: Double, zNear: Double, zFar: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: zNear) { pArg1 in + withUnsafePointer(to: zFar) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_orthogonal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_frustum: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frustum") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 354890663)! + } + + } + + }() + + /// Sets the camera projection to frustum mode (see ``ProjectionType/frustum``), by specifying a `size`, an `offset`, and the `zNear` and `zFar` clip planes in world space units. See also ``frustumOffset``. + public final func setFrustum(size: Double, offset: Vector2, zNear: Double, zFar: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: zNear) { pArg2 in + withUnsafePointer(to: zFar) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_frustum, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_make_current: GDExtensionMethodBindPtr = { + let methodName = StringName("make_current") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Makes this camera the current camera for the ``Viewport`` (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. + public final func makeCurrent() { + gi.object_method_bind_ptrcall(Camera3D.method_make_current, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_clear_current: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_current") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3216645846)! + } + + } + + }() + + /// If this is the current camera, remove it from being current. If `enableNext` is `true`, request to make the next camera current, if any. + public final func clearCurrent(enableNext: Bool = true) { + withUnsafePointer(to: enableNext) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_clear_current, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_current: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_current, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_current: GDExtensionMethodBindPtr = { + let methodName = StringName("is_current") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_current() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Camera3D.method_is_current, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_camera_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_transform") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + /// Returns the transform of the camera plus the vertical (``vOffset``) and horizontal (``hOffset``) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as ``XRCamera3D``. + public final func getCameraTransform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(Camera3D.method_get_camera_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_camera_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_projection") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2910717950)! + } + + } + + }() + + /// Returns the projection matrix that this camera uses to render to its associated viewport. The camera must be part of the scene tree to function. + public final func getCameraProjection() -> Projection { + var _result: Projection = Projection () + gi.object_method_bind_ptrcall(Camera3D.method_get_camera_projection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fov") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fov() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_fov, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_frustum_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frustum_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frustum_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Camera3D.method_get_frustum_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_far: GDExtensionMethodBindPtr = { + let methodName = StringName("get_far") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_far() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_far, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_near: GDExtensionMethodBindPtr = { + let methodName = StringName("get_near") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_near() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_near, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fov") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fov(_ fov: Double) { + withUnsafePointer(to: fov) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_fov, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_frustum_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frustum_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frustum_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_frustum_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_far: GDExtensionMethodBindPtr = { + let methodName = StringName("set_far") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_far(_ far: Double) { + withUnsafePointer(to: far) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_far, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_near: GDExtensionMethodBindPtr = { + let methodName = StringName("set_near") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_near(_ near: Double) { + withUnsafePointer(to: near) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_near, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_projection") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2624185235)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_projection() -> Camera3D.ProjectionType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Camera3D.method_get_projection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Camera3D.ProjectionType (rawValue: _result)! + } + + fileprivate static var method_set_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_projection") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4218540108)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_projection(_ mode: Camera3D.ProjectionType) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_projection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_offset(_ offset: Double) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_h_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_h_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_offset(_ offset: Double) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_v_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_offset") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Camera3D.method_get_v_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(Camera3D.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4143518816)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment(_ env: Environment?) { + withUnsafePointer(to: env?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_environment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3082064660)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment() -> Environment? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Camera3D.method_get_environment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attributes") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2817810567)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attributes(_ env: CameraAttributes?) { + withUnsafePointer(to: env?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_attributes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attributes") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3921283215)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attributes() -> CameraAttributes? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Camera3D.method_get_attributes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_compositor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_compositor") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1586754307)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_compositor(_ compositor: Compositor?) { + withUnsafePointer(to: compositor?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_compositor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_compositor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_compositor") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3647707413)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_compositor() -> Compositor? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Camera3D.method_get_compositor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_keep_aspect_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_aspect_mode") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740651252)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keep_aspect_mode(_ mode: Camera3D.KeepAspect) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_keep_aspect_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_keep_aspect_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keep_aspect_mode") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2790278316)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_keep_aspect_mode() -> Camera3D.KeepAspect { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Camera3D.method_get_keep_aspect_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Camera3D.KeepAspect (rawValue: _result)! + } + + fileprivate static var method_set_doppler_tracking: GDExtensionMethodBindPtr = { + let methodName = StringName("set_doppler_tracking") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3109431270)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_doppler_tracking(_ mode: Camera3D.DopplerTracking) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_doppler_tracking, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_doppler_tracking: GDExtensionMethodBindPtr = { + let methodName = StringName("get_doppler_tracking") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1584483649)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_doppler_tracking() -> Camera3D.DopplerTracking { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Camera3D.method_get_doppler_tracking, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Camera3D.DopplerTracking (rawValue: _result)! + } + + fileprivate static var method_get_frustum: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frustum") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the camera's frustum planes in world space units as an array of ``Plane``s in the following order: near, far, left, top, right, bottom. Not to be confused with ``frustumOffset``. + public final func getFrustum() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Camera3D.method_get_frustum, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_is_position_in_frustum: GDExtensionMethodBindPtr = { + let methodName = StringName("is_position_in_frustum") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3108956480)! + } + + } + + }() + + /// Returns `true` if the given position is inside the camera's frustum (the green part of the linked diagram). See this diagram for an overview of position query methods. + public final func isPositionInFrustum(worldPoint: Vector3) -> Bool { + var _result: Bool = false + withUnsafePointer(to: worldPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_is_position_in_frustum, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_camera_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_rid") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the camera's RID from the ``RenderingServer``. + public final func getCameraRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(Camera3D.method_get_camera_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_pyramid_shape_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pyramid_shape_rid") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Returns the RID of a pyramid shape encompassing the camera's view frustum, ignoring the camera's near plane. The tip of the pyramid represents the position of the camera. + public final func getPyramidShapeRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(Camera3D.method_get_pyramid_shape_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_cull_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask_value") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``cullMask``, given a `layerNumber` between 1 and 20. + public final func setCullMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_set_cull_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask_value") + return withUnsafePointer(to: &Camera3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``cullMask`` is enabled, given a `layerNumber` between 1 and 20. + public final func getCullMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Camera3D.method_get_cull_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraAttributes.swift b/Sources/SwiftGodot/Generated/Api/CameraAttributes.swift new file mode 100644 index 000000000..be5beb727 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraAttributes.swift @@ -0,0 +1,318 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Parent class for camera settings. +/// +/// Controls camera-specific attributes such as depth of field and exposure override. +/// +/// When used in a ``WorldEnvironment`` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own ``CameraAttributes``, including the editor camera. When used in a ``Camera3D`` it will override any ``CameraAttributes`` set in the ``WorldEnvironment``. When used in ``VoxelGI`` or ``LightmapGI``, only the exposure settings will be used. +/// +/// See also ``Environment`` for general 3D environment settings. +/// +/// This is a pure virtual class that is inherited by ``CameraAttributesPhysical`` and ``CameraAttributesPractical``. +/// +open class CameraAttributes: Resource { + override open class var godotClassName: StringName { "CameraAttributes" } + + /* Properties */ + + /// Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is enabled. When ``autoExposureEnabled`` this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. + final public var exposureSensitivity: Double { + get { + return get_exposure_sensitivity () + } + + set { + set_exposure_sensitivity (newValue) + } + + } + + /// Multiplier for the exposure amount. A higher value results in a brighter image. + final public var exposureMultiplier: Double { + get { + return get_exposure_multiplier () + } + + set { + set_exposure_multiplier (newValue) + } + + } + + /// If `true`, enables the tonemapping auto exposure mode of the scene renderer. If `true`, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. + final public var autoExposureEnabled: Bool { + get { + return is_auto_exposure_enabled () + } + + set { + set_auto_exposure_enabled (newValue) + } + + } + + /// The scale of the auto exposure effect. Affects the intensity of auto exposure. + final public var autoExposureScale: Double { + get { + return get_auto_exposure_scale () + } + + set { + set_auto_exposure_scale (newValue) + } + + } + + /// The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + final public var autoExposureSpeed: Double { + get { + return get_auto_exposure_speed () + } + + set { + set_auto_exposure_speed (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_exposure_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exposure_multiplier") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exposure_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributes.method_set_exposure_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exposure_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exposure_multiplier") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exposure_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributes.method_get_exposure_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exposure_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exposure_sensitivity") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exposure_sensitivity(_ sensitivity: Double) { + withUnsafePointer(to: sensitivity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributes.method_set_exposure_sensitivity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exposure_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exposure_sensitivity") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exposure_sensitivity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributes.method_get_exposure_sensitivity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_enabled") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributes.method_set_auto_exposure_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_auto_exposure_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_exposure_enabled") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_exposure_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CameraAttributes.method_is_auto_exposure_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_speed") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_speed(_ exposureSpeed: Double) { + withUnsafePointer(to: exposureSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributes.method_set_auto_exposure_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_speed") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributes.method_get_auto_exposure_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_scale") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_scale(_ exposureGrey: Double) { + withUnsafePointer(to: exposureGrey) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributes.method_set_auto_exposure_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_scale") + return withUnsafePointer(to: &CameraAttributes.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributes.method_get_auto_exposure_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraAttributesPhysical.swift b/Sources/SwiftGodot/Generated/Api/CameraAttributesPhysical.swift new file mode 100644 index 000000000..660f37c3b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraAttributesPhysical.swift @@ -0,0 +1,510 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Physically-based camera settings. +/// +/// ``CameraAttributesPhysical`` is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field. +/// +/// When used in a ``WorldEnvironment`` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own ``CameraAttributes``, including the editor camera. When used in a ``Camera3D`` it will override any ``CameraAttributes`` set in the ``WorldEnvironment`` and will override the ``Camera3D``s ``Camera3D/far``, ``Camera3D/near``, ``Camera3D/fov``, and ``Camera3D/keepAspect`` properties. When used in ``VoxelGI`` or ``LightmapGI``, only the exposure settings will be used. +/// +/// The default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation. +/// +/// > Note: Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. +/// +open class CameraAttributesPhysical: CameraAttributes { + override open class var godotClassName: StringName { "CameraAttributesPhysical" } + + /* Properties */ + + /// Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than ``frustumFocalLength``. + final public var frustumFocusDistance: Double { + get { + return get_focus_distance () + } + + set { + set_focus_distance (newValue) + } + + } + + /// Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a ``Camera3D`` as its ``Camera3D/attributes``, it will override the ``Camera3D/fov`` property and the ``Camera3D/keepAspect`` property. + final public var frustumFocalLength: Double { + get { + return get_focal_length () + } + + set { + set_focal_length (newValue) + } + + } + + /// Override value for ``Camera3D/near``. Used internally when calculating depth of field. When attached to a ``Camera3D`` as its ``Camera3D/attributes``, it will override the ``Camera3D/near`` property. + final public var frustumNear: Double { + get { + return get_near () + } + + set { + set_near (newValue) + } + + } + + /// Override value for ``Camera3D/far``. Used internally when calculating depth of field. When attached to a ``Camera3D`` as its ``Camera3D/attributes``, it will override the ``Camera3D/far`` property. + final public var frustumFar: Double { + get { + return get_far () + } + + set { + set_far (newValue) + } + + } + + /// Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default ``DirectionalLight3D``), for indoor lighting, a value between 2 and 4 is more appropriate. + /// + /// Only available when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is enabled. + /// + final public var exposureAperture: Double { + get { + return get_aperture () + } + + set { + set_aperture (newValue) + } + + } + + /// Time for shutter to open and close, evaluated as `1 / shutter_speed` seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image). + /// + /// Only available when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is enabled. + /// + final public var exposureShutterSpeed: Double { + get { + return get_shutter_speed () + } + + set { + set_shutter_speed (newValue) + } + + } + + /// The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. + final public var autoExposureMinExposureValue: Double { + get { + return get_auto_exposure_min_exposure_value () + } + + set { + set_auto_exposure_min_exposure_value (newValue) + } + + } + + /// The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. + final public var autoExposureMaxExposureValue: Double { + get { + return get_auto_exposure_max_exposure_value () + } + + set { + set_auto_exposure_max_exposure_value (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_aperture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_aperture") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_aperture(_ aperture: Double) { + withUnsafePointer(to: aperture) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_aperture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_aperture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_aperture") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_aperture() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_aperture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shutter_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shutter_speed") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shutter_speed(_ shutterSpeed: Double) { + withUnsafePointer(to: shutterSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_shutter_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shutter_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shutter_speed") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shutter_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_shutter_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_focal_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focal_length") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_focal_length(_ focalLength: Double) { + withUnsafePointer(to: focalLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_focal_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focal_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focal_length") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_focal_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_focal_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_focus_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focus_distance") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_focus_distance(_ focusDistance: Double) { + withUnsafePointer(to: focusDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_focus_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focus_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focus_distance") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_focus_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_focus_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_near: GDExtensionMethodBindPtr = { + let methodName = StringName("set_near") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_near(_ near: Double) { + withUnsafePointer(to: near) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_near, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_near: GDExtensionMethodBindPtr = { + let methodName = StringName("get_near") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_near() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_near, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_far: GDExtensionMethodBindPtr = { + let methodName = StringName("set_far") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_far(_ far: Double) { + withUnsafePointer(to: far) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_far, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_far: GDExtensionMethodBindPtr = { + let methodName = StringName("get_far") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_far() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_far, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fov") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the vertical field of view that corresponds to the ``frustumFocalLength``. This value is calculated internally whenever ``frustumFocalLength`` is changed. + public final func getFov() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_fov, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_max_exposure_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_max_exposure_value") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_max_exposure_value(_ exposureValueMax: Double) { + withUnsafePointer(to: exposureValueMax) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_auto_exposure_max_exposure_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_max_exposure_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_max_exposure_value") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_max_exposure_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_auto_exposure_max_exposure_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_min_exposure_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_min_exposure_value") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_min_exposure_value(_ exposureValueMin: Double) { + withUnsafePointer(to: exposureValueMin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_set_auto_exposure_min_exposure_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_min_exposure_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_min_exposure_value") + return withUnsafePointer(to: &CameraAttributesPhysical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_min_exposure_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPhysical.method_get_auto_exposure_min_exposure_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraAttributesPractical.swift b/Sources/SwiftGodot/Generated/Api/CameraAttributesPractical.swift new file mode 100644 index 000000000..cb844516d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraAttributesPractical.swift @@ -0,0 +1,544 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Camera settings in an easy to use format. +/// +/// Controls camera-specific attributes such as auto-exposure, depth of field, and exposure override. +/// +/// When used in a ``WorldEnvironment`` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own ``CameraAttributes``, including the editor camera. When used in a ``Camera3D`` it will override any ``CameraAttributes`` set in the ``WorldEnvironment``. When used in ``VoxelGI`` or ``LightmapGI``, only the exposure settings will be used. +/// +open class CameraAttributesPractical: CameraAttributes { + override open class var godotClassName: StringName { "CameraAttributesPractical" } + + /* Properties */ + + /// Enables depth of field blur for objects further than ``dofBlurFarDistance``. Strength of blur is controlled by ``dofBlurAmount`` and modulated by ``dofBlurFarTransition``. + /// + /// > Note: Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + /// + final public var dofBlurFarEnabled: Bool { + get { + return is_dof_blur_far_enabled () + } + + set { + set_dof_blur_far_enabled (newValue) + } + + } + + /// Objects further from the ``Camera3D`` by this amount will be blurred by the depth of field effect. Measured in meters. + final public var dofBlurFarDistance: Double { + get { + return get_dof_blur_far_distance () + } + + set { + set_dof_blur_far_distance (newValue) + } + + } + + /// When positive, distance over which (starting from ``dofBlurFarDistance``) blur effect will scale from 0 to ``dofBlurAmount``. When negative, uses physically-based scaling so depth of field effect will scale from 0 at ``dofBlurFarDistance`` and will increase in a physically accurate way as objects get further from the ``Camera3D``. + final public var dofBlurFarTransition: Double { + get { + return get_dof_blur_far_transition () + } + + set { + set_dof_blur_far_transition (newValue) + } + + } + + /// Enables depth of field blur for objects closer than ``dofBlurNearDistance``. Strength of blur is controlled by ``dofBlurAmount`` and modulated by ``dofBlurNearTransition``. + /// + /// > Note: Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + /// + final public var dofBlurNearEnabled: Bool { + get { + return is_dof_blur_near_enabled () + } + + set { + set_dof_blur_near_enabled (newValue) + } + + } + + /// Objects closer from the ``Camera3D`` by this amount will be blurred by the depth of field effect. Measured in meters. + final public var dofBlurNearDistance: Double { + get { + return get_dof_blur_near_distance () + } + + set { + set_dof_blur_near_distance (newValue) + } + + } + + /// When positive, distance over which blur effect will scale from 0 to ``dofBlurAmount``, ending at ``dofBlurNearDistance``. When negative, uses physically-based scaling so depth of field effect will scale from 0 at ``dofBlurNearDistance`` and will increase in a physically accurate way as objects get closer to the ``Camera3D``. + final public var dofBlurNearTransition: Double { + get { + return get_dof_blur_near_transition () + } + + set { + set_dof_blur_near_transition (newValue) + } + + } + + /// Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of blurriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style. + final public var dofBlurAmount: Double { + get { + return get_dof_blur_amount () + } + + set { + set_dof_blur_amount (newValue) + } + + } + + /// The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. + final public var autoExposureMinSensitivity: Double { + get { + return get_auto_exposure_min_sensitivity () + } + + set { + set_auto_exposure_min_sensitivity (newValue) + } + + } + + /// The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. + final public var autoExposureMaxSensitivity: Double { + get { + return get_auto_exposure_max_sensitivity () + } + + set { + set_auto_exposure_max_sensitivity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_dof_blur_far_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_far_enabled") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_far_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_far_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_dof_blur_far_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_dof_blur_far_enabled") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_dof_blur_far_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_is_dof_blur_far_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_far_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_far_distance") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_far_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_far_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dof_blur_far_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dof_blur_far_distance") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dof_blur_far_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_dof_blur_far_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_far_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_far_transition") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_far_transition(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_far_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dof_blur_far_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dof_blur_far_transition") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dof_blur_far_transition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_dof_blur_far_transition, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_near_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_near_enabled") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_near_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_near_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_dof_blur_near_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_dof_blur_near_enabled") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_dof_blur_near_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_is_dof_blur_near_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_near_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_near_distance") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_near_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_near_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dof_blur_near_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dof_blur_near_distance") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dof_blur_near_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_dof_blur_near_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_near_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_near_transition") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_near_transition(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_near_transition, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dof_blur_near_transition: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dof_blur_near_transition") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dof_blur_near_transition() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_dof_blur_near_transition, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dof_blur_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dof_blur_amount") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dof_blur_amount(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_dof_blur_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dof_blur_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dof_blur_amount") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dof_blur_amount() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_dof_blur_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_max_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_max_sensitivity") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_max_sensitivity(_ maxSensitivity: Double) { + withUnsafePointer(to: maxSensitivity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_auto_exposure_max_sensitivity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_max_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_max_sensitivity") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_max_sensitivity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_auto_exposure_max_sensitivity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_exposure_min_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_exposure_min_sensitivity") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_exposure_min_sensitivity(_ minSensitivity: Double) { + withUnsafePointer(to: minSensitivity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_set_auto_exposure_min_sensitivity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_exposure_min_sensitivity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_exposure_min_sensitivity") + return withUnsafePointer(to: &CameraAttributesPractical.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_exposure_min_sensitivity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CameraAttributesPractical.method_get_auto_exposure_min_sensitivity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraFeed.swift b/Sources/SwiftGodot/Generated/Api/CameraFeed.swift new file mode 100644 index 000000000..390527463 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraFeed.swift @@ -0,0 +1,259 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A camera feed gives you access to a single physical camera attached to your device. +/// +/// A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also ``CameraServer``. +/// +/// > Note: Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. +/// +open class CameraFeed: RefCounted { + override open class var godotClassName: StringName { "CameraFeed" } + public enum FeedDataType: Int64, CaseIterable, CustomDebugStringConvertible { + /// No image set for the feed. + case noimage = 0 // FEED_NOIMAGE + /// Feed supplies RGB images. + case rgb = 1 // FEED_RGB + /// Feed supplies YCbCr images that need to be converted to RGB. + case ycbcr = 2 // FEED_YCBCR + /// Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + case ycbcrSep = 3 // FEED_YCBCR_SEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .noimage: return ".noimage" + case .rgb: return ".rgb" + case .ycbcr: return ".ycbcr" + case .ycbcrSep: return ".ycbcrSep" + } + + } + + } + + public enum FeedPosition: Int64, CaseIterable, CustomDebugStringConvertible { + /// Unspecified position. + case unspecified = 0 // FEED_UNSPECIFIED + /// Camera is mounted at the front of the device. + case front = 1 // FEED_FRONT + /// Camera is mounted at the back of the device. + case back = 2 // FEED_BACK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unspecified: return ".unspecified" + case .front: return ".front" + case .back: return ".back" + } + + } + + } + + + /* Properties */ + + /// If `true`, the feed is active. + final public var feedIsActive: Bool { + get { + return is_active () + } + + set { + set_active (newValue) + } + + } + + /// The transform applied to the camera's image. + final public var feedTransform: Transform2D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_id") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the unique ID for this feed. + public final func getId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CameraFeed.method_get_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_active") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CameraFeed.method_is_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_active") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_active(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraFeed.method_set_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the camera's name. + public final func getName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CameraFeed.method_get_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2711679033)! + } + + } + + }() + + /// Returns the position of camera on the device. + public final func getPosition() -> CameraFeed.FeedPosition { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CameraFeed.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CameraFeed.FeedPosition (rawValue: _result)! + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CameraFeed.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraFeed.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_datatype: GDExtensionMethodBindPtr = { + let methodName = StringName("get_datatype") + return withUnsafePointer(to: &CameraFeed.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1477782850)! + } + + } + + }() + + /// Returns feed image data type. + public final func getDatatype() -> CameraFeed.FeedDataType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CameraFeed.method_get_datatype, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CameraFeed.FeedDataType (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraServer.swift b/Sources/SwiftGodot/Generated/Api/CameraServer.swift new file mode 100644 index 000000000..2077aef8c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraServer.swift @@ -0,0 +1,345 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Server keeping track of different cameras accessible in Godot. +/// +/// The ``CameraServer`` keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. +/// +/// It is notably used to provide AR modules with a video feed from the camera. +/// +/// > Note: This class is currently only implemented on macOS and iOS. To get a ``CameraFeed`` on iOS, the camera plugin from godot-ios-plugins is required. On other platforms, no ``CameraFeed``s will be available. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``cameraFeedAdded`` +/// - ``cameraFeedRemoved`` +open class CameraServer: Object { + /// The shared instance of this class + public static var shared: CameraServer = { + return withUnsafePointer (to: &CameraServer.godotClassName.content) { ptr in + CameraServer (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "CameraServer" } + public enum FeedImage: Int64, CaseIterable, CustomDebugStringConvertible { + /// The RGBA camera image. + case rgbaImage = 0 // FEED_RGBA_IMAGE + /// The YCbCr camera image. + // case ycbcrImage = 0 // FEED_YCBCR_IMAGE + /// The Y component camera image. + // case yImage = 0 // FEED_Y_IMAGE + /// The CbCr component camera image. + case cbcrImage = 1 // FEED_CBCR_IMAGE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rgbaImage: return ".rgbaImage" + case .cbcrImage: return ".cbcrImage" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_feed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feed") + return withUnsafePointer(to: &CameraServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 361927068)! + } + + } + + }() + + /// Returns the ``CameraFeed`` corresponding to the camera with the given `index`. + public static func getFeed(index: Int32) -> CameraFeed? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_feed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_feed_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feed_count") + return withUnsafePointer(to: &CameraServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the number of ``CameraFeed``s registered. + public static func getFeedCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_feed_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_feeds: GDExtensionMethodBindPtr = { + let methodName = StringName("feeds") + return withUnsafePointer(to: &CameraServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of ``CameraFeed``s. + public static func feeds() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_feeds, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_add_feed: GDExtensionMethodBindPtr = { + let methodName = StringName("add_feed") + return withUnsafePointer(to: &CameraServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3204782488)! + } + + } + + }() + + /// Adds the camera `feed` to the camera server. + public static func addFeed(_ feed: CameraFeed?) { + withUnsafePointer(to: feed?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_add_feed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_feed: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_feed") + return withUnsafePointer(to: &CameraServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3204782488)! + } + + } + + }() + + /// Removes the specified camera `feed`. + public static func removeFeed(_ feed: CameraFeed?) { + withUnsafePointer(to: feed?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_feed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``CameraFeed`` is added (e.g. a webcam is plugged in). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.cameraFeedAdded.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var cameraFeedAdded: Signal1 { Signal1 (target: self, signalName: "camera_feed_added") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a ``CameraFeed`` is removed (e.g. a webcam is unplugged). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.cameraFeedRemoved.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var cameraFeedRemoved: Signal2 { Signal2 (target: self, signalName: "camera_feed_removed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CameraTexture.swift b/Sources/SwiftGodot/Generated/Api/CameraTexture.swift new file mode 100644 index 000000000..10f743303 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CameraTexture.swift @@ -0,0 +1,202 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture provided by a ``CameraFeed``. +/// +/// This texture gives access to the camera texture provided by a ``CameraFeed``. +/// +/// > Note: Many cameras supply YCbCr images which need to be converted in a shader. +/// +open class CameraTexture: Texture2D { + override open class var godotClassName: StringName { "CameraTexture" } + + /* Properties */ + + /// The ID of the ``CameraFeed`` for which we want to display the image. + final public var cameraFeedId: Int32 { + get { + return get_camera_feed_id () + } + + set { + set_camera_feed_id (newValue) + } + + } + + /// Which image within the ``CameraFeed`` we want access to, important if the camera image is split in a Y and CbCr component. + final public var whichFeed: CameraServer.FeedImage { + get { + return get_which_feed () + } + + set { + set_which_feed (newValue) + } + + } + + /// Convenience property that gives access to the active property of the ``CameraFeed``. + final public var cameraIsActive: Bool { + get { + return get_camera_active () + } + + set { + set_camera_active (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_camera_feed_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_camera_feed_id") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_camera_feed_id(_ feedId: Int32) { + withUnsafePointer(to: feedId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraTexture.method_set_camera_feed_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_camera_feed_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_feed_id") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_camera_feed_id() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CameraTexture.method_get_camera_feed_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_which_feed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_which_feed") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1595299230)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_which_feed(_ whichFeed: CameraServer.FeedImage) { + withUnsafePointer(to: whichFeed.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraTexture.method_set_which_feed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_which_feed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_which_feed") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 91039457)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_which_feed() -> CameraServer.FeedImage { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CameraTexture.method_get_which_feed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CameraServer.FeedImage (rawValue: _result)! + } + + fileprivate static var method_set_camera_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_camera_active") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_camera_active(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CameraTexture.method_set_camera_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_camera_active: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_active") + return withUnsafePointer(to: &CameraTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_camera_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CameraTexture.method_get_camera_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasGroup.swift b/Sources/SwiftGodot/Generated/Api/CanvasGroup.swift new file mode 100644 index 000000000..acdfdd5fc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasGroup.swift @@ -0,0 +1,204 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Merges several 2D nodes into a single draw operation. +/// +/// Child ``CanvasItem`` nodes of a ``CanvasGroup`` are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending (set ``CanvasItem/selfModulate`` property of ``CanvasGroup`` to achieve this effect). +/// +/// > Note: The ``CanvasGroup`` uses a custom shader to read from the backbuffer to draw its children. Assigning a ``Material`` to the ``CanvasGroup`` overrides the builtin shader. To duplicate the behavior of the builtin shader in a custom ``Shader`` use the following: +/// +/// > Note: Since ``CanvasGroup`` and ``CanvasItem/clipChildren`` both utilize the backbuffer, children of a ``CanvasGroup`` who have their ``CanvasItem/clipChildren`` set to anything other than ``CanvasItem/ClipChildrenMode/disabled`` will not function correctly. +/// +open class CanvasGroup: Node2D { + override open class var godotClassName: StringName { "CanvasGroup" } + + /* Properties */ + + /// Sets the size of a margin used to expand the drawable rect of this ``CanvasGroup``. The size of the ``CanvasGroup`` is determined by fitting a rect around its children then expanding that rect by ``fitMargin``. This increases both the backbuffer area used and the area covered by the ``CanvasGroup`` both of which can reduce performance. This should be kept as small as possible and should only be expanded when an increased size is needed (e.g. for custom shader effects). + final public var fitMargin: Double { + get { + return get_fit_margin () + } + + set { + set_fit_margin (newValue) + } + + } + + /// Sets the size of the margin used to expand the clearing rect of this ``CanvasGroup``. This expands the area of the backbuffer that will be used by the ``CanvasGroup``. A smaller margin will reduce the area of the backbuffer used which can increase performance, however if ``useMipmaps`` is enabled, a small margin may result in mipmap errors at the edge of the ``CanvasGroup``. Accordingly, this should be left as small as possible, but should be increased if artifacts appear along the edges of the canvas group. + final public var clearMargin: Double { + get { + return get_clear_margin () + } + + set { + set_clear_margin (newValue) + } + + } + + /// If `true`, calculates mipmaps for the backbuffer before drawing the ``CanvasGroup`` so that mipmaps can be used in a custom ``ShaderMaterial`` attached to the ``CanvasGroup``. Generating mipmaps has a performance cost so this should not be enabled unless required. + final public var useMipmaps: Bool { + get { + return is_using_mipmaps () + } + + set { + set_use_mipmaps (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_fit_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fit_margin") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fit_margin(_ fitMargin: Double) { + withUnsafePointer(to: fitMargin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasGroup.method_set_fit_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fit_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fit_margin") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fit_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CanvasGroup.method_get_fit_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clear_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clear_margin") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clear_margin(_ clearMargin: Double) { + withUnsafePointer(to: clearMargin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasGroup.method_set_clear_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clear_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clear_margin") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clear_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CanvasGroup.method_get_clear_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_mipmaps") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_mipmaps(_ useMipmaps: Bool) { + withUnsafePointer(to: useMipmaps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasGroup.method_set_use_mipmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_mipmaps") + return withUnsafePointer(to: &CanvasGroup.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_mipmaps() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasGroup.method_is_using_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasItem.swift b/Sources/SwiftGodot/Generated/Api/CanvasItem.swift new file mode 100644 index 000000000..390ceddf6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasItem.swift @@ -0,0 +1,2874 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for everything in 2D space. +/// +/// Abstract base class for everything in 2D space. Canvas items are laid out in a tree; children inherit and extend their parent's transform. ``CanvasItem`` is extended by ``Control`` for GUI-related nodes, and by ``Node2D`` for 2D game objects. +/// +/// Any ``CanvasItem`` can draw. For this, ``queueRedraw()`` is called by the engine, then ``notificationDraw`` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the ``CanvasItem`` are provided (see `draw_*` functions). However, they can only be used inside ``_draw()``, its corresponding ``Wrapper._notification(code:reverse)`` or methods connected to the [signal draw] signal. +/// +/// Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root ``CanvasItem`` will be drawn behind everything. This behavior can be changed on a per-item basis. +/// +/// A ``CanvasItem`` can be hidden, which will also hide its children. By adjusting various other properties of a ``CanvasItem``, you can also modulate its color (via ``modulate`` or ``selfModulate``), change its Z-index, blend mode, and more. +/// +/// Note that properties like transform, modulation, and visibility are only propagated to _direct_ ``CanvasItem`` child nodes. If there is a non-``CanvasItem`` node in between, like ``Node`` or ``AnimationPlayer``, the ``CanvasItem`` nodes below will have an independent position and ``modulate`` chain. See also ``topLevel``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``draw`` +/// - ``visibilityChanged`` +/// - ``hidden`` +/// - ``itemRectChanged`` +open class CanvasItem: Node { + override open class var godotClassName: StringName { "CanvasItem" } + public enum TextureFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``CanvasItem`` will inherit the filter from its parent. + case parentNode = 0 // TEXTURE_FILTER_PARENT_NODE + /// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). + case nearest = 1 // TEXTURE_FILTER_NEAREST + /// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). + case linear = 2 // TEXTURE_FILTER_LINEAR + /// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look pixelated from up close, and smooth from a distance. + /// + /// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to ``Camera2D`` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + /// + case nearestWithMipmaps = 3 // TEXTURE_FILTER_NEAREST_WITH_MIPMAPS + /// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look smooth from up close, and smooth from a distance. + /// + /// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to ``Camera2D`` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + /// + case linearWithMipmaps = 4 // TEXTURE_FILTER_LINEAR_WITH_MIPMAPS + /// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + /// + /// > Note: This texture filter is rarely useful in 2D projects. ``TextureFilter/nearestWithMipmaps`` is usually more appropriate in this case. + /// + case nearestWithMipmapsAnisotropic = 5 // TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC + /// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + /// + /// > Note: This texture filter is rarely useful in 2D projects. ``TextureFilter/linearWithMipmaps`` is usually more appropriate in this case. + /// + case linearWithMipmapsAnisotropic = 6 // TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC + /// Represents the size of the ``CanvasItem/TextureFilter`` enum. + case max = 7 // TEXTURE_FILTER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .parentNode: return ".parentNode" + case .nearest: return ".nearest" + case .linear: return ".linear" + case .nearestWithMipmaps: return ".nearestWithMipmaps" + case .linearWithMipmaps: return ".linearWithMipmaps" + case .nearestWithMipmapsAnisotropic: return ".nearestWithMipmapsAnisotropic" + case .linearWithMipmapsAnisotropic: return ".linearWithMipmapsAnisotropic" + case .max: return ".max" + } + + } + + } + + public enum TextureRepeat: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``CanvasItem`` will inherit the filter from its parent. + case parentNode = 0 // TEXTURE_REPEAT_PARENT_NODE + /// Texture will not repeat. + case disabled = 1 // TEXTURE_REPEAT_DISABLED + /// Texture will repeat normally. + case enabled = 2 // TEXTURE_REPEAT_ENABLED + /// Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored. + case mirror = 3 // TEXTURE_REPEAT_MIRROR + /// Represents the size of the ``CanvasItem/TextureRepeat`` enum. + case max = 4 // TEXTURE_REPEAT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .parentNode: return ".parentNode" + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .mirror: return ".mirror" + case .max: return ".max" + } + + } + + } + + public enum ClipChildrenMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Child draws over parent and is not clipped. + case disabled = 0 // CLIP_CHILDREN_DISABLED + /// Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. + case only = 1 // CLIP_CHILDREN_ONLY + /// Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. + case andDraw = 2 // CLIP_CHILDREN_AND_DRAW + /// Represents the size of the ``CanvasItem/ClipChildrenMode`` enum. + case max = 3 // CLIP_CHILDREN_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .only: return ".only" + case .andDraw: return ".andDraw" + case .max: return ".max" + } + + } + + } + + /* Constants */ + /// The ``CanvasItem``'s global transform has changed. This notification is only received if enabled by ``setNotifyTransform(enable:)``. + public static let notificationTransformChanged = 2000 + /// The ``CanvasItem``'s local transform has changed. This notification is only received if enabled by ``setNotifyLocalTransform(enable:)``. + public static let notificationLocalTransformChanged = 35 + /// The ``CanvasItem`` is requested to draw (see ``_draw()``). + public static let notificationDraw = 30 + /// The ``CanvasItem``'s visibility has changed. + public static let notificationVisibilityChanged = 31 + /// The ``CanvasItem`` has entered the canvas. + public static let notificationEnterCanvas = 32 + /// The ``CanvasItem`` has exited the canvas. + public static let notificationExitCanvas = 33 + /// The ``CanvasItem``'s active ``World2D`` changed. + public static let notificationWorld2dChanged = 36 + + /* Properties */ + + /// If `true`, this ``CanvasItem`` is drawn. The node is only visible if all of its ancestors are visible as well (in other words, ``isVisibleInTree()`` must return `true`). + /// + /// > Note: For controls that inherit ``Popup``, the correct way to make them visible is to call one of the multiple `popup*()` functions instead. + /// + final public var visible: Bool { + get { + return is_visible () + } + + set { + set_visible (newValue) + } + + } + + /// The color applied to this ``CanvasItem``. This property does affect child ``CanvasItem``s, unlike ``selfModulate`` which only affects the node itself. + final public var modulate: Color { + get { + return get_modulate () + } + + set { + set_modulate (newValue) + } + + } + + /// The color applied to this ``CanvasItem``. This property does **not** affect child ``CanvasItem``s, unlike ``modulate`` which affects both the node itself and its children. + /// + /// > Note: Internal children (e.g. sliders in ``ColorPicker`` or tab bar in ``TabContainer``) are also not affected by this property (see `include_internal` parameter of ``Node/getChild(idx:includeInternal:)`` and other similar methods). + /// + final public var selfModulate: Color { + get { + return get_self_modulate () + } + + set { + set_self_modulate (newValue) + } + + } + + /// If `true`, the object draws behind its parent. + final public var showBehindParent: Bool { + get { + return is_draw_behind_parent_enabled () + } + + set { + set_draw_behind_parent (newValue) + } + + } + + /// If `true`, this ``CanvasItem`` will _not_ inherit its transform from parent ``CanvasItem``s. Its draw order will also be changed to make it draw on top of other ``CanvasItem``s that do not have ``topLevel`` set to `true`. The ``CanvasItem`` will effectively act as if it was placed as a child of a bare ``Node``. + final public var topLevel: Bool { + get { + return is_set_as_top_level () + } + + set { + set_as_top_level (newValue) + } + + } + + /// Allows the current node to clip child nodes, essentially acting as a mask. + final public var clipChildren: CanvasItem.ClipChildrenMode { + get { + return get_clip_children_mode () + } + + set { + set_clip_children_mode (newValue) + } + + } + + /// The rendering layers in which this ``CanvasItem`` responds to ``Light2D`` nodes. + final public var lightMask: Int32 { + get { + return get_light_mask () + } + + set { + set_light_mask (newValue) + } + + } + + /// The rendering layer in which this ``CanvasItem`` is rendered by ``Viewport`` nodes. A ``Viewport`` will render a ``CanvasItem`` if it and all its parents share a layer with the ``Viewport``'s canvas cull mask. + final public var visibilityLayer: UInt32 { + get { + return get_visibility_layer () + } + + set { + set_visibility_layer (newValue) + } + + } + + /// Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between ``RenderingServer/canvasItemZMin`` and ``RenderingServer/canvasItemZMax`` (inclusive). + /// + /// > Note: Changing the Z index of a ``Control`` only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others. + /// + final public var zIndex: Int32 { + get { + return get_z_index () + } + + set { + set_z_index (newValue) + } + + } + + /// If `true`, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. + final public var zAsRelative: Bool { + get { + return is_z_relative () + } + + set { + set_z_as_relative (newValue) + } + + } + + /// If `true`, this and child ``CanvasItem`` nodes with a lower Y position are rendered in front of nodes with a higher Y position. If `false`, this and child ``CanvasItem`` nodes are rendered normally in scene tree order. + /// + /// With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node 'B'. This allows you to organize the render order of a scene without changing the scene tree. + /// + /// Nodes sort relative to each other only if they are on the same ``zIndex``. + /// + final public var ySortEnabled: Bool { + get { + return is_y_sort_enabled () + } + + set { + set_y_sort_enabled (newValue) + } + + } + + /// The texture filtering mode to use on this ``CanvasItem``. + final public var textureFilter: CanvasItem.TextureFilter { + get { + return get_texture_filter () + } + + set { + set_texture_filter (newValue) + } + + } + + /// The texture repeating mode to use on this ``CanvasItem``. + final public var textureRepeat: CanvasItem.TextureRepeat { + get { + return get_texture_repeat () + } + + set { + set_texture_repeat (newValue) + } + + } + + /// The material applied to this ``CanvasItem``. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /// If `true`, the parent ``CanvasItem``'s ``material`` property is used as this one's material. + final public var useParentMaterial: Bool { + get { + return get_use_parent_material () + } + + set { + set_use_parent_material (newValue) + } + + } + + /* Methods */ + /// Called when ``CanvasItem`` has been requested to redraw (after ``queueRedraw()`` is called, either manually or by the engine). + /// + /// Corresponds to the ``notificationDraw`` notification in ``Wrapper._notification(code:reverse)``. + /// + @_documentation(visibility: public) + open func _draw() { + } + + fileprivate static var method_get_canvas_item: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas_item") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the canvas item RID used by ``RenderingServer`` for this item. + public final func getCanvasItem() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CanvasItem.method_get_canvas_item, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_visible_in_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible_in_tree") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is present in the ``SceneTree``, its ``visible`` property is `true` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see ``_draw()``). + public final func isVisibleInTree() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_visible_in_tree, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_show: GDExtensionMethodBindPtr = { + let methodName = StringName("show") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Show the ``CanvasItem`` if it's currently hidden. This is equivalent to setting ``visible`` to `true`. For controls that inherit ``Popup``, the correct way to make them visible is to call one of the multiple `popup*()` functions instead. + public final func show() { + gi.object_method_bind_ptrcall(CanvasItem.method_show, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_hide: GDExtensionMethodBindPtr = { + let methodName = StringName("hide") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Hide the ``CanvasItem`` if it's currently visible. This is equivalent to setting ``visible`` to `false`. + public final func hide() { + gi.object_method_bind_ptrcall(CanvasItem.method_hide, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_queue_redraw: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_redraw") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Queues the ``CanvasItem`` to redraw. During idle time, if ``CanvasItem`` is visible, ``notificationDraw`` is sent and ``_draw()`` is called. This only occurs **once** per frame, even if this method has been called multiple times. + public final func queueRedraw() { + gi.object_method_bind_ptrcall(CanvasItem.method_queue_redraw, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_move_to_front: GDExtensionMethodBindPtr = { + let methodName = StringName("move_to_front") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Moves this node to display on top of its siblings. + /// + /// Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent. + /// + public final func moveToFront() { + gi.object_method_bind_ptrcall(CanvasItem.method_move_to_front, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_as_top_level: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_top_level") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_top_level(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_as_top_level, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_set_as_top_level: GDExtensionMethodBindPtr = { + let methodName = StringName("is_set_as_top_level") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_set_as_top_level() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_set_as_top_level, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light_mask") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light_mask(_ lightMask: Int32) { + withUnsafePointer(to: lightMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_light_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light_mask") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light_mask() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CanvasItem.method_get_light_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_modulate") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_modulate(_ modulate: Color) { + withUnsafePointer(to: modulate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_modulate") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CanvasItem.method_get_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_self_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_self_modulate") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_self_modulate(_ selfModulate: Color) { + withUnsafePointer(to: selfModulate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_self_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_self_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_self_modulate") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_self_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CanvasItem.method_get_self_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_z_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_z_index") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_z_index(_ zIndex: Int32) { + withUnsafePointer(to: zIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_z_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_z_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_z_index") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_z_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CanvasItem.method_get_z_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_z_as_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_z_as_relative") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_z_as_relative(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_z_as_relative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_z_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("is_z_relative") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_z_relative() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_z_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_y_sort_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_y_sort_enabled") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_y_sort_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_y_sort_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_y_sort_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_y_sort_enabled") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_y_sort_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_y_sort_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_behind_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_behind_parent") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_behind_parent(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_draw_behind_parent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_draw_behind_parent_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_draw_behind_parent_enabled") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_draw_behind_parent_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_draw_behind_parent_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_draw_line: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_line") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1562330099)! + } + + } + + }() + + /// Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also ``drawMultiline(points:color:width:antialiased:)`` and ``drawPolyline(points:color:width:antialiased:)``. + /// + /// If `width` is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + public final func drawLine(from: Vector2, to: Vector2, color: Color, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: antialiased) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_dashed_line: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_dashed_line") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3653831622)! + } + + } + + }() + + /// Draws a dashed line from a 2D point to another, with a given color and width. See also ``drawMultiline(points:color:width:antialiased:)`` and ``drawPolyline(points:color:width:antialiased:)``. + /// + /// If `width` is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// If `antialiased` is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + /// + /// > Note: `antialiased` is only effective if `width` is greater than `0.0`. + /// + public final func drawDashedLine(from: Vector2, to: Vector2, color: Color, width: Double = -1.0, dash: Double = 2.0, aligned: Bool = true, antialiased: Bool = false) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: dash) { pArg4 in + withUnsafePointer(to: aligned) { pArg5 in + withUnsafePointer(to: antialiased) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_dashed_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_polyline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_polyline") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3797364428)! + } + + } + + }() + + /// Draws interconnected line segments with a uniform `color` and `width` and optional antialiasing (supported only for positive `width`). When drawing large amounts of lines, this is faster than using individual ``drawLine(from:to:color:width:antialiased:)`` calls. To draw disconnected lines, use ``drawMultiline(points:color:width:antialiased:)`` instead. See also ``drawPolygon(points:colors:uvs:texture:)``. + /// + /// If `width` is negative, it will be ignored and the polyline will be drawn using ``RenderingServer/PrimitiveType/lineStrip``. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + public final func drawPolyline(points: PackedVector2Array, color: Color, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: antialiased) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_polyline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_polyline_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_polyline_colors") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311979562)! + } + + } + + }() + + /// Draws interconnected line segments with a uniform `width`, point-by-point coloring, and optional antialiasing (supported only for positive `width`). Colors assigned to line points match by index between `points` and `colors`, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual ``drawLine(from:to:color:width:antialiased:)`` calls. To draw disconnected lines, use ``drawMultilineColors(points:colors:width:antialiased:)`` instead. See also ``drawPolygon(points:colors:uvs:texture:)``. + /// + /// If `width` is negative, it will be ignored and the polyline will be drawn using ``RenderingServer/PrimitiveType/lineStrip``. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + public final func drawPolylineColors(points: PackedVector2Array, colors: PackedColorArray, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: colors.content) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: antialiased) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_polyline_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_arc: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_arc") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4140652635)! + } + + } + + }() + + /// Draws an unfilled arc between the given angles with a uniform `color` and `width` and optional antialiasing (supported only for positive `width`). The larger the value of `pointCount`, the smoother the curve. See also ``drawCircle(position:radius:color:filled:width:antialiased:)``. + /// + /// If `width` is negative, it will be ignored and the arc will be drawn using ``RenderingServer/PrimitiveType/lineStrip``. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// The arc is drawn from `startAngle` towards the value of `endAngle` so in clockwise direction if `start_angle < end_angle` and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of `startAngle` and `endAngle` is greater than ``@GDScript.TAU`` radians, then a full circle arc is drawn (i.e. arc will not overlap itself). + /// + public final func drawArc(center: Vector2, radius: Double, startAngle: Double, endAngle: Double, pointCount: Int32, color: Color, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: center) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: startAngle) { pArg2 in + withUnsafePointer(to: endAngle) { pArg3 in + withUnsafePointer(to: pointCount) { pArg4 in + withUnsafePointer(to: color) { pArg5 in + withUnsafePointer(to: width) { pArg6 in + withUnsafePointer(to: antialiased) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_arc, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3797364428)! + } + + } + + }() + + /// Draws multiple disconnected lines with a uniform `width` and `color`. Each line is defined by two consecutive points from `points` array, i.e. i-th segment consists of `points[2 * i]`, `points[2 * i + 1]` endpoints. When drawing large amounts of lines, this is faster than using individual ``drawLine(from:to:color:width:antialiased:)`` calls. To draw interconnected lines, use ``drawPolyline(points:color:width:antialiased:)`` instead. + /// + /// If `width` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// > Note: `antialiased` is only effective if `width` is greater than `0.0`. + /// + public final func drawMultiline(points: PackedVector2Array, color: Color, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: antialiased) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_multiline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline_colors") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311979562)! + } + + } + + }() + + /// Draws multiple disconnected lines with a uniform `width` and segment-by-segment coloring. Each segment is defined by two consecutive points from `points` array and a corresponding color from `colors` array, i.e. i-th segment consists of `points[2 * i]`, `points[2 * i + 1]` endpoints and has `colors_` color. When drawing large amounts of lines, this is faster than using individual ``drawLine(from:to:color:width:antialiased:)`` calls. To draw interconnected lines, use ``drawPolylineColors(points:colors:width:antialiased:)`` instead. + /// + /// If `width` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// > Note: `antialiased` is only effective if `width` is greater than `0.0`. + /// + public final func drawMultilineColors(points: PackedVector2Array, colors: PackedColorArray, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: colors.content) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: antialiased) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_multiline_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_rect") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2773573813)! + } + + } + + }() + + /// Draws a rectangle. If `filled` is `true`, the rectangle will be filled with the `color` specified. If `filled` is `false`, the rectangle will be drawn as a stroke with the `color` and `width` specified. See also ``drawTextureRect(texture:rect:tile:modulate:transpose:)``. + /// + /// If `width` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// If `antialiased` is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + /// + /// > Note: `width` is only effective if `filled` is `false`. + /// + /// > Note: Unfilled rectangles drawn with a negative `width` may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent `color`). + /// + public final func drawRect(_ rect: Rect2, color: Color, filled: Bool = true, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: filled) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: antialiased) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_circle: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_circle") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3153026596)! + } + + } + + }() + + /// Draws a circle. See also ``drawArc(center:radius:startAngle:endAngle:pointCount:color:width:antialiased:)``, ``drawPolyline(points:color:width:antialiased:)``, and ``drawPolygon(points:colors:uvs:texture:)``. + /// + /// If `filled` is `true`, the circle will be filled with the `color` specified. If `filled` is `false`, the circle will be drawn as a stroke with the `color` and `width` specified. + /// + /// If `width` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive `width` like `1.0`. + /// + /// If `antialiased` is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + /// + /// > Note: `width` is only effective if `filled` is `false`. + /// + public final func drawCircle(position: Vector2, radius: Double, color: Color, filled: Bool = true, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: filled) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: antialiased) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_circle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_texture") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 520200117)! + } + + } + + }() + + /// Draws a texture at a given position. + public final func drawTexture(_ texture: Texture2D?, position: Vector2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: modulate) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_texture_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_texture_rect") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3832805018)! + } + + } + + }() + + /// Draws a textured rectangle at a given position, optionally modulated by a color. If `transpose` is `true`, the texture will have its X and Y coordinates swapped. See also ``drawRect(_:color:filled:width:antialiased:)`` and ``drawTextureRectRegion(texture:rect:srcRect:modulate:transpose:clipUv:)``. + public final func drawTextureRect(texture: Texture2D?, rect: Rect2, tile: Bool, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), transpose: Bool = false) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: tile) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: transpose) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_texture_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_texture_rect_region") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3883821411)! + } + + } + + }() + + /// Draws a textured rectangle from a texture's region (specified by `srcRect`) at a given position, optionally modulated by a color. If `transpose` is `true`, the texture will have its X and Y coordinates swapped. See also ``drawTextureRect(texture:rect:tile:modulate:transpose:)``. + public final func drawTextureRectRegion(texture: Texture2D?, rect: Rect2, srcRect: Rect2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), transpose: Bool = false, clipUv: Bool = true) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: srcRect) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: transpose) { pArg4 in + withUnsafePointer(to: clipUv) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_texture_rect_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_msdf_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_msdf_texture_rect_region") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4219163252)! + } + + } + + }() + + /// Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See ``FontFile/multichannelSignedDistanceField`` for more information and caveats about MSDF font rendering. + /// + /// If `outline` is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the `outline` radius. + /// + /// Value of the `pixelRange` should the same that was used during distance field texture generation. + /// + public final func drawMsdfTextureRectRegion(texture: Texture2D?, rect: Rect2, srcRect: Rect2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), outline: Double = 0.0, pixelRange: Double = 4.0, scale: Double = 1.0) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: srcRect) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: outline) { pArg4 in + withUnsafePointer(to: pixelRange) { pArg5 in + withUnsafePointer(to: scale) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_msdf_texture_rect_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_lcd_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_lcd_texture_rect_region") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3212350954)! + } + + } + + }() + + /// Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. + /// + /// Texture is drawn using the following blend operation, blend mode of the ``CanvasItemMaterial`` is ignored: + /// + public final func drawLcdTextureRectRegion(texture: Texture2D?, rect: Rect2, srcRect: Rect2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: srcRect) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_lcd_texture_rect_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_style_box: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_style_box") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 388176283)! + } + + } + + }() + + /// Draws a styled rectangle. + public final func drawStyleBox(_ styleBox: StyleBox?, rect: Rect2) { + withUnsafePointer(to: styleBox?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_style_box, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_primitive: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_primitive") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3288481815)! + } + + } + + }() + + /// Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also ``drawLine(from:to:color:width:antialiased:)``, ``drawPolyline(points:color:width:antialiased:)``, ``drawPolygon(points:colors:uvs:texture:)``, and ``drawRect(_:color:filled:width:antialiased:)``. + public final func drawPrimitive(points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array, texture: Texture2D? = nil) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: colors.content) { pArg1 in + withUnsafePointer(to: uvs.content) { pArg2 in + withUnsafePointer(to: texture?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_primitive, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_polygon") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974537912)! + } + + } + + }() + + /// Draws a solid polygon of any number of points, convex or concave. Unlike ``drawColoredPolygon(points:color:uvs:texture:)``, each point's color can be changed individually. See also ``drawPolyline(points:color:width:antialiased:)`` and ``drawPolylineColors(points:colors:width:antialiased:)``. If you need more flexibility (such as being able to use bones), use ``RenderingServer/canvasItemAddTriangleArray(item:indices:points:colors:uvs:bones:weights:texture:count:)`` instead. + public final func drawPolygon(points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array = PackedVector2Array(), texture: Texture2D? = nil) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: colors.content) { pArg1 in + withUnsafePointer(to: uvs.content) { pArg2 in + withUnsafePointer(to: texture?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_colored_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_colored_polygon") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 15245644)! + } + + } + + }() + + /// Draws a colored polygon of any number of points, convex or concave. Unlike ``drawPolygon(points:colors:uvs:texture:)``, a single color must be specified for the whole polygon. + public final func drawColoredPolygon(points: PackedVector2Array, color: Color, uvs: PackedVector2Array = PackedVector2Array(), texture: Texture2D? = nil) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: uvs.content) { pArg2 in + withUnsafePointer(to: texture?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_colored_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_string: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_string") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 728290553)! + } + + } + + }() + + /// Draws `text` using the specified `font` at the `pos` (bottom-left corner using the baseline of the font). The text will have its color multiplied by `modulate`. If `width` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + /// + /// **Example using the default project font:** + /// + /// See also ``Font/drawString(canvasItem:pos:text:alignment:width:fontSize:modulate:justificationFlags:direction:orientation:)``. + /// + public final func drawString(font: Font?, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: modulate) { pArg6 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg7 in + withUnsafePointer(to: direction.rawValue) { pArg8 in + withUnsafePointer(to: orientation.rawValue) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline_string: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline_string") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1927038192)! + } + + } + + }() + + /// Breaks `text` into lines and draws it using the specified `font` at the `pos` (top-left corner). The text will have its color multiplied by `modulate`. If `width` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + public final func drawMultilineString(font: Font?, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, maxLines: Int32 = -1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), brkFlags: TextServer.LineBreakFlag = [.mandatory, .wordBound], justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: maxLines) { pArg6 in + withUnsafePointer(to: modulate) { pArg7 in + withUnsafePointer(to: brkFlags.rawValue) { pArg8 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg9 in + withUnsafePointer(to: direction.rawValue) { pArg10 in + withUnsafePointer(to: orientation.rawValue) { pArg11 in + withUnsafePointer(to: UnsafeRawPointersN12(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 12) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_multiline_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_string_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_string_outline") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 340562381)! + } + + } + + }() + + /// Draws `text` outline using the specified `font` at the `pos` (bottom-left corner using the baseline of the font). The text will have its color multiplied by `modulate`. If `width` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + public final func drawStringOutline(font: Font?, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, size: Int32 = 1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: size) { pArg6 in + withUnsafePointer(to: modulate) { pArg7 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg8 in + withUnsafePointer(to: direction.rawValue) { pArg9 in + withUnsafePointer(to: orientation.rawValue) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_string_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline_string_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline_string_outline") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1912318525)! + } + + } + + }() + + /// Breaks `text` to the lines and draws text outline using the specified `font` at the `pos` (top-left corner). The text will have its color multiplied by `modulate`. If `width` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + public final func drawMultilineStringOutline(font: Font?, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, maxLines: Int32 = -1, size: Int32 = 1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), brkFlags: TextServer.LineBreakFlag = [.mandatory, .wordBound], justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: maxLines) { pArg6 in + withUnsafePointer(to: size) { pArg7 in + withUnsafePointer(to: modulate) { pArg8 in + withUnsafePointer(to: brkFlags.rawValue) { pArg9 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg10 in + withUnsafePointer(to: direction.rawValue) { pArg11 in + withUnsafePointer(to: orientation.rawValue) { pArg12 in + withUnsafePointer(to: UnsafeRawPointersN13(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11, pArg12)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 13) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_multiline_string_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_char: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_char") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3339793283)! + } + + } + + }() + + /// Draws a string first character using a custom font. + public final func drawChar(font: Font?, pos: Vector2, char: String, fontSize: Int32 = 16, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let char = GString(char) + withUnsafePointer(to: char.content) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_char, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_char_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_char_outline") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3302344391)! + } + + } + + }() + + /// Draws a string first character outline using a custom font. + public final func drawCharOutline(font: Font?, pos: Vector2, char: String, fontSize: Int32 = 16, size: Int32 = -1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let char = GString(char) + withUnsafePointer(to: char.content) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: size) { pArg4 in + withUnsafePointer(to: modulate) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_char_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_mesh") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 153818295)! + } + + } + + }() + + /// Draws a ``Mesh`` in 2D, using the provided texture. See ``MeshInstance2D`` for related documentation. + public final func drawMesh(_ mesh: Mesh?, texture: Texture2D?, transform: Transform2D = Transform2D (xAxis: Vector2 (x: 1, y: 0), yAxis: Vector2 (x: 0, y: 1), origin: Vector2 (x: 0, y: 0)), modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multimesh") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 937992368)! + } + + } + + }() + + /// Draws a ``MultiMesh`` in 2D with the provided texture. See ``MultiMeshInstance2D`` for related documentation. + public final func drawMultimesh(_ multimesh: MultiMesh?, texture: Texture2D?) { + withUnsafePointer(to: multimesh?.handle) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_multimesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_set_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 288975085)! + } + + } + + }() + + /// Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. + /// + /// > Note: ``FontFile/oversampling`` does _not_ take `scale` into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling ``ProjectSettings/gui/theme/defaultFontMultichannelSignedDistanceField`` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, ``SystemFont/multichannelSignedDistanceField`` can be enabled in the inspector. + /// + public final func drawSetTransform(position: Vector2, rotation: Double = 0.0, scale: Vector2 = Vector2 (x: 1, y: 1)) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: rotation) { pArg1 in + withUnsafePointer(to: scale) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_set_transform_matrix: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_set_transform_matrix") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + /// Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. + public final func drawSetTransformMatrix(xform: Transform2D) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_set_transform_matrix, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_draw_animation_slice: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_animation_slice") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3112831842)! + } + + } + + }() + + /// Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. + public final func drawAnimationSlice(animationLength: Double, sliceBegin: Double, sliceEnd: Double, offset: Double = 0.0) { + withUnsafePointer(to: animationLength) { pArg0 in + withUnsafePointer(to: sliceBegin) { pArg1 in + withUnsafePointer(to: sliceEnd) { pArg2 in + withUnsafePointer(to: offset) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_draw_animation_slice, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_end_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_end_animation") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// After submitting all animations slices via ``drawAnimationSlice(animationLength:sliceBegin:sliceEnd:offset:)``, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. + public final func drawEndAnimation() { + gi.object_method_bind_ptrcall(CanvasItem.method_draw_end_animation, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform matrix of this item. + public final func getTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the global transform matrix of this item, i.e. the combined transform up to the topmost ``CanvasItem`` node. The topmost item is a ``CanvasItem`` that either has no parent, has non-``CanvasItem`` parent or it has ``topLevel`` enabled. + public final func getGlobalTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_global_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_transform_with_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_transform_with_canvas") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform from the local coordinate system of this ``CanvasItem`` to the ``Viewport``s coordinate system. + public final func getGlobalTransformWithCanvas() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_global_transform_with_canvas, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_viewport_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_viewport_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform from the coordinate system of the canvas, this item is in, to the ``Viewport``s embedders coordinate system. + public final func getViewportTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_viewport_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_viewport_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_viewport_rect") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + /// Returns the viewport's boundaries as a ``Rect2``. + public final func getViewportRect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(CanvasItem.method_get_viewport_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_canvas_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform from the coordinate system of the canvas, this item is in, to the ``Viewport``s coordinate system. + public final func getCanvasTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_canvas_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_screen_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform of this ``CanvasItem`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + /// + /// Equals to ``getGlobalTransform()`` if the window is embedded (see ``Viewport/guiEmbedSubwindows``). + /// + public final func getScreenTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasItem.method_get_screen_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_local_mouse_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_mouse_position") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the mouse's position in this ``CanvasItem`` using the local coordinate system of this ``CanvasItem``. + public final func getLocalMousePosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CanvasItem.method_get_local_mouse_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_mouse_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_mouse_position") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the mouse's position in the ``CanvasLayer`` that this ``CanvasItem`` is in using the coordinate system of the ``CanvasLayer``. + /// + /// > Note: For screen-space coordinates (e.g. when using a non-embedded ``Popup``), you can use ``DisplayServer/mouseGetPosition()``. + /// + public final func getGlobalMousePosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CanvasItem.method_get_global_mouse_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the ``World2D`` canvas where this item is in. + public final func getCanvas() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CanvasItem.method_get_canvas, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_canvas_layer_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas_layer_node") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2602762519)! + } + + } + + }() + + /// Returns the ``CanvasLayer`` that contains this node, or `null` if the node is not in any ``CanvasLayer``. + public final func getCanvasLayerNode() -> CanvasLayer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasItem.method_get_canvas_layer_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_world_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_world_2d") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339128592)! + } + + } + + }() + + /// Returns the ``World2D`` where this item is in. + public final func getWorld2d() -> World2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasItem.method_get_world_2d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasItem.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_use_parent_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_parent_material") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_parent_material(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_use_parent_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_parent_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_parent_material") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_parent_material() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_get_use_parent_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_notify_local_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_notify_local_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `enable` is `true`, this node will receive ``notificationLocalTransformChanged`` when its local transform changes. + public final func setNotifyLocalTransform(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_notify_local_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_local_transform_notification_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_local_transform_notification_enabled") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if local transform notifications are communicated to children. + public final func isLocalTransformNotificationEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_local_transform_notification_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_notify_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_notify_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `enable` is `true`, this node will receive ``notificationTransformChanged`` when its global transform changes. + public final func setNotifyTransform(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_notify_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_transform_notification_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_transform_notification_enabled") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if global transform notifications are communicated to children. + public final func isTransformNotificationEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItem.method_is_transform_notification_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_force_update_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_transform") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. + public final func forceUpdateTransform() { + gi.object_method_bind_ptrcall(CanvasItem.method_force_update_transform, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_make_canvas_position_local: GDExtensionMethodBindPtr = { + let methodName = StringName("make_canvas_position_local") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Assigns `screenPoint` as this node's new local transform. + public final func makeCanvasPositionLocal(screenPoint: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: screenPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_make_canvas_position_local, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_make_input_local: GDExtensionMethodBindPtr = { + let methodName = StringName("make_input_local") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 811130057)! + } + + } + + }() + + /// Transformations issued by `event`'s inputs are applied in local space instead of global space. + public final func makeInputLocal(event: InputEvent?) -> InputEvent? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: event?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_make_input_local, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_visibility_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_layer") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_layer(_ layer: UInt32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_visibility_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_layer") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_layer() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CanvasItem.method_get_visibility_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_layer_bit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_layer_bit") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Set/clear individual bits on the rendering visibility layer. This simplifies editing this ``CanvasItem``'s visibility layer. + public final func setVisibilityLayerBit(layer: UInt32, enabled: Bool) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_visibility_layer_bit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_visibility_layer_bit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_layer_bit") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns an individual bit on the rendering visibility layer. + public final func getVisibilityLayerBit(layer: UInt32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_get_visibility_layer_bit, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_filter") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1037999706)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_filter(_ mode: CanvasItem.TextureFilter) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_texture_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_filter") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121960042)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_filter() -> CanvasItem.TextureFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasItem.method_get_texture_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItem.TextureFilter (rawValue: _result)! + } + + fileprivate static var method_set_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_repeat") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1716472974)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_repeat(_ mode: CanvasItem.TextureRepeat) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_texture_repeat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_repeat") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2667158319)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_repeat() -> CanvasItem.TextureRepeat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasItem.method_get_texture_repeat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItem.TextureRepeat (rawValue: _result)! + } + + fileprivate static var method_set_clip_children_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_children_mode") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1319393776)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clip_children_mode(_ mode: CanvasItem.ClipChildrenMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItem.method_set_clip_children_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_clip_children_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_clip_children_mode") + return withUnsafePointer(to: &CanvasItem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3581808349)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_clip_children_mode() -> CanvasItem.ClipChildrenMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasItem.method_get_clip_children_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItem.ClipChildrenMode (rawValue: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_draw": + return _CanvasItem_proxy_draw + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when the ``CanvasItem`` must redraw, _after_ the related ``notificationDraw`` notification, and _before_ ``_draw()`` is called. + /// + /// > Note: Deferred connections do not allow drawing through the `draw_*` methods. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.draw.connect { + /// print ("caught signal") + /// } + /// ``` + public var draw: SimpleSignal { SimpleSignal (target: self, signalName: "draw") } + + /// Emitted when the visibility (hidden/visible) changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.visibilityChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var visibilityChanged: SimpleSignal { SimpleSignal (target: self, signalName: "visibility_changed") } + + /// Emitted when becoming hidden. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.hidden.connect { + /// print ("caught signal") + /// } + /// ``` + public var hidden: SimpleSignal { SimpleSignal (target: self, signalName: "hidden") } + + /// Emitted when the item's ``Rect2`` boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing ``Sprite2D/texture``). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemRectChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var itemRectChanged: SimpleSignal { SimpleSignal (target: self, signalName: "item_rect_changed") } + +} + +// Support methods for proxies +func _CanvasItem_proxy_draw (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._draw () +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasItemMaterial.swift b/Sources/SwiftGodot/Generated/Api/CanvasItemMaterial.swift new file mode 100644 index 000000000..0a36b7b44 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasItemMaterial.swift @@ -0,0 +1,423 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A material for ``CanvasItem``s. +/// +/// ``CanvasItemMaterial``s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a ``ShaderMaterial`` to more fully customize a material's interactions with a ``CanvasItem``. +open class CanvasItemMaterial: Material { + override open class var godotClassName: StringName { "CanvasItemMaterial" } + public enum BlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. + case mix = 0 // BLEND_MODE_MIX + /// Additive blending mode. + case add = 1 // BLEND_MODE_ADD + /// Subtractive blending mode. + case sub = 2 // BLEND_MODE_SUB + /// Multiplicative blending mode. + case mul = 3 // BLEND_MODE_MUL + /// Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. + case premultAlpha = 4 // BLEND_MODE_PREMULT_ALPHA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .mix: return ".mix" + case .add: return ".add" + case .sub: return ".sub" + case .mul: return ".mul" + case .premultAlpha: return ".premultAlpha" + } + + } + + } + + public enum LightMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Render the material using both light and non-light sensitive material properties. + case normal = 0 // LIGHT_MODE_NORMAL + /// Render the material as if there were no light. + case unshaded = 1 // LIGHT_MODE_UNSHADED + /// Render the material as if there were only light. + case lightOnly = 2 // LIGHT_MODE_LIGHT_ONLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .normal: return ".normal" + case .unshaded: return ".unshaded" + case .lightOnly: return ".lightOnly" + } + + } + + } + + + /* Properties */ + + /// The manner in which a material's rendering is applied to underlying textures. + final public var blendMode: CanvasItemMaterial.BlendMode { + get { + return get_blend_mode () + } + + set { + set_blend_mode (newValue) + } + + } + + /// The manner in which material reacts to lighting. + final public var lightMode: CanvasItemMaterial.LightMode { + get { + return get_light_mode () + } + + set { + set_light_mode (newValue) + } + + } + + /// If `true`, enable spritesheet-based animation features when assigned to ``GPUParticles2D`` and ``CPUParticles2D`` nodes. The ``ParticleProcessMaterial/animSpeedMax`` or ``CPUParticles2D/animSpeedMax`` should also be set to a positive value for the animation to play. + /// + /// This property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes. + /// + final public var particlesAnimation: Bool { + get { + return get_particles_animation () + } + + set { + set_particles_animation (newValue) + } + + } + + /// The number of columns in the spritesheet assigned as ``Texture2D`` for a ``GPUParticles2D`` or ``CPUParticles2D``. + /// + /// > Note: This property is only used and visible in the editor if ``particlesAnimation`` is `true`. + /// + final public var particlesAnimHFrames: Int32 { + get { + return get_particles_anim_h_frames () + } + + set { + set_particles_anim_h_frames (newValue) + } + + } + + /// The number of rows in the spritesheet assigned as ``Texture2D`` for a ``GPUParticles2D`` or ``CPUParticles2D``. + /// + /// > Note: This property is only used and visible in the editor if ``particlesAnimation`` is `true`. + /// + final public var particlesAnimVFrames: Int32 { + get { + return get_particles_anim_v_frames () + } + + set { + set_particles_anim_v_frames (newValue) + } + + } + + /// If `true`, the particles animation will loop. + /// + /// > Note: This property is only used and visible in the editor if ``particlesAnimation`` is `true`. + /// + final public var particlesAnimLoop: Bool { + get { + return get_particles_anim_loop () + } + + set { + set_particles_anim_loop (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_mode") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1786054936)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_mode(_ blendMode: CanvasItemMaterial.BlendMode) { + withUnsafePointer(to: blendMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_mode") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3318684035)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_mode() -> CanvasItemMaterial.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItemMaterial.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_light_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light_mode") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 628074070)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light_mode(_ lightMode: CanvasItemMaterial.LightMode) { + withUnsafePointer(to: lightMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_light_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light_mode") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3863292382)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light_mode() -> CanvasItemMaterial.LightMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_light_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItemMaterial.LightMode (rawValue: _result)! + } + + fileprivate static var method_set_particles_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_animation") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_animation(_ particlesAnim: Bool) { + withUnsafePointer(to: particlesAnim) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_particles_animation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_animation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_animation") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_animation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_particles_animation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_particles_anim_h_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_h_frames") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_h_frames(_ frames: Int32) { + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_particles_anim_h_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_h_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_h_frames") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_h_frames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_particles_anim_h_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_particles_anim_v_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_v_frames") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_v_frames(_ frames: Int32) { + withUnsafePointer(to: frames) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_particles_anim_v_frames, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_v_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_v_frames") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_v_frames() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_particles_anim_v_frames, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_particles_anim_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particles_anim_loop") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_particles_anim_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_set_particles_anim_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_particles_anim_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particles_anim_loop") + return withUnsafePointer(to: &CanvasItemMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_particles_anim_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasItemMaterial.method_get_particles_anim_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasLayer.swift b/Sources/SwiftGodot/Generated/Api/CanvasLayer.swift new file mode 100644 index 000000000..5e5ccceba --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasLayer.swift @@ -0,0 +1,643 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used for independent rendering of objects within a 2D scene. +/// +/// ``CanvasItem``-derived nodes that are direct or indirect children of a ``CanvasLayer`` will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index `0`, so a ``CanvasLayer`` with index `-1` will be drawn below, and a ``CanvasLayer`` with index `1` will be drawn above. This order will hold regardless of the ``CanvasItem/zIndex`` of the nodes within each layer. +/// +/// ``CanvasLayer``s can be hidden and they can also optionally follow the viewport. This makes them useful for HUDs like health bar overlays (on layers `1` and higher) or backgrounds (on layers `-1` and lower). +/// +/// > Note: Embedded ``Window``s are placed on layer `1024`. ``CanvasItem``s on layers `1025` and higher appear in front of embedded windows. +/// +/// > Note: Each ``CanvasLayer`` is drawn on one specific ``Viewport`` and cannot be shared between multiple ``Viewport``s, see ``customViewport``. When using multiple ``Viewport``s, for example in a split-screen game, you need create an individual ``CanvasLayer`` for each ``Viewport`` you want it to be drawn on. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``visibilityChanged`` +open class CanvasLayer: Node { + override open class var godotClassName: StringName { "CanvasLayer" } + + /* Properties */ + + /// Layer index for draw order. Lower values are drawn behind higher values. + /// + /// > Note: If multiple CanvasLayers have the same layer index, ``CanvasItem`` children of one CanvasLayer are drawn behind the ``CanvasItem`` children of the other CanvasLayer. Which CanvasLayer is drawn in front is non-deterministic. + /// + final public var layer: Int32 { + get { + return get_layer () + } + + set { + set_layer (newValue) + } + + } + + /// If `false`, any ``CanvasItem`` under this ``CanvasLayer`` will be hidden. + /// + /// Unlike ``CanvasItem/visible``, visibility of a ``CanvasLayer`` isn't propagated to underlying layers. + /// + final public var visible: Bool { + get { + return is_visible () + } + + set { + set_visible (newValue) + } + + } + + /// The layer's base offset. + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The layer's rotation in radians. + final public var rotation: Double { + get { + return get_rotation () + } + + set { + set_rotation (newValue) + } + + } + + /// The layer's scale. + final public var scale: Vector2 { + get { + return get_scale () + } + + set { + set_scale (newValue) + } + + } + + /// The layer's transform. + final public var transform: Transform2D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /// The custom ``Viewport`` node assigned to the ``CanvasLayer``. If `null`, uses the default viewport instead. + final public var customViewport: Node? { + get { + return get_custom_viewport () + } + + set { + set_custom_viewport (newValue) + } + + } + + /// If enabled, the ``CanvasLayer`` will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen. + /// + /// Together with ``followViewportScale`` it can be used for a pseudo 3D effect. + /// + final public var followViewportEnabled: Bool { + get { + return is_following_viewport () + } + + set { + set_follow_viewport (newValue) + } + + } + + /// Scales the layer when using ``followViewportEnabled``. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. + final public var followViewportScale: Double { + get { + return get_follow_viewport_scale () + } + + set { + set_follow_viewport_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layer") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layer(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layer") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layer() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CanvasLayer.method_get_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasLayer.method_is_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_show: GDExtensionMethodBindPtr = { + let methodName = StringName("show") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Shows any ``CanvasItem`` under this ``CanvasLayer``. This is equivalent to setting ``visible`` to `true`. + public final func show() { + gi.object_method_bind_ptrcall(CanvasLayer.method_show, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_hide: GDExtensionMethodBindPtr = { + let methodName = StringName("hide") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Hides any ``CanvasItem`` under this ``CanvasLayer``. This is equivalent to setting ``visible`` to `false`. + public final func hide() { + gi.object_method_bind_ptrcall(CanvasLayer.method_hide, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasLayer.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_final_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_final_transform") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + /// Returns the transform from the ``CanvasLayer``s coordinate system to the ``Viewport``s coordinate system. + public final func getFinalTransform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CanvasLayer.method_get_final_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CanvasLayer.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CanvasLayer.method_get_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CanvasLayer.method_get_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_follow_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("set_follow_viewport") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_follow_viewport(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_follow_viewport, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_following_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("is_following_viewport") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_following_viewport() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CanvasLayer.method_is_following_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_follow_viewport_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_follow_viewport_scale") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_follow_viewport_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_follow_viewport_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_follow_viewport_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_follow_viewport_scale") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_follow_viewport_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CanvasLayer.method_get_follow_viewport_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_custom_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_viewport") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_viewport(_ viewport: Node?) { + withUnsafePointer(to: viewport?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasLayer.method_set_custom_viewport, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_viewport") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_viewport() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasLayer.method_get_custom_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas") + return withUnsafePointer(to: &CanvasLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the RID of the canvas used by this layer. + public final func getCanvas() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CanvasLayer.method_get_canvas, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + // Signals + /// Emitted when visibility of the layer is changed. See ``visible``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.visibilityChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var visibilityChanged: SimpleSignal { SimpleSignal (target: self, signalName: "visibility_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasModulate.swift b/Sources/SwiftGodot/Generated/Api/CanvasModulate.swift new file mode 100644 index 000000000..8b8d8b3c2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasModulate.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that applies a color tint to a canvas. +/// +/// ``CanvasModulate`` applies a color tint to all nodes on a canvas. Only one can be used to tint a canvas, but ``CanvasLayer``s can be used to render things independently. +open class CanvasModulate: Node2D { + override open class var godotClassName: StringName { "CanvasModulate" } + + /* Properties */ + + /// The tint color to apply. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &CanvasModulate.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasModulate.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &CanvasModulate.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CanvasModulate.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CanvasTexture.swift b/Sources/SwiftGodot/Generated/Api/CanvasTexture.swift new file mode 100644 index 000000000..51f244916 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CanvasTexture.swift @@ -0,0 +1,429 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture with optional normal and specular maps for use in 2D rendering. +/// +/// ``CanvasTexture`` is an alternative to ``ImageTexture`` for 2D rendering. It allows using normal maps and specular maps in any node that inherits from ``CanvasItem``. ``CanvasTexture`` also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings). +/// +/// > Note: ``CanvasTexture`` cannot be used in 3D. It will not display correctly when applied to any ``VisualInstance3D``, such as ``Sprite3D`` or ``Decal``. For physically-based materials in 3D, use ``BaseMaterial3D`` instead. +/// +open class CanvasTexture: Texture2D { + override open class var godotClassName: StringName { "CanvasTexture" } + + /* Properties */ + + /// The diffuse (color) texture to use. This is the main texture you want to set in most cases. + final public var diffuseTexture: Texture2D? { + get { + return get_diffuse_texture () + } + + set { + set_diffuse_texture (newValue) + } + + } + + /// The normal map texture to use. Only has a visible effect if ``Light2D``s are affecting this ``CanvasTexture``. + /// + /// > Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines. + /// + final public var normalTexture: Texture2D? { + get { + return get_normal_texture () + } + + set { + set_normal_texture (newValue) + } + + } + + /// The specular map to use for ``Light2D`` specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher ``specularShininess`` value. Using a colored ``specularTexture`` allows controlling specular shininess on a per-channel basis. Only has a visible effect if ``Light2D``s are affecting this ``CanvasTexture``. + final public var specularTexture: Texture2D? { + get { + return get_specular_texture () + } + + set { + set_specular_texture (newValue) + } + + } + + /// The multiplier for specular reflection colors. The ``Light2D``'s color is also taken into account when determining the reflection color. Only has a visible effect if ``Light2D``s are affecting this ``CanvasTexture``. + final public var specularColor: Color { + get { + return get_specular_color () + } + + set { + set_specular_color (newValue) + } + + } + + /// The specular exponent for ``Light2D`` specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of `1.0` disables specular reflections entirely. Only has a visible effect if ``Light2D``s are affecting this ``CanvasTexture``. + final public var specularShininess: Double { + get { + return get_specular_shininess () + } + + set { + set_specular_shininess (newValue) + } + + } + + /// The texture filtering mode to use when drawing this ``CanvasTexture``. + final public var textureFilter: CanvasItem.TextureFilter { + get { + return get_texture_filter () + } + + set { + set_texture_filter (newValue) + } + + } + + /// The texture repeat mode to use when drawing this ``CanvasTexture``. + final public var textureRepeat: CanvasItem.TextureRepeat { + get { + return get_texture_repeat () + } + + set { + set_texture_repeat (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_diffuse_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_diffuse_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_diffuse_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_diffuse_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_diffuse_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_diffuse_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_diffuse_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasTexture.method_get_diffuse_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_normal_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normal_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normal_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_normal_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_normal_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normal_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_normal_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasTexture.method_get_normal_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_specular_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_specular_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular_texture") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CanvasTexture.method_get_specular_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_specular_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular_color") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_specular_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular_color") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CanvasTexture.method_get_specular_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_specular_shininess: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular_shininess") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular_shininess(_ shininess: Double) { + withUnsafePointer(to: shininess) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_specular_shininess, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular_shininess: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular_shininess") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular_shininess() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CanvasTexture.method_get_specular_shininess, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_filter") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1037999706)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_filter(_ filter: CanvasItem.TextureFilter) { + withUnsafePointer(to: filter.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_texture_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_filter") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121960042)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_filter() -> CanvasItem.TextureFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasTexture.method_get_texture_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItem.TextureFilter (rawValue: _result)! + } + + fileprivate static var method_set_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_repeat") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1716472974)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_repeat(_ `repeat`: CanvasItem.TextureRepeat) { + withUnsafePointer(to: `repeat`.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CanvasTexture.method_set_texture_repeat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_repeat") + return withUnsafePointer(to: &CanvasTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2667158319)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_repeat() -> CanvasItem.TextureRepeat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CanvasTexture.method_get_texture_repeat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CanvasItem.TextureRepeat (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CapsuleMesh.swift b/Sources/SwiftGodot/Generated/Api/CapsuleMesh.swift new file mode 100644 index 000000000..622382af4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CapsuleMesh.swift @@ -0,0 +1,255 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class representing a capsule-shaped ``PrimitiveMesh``. +/// +/// Class representing a capsule-shaped ``PrimitiveMesh``. +open class CapsuleMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "CapsuleMesh" } + + /* Properties */ + + /// Radius of the capsule mesh. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// Total height of the capsule mesh (including the hemispherical ends). + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// Number of radial segments on the capsule mesh. + final public var radialSegments: Int32 { + get { + return get_radial_segments () + } + + set { + set_radial_segments (newValue) + } + + } + + /// Number of rings along the height of the capsule. + final public var rings: Int32 { + get { + return get_rings () + } + + set { + set_rings (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleMesh.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleMesh.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleMesh.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleMesh.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radial_segments") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radial_segments(_ segments: Int32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleMesh.method_set_radial_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radial_segments") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radial_segments() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CapsuleMesh.method_get_radial_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rings") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rings(_ rings: Int32) { + withUnsafePointer(to: rings) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleMesh.method_set_rings, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rings") + return withUnsafePointer(to: &CapsuleMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rings() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CapsuleMesh.method_get_rings, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CapsuleShape2D.swift b/Sources/SwiftGodot/Generated/Api/CapsuleShape2D.swift new file mode 100644 index 000000000..c5e1736a2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CapsuleShape2D.swift @@ -0,0 +1,146 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D capsule shape used for physics collision. +/// +/// A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape2D``. +/// +/// **Performance:** ``CapsuleShape2D`` is fast to check collisions against, but it is slower than ``RectangleShape2D`` and ``CircleShape2D``. +/// +open class CapsuleShape2D: Shape2D { + override open class var godotClassName: StringName { "CapsuleShape2D" } + + /* Properties */ + + /// The capsule's radius. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The capsule's height. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CapsuleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleShape2D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CapsuleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleShape2D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CapsuleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleShape2D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CapsuleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleShape2D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CapsuleShape3D.swift b/Sources/SwiftGodot/Generated/Api/CapsuleShape3D.swift new file mode 100644 index 000000000..5cdec7b56 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CapsuleShape3D.swift @@ -0,0 +1,146 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D capsule shape used for physics collision. +/// +/// A 3D capsule shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. +/// +/// **Performance:** ``CapsuleShape3D`` is fast to check collisions against. It is faster than ``CylinderShape3D``, but slower than ``SphereShape3D`` and ``BoxShape3D``. +/// +open class CapsuleShape3D: Shape3D { + override open class var godotClassName: StringName { "CapsuleShape3D" } + + /* Properties */ + + /// The capsule's radius. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The capsule's height. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CapsuleShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleShape3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CapsuleShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleShape3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CapsuleShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CapsuleShape3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CapsuleShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CapsuleShape3D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CenterContainer.swift b/Sources/SwiftGodot/Generated/Api/CenterContainer.swift new file mode 100644 index 000000000..ff39839a4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CenterContainer.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that keeps child controls in its center. +/// +/// ``CenterContainer`` is a container that keeps all of its child controls in its center at their minimum size. +open class CenterContainer: Container { + override open class var godotClassName: StringName { "CenterContainer" } + + /* Properties */ + + /// If `true`, centers children relative to the ``CenterContainer``'s top left corner. + final public var useTopLeft: Bool { + get { + return is_using_top_left () + } + + set { + set_use_top_left (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_use_top_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_top_left") + return withUnsafePointer(to: &CenterContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_top_left(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CenterContainer.method_set_use_top_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_top_left: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_top_left") + return withUnsafePointer(to: &CenterContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_top_left() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CenterContainer.method_is_using_top_left, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CharFXTransform.swift b/Sources/SwiftGodot/Generated/Api/CharFXTransform.swift new file mode 100644 index 000000000..a82306f4e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CharFXTransform.swift @@ -0,0 +1,765 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Controls how an individual character will be displayed in a ``RichTextEffect``. +/// +/// By setting various properties on this object, you can control how individual characters will be displayed in a ``RichTextEffect``. +open class CharFXTransform: RefCounted { + override open class var godotClassName: StringName { "CharFXTransform" } + + /* Properties */ + + /// The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects. + final public var transform: Transform2D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /// Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. + final public var range: Vector2i { + get { + return get_range () + } + + set { + set_range (newValue) + } + + } + + /// The time elapsed since the ``RichTextLabel`` was added to the scene tree (in seconds). Time stops when the ``RichTextLabel`` is paused (see ``Node/processMode``). Resets when the text in the ``RichTextLabel`` is changed. + /// + /// > Note: Time still passes while the ``RichTextLabel`` is hidden. + /// + final public var elapsedTime: Double { + get { + return get_elapsed_time () + } + + set { + set_elapsed_time (newValue) + } + + } + + /// If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their ``color`` to `Color(1, 1, 1, 0)` instead. + final public var visible: Bool { + get { + return is_visible () + } + + set { + set_visibility (newValue) + } + + } + + /// If `true`, FX transform is called for outline drawing. Setting this property won't affect drawing. + final public var outline: Bool { + get { + return is_outline () + } + + set { + set_outline (newValue) + } + + } + + /// The position offset the character will be drawn with (in pixels). + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The color the character will be drawn with. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], integer or float, they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque ``Color``. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. + /// + /// For example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following ``GDictionary``: + /// + final public var env: GDictionary { + get { + return get_environment () + } + + set { + set_environment (newValue) + } + + } + + /// Font specific glyph index. + final public var glyphIndex: UInt32 { + get { + return get_glyph_index () + } + + set { + set_glyph_index (newValue) + } + + } + + /// Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. + final public var glyphCount: UInt8 { + get { + return get_glyph_count () + } + + set { + set_glyph_count (newValue) + } + + } + + /// Glyph flags. See ``TextServer.GraphemeFlag`` for more info. Setting this property won't affect drawing. + final public var glyphFlags: UInt16 { + get { + return get_glyph_flags () + } + + set { + set_glyph_flags (newValue) + } + + } + + /// The character offset of the glyph, relative to the current ``RichTextEffect`` custom block. Setting this property won't affect drawing. + final public var relativeIndex: Int32 { + get { + return get_relative_index () + } + + set { + set_relative_index (newValue) + } + + } + + /// Font resource used to render glyph. + final public var font: RID { + get { + return get_font () + } + + set { + set_font (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3761352769)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_range") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2741790807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_range() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_range") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_range(_ range: Vector2i) { + withUnsafePointer(to: range) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_elapsed_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_elapsed_time") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_elapsed_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharFXTransform.method_get_elapsed_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_elapsed_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_elapsed_time") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_elapsed_time(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_elapsed_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharFXTransform.method_is_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility(_ visibility: Bool) { + withUnsafePointer(to: visibility) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_visibility, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("is_outline") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_outline() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharFXTransform.method_is_outline, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline(_ outline: Bool) { + withUnsafePointer(to: outline) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200896285)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_environment, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment(_ environment: GDictionary) { + withUnsafePointer(to: environment.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_environment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glyph_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_index") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glyph_index() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CharFXTransform.method_get_glyph_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glyph_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_index") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glyph_index(_ glyphIndex: UInt32) { + withUnsafePointer(to: glyphIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_glyph_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_relative_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_relative_index") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_relative_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CharFXTransform.method_get_relative_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_relative_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_relative_index") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_relative_index(_ relativeIndex: Int32) { + withUnsafePointer(to: relativeIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_relative_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glyph_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_count") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glyph_count() -> UInt8 { + var _result: UInt8 = 0 + gi.object_method_bind_ptrcall(CharFXTransform.method_get_glyph_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glyph_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_count") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glyph_count(_ glyphCount: UInt8) { + withUnsafePointer(to: glyphCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_glyph_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glyph_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_flags") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glyph_flags() -> UInt16 { + var _result: UInt16 = 0 + gi.object_method_bind_ptrcall(CharFXTransform.method_get_glyph_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glyph_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_flags") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glyph_flags(_ glyphFlags: UInt16) { + withUnsafePointer(to: glyphFlags) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_glyph_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CharFXTransform.method_get_font, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_font: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font") + return withUnsafePointer(to: &CharFXTransform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font(_ font: RID) { + withUnsafePointer(to: font.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharFXTransform.method_set_font, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CharacterBody2D.swift b/Sources/SwiftGodot/Generated/Api/CharacterBody2D.swift new file mode 100644 index 000000000..b74451ed2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CharacterBody2D.swift @@ -0,0 +1,1285 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D physics body specialized for characters moved by script. +/// +/// ``CharacterBody2D`` is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (``moveAndSlide()`` method) in addition to the general collision detection provided by ``PhysicsBody2D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:)``. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +/// +/// For game objects that don't require complex movement or collision detection, such as moving platforms, ``AnimatableBody2D`` is simpler to configure. +/// +open class CharacterBody2D: PhysicsBody2D { + override open class var godotClassName: StringName { "CharacterBody2D" } + public enum MotionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. + case grounded = 0 // MOTION_MODE_GROUNDED + /// Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. + case floating = 1 // MOTION_MODE_FLOATING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .grounded: return ".grounded" + case .floating: return ".floating" + } + + } + + } + + public enum PlatformOnLeave: Int64, CaseIterable, CustomDebugStringConvertible { + /// Add the last platform velocity to the ``velocity`` when you leave a moving platform. + case addVelocity = 0 // PLATFORM_ON_LEAVE_ADD_VELOCITY + /// Add the last platform velocity to the ``velocity`` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + case addUpwardVelocity = 1 // PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY + /// Do nothing when leaving a platform. + case doNothing = 2 // PLATFORM_ON_LEAVE_DO_NOTHING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .addVelocity: return ".addVelocity" + case .addUpwardVelocity: return ".addUpwardVelocity" + case .doNothing: return ".doNothing" + } + + } + + } + + + /* Properties */ + + /// Sets the motion mode which defines the behavior of ``moveAndSlide()``. See ``CharacterBody2D/MotionMode`` constants for available modes. + final public var motionMode: CharacterBody2D.MotionMode { + get { + return get_motion_mode () + } + + set { + set_motion_mode (newValue) + } + + } + + /// Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling ``moveAndSlide()``. Defaults to ``Vector2/up``. As the vector will be normalized it can't be equal to ``Vector2/zero``, if you want all collisions to be reported as walls, consider using ``MotionMode/floating`` as ``motionMode``. + final public var upDirection: Vector2 { + get { + return get_up_direction () + } + + set { + set_up_direction (newValue) + } + + } + + /// Current velocity vector in pixels per second, used and modified during calls to ``moveAndSlide()``. + final public var velocity: Vector2 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// If `true`, during a jump against the ceiling, the body will slide, if `false` it will be stopped and will fall vertically. + final public var slideOnCeiling: Bool { + get { + return is_slide_on_ceiling_enabled () + } + + set { + set_slide_on_ceiling_enabled (newValue) + } + + } + + /// Maximum number of times the body can change direction before it stops when calling ``moveAndSlide()``. + final public var maxSlides: Int32 { + get { + return get_max_slides () + } + + set { + set_max_slides (newValue) + } + + } + + /// Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when ``motionMode`` is ``MotionMode/floating``. + final public var wallMinSlideAngle: Double { + get { + return get_wall_min_slide_angle () + } + + set { + set_wall_min_slide_angle (newValue) + } + + } + + /// If `true`, the body will not slide on slopes when calling ``moveAndSlide()`` when the body is standing still. + /// + /// If `false`, the body will slide on floor's slopes when ``velocity`` applies a downward force. + /// + final public var floorStopOnSlope: Bool { + get { + return is_floor_stop_on_slope_enabled () + } + + set { + set_floor_stop_on_slope_enabled (newValue) + } + + } + + /// If `false` (by default), the body will move faster on downward slopes and slower on upward slopes. + /// + /// If `true`, the body will always move at the same speed on the ground no matter the slope. Note that you need to use ``floorSnapLength`` to stick along a downward slope at constant speed. + /// + final public var floorConstantSpeed: Bool { + get { + return is_floor_constant_speed_enabled () + } + + set { + set_floor_constant_speed_enabled (newValue) + } + + } + + /// If `true`, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. + final public var floorBlockOnWall: Bool { + get { + return is_floor_block_on_wall_enabled () + } + + set { + set_floor_block_on_wall_enabled (newValue) + } + + } + + /// Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling ``moveAndSlide()``. The default value equals 45 degrees. + final public var floorMaxAngle: Double { + get { + return get_floor_max_angle () + } + + set { + set_floor_max_angle (newValue) + } + + } + + /// Sets a snapping distance. When set to a value different from `0.0`, the body is kept attached to slopes when calling ``moveAndSlide()``. The snapping vector is determined by the given distance along the opposite direction of the ``upDirection``. + /// + /// As long as the snapping vector is in contact with the ground and the body moves against ``upDirection``, the body will remain attached to the surface. Snapping is not applied if the body moves along ``upDirection``, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use ``applyFloorSnap()``. + /// + final public var floorSnapLength: Double { + get { + return get_floor_snap_length () + } + + set { + set_floor_snap_length (newValue) + } + + } + + /// Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See ``CharacterBody2D/PlatformOnLeave`` constants for available behavior. + final public var platformOnLeave: CharacterBody2D.PlatformOnLeave { + get { + return get_platform_on_leave () + } + + set { + set_platform_on_leave (newValue) + } + + } + + /// Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the ``CharacterBody2D``. By default, all floor bodies are detected and propagate their velocity. + final public var platformFloorLayers: UInt32 { + get { + return get_platform_floor_layers () + } + + set { + set_platform_floor_layers (newValue) + } + + } + + /// Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the ``CharacterBody2D``. By default, all wall bodies are ignored. + final public var platformWallLayers: UInt32 { + get { + return get_platform_wall_layers () + } + + set { + set_platform_wall_layers (newValue) + } + + } + + /// Extra margin used for collision recovery when calling ``moveAndSlide()``. + /// + /// If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + /// + /// A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + /// + /// A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + /// + final public var safeMargin: Double { + get { + return get_safe_margin () + } + + set { + set_safe_margin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_move_and_slide: GDExtensionMethodBindPtr = { + let methodName = StringName("move_and_slide") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Moves the body based on ``velocity``. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a ``CharacterBody2D`` or ``RigidBody2D``, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + /// + /// Modifies ``velocity`` if a slide collision occurred. To get the latest collision call ``getLastSlideCollision()``, for detailed information about collisions that occurred, use ``getSlideCollision(slideIdx:)``. + /// + /// When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + /// + /// The general behavior and available properties change according to the ``motionMode``. + /// + /// Returns `true` if the body collided, otherwise, returns `false`. + /// + @discardableResult /* discardable per discardableList: CharacterBody2D, move_and_slide */ + public final func moveAndSlide() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_move_and_slide, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_apply_floor_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_floor_snap") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when ``isOnFloor()`` returns `true`. + public final func applyFloorSnap() { + gi.object_method_bind_ptrcall(CharacterBody2D.method_apply_floor_snap, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_safe_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_safe_margin") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_safe_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_safe_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_safe_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_safe_margin") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_safe_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_safe_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_floor_stop_on_slope_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_stop_on_slope_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_stop_on_slope_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_floor_stop_on_slope_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_stop_on_slope_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_stop_on_slope_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_stop_on_slope_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_floor_stop_on_slope_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_floor_constant_speed_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_constant_speed_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_constant_speed_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_floor_constant_speed_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_floor_constant_speed_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_constant_speed_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_constant_speed_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_floor_constant_speed_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_block_on_wall_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_block_on_wall_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_block_on_wall_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_floor_block_on_wall_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_floor_block_on_wall_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_block_on_wall_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_block_on_wall_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_floor_block_on_wall_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_slide_on_ceiling_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slide_on_ceiling_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_slide_on_ceiling_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_slide_on_ceiling_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_slide_on_ceiling_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_slide_on_ceiling_enabled") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_slide_on_ceiling_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_slide_on_ceiling_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_platform_floor_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_floor_layers") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_floor_layers(_ excludeLayer: UInt32) { + withUnsafePointer(to: excludeLayer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_platform_floor_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_floor_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_floor_layers") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_floor_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_platform_floor_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_platform_wall_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_wall_layers") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_wall_layers(_ excludeLayer: UInt32) { + withUnsafePointer(to: excludeLayer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_platform_wall_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_wall_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_wall_layers") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_wall_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_platform_wall_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_max_slides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_slides") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_slides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_max_slides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_slides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_slides") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_slides(_ maxSlides: Int32) { + withUnsafePointer(to: maxSlides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_max_slides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_floor_max_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_max_angle") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_floor_max_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_floor_max_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_max_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_max_angle") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_max_angle(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_floor_max_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_floor_snap_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_snap_length") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_floor_snap_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_floor_snap_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_snap_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_snap_length") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_snap_length(_ floorSnapLength: Double) { + withUnsafePointer(to: floorSnapLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_floor_snap_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wall_min_slide_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wall_min_slide_angle") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wall_min_slide_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_wall_min_slide_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wall_min_slide_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wall_min_slide_angle") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wall_min_slide_angle(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_wall_min_slide_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_up_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_up_direction") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_up_direction() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_up_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_up_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_up_direction") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_up_direction(_ upDirection: Vector2) { + withUnsafePointer(to: upDirection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_up_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_motion_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_mode") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1224392233)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion_mode(_ mode: CharacterBody2D.MotionMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_motion_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_mode") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1160151236)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion_mode() -> CharacterBody2D.MotionMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_motion_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CharacterBody2D.MotionMode (rawValue: _result)! + } + + fileprivate static var method_set_platform_on_leave: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_on_leave") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2423324375)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_on_leave(_ onLeaveApplyVelocity: CharacterBody2D.PlatformOnLeave) { + withUnsafePointer(to: onLeaveApplyVelocity.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_set_platform_on_leave, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_on_leave: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_on_leave") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4054324341)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_on_leave() -> CharacterBody2D.PlatformOnLeave { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_platform_on_leave, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CharacterBody2D.PlatformOnLeave (rawValue: _result)! + } + + fileprivate static var method_is_on_floor: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_floor") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with the floor on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "floor" or not. + public final func isOnFloor() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_floor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_floor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_floor_only") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with the floor on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "floor" or not. + public final func isOnFloorOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_floor_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_ceiling: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_ceiling") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with the ceiling on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "ceiling" or not. + public final func isOnCeiling() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_ceiling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_ceiling_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_ceiling_only") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with the ceiling on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "ceiling" or not. + public final func isOnCeilingOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_ceiling_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_wall: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_wall") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with a wall on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "wall" or not. + public final func isOnWall() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_wall, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_wall_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_wall_only") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with a wall on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "wall" or not. + public final func isOnWallOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody2D.method_is_on_wall_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_floor_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_normal") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the collision normal of the floor at the last collision point. Only valid after calling ``moveAndSlide()`` and when ``isOnFloor()`` returns `true`. + /// + /// > Warning: The collision normal is not always the same as the surface normal. + /// + public final func getFloorNormal() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_floor_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_wall_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wall_normal") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the collision normal of the wall at the last collision point. Only valid after calling ``moveAndSlide()`` and when ``isOnWall()`` returns `true`. + /// + /// > Warning: The collision normal is not always the same as the surface normal. + /// + public final func getWallNormal() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_wall_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_last_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_motion") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the last motion applied to the ``CharacterBody2D`` during the last call to ``moveAndSlide()``. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. + public final func getLastMotion() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_last_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_position_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position_delta") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the travel (position delta) that occurred during the last call to ``moveAndSlide()``. + public final func getPositionDelta() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_position_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_real_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_real_velocity") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the current real velocity since the last call to ``moveAndSlide()``. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to ``velocity`` which returns the requested velocity. + public final func getRealVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_real_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_floor_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_angle") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841063350)! + } + + } + + }() + + /// Returns the floor's collision angle at the last collision point according to `upDirection`, which is ``Vector2/up`` by default. This value is always positive and only valid after calling ``moveAndSlide()`` and when ``isOnFloor()`` returns `true`. + public final func getFloorAngle(upDirection: Vector2 = Vector2 (x: 0, y: -1)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: upDirection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_floor_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_platform_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_velocity") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the linear velocity of the platform at the last collision point. Only valid after calling ``moveAndSlide()``. + public final func getPlatformVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_platform_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_slide_collision_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slide_collision_count") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of times the body collided and changed direction during the last call to ``moveAndSlide()``. + public final func getSlideCollisionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_slide_collision_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_slide_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slide_collision") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 860659811)! + } + + } + + }() + + /// Returns a ``KinematicCollision2D``, which contains information about a collision that occurred during the last call to ``moveAndSlide()``. Since the body can collide several times in a single call to ``moveAndSlide()``, you must specify the index of the collision in the range 0 to (``getSlideCollisionCount()`` - 1). + /// + /// **Example usage:** + /// + public final func getSlideCollision(slideIdx: Int32) -> KinematicCollision2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: slideIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_slide_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_last_slide_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_slide_collision") + return withUnsafePointer(to: &CharacterBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2161834755)! + } + + } + + }() + + /// Returns a ``KinematicCollision2D``, which contains information about the latest collision that occurred during the last call to ``moveAndSlide()``. + public final func getLastSlideCollision() -> KinematicCollision2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CharacterBody2D.method_get_last_slide_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CharacterBody3D.swift b/Sources/SwiftGodot/Generated/Api/CharacterBody3D.swift new file mode 100644 index 000000000..2be78d488 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CharacterBody3D.swift @@ -0,0 +1,1298 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D physics body specialized for characters moved by script. +/// +/// ``CharacterBody3D`` is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (``moveAndSlide()`` method) in addition to the general collision detection provided by ``PhysicsBody3D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:maxCollisions:)``. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +/// +/// For game objects that don't require complex movement or collision detection, such as moving platforms, ``AnimatableBody3D`` is simpler to configure. +/// +open class CharacterBody3D: PhysicsBody3D { + override open class var godotClassName: StringName { "CharacterBody3D" } + public enum MotionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers. + case grounded = 0 // MOTION_MODE_GROUNDED + /// Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. + case floating = 1 // MOTION_MODE_FLOATING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .grounded: return ".grounded" + case .floating: return ".floating" + } + + } + + } + + public enum PlatformOnLeave: Int64, CaseIterable, CustomDebugStringConvertible { + /// Add the last platform velocity to the ``velocity`` when you leave a moving platform. + case addVelocity = 0 // PLATFORM_ON_LEAVE_ADD_VELOCITY + /// Add the last platform velocity to the ``velocity`` when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. + case addUpwardVelocity = 1 // PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY + /// Do nothing when leaving a platform. + case doNothing = 2 // PLATFORM_ON_LEAVE_DO_NOTHING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .addVelocity: return ".addVelocity" + case .addUpwardVelocity: return ".addUpwardVelocity" + case .doNothing: return ".doNothing" + } + + } + + } + + + /* Properties */ + + /// Sets the motion mode which defines the behavior of ``moveAndSlide()``. See ``CharacterBody3D/MotionMode`` constants for available modes. + final public var motionMode: CharacterBody3D.MotionMode { + get { + return get_motion_mode () + } + + set { + set_motion_mode (newValue) + } + + } + + /// Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling ``moveAndSlide()``. Defaults to ``Vector3/up``. As the vector will be normalized it can't be equal to ``Vector3/zero``, if you want all collisions to be reported as walls, consider using ``MotionMode/floating`` as ``motionMode``. + final public var upDirection: Vector3 { + get { + return get_up_direction () + } + + set { + set_up_direction (newValue) + } + + } + + /// If `true`, during a jump against the ceiling, the body will slide, if `false` it will be stopped and will fall vertically. + final public var slideOnCeiling: Bool { + get { + return is_slide_on_ceiling_enabled () + } + + set { + set_slide_on_ceiling_enabled (newValue) + } + + } + + /// Current velocity vector (typically meters per second), used and modified during calls to ``moveAndSlide()``. + final public var velocity: Vector3 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// Maximum number of times the body can change direction before it stops when calling ``moveAndSlide()``. + final public var maxSlides: Int32 { + get { + return get_max_slides () + } + + set { + set_max_slides (newValue) + } + + } + + /// Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When ``motionMode`` is ``MotionMode/grounded``, it only affects movement if ``floorBlockOnWall`` is `true`. + final public var wallMinSlideAngle: Double { + get { + return get_wall_min_slide_angle () + } + + set { + set_wall_min_slide_angle (newValue) + } + + } + + /// If `true`, the body will not slide on slopes when calling ``moveAndSlide()`` when the body is standing still. + /// + /// If `false`, the body will slide on floor's slopes when ``velocity`` applies a downward force. + /// + final public var floorStopOnSlope: Bool { + get { + return is_floor_stop_on_slope_enabled () + } + + set { + set_floor_stop_on_slope_enabled (newValue) + } + + } + + /// If `false` (by default), the body will move faster on downward slopes and slower on upward slopes. + /// + /// If `true`, the body will always move at the same speed on the ground no matter the slope. Note that you need to use ``floorSnapLength`` to stick along a downward slope at constant speed. + /// + final public var floorConstantSpeed: Bool { + get { + return is_floor_constant_speed_enabled () + } + + set { + set_floor_constant_speed_enabled (newValue) + } + + } + + /// If `true`, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. + final public var floorBlockOnWall: Bool { + get { + return is_floor_block_on_wall_enabled () + } + + set { + set_floor_block_on_wall_enabled (newValue) + } + + } + + /// Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling ``moveAndSlide()``. The default value equals 45 degrees. + final public var floorMaxAngle: Double { + get { + return get_floor_max_angle () + } + + set { + set_floor_max_angle (newValue) + } + + } + + /// Sets a snapping distance. When set to a value different from `0.0`, the body is kept attached to slopes when calling ``moveAndSlide()``. The snapping vector is determined by the given distance along the opposite direction of the ``upDirection``. + /// + /// As long as the snapping vector is in contact with the ground and the body moves against ``upDirection``, the body will remain attached to the surface. Snapping is not applied if the body moves along ``upDirection``, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use ``applyFloorSnap()``. + /// + final public var floorSnapLength: Double { + get { + return get_floor_snap_length () + } + + set { + set_floor_snap_length (newValue) + } + + } + + /// Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See ``CharacterBody3D/PlatformOnLeave`` constants for available behavior. + final public var platformOnLeave: CharacterBody3D.PlatformOnLeave { + get { + return get_platform_on_leave () + } + + set { + set_platform_on_leave (newValue) + } + + } + + /// Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the ``CharacterBody3D``. By default, all floor bodies are detected and propagate their velocity. + final public var platformFloorLayers: UInt32 { + get { + return get_platform_floor_layers () + } + + set { + set_platform_floor_layers (newValue) + } + + } + + /// Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the ``CharacterBody3D``. By default, all wall bodies are ignored. + final public var platformWallLayers: UInt32 { + get { + return get_platform_wall_layers () + } + + set { + set_platform_wall_layers (newValue) + } + + } + + /// Extra margin used for collision recovery when calling ``moveAndSlide()``. + /// + /// If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + /// + /// A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + /// + /// A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + /// + final public var safeMargin: Double { + get { + return get_safe_margin () + } + + set { + set_safe_margin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_move_and_slide: GDExtensionMethodBindPtr = { + let methodName = StringName("move_and_slide") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Moves the body based on ``velocity``. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a ``CharacterBody3D`` or ``RigidBody3D``, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + /// + /// Modifies ``velocity`` if a slide collision occurred. To get the latest collision call ``getLastSlideCollision()``, for more detailed information about collisions that occurred, use ``getSlideCollision(slideIdx:)``. + /// + /// When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + /// + /// Returns `true` if the body collided, otherwise, returns `false`. + /// + @discardableResult /* discardable per discardableList: CharacterBody3D, move_and_slide */ + public final func moveAndSlide() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_move_and_slide, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_apply_floor_snap: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_floor_snap") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when ``isOnFloor()`` returns `true`. + public final func applyFloorSnap() { + gi.object_method_bind_ptrcall(CharacterBody3D.method_apply_floor_snap, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_safe_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_safe_margin") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_safe_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_safe_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_safe_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_safe_margin") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_safe_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_safe_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_floor_stop_on_slope_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_stop_on_slope_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_stop_on_slope_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_floor_stop_on_slope_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_stop_on_slope_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_stop_on_slope_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_stop_on_slope_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_floor_stop_on_slope_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_floor_constant_speed_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_constant_speed_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_constant_speed_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_floor_constant_speed_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_floor_constant_speed_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_constant_speed_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_constant_speed_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_floor_constant_speed_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_block_on_wall_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_block_on_wall_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_block_on_wall_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_floor_block_on_wall_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_floor_block_on_wall_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_floor_block_on_wall_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_floor_block_on_wall_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_floor_block_on_wall_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_slide_on_ceiling_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slide_on_ceiling_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_slide_on_ceiling_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_slide_on_ceiling_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_slide_on_ceiling_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_slide_on_ceiling_enabled") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_slide_on_ceiling_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_slide_on_ceiling_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_platform_floor_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_floor_layers") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_floor_layers(_ excludeLayer: UInt32) { + withUnsafePointer(to: excludeLayer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_platform_floor_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_floor_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_floor_layers") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_floor_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_platform_floor_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_platform_wall_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_wall_layers") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_wall_layers(_ excludeLayer: UInt32) { + withUnsafePointer(to: excludeLayer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_platform_wall_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_wall_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_wall_layers") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_wall_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_platform_wall_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_max_slides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_slides") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_slides() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_max_slides, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_slides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_slides") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_slides(_ maxSlides: Int32) { + withUnsafePointer(to: maxSlides) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_max_slides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_floor_max_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_max_angle") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_floor_max_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_floor_max_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_max_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_max_angle") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_max_angle(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_floor_max_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_floor_snap_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_snap_length") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_floor_snap_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_floor_snap_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_floor_snap_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_floor_snap_length") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_floor_snap_length(_ floorSnapLength: Double) { + withUnsafePointer(to: floorSnapLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_floor_snap_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wall_min_slide_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wall_min_slide_angle") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wall_min_slide_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_wall_min_slide_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wall_min_slide_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wall_min_slide_angle") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wall_min_slide_angle(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_wall_min_slide_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_up_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_up_direction") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_up_direction() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_up_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_up_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_up_direction") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_up_direction(_ upDirection: Vector3) { + withUnsafePointer(to: upDirection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_up_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_motion_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_mode") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2690739026)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion_mode(_ mode: CharacterBody3D.MotionMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_motion_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_mode") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3529553604)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion_mode() -> CharacterBody3D.MotionMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_motion_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CharacterBody3D.MotionMode (rawValue: _result)! + } + + fileprivate static var method_set_platform_on_leave: GDExtensionMethodBindPtr = { + let methodName = StringName("set_platform_on_leave") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1459986142)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_platform_on_leave(_ onLeaveApplyVelocity: CharacterBody3D.PlatformOnLeave) { + withUnsafePointer(to: onLeaveApplyVelocity.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_set_platform_on_leave, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_platform_on_leave: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_on_leave") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 996491171)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_platform_on_leave() -> CharacterBody3D.PlatformOnLeave { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_platform_on_leave, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CharacterBody3D.PlatformOnLeave (rawValue: _result)! + } + + fileprivate static var method_is_on_floor: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_floor") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with the floor on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "floor" or not. + public final func isOnFloor() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_floor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_floor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_floor_only") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with the floor on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "floor" or not. + public final func isOnFloorOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_floor_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_ceiling: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_ceiling") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with the ceiling on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "ceiling" or not. + public final func isOnCeiling() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_ceiling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_ceiling_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_ceiling_only") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with the ceiling on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "ceiling" or not. + public final func isOnCeilingOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_ceiling_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_wall: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_wall") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided with a wall on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "wall" or not. + public final func isOnWall() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_wall, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_on_wall_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_wall_only") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the body collided only with a wall on the last call of ``moveAndSlide()``. Otherwise, returns `false`. The ``upDirection`` and ``floorMaxAngle`` are used to determine whether a surface is "wall" or not. + public final func isOnWallOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CharacterBody3D.method_is_on_wall_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_floor_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_normal") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the collision normal of the floor at the last collision point. Only valid after calling ``moveAndSlide()`` and when ``isOnFloor()`` returns `true`. + /// + /// > Warning: The collision normal is not always the same as the surface normal. + /// + public final func getFloorNormal() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_floor_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_wall_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wall_normal") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the collision normal of the wall at the last collision point. Only valid after calling ``moveAndSlide()`` and when ``isOnWall()`` returns `true`. + /// + /// > Warning: The collision normal is not always the same as the surface normal. + /// + public final func getWallNormal() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_wall_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_last_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_motion") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the last motion applied to the ``CharacterBody3D`` during the last call to ``moveAndSlide()``. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. + public final func getLastMotion() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_last_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_position_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position_delta") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the travel (position delta) that occurred during the last call to ``moveAndSlide()``. + public final func getPositionDelta() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_position_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_real_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_real_velocity") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the current real velocity since the last call to ``moveAndSlide()``. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to ``velocity`` which returns the requested velocity. + public final func getRealVelocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_real_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_floor_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_floor_angle") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2906300789)! + } + + } + + }() + + /// Returns the floor's collision angle at the last collision point according to `upDirection`, which is ``Vector3/up`` by default. This value is always positive and only valid after calling ``moveAndSlide()`` and when ``isOnFloor()`` returns `true`. + public final func getFloorAngle(upDirection: Vector3 = Vector3 (x: 0, y: 1, z: 0)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: upDirection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_floor_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_platform_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_velocity") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the linear velocity of the platform at the last collision point. Only valid after calling ``moveAndSlide()``. + public final func getPlatformVelocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_platform_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_platform_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_platform_angular_velocity") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the angular velocity of the platform at the last collision point. Only valid after calling ``moveAndSlide()``. + public final func getPlatformAngularVelocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_platform_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_slide_collision_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slide_collision_count") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of times the body collided and changed direction during the last call to ``moveAndSlide()``. + public final func getSlideCollisionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_slide_collision_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_slide_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slide_collision") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107003663)! + } + + } + + }() + + /// Returns a ``KinematicCollision3D``, which contains information about a collision that occurred during the last call to ``moveAndSlide()``. Since the body can collide several times in a single call to ``moveAndSlide()``, you must specify the index of the collision in the range 0 to (``getSlideCollisionCount()`` - 1). + public final func getSlideCollision(slideIdx: Int32) -> KinematicCollision3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: slideIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_slide_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_last_slide_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_slide_collision") + return withUnsafePointer(to: &CharacterBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 186875014)! + } + + } + + }() + + /// Returns a ``KinematicCollision3D``, which contains information about the latest collision that occurred during the last call to ``moveAndSlide()``. + public final func getLastSlideCollision() -> KinematicCollision3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CharacterBody3D.method_get_last_slide_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CheckBox.swift b/Sources/SwiftGodot/Generated/Api/CheckBox.swift new file mode 100644 index 000000000..09a027cfb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CheckBox.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that represents a binary choice. +/// +/// ``CheckBox`` allows the user to choose one of only two possible options. It's similar to ``CheckButton`` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use ``CheckBox`` when toggling it has **no** immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed. +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +/// When ``BaseButton/buttonGroup`` specifies a ``ButtonGroup``, ``CheckBox`` changes its appearance to that of a radio button and uses the various `radio_*` theme properties. +/// +open class CheckBox: Button { + override open class var godotClassName: StringName { "CheckBox" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CheckButton.swift b/Sources/SwiftGodot/Generated/Api/CheckButton.swift new file mode 100644 index 000000000..2975d0709 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CheckButton.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that represents a binary choice. +/// +/// ``CheckButton`` is a toggle button displayed as a check field. It's similar to ``CheckBox`` in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use ``CheckButton`` when toggling it has an **immediate** effect on something. For example, it can be used when pressing it shows or hides advanced settings, without asking the user to confirm this action. +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +open class CheckButton: Button { + override open class var godotClassName: StringName { "CheckButton" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CircleShape2D.swift b/Sources/SwiftGodot/Generated/Api/CircleShape2D.swift new file mode 100644 index 000000000..fddf71f8f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CircleShape2D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D circle shape used for physics collision. +/// +/// A 2D circle shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape2D``. +/// +/// **Performance:** ``CircleShape2D`` is fast to check collisions against. It is faster than ``RectangleShape2D`` and ``CapsuleShape2D``. +/// +open class CircleShape2D: Shape2D { + override open class var godotClassName: StringName { "CircleShape2D" } + + /* Properties */ + + /// The circle's radius. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CircleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CircleShape2D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CircleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CircleShape2D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ClassDB.swift b/Sources/SwiftGodot/Generated/Api/ClassDB.swift new file mode 100644 index 000000000..eddee5116 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ClassDB.swift @@ -0,0 +1,810 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class information repository. +/// +/// Provides access to metadata stored for every available class. +open class ClassDB: Object { + /// The shared instance of this class + public static var shared: ClassDB = { + return withUnsafePointer (to: &ClassDB.godotClassName.content) { ptr in + ClassDB (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "ClassDB" } + /* Methods */ + fileprivate static var method_get_class_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_class_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the names of all the classes available. + public static func getClassList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_class_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_inheriters_from_class: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inheriters_from_class") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1761182771)! + } + + } + + }() + + /// Returns the names of all the classes that directly or indirectly inherit from `class`. + public static func getInheritersFromClass(_ `class`: StringName) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_inheriters_from_class, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_parent_class: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent_class") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965194235)! + } + + } + + }() + + /// Returns the parent class of `class`. + public static func getParentClass(_ `class`: StringName) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_parent_class, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_class_exists: GDExtensionMethodBindPtr = { + let methodName = StringName("class_exists") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns whether the specified `class` is available or not. + public static func classExists(`class`: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_class_exists, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_parent_class: GDExtensionMethodBindPtr = { + let methodName = StringName("is_parent_class") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns whether `inherits` is an ancestor of `class` or not. + public static func isParentClass(_ `class`: StringName, inherits: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: inherits.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_parent_class, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_can_instantiate: GDExtensionMethodBindPtr = { + let methodName = StringName("can_instantiate") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if objects can be instantiated from the specified `class`, otherwise returns `false`. + public static func canInstantiate(`class`: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_can_instantiate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_instantiate: GDExtensionMethodBindPtr = { + let methodName = StringName("instantiate") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Creates an instance of `class`. + public static func instantiate(`class`: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_instantiate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_class_has_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("class_has_signal") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns whether `class` or its ancestry has a signal called `signal` or not. + public static func classHasSignal(`class`: StringName, signal: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: signal.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_has_signal, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_signal") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3061114238)! + } + + } + + }() + + /// Returns the `signal` data of `class` or its ancestry. The returned value is a ``GDictionary`` with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`. + public static func classGetSignal(`class`: StringName, signal: StringName) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: signal.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_signal, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_signal_list: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_signal_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3504980660)! + } + + } + + }() + + /// Returns an array with all the signals of `class` or its ancestry if `noInheritance` is `false`. Every element of the array is a ``GDictionary`` as described in ``classGetSignal(`class`:signal:)``. + public static func classGetSignalList(`class`: StringName, noInheritance: Bool = false) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: noInheritance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_signal_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_class_get_property_list: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_property_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3504980660)! + } + + } + + }() + + /// Returns an array with all the properties of `class` or its ancestry if `noInheritance` is `false`. + public static func classGetPropertyList(`class`: StringName, noInheritance: Bool = false) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: noInheritance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_property_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_class_get_property: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_property") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2498641674)! + } + + } + + }() + + /// Returns the value of `property` of `object` or its ancestry. + public static func classGetProperty(object: Object?, property: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_property, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_class_set_property: GDExtensionMethodBindPtr = { + let methodName = StringName("class_set_property") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1690314931)! + } + + } + + }() + + /// Sets `property` value of `object` to `value`. + public static func classSetProperty(object: Object?, property: StringName, value: Variant?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_set_property, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_class_get_property_default_value: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_property_default_value") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2718203076)! + } + + } + + }() + + /// Returns the default value of `property` of `class` or its ancestor classes. + public static func classGetPropertyDefaultValue(`class`: StringName, property: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_property_default_value, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_class_has_method: GDExtensionMethodBindPtr = { + let methodName = StringName("class_has_method") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3860701026)! + } + + } + + }() + + /// Returns whether `class` (or its ancestry if `noInheritance` is `false`) has a method called `method` or not. + public static func classHasMethod(`class`: StringName, method: StringName, noInheritance: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: method.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_has_method, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_method_argument_count: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_method_argument_count") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3885694822)! + } + + } + + }() + + /// Returns the number of arguments of the method `method` of `class` or its ancestry if `noInheritance` is `false`. + public static func classGetMethodArgumentCount(`class`: StringName, method: StringName, noInheritance: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: method.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_method_argument_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_method_list: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_method_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3504980660)! + } + + } + + }() + + /// Returns an array with all the methods of `class` or its ancestry if `noInheritance` is `false`. Every element of the array is a ``GDictionary`` with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`. + /// + /// > Note: In exported release builds the debug info is not available, so the returned dictionaries will contain only method names. + /// + public static func classGetMethodList(`class`: StringName, noInheritance: Bool = false) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: noInheritance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_method_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_class_get_integer_constant_list: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_integer_constant_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3031669221)! + } + + } + + }() + + /// Returns an array with the names all the integer constants of `class` or its ancestry. + public static func classGetIntegerConstantList(`class`: StringName, noInheritance: Bool = false) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: noInheritance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_integer_constant_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_has_integer_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("class_has_integer_constant") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns whether `class` or its ancestry has an integer constant called `name` or not. + public static func classHasIntegerConstant(`class`: StringName, name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_has_integer_constant, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_integer_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_integer_constant") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2419549490)! + } + + } + + }() + + /// Returns the value of the integer constant `name` of `class` or its ancestry. Always returns 0 when the constant could not be found. + public static func classGetIntegerConstant(`class`: StringName, name: StringName) -> Int { + var _result: Int = 0 + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_integer_constant, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_has_enum: GDExtensionMethodBindPtr = { + let methodName = StringName("class_has_enum") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3860701026)! + } + + } + + }() + + /// Returns whether `class` or its ancestry has an enum called `name` or not. + public static func classHasEnum(`class`: StringName, name: StringName, noInheritance: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_has_enum, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_enum_list: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_enum_list") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3031669221)! + } + + } + + }() + + /// Returns an array with all the enums of `class` or its ancestry. + public static func classGetEnumList(`class`: StringName, noInheritance: Bool = false) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: noInheritance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_enum_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_enum_constants: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_enum_constants") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 661528303)! + } + + } + + }() + + /// Returns an array with all the keys in `enum` of `class` or its ancestry. + public static func classGetEnumConstants(`class`: StringName, `enum`: StringName, noInheritance: Bool = false) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: `enum`.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_enum_constants, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_class_get_integer_constant_enum: GDExtensionMethodBindPtr = { + let methodName = StringName("class_get_integer_constant_enum") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2457504236)! + } + + } + + }() + + /// Returns which enum the integer constant `name` of `class` or its ancestry belongs to. + public static func classGetIntegerConstantEnum(`class`: StringName, name: StringName, noInheritance: Bool = false) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_class_get_integer_constant_enum, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_class_enum_bitfield: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class_enum_bitfield") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3860701026)! + } + + } + + }() + + /// Returns whether `class` (or its ancestor classes if `noInheritance` is `false`) has an enum called `enum` that is a bitfield. + public static func isClassEnumBitfield(`class`: StringName, `enum`: StringName, noInheritance: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: `enum`.content) { pArg1 in + withUnsafePointer(to: noInheritance) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_is_class_enum_bitfield, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_class_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class_enabled") + return withUnsafePointer(to: &ClassDB.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns whether this `class` is enabled or not. + public static func isClassEnabled(`class`: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_class_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CodeEdit.swift b/Sources/SwiftGodot/Generated/Api/CodeEdit.swift new file mode 100644 index 000000000..e3ee8d81f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CodeEdit.swift @@ -0,0 +1,3236 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A multiline text editor designed for editing code. +/// +/// CodeEdit is a specialized ``TextEdit`` designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management. +/// +/// > Note: Regardless of locale, ``CodeEdit`` will by default always use left-to-right text direction to correctly display source code. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``breakpointToggled`` +/// - ``codeCompletionRequested`` +/// - ``symbolLookup`` +/// - ``symbolValidate`` +open class CodeEdit: TextEdit { + override open class var godotClassName: StringName { "CodeEdit" } + public enum CodeCompletionKind: Int64, CaseIterable, CustomDebugStringConvertible { + /// Marks the option as a class. + case `class` = 0 // KIND_CLASS + /// Marks the option as a function. + case function = 1 // KIND_FUNCTION + /// Marks the option as a Godot signal. + case signal = 2 // KIND_SIGNAL + /// Marks the option as a variable. + case variable = 3 // KIND_VARIABLE + /// Marks the option as a member. + case member = 4 // KIND_MEMBER + /// Marks the option as an enum entry. + case `enum` = 5 // KIND_ENUM + /// Marks the option as a constant. + case constant = 6 // KIND_CONSTANT + /// Marks the option as a Godot node path. + case nodePath = 7 // KIND_NODE_PATH + /// Marks the option as a file path. + case filePath = 8 // KIND_FILE_PATH + /// Marks the option as unclassified or plain text. + case plainText = 9 // KIND_PLAIN_TEXT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`class`: return ".`class`" + case .function: return ".function" + case .signal: return ".signal" + case .variable: return ".variable" + case .member: return ".member" + case .`enum`: return ".`enum`" + case .constant: return ".constant" + case .nodePath: return ".nodePath" + case .filePath: return ".filePath" + case .plainText: return ".plainText" + } + + } + + } + + public enum CodeCompletionLocation: Int64, CaseIterable, CustomDebugStringConvertible { + /// The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). + case local = 0 // LOCATION_LOCAL + /// The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. `0` for the local class, `1` for the parent, `2` for the grandparent, etc.) to store the depth of an option in the class or a parent class. + case parentMask = 256 // LOCATION_PARENT_MASK + /// The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). + case otherUserCode = 512 // LOCATION_OTHER_USER_CODE + /// The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. + case other = 1024 // LOCATION_OTHER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .local: return ".local" + case .parentMask: return ".parentMask" + case .otherUserCode: return ".otherUserCode" + case .other: return ".other" + } + + } + + } + + + /* Properties */ + + /// Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted. + final public var symbolLookupOnClick: Bool { + get { + return is_symbol_lookup_on_click_enabled () + } + + set { + set_symbol_lookup_on_click_enabled (newValue) + } + + } + + /// Sets whether line folding is allowed. + final public var lineFolding: Bool { + get { + return is_line_folding_enabled () + } + + set { + set_line_folding_enabled (newValue) + } + + } + + /// Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. + final public var lineLengthGuidelines: VariantCollection { + get { + return get_line_length_guidelines () + } + + set { + set_line_length_guidelines (newValue) + } + + } + + /// Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. + final public var guttersDrawBreakpointsGutter: Bool { + get { + return is_drawing_breakpoints_gutter () + } + + set { + set_draw_breakpoints_gutter (newValue) + } + + } + + /// Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. + final public var guttersDrawBookmarks: Bool { + get { + return is_drawing_bookmarks_gutter () + } + + set { + set_draw_bookmarks_gutter (newValue) + } + + } + + /// Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. + final public var guttersDrawExecutingLines: Bool { + get { + return is_drawing_executing_lines_gutter () + } + + set { + set_draw_executing_lines_gutter (newValue) + } + + } + + /// Sets if line numbers should be drawn in the gutter. + final public var guttersDrawLineNumbers: Bool { + get { + return is_draw_line_numbers_enabled () + } + + set { + set_draw_line_numbers (newValue) + } + + } + + /// Sets if line numbers drawn in the gutter are zero padded. + final public var guttersZeroPadLineNumbers: Bool { + get { + return is_line_numbers_zero_padded () + } + + set { + set_line_numbers_zero_padded (newValue) + } + + } + + /// Sets if foldable lines icons should be drawn in the gutter. + final public var guttersDrawFoldGutter: Bool { + get { + return is_drawing_fold_gutter () + } + + set { + set_draw_fold_gutter (newValue) + } + + } + + /// Sets the string delimiters. All existing string delimiters will be removed. + final public var delimiterStrings: VariantCollection { + get { + return get_string_delimiters () + } + + set { + set_string_delimiters (newValue) + } + + } + + /// Sets the comment delimiters. All existing comment delimiters will be removed. + final public var delimiterComments: VariantCollection { + get { + return get_comment_delimiters () + } + + set { + set_comment_delimiters (newValue) + } + + } + + /// Sets whether code completion is allowed. + final public var codeCompletionEnabled: Bool { + get { + return is_code_completion_enabled () + } + + set { + set_code_completion_enabled (newValue) + } + + } + + /// Sets prefixes that will trigger code completion. + final public var codeCompletionPrefixes: VariantCollection { + get { + return get_code_completion_prefixes () + } + + set { + set_code_completion_prefixes (newValue) + } + + } + + /// Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If ``indentUseSpaces`` is enabled the number of spaces to use. + final public var indentSize: Int32 { + get { + return get_indent_size () + } + + set { + set_indent_size (newValue) + } + + } + + /// Use spaces instead of tabs for indentation. + final public var indentUseSpaces: Bool { + get { + return is_indent_using_spaces () + } + + set { + set_indent_using_spaces (newValue) + } + + } + + /// Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. + final public var indentAutomatic: Bool { + get { + return is_auto_indent_enabled () + } + + set { + set_auto_indent_enabled (newValue) + } + + } + + /// Prefixes to trigger an automatic indent. + final public var indentAutomaticPrefixes: VariantCollection { + get { + return get_auto_indent_prefixes () + } + + set { + set_auto_indent_prefixes (newValue) + } + + } + + /// Sets whether brace pairs should be autocompleted. + final public var autoBraceCompletionEnabled: Bool { + get { + return is_auto_brace_completion_enabled () + } + + set { + set_auto_brace_completion_enabled (newValue) + } + + } + + /// Highlight mismatching brace pairs. + final public var autoBraceCompletionHighlightMatching: Bool { + get { + return is_highlight_matching_braces_enabled () + } + + set { + set_highlight_matching_braces_enabled (newValue) + } + + } + + /// Sets the brace pairs to be autocompleted. + final public var autoBraceCompletionPairs: GDictionary { + get { + return get_auto_brace_completion_pairs () + } + + set { + set_auto_brace_completion_pairs (newValue) + } + + } + + /* Methods */ + /// Override this method to define how the selected entry should be inserted. If `replace` is `true`, any existing text should be replaced. + @_documentation(visibility: public) + open func _confirmCodeCompletion(replace: Bool) { + } + + /// Override this method to define what happens when the user requests code completion. If `force` is `true`, any checks should be bypassed. + @_documentation(visibility: public) + open func _requestCodeCompletion(force: Bool) { + } + + /// Override this method to define what items in `candidates` should be displayed. + /// + /// Both `candidates` and the return is a ``GArray`` of ``GDictionary``, see ``getCodeCompletionOption(index:)`` for ``GDictionary`` content. + /// + @_documentation(visibility: public) + open func _filterCodeCompletionCandidates(_ candidates: VariantCollection) -> VariantCollection { + return VariantCollection() + } + + fileprivate static var method_set_indent_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indent_size") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_indent_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_indent_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_indent_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_indent_size") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_indent_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_indent_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_indent_using_spaces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indent_using_spaces") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_indent_using_spaces(_ useSpaces: Bool) { + withUnsafePointer(to: useSpaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_indent_using_spaces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_indent_using_spaces: GDExtensionMethodBindPtr = { + let methodName = StringName("is_indent_using_spaces") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_indent_using_spaces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_indent_using_spaces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_indent_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_indent_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_indent_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_auto_indent_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_auto_indent_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_indent_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_indent_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_auto_indent_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_indent_prefixes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_indent_prefixes") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_indent_prefixes(_ prefixes: VariantCollection) { + withUnsafePointer(to: prefixes.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_auto_indent_prefixes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_indent_prefixes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_indent_prefixes") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_indent_prefixes() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_auto_indent_prefixes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_do_indent: GDExtensionMethodBindPtr = { + let methodName = StringName("do_indent") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Perform an indent as if the user activated the "ui_text_indent" action. + public final func doIndent() { + gi.object_method_bind_ptrcall(CodeEdit.method_do_indent, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_indent_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("indent_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Indents selected lines, or in the case of no selection the caret line by one. + public final func indentLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_indent_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_unindent_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("unindent_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. + public final func unindentLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_unindent_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_convert_indent: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_indent") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 423910286)! + } + + } + + }() + + /// Converts the indents of lines between `fromLine` and `toLine` to tabs or spaces as set by ``indentUseSpaces``. + /// + /// Values of `-1` convert the entire text. + /// + public final func convertIndent(fromLine: Int32 = -1, toLine: Int32 = -1) { + withUnsafePointer(to: fromLine) { pArg0 in + withUnsafePointer(to: toLine) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_convert_indent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_auto_brace_completion_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_brace_completion_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_brace_completion_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_auto_brace_completion_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_auto_brace_completion_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_brace_completion_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_brace_completion_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_auto_brace_completion_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_highlight_matching_braces_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_highlight_matching_braces_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_highlight_matching_braces_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_highlight_matching_braces_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_highlight_matching_braces_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_highlight_matching_braces_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_highlight_matching_braces_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_highlight_matching_braces_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_auto_brace_completion_pair: GDExtensionMethodBindPtr = { + let methodName = StringName("add_auto_brace_completion_pair") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3186203200)! + } + + } + + }() + + /// Adds a brace pair. + /// + /// Both the start and end keys must be symbols. Only the start key has to be unique. + /// + public final func addAutoBraceCompletionPair(startKey: String, endKey: String) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + let endKey = GString(endKey) + withUnsafePointer(to: endKey.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_add_auto_brace_completion_pair, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_auto_brace_completion_pairs: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_brace_completion_pairs") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_brace_completion_pairs(_ pairs: GDictionary) { + withUnsafePointer(to: pairs.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_auto_brace_completion_pairs, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_brace_completion_pairs: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_brace_completion_pairs") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_brace_completion_pairs() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(CodeEdit.method_get_auto_brace_completion_pairs, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_has_auto_brace_completion_open_key: GDExtensionMethodBindPtr = { + let methodName = StringName("has_auto_brace_completion_open_key") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if open key `openKey` exists. + public final func hasAutoBraceCompletionOpenKey(_ openKey: String) -> Bool { + var _result: Bool = false + let openKey = GString(openKey) + withUnsafePointer(to: openKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_has_auto_brace_completion_open_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_auto_brace_completion_close_key: GDExtensionMethodBindPtr = { + let methodName = StringName("has_auto_brace_completion_close_key") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if close key `closeKey` exists. + public final func hasAutoBraceCompletionCloseKey(_ closeKey: String) -> Bool { + var _result: Bool = false + let closeKey = GString(closeKey) + withUnsafePointer(to: closeKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_has_auto_brace_completion_close_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_auto_brace_completion_close_key: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_brace_completion_close_key") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3135753539)! + } + + } + + }() + + /// Gets the matching auto brace close key for `openKey`. + public final func getAutoBraceCompletionCloseKey(openKey: String) -> String { + let _result = GString () + let openKey = GString(openKey) + withUnsafePointer(to: openKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_auto_brace_completion_close_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_draw_breakpoints_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_breakpoints_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_breakpoints_gutter(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_draw_breakpoints_gutter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drawing_breakpoints_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drawing_breakpoints_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drawing_breakpoints_gutter() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_drawing_breakpoints_gutter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_bookmarks_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_bookmarks_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_bookmarks_gutter(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_draw_bookmarks_gutter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drawing_bookmarks_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drawing_bookmarks_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drawing_bookmarks_gutter() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_drawing_bookmarks_gutter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_executing_lines_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_executing_lines_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_executing_lines_gutter(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_draw_executing_lines_gutter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drawing_executing_lines_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drawing_executing_lines_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drawing_executing_lines_gutter() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_drawing_executing_lines_gutter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_line_as_breakpoint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_as_breakpoint") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the line as breakpointed. + public final func setLineAsBreakpoint(line: Int32, breakpointed: Bool) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: breakpointed) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_as_breakpoint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_line_breakpointed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_breakpointed") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is breakpointed or not. + public final func isLineBreakpointed(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_breakpointed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_breakpointed_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_breakpointed_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all breakpointed lines. + public final func clearBreakpointedLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_clear_breakpointed_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_breakpointed_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_breakpointed_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Gets all breakpointed lines. + public final func getBreakpointedLines() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(CodeEdit.method_get_breakpointed_lines, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_line_as_bookmarked: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_as_bookmarked") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the line as bookmarked. + public final func setLineAsBookmarked(line: Int32, bookmarked: Bool) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: bookmarked) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_as_bookmarked, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_line_bookmarked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_bookmarked") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is bookmarked or not. + public final func isLineBookmarked(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_bookmarked, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_bookmarked_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_bookmarked_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all bookmarked lines. + public final func clearBookmarkedLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_clear_bookmarked_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_bookmarked_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bookmarked_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Gets all bookmarked lines. + public final func getBookmarkedLines() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(CodeEdit.method_get_bookmarked_lines, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_line_as_executing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_as_executing") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the line as executing. + public final func setLineAsExecuting(line: Int32, executing: Bool) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: executing) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_as_executing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_line_executing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_executing") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is marked as executing or not. + public final func isLineExecuting(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_executing, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_executing_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_executing_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all executed lines. + public final func clearExecutingLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_clear_executing_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_executing_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_executing_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Gets all executing lines. + public final func getExecutingLines() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(CodeEdit.method_get_executing_lines, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_draw_line_numbers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_line_numbers") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_line_numbers(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_draw_line_numbers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_draw_line_numbers_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_draw_line_numbers_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_draw_line_numbers_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_draw_line_numbers_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_line_numbers_zero_padded: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_numbers_zero_padded") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_numbers_zero_padded(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_numbers_zero_padded, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_line_numbers_zero_padded: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_numbers_zero_padded") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_line_numbers_zero_padded() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_numbers_zero_padded, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_fold_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_fold_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_fold_gutter(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_draw_fold_gutter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drawing_fold_gutter: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drawing_fold_gutter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drawing_fold_gutter() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_drawing_fold_gutter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_line_folding_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_folding_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_folding_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_folding_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_line_folding_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_folding_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_line_folding_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_folding_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_can_fold_line: GDExtensionMethodBindPtr = { + let methodName = StringName("can_fold_line") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. + public final func canFoldLine(_ line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_can_fold_line, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_fold_line: GDExtensionMethodBindPtr = { + let methodName = StringName("fold_line") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Folds the given line, if possible (see ``canFoldLine(_:)``). + public final func foldLine(_ line: Int32) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_fold_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_unfold_line: GDExtensionMethodBindPtr = { + let methodName = StringName("unfold_line") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Unfolds all lines that were previously folded. + public final func unfoldLine(_ line: Int32) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_unfold_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_fold_all_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("fold_all_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Folds all lines that are possible to be folded (see ``canFoldLine(_:)``). + public final func foldAllLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_fold_all_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_unfold_all_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("unfold_all_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Unfolds all lines, folded or not. + public final func unfoldAllLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_unfold_all_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_toggle_foldable_line: GDExtensionMethodBindPtr = { + let methodName = StringName("toggle_foldable_line") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Toggle the folding of the code block at the given line. + public final func toggleFoldableLine(_ line: Int32) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_toggle_foldable_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_toggle_foldable_lines_at_carets: GDExtensionMethodBindPtr = { + let methodName = StringName("toggle_foldable_lines_at_carets") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Toggle the folding of the code block on all lines with a caret on them. + public final func toggleFoldableLinesAtCarets() { + gi.object_method_bind_ptrcall(CodeEdit.method_toggle_foldable_lines_at_carets, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_line_folded: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_folded") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is folded or not. + public final func isLineFolded(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_folded, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_folded_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_folded_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns all lines that are current folded. + public final func getFoldedLines() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_folded_lines, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_create_code_region: GDExtensionMethodBindPtr = { + let methodName = StringName("create_code_region") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see ``addCommentDelimiter(startKey:endKey:lineOnly:)``). + /// + /// A code region is a part of code that is highlighted when folded and can help organize your script. + /// + /// Code region start and end tags can be customized (see ``setCodeRegionTags(start:end:)``). + /// + /// Code regions are delimited using start and end tags (respectively `region` and `endregion` by default) preceded by one line comment delimiter. (eg. `#region` and `#endregion`) + /// + public final func createCodeRegion() { + gi.object_method_bind_ptrcall(CodeEdit.method_create_code_region, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_code_region_start_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_region_start_tag") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the code region start tag (without comment delimiter). + public final func getCodeRegionStartTag() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_region_start_tag, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_code_region_end_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_region_end_tag") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the code region end tag (without comment delimiter). + public final func getCodeRegionEndTag() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_region_end_tag, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_code_region_tags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_region_tags") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 708800718)! + } + + } + + }() + + /// Sets the code region start and end tags (without comment delimiter). + public final func setCodeRegionTags(start: String = "region", end: String = "endregion") { + let start = GString(start) + withUnsafePointer(to: start.content) { pArg0 in + let end = GString(end) + withUnsafePointer(to: end.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_region_tags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_line_code_region_start: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_code_region_start") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is a code region start. + public final func isLineCodeRegionStart(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_code_region_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_line_code_region_end: GDExtensionMethodBindPtr = { + let methodName = StringName("is_line_code_region_end") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the line at the specified index is a code region end. + public final func isLineCodeRegionEnd(line: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_line_code_region_end, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_string_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("add_string_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3146098955)! + } + + } + + }() + + /// Defines a string delimiter from `startKey` to `endKey`. Both keys should be symbols, and `startKey` must not be shared with other delimiters. + /// + /// If `lineOnly` is `true` or `endKey` is an empty ``String``, the region does not carry over to the next line. + /// + public final func addStringDelimiter(startKey: String, endKey: String, lineOnly: Bool = false) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + let endKey = GString(endKey) + withUnsafePointer(to: endKey.content) { pArg1 in + withUnsafePointer(to: lineOnly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_add_string_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_string_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_string_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the string delimiter with `startKey`. + public final func removeStringDelimiter(startKey: String) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_remove_string_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_string_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("has_string_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if string `startKey` exists. + public final func hasStringDelimiter(startKey: String) -> Bool { + var _result: Bool = false + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_has_string_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_string_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_string_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_string_delimiters(_ stringDelimiters: VariantCollection) { + withUnsafePointer(to: stringDelimiters.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_string_delimiters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_string_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_string_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all string delimiters. + public final func clearStringDelimiters() { + gi.object_method_bind_ptrcall(CodeEdit.method_clear_string_delimiters, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_string_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_string_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_string_delimiters() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_string_delimiters, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_is_in_string: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_string") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 688195400)! + } + + } + + }() + + /// Returns the delimiter index if `line` `column` is in a string. If `column` is not provided, will return the delimiter index if the entire `line` is a string. Otherwise `-1`. + public final func isInString(line: Int32, column: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: column) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_in_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_comment_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("add_comment_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3146098955)! + } + + } + + }() + + /// Adds a comment delimiter from `startKey` to `endKey`. Both keys should be symbols, and `startKey` must not be shared with other delimiters. + /// + /// If `lineOnly` is `true` or `endKey` is an empty ``String``, the region does not carry over to the next line. + /// + public final func addCommentDelimiter(startKey: String, endKey: String, lineOnly: Bool = false) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + let endKey = GString(endKey) + withUnsafePointer(to: endKey.content) { pArg1 in + withUnsafePointer(to: lineOnly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_add_comment_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_comment_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_comment_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the comment delimiter with `startKey`. + public final func removeCommentDelimiter(startKey: String) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_remove_comment_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_comment_delimiter: GDExtensionMethodBindPtr = { + let methodName = StringName("has_comment_delimiter") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if comment `startKey` exists. + public final func hasCommentDelimiter(startKey: String) -> Bool { + var _result: Bool = false + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_has_comment_delimiter, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_comment_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_comment_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_comment_delimiters(_ commentDelimiters: VariantCollection) { + withUnsafePointer(to: commentDelimiters.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_comment_delimiters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_comment_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_comment_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all comment delimiters. + public final func clearCommentDelimiters() { + gi.object_method_bind_ptrcall(CodeEdit.method_clear_comment_delimiters, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_comment_delimiters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_comment_delimiters") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_comment_delimiters() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_comment_delimiters, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_is_in_comment: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_comment") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 688195400)! + } + + } + + }() + + /// Returns delimiter index if `line` `column` is in a comment. If `column` is not provided, will return delimiter index if the entire `line` is a comment. Otherwise `-1`. + public final func isInComment(line: Int32, column: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: column) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_is_in_comment, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_delimiter_start_key: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delimiter_start_key") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Gets the start key for a string or comment region index. + public final func getDelimiterStartKey(delimiterIndex: Int32) -> String { + let _result = GString () + withUnsafePointer(to: delimiterIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_delimiter_start_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_delimiter_end_key: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delimiter_end_key") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Gets the end key for a string or comment region index. + public final func getDelimiterEndKey(delimiterIndex: Int32) -> String { + let _result = GString () + withUnsafePointer(to: delimiterIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_delimiter_end_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_delimiter_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delimiter_start_position") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3016396712)! + } + + } + + }() + + /// If `line` `column` is in a string or comment, returns the start position of the region. If not or no start could be found, both ``Vector2`` values will be `-1`. + public final func getDelimiterStartPosition(line: Int32, column: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: column) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_delimiter_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_delimiter_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delimiter_end_position") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3016396712)! + } + + } + + }() + + /// If `line` `column` is in a string or comment, returns the end position of the region. If not or no end could be found, both ``Vector2`` values will be `-1`. + public final func getDelimiterEndPosition(line: Int32, column: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: column) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_delimiter_end_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_code_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_hint") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the code hint text. Pass an empty string to clear. + public final func setCodeHint(_ codeHint: String) { + let codeHint = GString(codeHint) + withUnsafePointer(to: codeHint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_code_hint_draw_below: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_hint_draw_below") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets if the code hint should draw below the text. + public final func setCodeHintDrawBelow(_ drawBelow: Bool) { + withUnsafePointer(to: drawBelow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_hint_draw_below, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_for_code_completion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_for_code_completion") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the full text with char `0xFFFF` at the caret location. + public final func getTextForCodeCompletion() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CodeEdit.method_get_text_for_code_completion, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_request_code_completion: GDExtensionMethodBindPtr = { + let methodName = StringName("request_code_completion") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107499316)! + } + + } + + }() + + /// Emits [signal code_completion_requested], if `force` is `true` will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal. + public final func requestCodeCompletion(force: Bool = false) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_request_code_completion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_code_completion_option: GDExtensionMethodBindPtr = { + let methodName = StringName("add_code_completion_option") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3944379502)! + } + + } + + }() + + /// Submits an item to the queue of potential candidates for the autocomplete menu. Call ``updateCodeCompletionOptions(force:)`` to update the list. + /// + /// `location` indicates location of the option relative to the location of the code completion query. See ``CodeEdit.CodeCompletionLocation`` for how to set this value. + /// + /// > Note: This list will replace all current candidates. + /// + public final func addCodeCompletionOption(type: CodeEdit.CodeCompletionKind, displayText: String, insertText: String, textColor: Color = Color (r: 1, g: 1, b: 1, a: 1), icon: Resource? = nil, value: Variant?, location: Int32 = 1024) { + withUnsafePointer(to: type.rawValue) { pArg0 in + let displayText = GString(displayText) + withUnsafePointer(to: displayText.content) { pArg1 in + let insertText = GString(insertText) + withUnsafePointer(to: insertText.content) { pArg2 in + withUnsafePointer(to: textColor) { pArg3 in + withUnsafePointer(to: icon?.handle) { pArg4 in + withUnsafePointer(to: value.content) { pArg5 in + withUnsafePointer(to: location) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_add_code_completion_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_update_code_completion_options: GDExtensionMethodBindPtr = { + let methodName = StringName("update_code_completion_options") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Submits all completion options added with ``addCodeCompletionOption(type:displayText:insertText:textColor:icon:value:location:)``. Will try to force the autocomplete menu to popup, if `force` is `true`. + /// + /// > Note: This will replace all current candidates. + /// + public final func updateCodeCompletionOptions(force: Bool) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_update_code_completion_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_code_completion_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_completion_options") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Gets all completion options, see ``getCodeCompletionOption(index:)`` for return content. + public final func getCodeCompletionOptions() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_completion_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_code_completion_option: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_completion_option") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3485342025)! + } + + } + + }() + + /// Gets the completion option at `index`. The return ``GDictionary`` has the following key-values: + /// + /// `kind`: ``CodeEdit/CodeCompletionKind`` + /// + /// `display_text`: Text that is shown on the autocomplete menu. + /// + /// `insert_text`: Text that is to be inserted when this item is selected. + /// + /// `font_color`: Color of the text on the autocomplete menu. + /// + /// `icon`: Icon to draw on the autocomplete menu. + /// + /// `default_value`: Value of the symbol. + /// + public final func getCodeCompletionOption(index: Int32) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_completion_option, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_code_completion_selected_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_completion_selected_index") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Gets the index of the current selected completion option. + public final func getCodeCompletionSelectedIndex() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_completion_selected_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_code_completion_selected_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_completion_selected_index") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the current selected completion option. + public final func setCodeCompletionSelectedIndex(_ index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_completion_selected_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_confirm_code_completion: GDExtensionMethodBindPtr = { + let methodName = StringName("confirm_code_completion") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107499316)! + } + + } + + }() + + /// Inserts the selected entry into the text. If `replace` is `true`, any existing text is replaced rather than merged. + public final func confirmCodeCompletion(replace: Bool = false) { + withUnsafePointer(to: replace) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_confirm_code_completion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_cancel_code_completion: GDExtensionMethodBindPtr = { + let methodName = StringName("cancel_code_completion") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Cancels the autocomplete menu. + public final func cancelCodeCompletion() { + gi.object_method_bind_ptrcall(CodeEdit.method_cancel_code_completion, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_code_completion_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_completion_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_code_completion_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_completion_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_code_completion_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_code_completion_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_code_completion_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_code_completion_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_code_completion_prefixes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_code_completion_prefixes") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_code_completion_prefixes(_ prefixes: VariantCollection) { + withUnsafePointer(to: prefixes.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_code_completion_prefixes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_code_completion_prefixes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_code_completion_prefixes") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_code_completion_prefixes() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_code_completion_prefixes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_line_length_guidelines: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_length_guidelines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_length_guidelines(_ guidelineColumns: VariantCollection) { + withUnsafePointer(to: guidelineColumns.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_line_length_guidelines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_line_length_guidelines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_length_guidelines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_line_length_guidelines() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(CodeEdit.method_get_line_length_guidelines, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_symbol_lookup_on_click_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_symbol_lookup_on_click_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_symbol_lookup_on_click_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_symbol_lookup_on_click_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_symbol_lookup_on_click_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_symbol_lookup_on_click_enabled") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_symbol_lookup_on_click_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CodeEdit.method_is_symbol_lookup_on_click_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_text_for_symbol_lookup: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_for_symbol_lookup") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the full text with char `0xFFFF` at the cursor location. + public final func getTextForSymbolLookup() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CodeEdit.method_get_text_for_symbol_lookup, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_text_with_cursor_char: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_with_cursor_char") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1391810591)! + } + + } + + }() + + /// Returns the full text with char `0xFFFF` at the specified location. + public final func getTextWithCursorChar(line: Int32, column: Int32) -> String { + let _result = GString () + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: column) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_get_text_with_cursor_char, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_symbol_lookup_word_as_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("set_symbol_lookup_word_as_valid") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets the symbol emitted by [signal symbol_validate] as a valid lookup. + public final func setSymbolLookupWordAsValid(_ valid: Bool) { + withUnsafePointer(to: valid) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeEdit.method_set_symbol_lookup_word_as_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_move_lines_up: GDExtensionMethodBindPtr = { + let methodName = StringName("move_lines_up") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Moves all lines up that are selected or have a caret on them. + public final func moveLinesUp() { + gi.object_method_bind_ptrcall(CodeEdit.method_move_lines_up, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_move_lines_down: GDExtensionMethodBindPtr = { + let methodName = StringName("move_lines_down") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Moves all lines down that are selected or have a caret on them. + public final func moveLinesDown() { + gi.object_method_bind_ptrcall(CodeEdit.method_move_lines_down, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_delete_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("delete_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Deletes all lines that are selected or have a caret on them. + public final func deleteLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_delete_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_duplicate_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("duplicate_selection") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Duplicates all selected text and duplicates all lines with a caret on them. + public final func duplicateSelection() { + gi.object_method_bind_ptrcall(CodeEdit.method_duplicate_selection, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_duplicate_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("duplicate_lines") + return withUnsafePointer(to: &CodeEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line. + public final func duplicateLines() { + gi.object_method_bind_ptrcall(CodeEdit.method_duplicate_lines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_confirm_code_completion": + return _CodeEdit_proxy_confirm_code_completion + case "_filter_code_completion_candidates": + return _CodeEdit_proxy_filter_code_completion_candidates + case "_request_code_completion": + return _CodeEdit_proxy_request_code_completion + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ line: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.breakpointToggled.connect { line in + /// print ("caught signal") + /// } + /// ``` + public var breakpointToggled: Signal1 { Signal1 (target: self, signalName: "breakpoint_toggled") } + + /// Emitted when the user requests code completion. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.codeCompletionRequested.connect { + /// print ("caught signal") + /// } + /// ``` + public var codeCompletionRequested: SimpleSignal { SimpleSignal (target: self, signalName: "code_completion_requested") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ symbol: String, _ line: Int64, _ column: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = Int64 (args [1]!)! + let arg_2 = Int64 (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user has clicked on a valid symbol. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.symbolLookup.connect { symbol, line, column in + /// print ("caught signal") + /// } + /// ``` + public var symbolLookup: Signal2 { Signal2 (target: self, signalName: "symbol_lookup") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ symbol: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling ``setSymbolLookupWordAsValid(_:)``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.symbolValidate.connect { symbol in + /// print ("caught signal") + /// } + /// ``` + public var symbolValidate: Signal3 { Signal3 (target: self, signalName: "symbol_validate") } + +} + +// Support methods for proxies +func _CodeEdit_proxy_confirm_code_completion (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._confirmCodeCompletion (replace: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _CodeEdit_proxy_filter_code_completion_candidates (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._filterCodeCompletionCandidates (args [0]!.assumingMemoryBound (to: VariantCollection.self).pointee) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _CodeEdit_proxy_request_code_completion (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._requestCodeCompletion (force: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/CodeHighlighter.swift b/Sources/SwiftGodot/Generated/Api/CodeHighlighter.swift new file mode 100644 index 000000000..588c81f78 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CodeHighlighter.swift @@ -0,0 +1,803 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A syntax highlighter intended for code. +/// +/// By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a ``TextEdit`` control. +open class CodeHighlighter: SyntaxHighlighter { + override open class var godotClassName: StringName { "CodeHighlighter" } + + /* Properties */ + + /// Sets the color for numbers. + final public var numberColor: Color { + get { + return get_number_color () + } + + set { + set_number_color (newValue) + } + + } + + /// Sets the color for symbols. + final public var symbolColor: Color { + get { + return get_symbol_color () + } + + set { + set_symbol_color (newValue) + } + + } + + /// Sets color for functions. A function is a non-keyword string followed by a '('. + final public var functionColor: Color { + get { + return get_function_color () + } + + set { + set_function_color (newValue) + } + + } + + /// Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. + final public var memberVariableColor: Color { + get { + return get_member_variable_color () + } + + set { + set_member_variable_color (newValue) + } + + } + + /// Sets the keyword colors. All existing keywords will be removed. The ``GDictionary`` key is the keyword. The value is the keyword color. + final public var keywordColors: GDictionary { + get { + return get_keyword_colors () + } + + set { + set_keyword_colors (newValue) + } + + } + + /// Sets the member keyword colors. All existing member keyword will be removed. The ``GDictionary`` key is the member keyword. The value is the member keyword color. + final public var memberKeywordColors: GDictionary { + get { + return get_member_keyword_colors () + } + + set { + set_member_keyword_colors (newValue) + } + + } + + /// Sets the color regions. All existing regions will be removed. The ``GDictionary`` key is the region start and end key, separated by a space. The value is the region color. + final public var colorRegions: GDictionary { + get { + return get_color_regions () + } + + set { + set_color_regions (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("add_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1636512886)! + } + + } + + }() + + /// Sets the color for a keyword. + /// + /// The keyword cannot contain any symbols except '_'. + /// + public final func addKeywordColor(keyword: String, color: Color) { + let keyword = GString(keyword) + withUnsafePointer(to: keyword.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_add_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the keyword. + public final func removeKeywordColor(keyword: String) { + let keyword = GString(keyword) + withUnsafePointer(to: keyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_remove_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("has_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the keyword exists, else `false`. + public final func hasKeywordColor(keyword: String) -> Bool { + var _result: Bool = false + let keyword = GString(keyword) + withUnsafePointer(to: keyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_has_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3855908743)! + } + + } + + }() + + /// Returns the color for a keyword. + public final func getKeywordColor(keyword: String) -> Color { + var _result: Color = Color () + let keyword = GString(keyword) + withUnsafePointer(to: keyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keyword_colors(_ keywords: GDictionary) { + withUnsafePointer(to: keywords.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_keyword_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all keywords. + public final func clearKeywordColors() { + gi.object_method_bind_ptrcall(CodeHighlighter.method_clear_keyword_colors, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_keyword_colors() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_keyword_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_member_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("add_member_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1636512886)! + } + + } + + }() + + /// Sets the color for a member keyword. + /// + /// The member keyword cannot contain any symbols except '_'. + /// + /// It will not be highlighted if preceded by a '.'. + /// + public final func addMemberKeywordColor(memberKeyword: String, color: Color) { + let memberKeyword = GString(memberKeyword) + withUnsafePointer(to: memberKeyword.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_add_member_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_member_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_member_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the member keyword. + public final func removeMemberKeywordColor(memberKeyword: String) { + let memberKeyword = GString(memberKeyword) + withUnsafePointer(to: memberKeyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_remove_member_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_member_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("has_member_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the member keyword exists, else `false`. + public final func hasMemberKeywordColor(memberKeyword: String) -> Bool { + var _result: Bool = false + let memberKeyword = GString(memberKeyword) + withUnsafePointer(to: memberKeyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_has_member_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_member_keyword_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_member_keyword_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3855908743)! + } + + } + + }() + + /// Returns the color for a member keyword. + public final func getMemberKeywordColor(memberKeyword: String) -> Color { + var _result: Color = Color () + let memberKeyword = GString(memberKeyword) + withUnsafePointer(to: memberKeyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_member_keyword_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_member_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_member_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_member_keyword_colors(_ memberKeyword: GDictionary) { + withUnsafePointer(to: memberKeyword.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_member_keyword_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_member_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_member_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all member keywords. + public final func clearMemberKeywordColors() { + gi.object_method_bind_ptrcall(CodeHighlighter.method_clear_member_keyword_colors, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_member_keyword_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_member_keyword_colors") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_member_keyword_colors() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_member_keyword_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_color_region: GDExtensionMethodBindPtr = { + let methodName = StringName("add_color_region") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2924977451)! + } + + } + + }() + + /// Adds a color region (such as for comments or strings) from `startKey` to `endKey`. Both keys should be symbols, and `startKey` must not be shared with other delimiters. + /// + /// If `lineOnly` is `true` or `endKey` is an empty ``String``, the region does not carry over to the next line. + /// + public final func addColorRegion(startKey: String, endKey: String, color: Color, lineOnly: Bool = false) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + let endKey = GString(endKey) + withUnsafePointer(to: endKey.content) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: lineOnly) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_add_color_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_color_region: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_color_region") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the color region that uses that start key. + public final func removeColorRegion(startKey: String) { + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_remove_color_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_color_region: GDExtensionMethodBindPtr = { + let methodName = StringName("has_color_region") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the start key exists, else `false`. + public final func hasColorRegion(startKey: String) -> Bool { + var _result: Bool = false + let startKey = GString(startKey) + withUnsafePointer(to: startKey.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_has_color_region, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_color_regions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_regions") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_regions(_ colorRegions: GDictionary) { + withUnsafePointer(to: colorRegions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_color_regions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_color_regions: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_color_regions") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all color regions. + public final func clearColorRegions() { + gi.object_method_bind_ptrcall(CodeHighlighter.method_clear_color_regions, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_color_regions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_regions") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_regions() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_color_regions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_function_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_function_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_function_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_function_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_function_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_function_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_function_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_function_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_number_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_number_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_number_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_number_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_number_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_number_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_number_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_number_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_symbol_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_symbol_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_symbol_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_symbol_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_symbol_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_symbol_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_symbol_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_symbol_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_member_variable_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_member_variable_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_member_variable_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CodeHighlighter.method_set_member_variable_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_member_variable_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_member_variable_color") + return withUnsafePointer(to: &CodeHighlighter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_member_variable_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CodeHighlighter.method_get_member_variable_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionObject2D.swift b/Sources/SwiftGodot/Generated/Api/CollisionObject2D.swift new file mode 100644 index 000000000..978cb71c7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionObject2D.swift @@ -0,0 +1,1376 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 2D physics objects. +/// +/// Abstract base class for 2D physics objects. ``CollisionObject2D`` can hold any number of ``Shape2D``s for collision. Each shape must be assigned to a _shape owner_. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the `shape_owner_*` methods. +/// +/// > Note: Only collisions between objects within the same canvas (``Viewport`` canvas or ``CanvasLayer``) are supported. The behavior of collisions between objects in different canvases is undefined. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``inputEvent`` +/// - ``mouseEntered`` +/// - ``mouseExited`` +/// - ``mouseShapeEntered`` +/// - ``mouseShapeExited`` +open class CollisionObject2D: Node2D { + override open class var godotClassName: StringName { "CollisionObject2D" } + public enum DisableMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, remove from the physics simulation to stop all physics interactions with this ``CollisionObject2D``. + /// + /// Automatically re-added to the physics simulation when the ``Node`` is processed again. + /// + case remove = 0 // DISABLE_MODE_REMOVE + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, make the body static. Doesn't affect ``Area2D``. ``PhysicsBody2D`` can't be affected by forces or other bodies while static. + /// + /// Automatically set ``PhysicsBody2D`` back to its original mode when the ``Node`` is processed again. + /// + case makeStatic = 1 // DISABLE_MODE_MAKE_STATIC + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, do not affect the physics simulation. + case keepActive = 2 // DISABLE_MODE_KEEP_ACTIVE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .remove: return ".remove" + case .makeStatic: return ".makeStatic" + case .keepActive: return ".keepActive" + } + + } + + } + + + /* Properties */ + + /// Defines the behavior in physics when ``Node/processMode`` is set to ``Node/ProcessMode/disabled``. See ``CollisionObject2D/DisableMode`` for more details about the different modes. + final public var disableMode: CollisionObject2D.DisableMode { + get { + return get_disable_mode () + } + + set { + set_disable_mode (newValue) + } + + } + + /// The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also ``collisionMask``. + /// + /// > Note: Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See Collision layers and masks in the documentation for more information. + /// + final public var collisionLayer: UInt32 { + get { + return get_collision_layer () + } + + set { + set_collision_layer (newValue) + } + + } + + /// The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also ``collisionLayer``. + /// + /// > Note: Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See Collision layers and masks in the documentation for more information. + /// + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + final public var collisionPriority: Double { + get { + return get_collision_priority () + } + + set { + set_collision_priority (newValue) + } + + } + + /// If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one ``collisionLayer`` bit to be set. + final public var inputPickable: Bool { + get { + return is_pickable () + } + + set { + set_pickable (newValue) + } + + } + + /* Methods */ + /// Accepts unhandled ``InputEvent``s. `shapeIdx` is the child index of the clicked ``Shape2D``. Connect to [signal input_event] to easily pick up these events. + /// + /// > Note: ``_inputEvent(viewport:event:shapeIdx:)`` requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + @_documentation(visibility: public) + open func _inputEvent(viewport: Viewport?, event: InputEvent?, shapeIdx: Int32) { + } + + /// Called when the mouse pointer enters any of this object's shapes. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this function to be called. + @_documentation(visibility: public) + open func _mouseEnter() { + } + + /// Called when the mouse pointer exits all this object's shapes. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this function to be called. + @_documentation(visibility: public) + open func _mouseExit() { + } + + /// Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. `shapeIdx` is the child index of the newly entered ``Shape2D``. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be called. + @_documentation(visibility: public) + open func _mouseShapeEnter(shapeIdx: Int32) { + } + + /// Called when the mouse pointer exits any of this object's shapes. `shapeIdx` is the child index of the exited ``Shape2D``. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be called. + @_documentation(visibility: public) + open func _mouseShapeExit(shapeIdx: Int32) { + } + + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the object's ``RID``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_layer(_ layer: UInt32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_collision_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_layer() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_collision_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer_value") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionLayer``, given a `layerNumber` between 1 and 32. + public final func setCollisionLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer_value") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionLayer`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_priority") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_collision_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_priority") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_collision_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_mode") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1919204045)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disable_mode(_ mode: CollisionObject2D.DisableMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_disable_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_disable_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_disable_mode") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3172846349)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_disable_mode() -> CollisionObject2D.DisableMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_disable_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CollisionObject2D.DisableMode (rawValue: _result)! + } + + fileprivate static var method_set_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pickable") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pickable(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_set_pickable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_pickable") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_pickable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionObject2D.method_is_pickable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_create_shape_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("create_shape_owner") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3429307534)! + } + + } + + }() + + /// Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference. + public final func createShapeOwner(_ owner: Object?) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: owner?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_create_shape_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_shape_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_shape_owner") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the given shape owner. + public final func removeShapeOwner(ownerId: UInt32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_remove_shape_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape_owners: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_owners") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + /// Returns an ``GArray`` of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument. + public final func getShapeOwners() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_shape_owners, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shape_owner_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_transform") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 30160968)! + } + + } + + }() + + /// Sets the ``Transform2D`` of the given shape owner. + public final func shapeOwnerSetTransform(ownerId: UInt32, transform: Transform2D) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_transform") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3836996910)! + } + + } + + }() + + /// Returns the shape owner's ``Transform2D``. + public final func shapeOwnerGetTransform(ownerId: UInt32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_get_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_get_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_owner") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3332903315)! + } + + } + + }() + + /// Returns the parent object of the given shape owner. + public final func shapeOwnerGetOwner(ownerId: UInt32) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_get_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_shape_owner_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_disabled") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, disables the given shape owner. + public final func shapeOwnerSetDisabled(ownerId: UInt32, disabled: Bool) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_shape_owner_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shape_owner_disabled") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// If `true`, the shape owner and its shapes are disabled. + public final func isShapeOwnerDisabled(ownerId: UInt32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_is_shape_owner_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_set_one_way_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_one_way_collision") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `enable` is `true`, collisions for the shape owner originating from this ``CollisionObject2D`` will not be reported to collided with ``CollisionObject2D``s. + public final func shapeOwnerSetOneWayCollision(ownerId: UInt32, enable: Bool) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_set_one_way_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_shape_owner_one_way_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shape_owner_one_way_collision_enabled") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if collisions for the shape owner originating from this ``CollisionObject2D`` will not be reported to collided with ``CollisionObject2D``s. + public final func isShapeOwnerOneWayCollisionEnabled(ownerId: UInt32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_is_shape_owner_one_way_collision_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_set_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_one_way_collision_margin") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the `one_way_collision_margin` of the shape owner identified by given `ownerId` to `margin` pixels. + public final func shapeOwnerSetOneWayCollisionMargin(ownerId: UInt32, margin: Double) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: margin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_set_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_shape_owner_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_owner_one_way_collision_margin") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the `one_way_collision_margin` of the shape owner identified by given `ownerId`. + public final func getShapeOwnerOneWayCollisionMargin(ownerId: UInt32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_get_shape_owner_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_add_shape") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2077425081)! + } + + } + + }() + + /// Adds a ``Shape2D`` to the shape owner. + public final func shapeOwnerAddShape(ownerId: UInt32, shape: Shape2D?) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shape?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_add_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape_count") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of shapes the given shape owner contains. + public final func shapeOwnerGetShapeCount(ownerId: UInt32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_get_shape_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3106725749)! + } + + } + + }() + + /// Returns the ``Shape2D`` with the given ID from the given shape owner. + public final func shapeOwnerGetShape(ownerId: UInt32, shapeId: Int32) -> Shape2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_get_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_shape_owner_get_shape_index: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape_index") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns the child index of the ``Shape2D`` with the given ID from the given shape owner. + public final func shapeOwnerGetShapeIndex(ownerId: UInt32, shapeId: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_get_shape_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_remove_shape") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Removes a shape from the given shape owner. + public final func shapeOwnerRemoveShape(ownerId: UInt32, shapeId: Int32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_remove_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_clear_shapes") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes all shapes from the shape owner. + public final func shapeOwnerClearShapes(ownerId: UInt32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_owner_clear_shapes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_shape_find_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_find_owner") + return withUnsafePointer(to: &CollisionObject2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the `owner_id` of the given shape. + public final func shapeFindOwner(shapeIndex: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: shapeIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject2D.method_shape_find_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_input_event": + return _CollisionObject2D_proxy_input_event + case "_mouse_enter": + return _CollisionObject2D_proxy_mouse_enter + case "_mouse_exit": + return _CollisionObject2D_proxy_mouse_exit + case "_mouse_shape_enter": + return _CollisionObject2D_proxy_mouse_shape_enter + case "_mouse_shape_exit": + return _CollisionObject2D_proxy_mouse_shape_exit + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ viewport: Node, _ event: InputEvent, _ shapeIdx: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? InputEvent ?? lookupObject (nativeHandle: ptr_1!) ?? InputEvent (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an input event occurs. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. See ``_inputEvent(viewport:event:shapeIdx:)`` for details. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.inputEvent.connect { viewport, event, shapeIdx in + /// print ("caught signal") + /// } + /// ``` + public var inputEvent: Signal1 { Signal1 (target: self, signalName: "input_event") } + + /// Emitted when the mouse pointer enters any of this object's shapes. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this signal to be emitted. + /// + /// > Note: Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseEntered: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_entered") } + + /// Emitted when the mouse pointer exits all this object's shapes. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject2D`` won't cause this signal to be emitted. + /// + /// > Note: Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject2D``'s area is small. This signal may also not be emitted if another ``CollisionObject2D`` is overlapping the ``CollisionObject2D`` in question. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseExited: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ shapeIdx: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. `shapeIdx` is the child index of the newly entered ``Shape2D``. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseShapeEntered.connect { shapeIdx in + /// print ("caught signal") + /// } + /// ``` + public var mouseShapeEntered: Signal2 { Signal2 (target: self, signalName: "mouse_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ shapeIdx: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the mouse pointer exits any of this object's shapes. `shapeIdx` is the child index of the exited ``Shape2D``. Requires ``inputPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseShapeExited.connect { shapeIdx in + /// print ("caught signal") + /// } + /// ``` + public var mouseShapeExited: Signal3 { Signal3 (target: self, signalName: "mouse_shape_exited") } + +} + +// Support methods for proxies +func _CollisionObject2D_proxy_input_event (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + swiftObject._inputEvent (viewport: lookupLiveObject (handleAddress: resolved_0) as? Viewport ?? lookupObject (nativeHandle: resolved_0)!, event: lookupLiveObject (handleAddress: resolved_1) as? InputEvent ?? lookupObject (nativeHandle: resolved_1)!, shapeIdx: args [2]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _CollisionObject2D_proxy_mouse_enter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseEnter () +} + +func _CollisionObject2D_proxy_mouse_exit (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseExit () +} + +func _CollisionObject2D_proxy_mouse_shape_enter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseShapeEnter (shapeIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _CollisionObject2D_proxy_mouse_shape_exit (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseShapeExit (shapeIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionObject3D.swift b/Sources/SwiftGodot/Generated/Api/CollisionObject3D.swift new file mode 100644 index 000000000..23a8ceb18 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionObject3D.swift @@ -0,0 +1,1130 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 3D physics objects. +/// +/// Abstract base class for 3D physics objects. ``CollisionObject3D`` can hold any number of ``Shape3D``s for collision. Each shape must be assigned to a _shape owner_. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the `shape_owner_*` methods. +/// +/// > Warning: With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``inputEvent`` +/// - ``mouseEntered`` +/// - ``mouseExited`` +open class CollisionObject3D: Node3D { + override open class var godotClassName: StringName { "CollisionObject3D" } + public enum DisableMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, remove from the physics simulation to stop all physics interactions with this ``CollisionObject3D``. + /// + /// Automatically re-added to the physics simulation when the ``Node`` is processed again. + /// + case remove = 0 // DISABLE_MODE_REMOVE + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, make the body static. Doesn't affect ``Area3D``. ``PhysicsBody3D`` can't be affected by forces or other bodies while static. + /// + /// Automatically set ``PhysicsBody3D`` back to its original mode when the ``Node`` is processed again. + /// + case makeStatic = 1 // DISABLE_MODE_MAKE_STATIC + /// When ``Node/processMode`` is set to ``Node/ProcessMode/disabled``, do not affect the physics simulation. + case keepActive = 2 // DISABLE_MODE_KEEP_ACTIVE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .remove: return ".remove" + case .makeStatic: return ".makeStatic" + case .keepActive: return ".keepActive" + } + + } + + } + + + /* Properties */ + + /// Defines the behavior in physics when ``Node/processMode`` is set to ``Node/ProcessMode/disabled``. See ``CollisionObject3D/DisableMode`` for more details about the different modes. + final public var disableMode: CollisionObject3D.DisableMode { + get { + return get_disable_mode () + } + + set { + set_disable_mode (newValue) + } + + } + + /// The physics layers this CollisionObject3D **is in**. Collision objects can exist in one or more of 32 different layers. See also ``collisionMask``. + /// + /// > Note: Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See Collision layers and masks in the documentation for more information. + /// + final public var collisionLayer: UInt32 { + get { + return get_collision_layer () + } + + set { + set_collision_layer (newValue) + } + + } + + /// The physics layers this CollisionObject3D **scans**. Collision objects can scan one or more of 32 different layers. See also ``collisionLayer``. + /// + /// > Note: Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See Collision layers and masks in the documentation for more information. + /// + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + final public var collisionPriority: Double { + get { + return get_collision_priority () + } + + set { + set_collision_priority (newValue) + } + + } + + /// If `true`, this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one ``collisionLayer`` bit to be set. + final public var inputRayPickable: Bool { + get { + return is_ray_pickable () + } + + set { + set_ray_pickable (newValue) + } + + } + + /// If `true`, the ``CollisionObject3D`` will continue to receive input events as the mouse is dragged across its shapes. + final public var inputCaptureOnDrag: Bool { + get { + return get_capture_input_on_drag () + } + + set { + set_capture_input_on_drag (newValue) + } + + } + + /* Methods */ + /// Receives unhandled ``InputEvent``s. `eventPosition` is the location in world space of the mouse pointer on the surface of the shape with index `shapeIdx` and `normal` is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. + /// + /// > Note: ``_inputEvent(camera:event:eventPosition:normal:shapeIdx:)`` requires ``inputRayPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + @_documentation(visibility: public) + open func _inputEvent(camera: Camera3D?, event: InputEvent?, eventPosition: Vector3, normal: Vector3, shapeIdx: Int32) { + } + + /// Called when the mouse pointer enters any of this object's shapes. Requires ``inputRayPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject3D`` won't cause this function to be called. + @_documentation(visibility: public) + open func _mouseEnter() { + } + + /// Called when the mouse pointer exits all this object's shapes. Requires ``inputRayPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. Note that moving between different shapes within a single ``CollisionObject3D`` won't cause this function to be called. + @_documentation(visibility: public) + open func _mouseExit() { + } + + fileprivate static var method_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_layer(_ layer: UInt32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_collision_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_layer() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_collision_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer_value") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionLayer``, given a `layerNumber` between 1 and 32. + public final func setCollisionLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer_value") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionLayer`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_priority") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_collision_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_priority") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_collision_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_mode") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1623620376)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disable_mode(_ mode: CollisionObject3D.DisableMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_disable_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_disable_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_disable_mode") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 410164780)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_disable_mode() -> CollisionObject3D.DisableMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_disable_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CollisionObject3D.DisableMode (rawValue: _result)! + } + + fileprivate static var method_set_ray_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ray_pickable") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ray_pickable(_ rayPickable: Bool) { + withUnsafePointer(to: rayPickable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_ray_pickable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ray_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ray_pickable") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ray_pickable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionObject3D.method_is_ray_pickable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_capture_input_on_drag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_capture_input_on_drag") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_capture_input_on_drag(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_set_capture_input_on_drag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_capture_input_on_drag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_capture_input_on_drag") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_capture_input_on_drag() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_capture_input_on_drag, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the object's ``RID``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_create_shape_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("create_shape_owner") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3429307534)! + } + + } + + }() + + /// Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference. + public final func createShapeOwner(_ owner: Object?) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: owner?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_create_shape_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_shape_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_shape_owner") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the given shape owner. + public final func removeShapeOwner(ownerId: UInt32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_remove_shape_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape_owners: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_owners") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + /// Returns an ``GArray`` of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument. + public final func getShapeOwners() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(CollisionObject3D.method_get_shape_owners, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shape_owner_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_transform") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3616898986)! + } + + } + + }() + + /// Sets the ``Transform3D`` of the given shape owner. + public final func shapeOwnerSetTransform(ownerId: UInt32, transform: Transform3D) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_transform") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965739696)! + } + + } + + }() + + /// Returns the shape owner's ``Transform3D``. + public final func shapeOwnerGetTransform(ownerId: UInt32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_get_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_get_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_owner") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3332903315)! + } + + } + + }() + + /// Returns the parent object of the given shape owner. + public final func shapeOwnerGetOwner(ownerId: UInt32) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_get_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_shape_owner_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_set_disabled") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, disables the given shape owner. + public final func shapeOwnerSetDisabled(ownerId: UInt32, disabled: Bool) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_shape_owner_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shape_owner_disabled") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// If `true`, the shape owner and its shapes are disabled. + public final func isShapeOwnerDisabled(ownerId: UInt32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_is_shape_owner_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_add_shape") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2566676345)! + } + + } + + }() + + /// Adds a ``Shape3D`` to the shape owner. + public final func shapeOwnerAddShape(ownerId: UInt32, shape: Shape3D?) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shape?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_add_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape_count") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of shapes the given shape owner contains. + public final func shapeOwnerGetShapeCount(ownerId: UInt32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_get_shape_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015519174)! + } + + } + + }() + + /// Returns the ``Shape3D`` with the given ID from the given shape owner. + public final func shapeOwnerGetShape(ownerId: UInt32, shapeId: Int32) -> Shape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_get_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_shape_owner_get_shape_index: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_get_shape_index") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns the child index of the ``Shape3D`` with the given ID from the given shape owner. + public final func shapeOwnerGetShapeIndex(ownerId: UInt32, shapeId: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_get_shape_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shape_owner_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_remove_shape") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Removes a shape from the given shape owner. + public final func shapeOwnerRemoveShape(ownerId: UInt32, shapeId: Int32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: shapeId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_remove_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_owner_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_owner_clear_shapes") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes all shapes from the shape owner. + public final func shapeOwnerClearShapes(ownerId: UInt32) { + withUnsafePointer(to: ownerId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_owner_clear_shapes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_shape_find_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_find_owner") + return withUnsafePointer(to: &CollisionObject3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the `owner_id` of the given shape. + public final func shapeFindOwner(shapeIndex: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: shapeIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionObject3D.method_shape_find_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_input_event": + return _CollisionObject3D_proxy_input_event + case "_mouse_enter": + return _CollisionObject3D_proxy_mouse_enter + case "_mouse_exit": + return _CollisionObject3D_proxy_mouse_exit + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ camera: Node, _ event: InputEvent, _ eventPosition: Vector3, _ normal: Vector3, _ shapeIdx: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? InputEvent ?? lookupObject (nativeHandle: ptr_1!) ?? InputEvent (nativeHandle: ptr_1!) + let arg_2 = Vector3 (args [2]!)! + let arg_3 = Vector3 (args [3]!)! + let arg_4 = Int64 (args [4]!)! + + callback (arg_0, arg_1, arg_2, arg_3, arg_4) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the object receives an unhandled ``InputEvent``. `eventPosition` is the location in world space of the mouse pointer on the surface of the shape with index `shapeIdx` and `normal` is the normal vector of the surface at that point. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.inputEvent.connect { camera, event, eventPosition, normal, shapeIdx in + /// print ("caught signal") + /// } + /// ``` + public var inputEvent: Signal1 { Signal1 (target: self, signalName: "input_event") } + + /// Emitted when the mouse pointer enters any of this object's shapes. Requires ``inputRayPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + /// > Note: Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject3D``'s area is small. This signal may also not be emitted if another ``CollisionObject3D`` is overlapping the ``CollisionObject3D`` in question. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseEntered: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_entered") } + + /// Emitted when the mouse pointer exits all this object's shapes. Requires ``inputRayPickable`` to be `true` and at least one ``collisionLayer`` bit to be set. + /// + /// > Note: Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the ``CollisionObject3D``'s area is small. This signal may also not be emitted if another ``CollisionObject3D`` is overlapping the ``CollisionObject3D`` in question. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseExited: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_exited") } + +} + +// Support methods for proxies +func _CollisionObject3D_proxy_input_event (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + swiftObject._inputEvent (camera: lookupLiveObject (handleAddress: resolved_0) as? Camera3D ?? lookupObject (nativeHandle: resolved_0)!, event: lookupLiveObject (handleAddress: resolved_1) as? InputEvent ?? lookupObject (nativeHandle: resolved_1)!, eventPosition: args [2]!.assumingMemoryBound (to: Vector3.self).pointee, normal: args [3]!.assumingMemoryBound (to: Vector3.self).pointee, shapeIdx: args [4]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _CollisionObject3D_proxy_mouse_enter (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseEnter () +} + +func _CollisionObject3D_proxy_mouse_exit (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._mouseExit () +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionPolygon2D.swift b/Sources/SwiftGodot/Generated/Api/CollisionPolygon2D.swift new file mode 100644 index 000000000..0150d53c4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionPolygon2D.swift @@ -0,0 +1,336 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that provides a polygon shape to a ``CollisionObject2D`` parent. +/// +/// A node that provides a polygon shape to a ``CollisionObject2D`` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an ``Area2D``, turn ``PhysicsBody2D`` into a solid object, or give a hollow shape to a ``StaticBody2D``. +/// +/// > Warning: A non-uniformly scaled ``CollisionShape2D`` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. +/// +open class CollisionPolygon2D: Node2D { + override open class var godotClassName: StringName { "CollisionPolygon2D" } + public enum BuildMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Collisions will include the polygon and its contained area. In this mode the node has the same effect as several ``ConvexPolygonShape2D`` nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes). + case solids = 0 // BUILD_SOLIDS + /// Collisions will only include the polygon edges. In this mode the node has the same effect as a single ``ConcavePolygonShape2D`` made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon). + case segments = 1 // BUILD_SEGMENTS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .solids: return ".solids" + case .segments: return ".segments" + } + + } + + } + + + /* Properties */ + + /// Collision build mode. Use one of the ``CollisionPolygon2D/BuildMode`` constants. + final public var buildMode: CollisionPolygon2D.BuildMode { + get { + return get_build_mode () + } + + set { + set_build_mode (newValue) + } + + } + + /// The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first. + /// + /// > Note: The returned vertices are in the local coordinate space of the given ``CollisionPolygon2D``. + /// + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /// If `true`, no collisions will be detected. + final public var disabled: Bool { + get { + return is_disabled () + } + + set { + set_disabled (newValue) + } + + } + + /// If `true`, only edges that face up, relative to ``CollisionPolygon2D``'s rotation, will collide with other objects. + /// + /// > Note: This property has no effect if this ``CollisionPolygon2D`` is a child of an ``Area2D`` node. + /// + final public var oneWayCollision: Bool { + get { + return is_one_way_collision_enabled () + } + + set { + set_one_way_collision (newValue) + } + + } + + /// The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. + final public var oneWayCollisionMargin: Double { + get { + return get_one_way_collision_margin () + } + + set { + set_one_way_collision_margin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_build_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_build_mode") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2780803135)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_build_mode(_ buildMode: CollisionPolygon2D.BuildMode) { + withUnsafePointer(to: buildMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_set_build_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_build_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_build_mode") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3044948800)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_build_mode() -> CollisionPolygon2D.BuildMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_get_build_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CollisionPolygon2D.BuildMode (rawValue: _result)! + } + + fileprivate static var method_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disabled") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disabled(_ disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_disabled") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_is_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_one_way_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_way_collision") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_way_collision(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_set_one_way_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_one_way_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_one_way_collision_enabled") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_one_way_collision_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_is_one_way_collision_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_way_collision_margin") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_way_collision_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_set_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_way_collision_margin") + return withUnsafePointer(to: &CollisionPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_way_collision_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionPolygon2D.method_get_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionPolygon3D.swift b/Sources/SwiftGodot/Generated/Api/CollisionPolygon3D.swift new file mode 100644 index 000000000..b5af7c684 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionPolygon3D.swift @@ -0,0 +1,258 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that provides a thickened polygon shape (a prism) to a ``CollisionObject3D`` parent. +/// +/// A node that provides a thickened polygon shape (a prism) to a ``CollisionObject3D`` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an ``Area3D`` or turn ``PhysicsBody3D`` into a solid object. +/// +/// > Warning: A non-uniformly scaled ``CollisionShape3D`` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. +/// +open class CollisionPolygon3D: Node3D { + override open class var godotClassName: StringName { "CollisionPolygon3D" } + + /* Properties */ + + /// Length that the resulting collision extends in either direction perpendicular to its 2D polygon. + final public var depth: Double { + get { + return get_depth () + } + + set { + set_depth (newValue) + } + + } + + /// If `true`, no collision will be produced. + final public var disabled: Bool { + get { + return is_disabled () + } + + set { + set_disabled (newValue) + } + + } + + /// Array of vertices which define the 2D polygon in the local XY plane. + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /// The collision margin for the generated ``Shape3D``. See ``Shape3D/margin`` for more details. + final public var margin: Double { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth(_ depth: Double) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_set_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disabled") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disabled(_ disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_disabled") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_is_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &CollisionPolygon3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionPolygon3D.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionShape2D.swift b/Sources/SwiftGodot/Generated/Api/CollisionShape2D.swift new file mode 100644 index 000000000..dd073538f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionShape2D.swift @@ -0,0 +1,317 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that provides a ``Shape2D`` to a ``CollisionObject2D`` parent. +/// +/// A node that provides a ``Shape2D`` to a ``CollisionObject2D`` parent and allows to edit it. This can give a detection shape to an ``Area2D`` or turn a ``PhysicsBody2D`` into a solid object. +open class CollisionShape2D: Node2D { + override open class var godotClassName: StringName { "CollisionShape2D" } + + /* Properties */ + + /// The actual shape owned by this collision shape. + final public var shape: Shape2D? { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// A disabled collision shape has no effect in the world. This property should be changed with ``Object/setDeferred(property:value:)``. + final public var disabled: Bool { + get { + return is_disabled () + } + + set { + set_disabled (newValue) + } + + } + + /// Sets whether this collision shape should only detect collision on one side (top or bottom). + /// + /// > Note: This property has no effect if this ``CollisionShape2D`` is a child of an ``Area2D`` node. + /// + final public var oneWayCollision: Bool { + get { + return is_one_way_collision_enabled () + } + + set { + set_one_way_collision (newValue) + } + + } + + /// The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. + final public var oneWayCollisionMargin: Double { + get { + return get_one_way_collision_margin () + } + + set { + set_one_way_collision_margin (newValue) + } + + } + + /// The collision shape debug color. + /// + /// > Note: The default value is ``ProjectSettings/debug/shapes/collision/shapeColor``. The `Color(0, 0, 0, 1)` value documented here is a placeholder, and not the actual default debug color. + /// + final public var debugColor: Color { + get { + return get_debug_color () + } + + set { + set_debug_color (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 771364740)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: Shape2D?) { + withUnsafePointer(to: shape?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape2D.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 522005891)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> Shape2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CollisionShape2D.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disabled") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disabled(_ disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape2D.method_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_disabled") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionShape2D.method_is_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_one_way_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_way_collision") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_way_collision(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape2D.method_set_one_way_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_one_way_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_one_way_collision_enabled") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_one_way_collision_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionShape2D.method_is_one_way_collision_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_way_collision_margin") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_way_collision_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape2D.method_set_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_one_way_collision_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_way_collision_margin") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_way_collision_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CollisionShape2D.method_get_one_way_collision_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_color") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape2D.method_set_debug_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_color") + return withUnsafePointer(to: &CollisionShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(CollisionShape2D.method_get_debug_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CollisionShape3D.swift b/Sources/SwiftGodot/Generated/Api/CollisionShape3D.swift new file mode 100644 index 000000000..a6192dd43 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CollisionShape3D.swift @@ -0,0 +1,189 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node that provides a ``Shape3D`` to a ``CollisionObject3D`` parent. +/// +/// A node that provides a ``Shape3D`` to a ``CollisionObject3D`` parent and allows to edit it. This can give a detection shape to an ``Area3D`` or turn a ``PhysicsBody3D`` into a solid object. +/// +/// > Warning: A non-uniformly scaled ``CollisionShape3D`` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its ``shape`` resource instead. +/// +open class CollisionShape3D: Node3D { + override open class var godotClassName: StringName { "CollisionShape3D" } + + /* Properties */ + + /// The actual shape owned by this collision shape. + final public var shape: Shape3D? { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// A disabled collision shape has no effect in the world. + final public var disabled: Bool { + get { + return is_disabled () + } + + set { + set_disabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_resource_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("resource_changed") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + /// This method does nothing. + public final func resourceChanged(resource: Resource?) { + withUnsafePointer(to: resource?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape3D.method_resource_changed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1549710052)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: Shape3D?) { + withUnsafePointer(to: shape?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape3D.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3214262478)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> Shape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CollisionShape3D.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disabled") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CollisionShape3D.method_set_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_disabled") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CollisionShape3D.method_is_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_make_convex_from_siblings: GDExtensionMethodBindPtr = { + let methodName = StringName("make_convex_from_siblings") + return withUnsafePointer(to: &CollisionShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sets the collision shape's shape to the addition of all its convexed ``MeshInstance3D`` siblings geometry. + public final func makeConvexFromSiblings() { + gi.object_method_bind_ptrcall(CollisionShape3D.method_make_convex_from_siblings, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ColorPicker.swift b/Sources/SwiftGodot/Generated/Api/ColorPicker.swift new file mode 100644 index 000000000..7b29162ea --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ColorPicker.swift @@ -0,0 +1,1099 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A widget that provides an interface for selecting or modifying a color. +/// +/// A widget that provides an interface for selecting or modifying a color. It can optionally provide functionalities like a color sampler (eyedropper), color modes, and presets. +/// +/// > Note: This control is the color picker widget itself. You can use a ``ColorPickerButton`` instead if you need a button that brings up a ``ColorPicker`` in a popup. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``colorChanged`` +/// - ``presetAdded`` +/// - ``presetRemoved`` +open class ColorPicker: VBoxContainer { + override open class var godotClassName: StringName { "ColorPicker" } + public enum ColorModeType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Allows editing the color with Red/Green/Blue sliders. + case rgb = 0 // MODE_RGB + /// Allows editing the color with Hue/Saturation/Value sliders. + case hsv = 1 // MODE_HSV + /// Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + case raw = 2 // MODE_RAW + /// Allows editing the color with Hue/Saturation/Lightness sliders. + /// + /// OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue. + /// + /// Okhsv and Okhsl color spaces + /// + case okhsl = 3 // MODE_OKHSL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rgb: return ".rgb" + case .hsv: return ".hsv" + case .raw: return ".raw" + case .okhsl: return ".okhsl" + } + + } + + } + + public enum PickerShapeType: Int64, CaseIterable, CustomDebugStringConvertible { + /// HSV Color Model rectangle color space. + case hsvRectangle = 0 // SHAPE_HSV_RECTANGLE + /// HSV Color Model rectangle color space with a wheel. + case hsvWheel = 1 // SHAPE_HSV_WHEEL + /// HSV Color Model circle color space. Use Saturation as a radius. + case vhsCircle = 2 // SHAPE_VHS_CIRCLE + /// HSL OK Color Model circle color space. + case okhslCircle = 3 // SHAPE_OKHSL_CIRCLE + /// The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. + case none = 4 // SHAPE_NONE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .hsvRectangle: return ".hsvRectangle" + case .hsvWheel: return ".hsvWheel" + case .vhsCircle: return ".vhsCircle" + case .okhslCircle: return ".okhslCircle" + case .none: return ".none" + } + + } + + } + + + /* Properties */ + + /// The currently selected color. + final public var color: Color { + get { + return get_pick_color () + } + + set { + set_pick_color (newValue) + } + + } + + /// If `true`, shows an alpha channel slider (opacity). + final public var editAlpha: Bool { + get { + return is_editing_alpha () + } + + set { + set_edit_alpha (newValue) + } + + } + + /// The currently selected color mode. See ``ColorPicker/ColorModeType``. + final public var colorMode: ColorPicker.ColorModeType { + get { + return get_color_mode () + } + + set { + set_color_mode (newValue) + } + + } + + /// If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). + final public var deferredMode: Bool { + get { + return is_deferred_mode () + } + + set { + set_deferred_mode (newValue) + } + + } + + /// The shape of the color space view. See ``ColorPicker/PickerShapeType``. + final public var pickerShape: ColorPicker.PickerShapeType { + get { + return get_picker_shape () + } + + set { + set_picker_shape (newValue) + } + + } + + /// If `true`, it's possible to add presets under Swatches. If `false`, the button to add presets is disabled. + final public var canAddSwatches: Bool { + get { + return are_swatches_enabled () + } + + set { + set_can_add_swatches (newValue) + } + + } + + /// If `true`, the color sampler and color preview are visible. + final public var samplerVisible: Bool { + get { + return is_sampler_visible () + } + + set { + set_sampler_visible (newValue) + } + + } + + /// If `true`, the color mode buttons are visible. + final public var colorModesVisible: Bool { + get { + return are_modes_visible () + } + + set { + set_modes_visible (newValue) + } + + } + + /// If `true`, the color sliders are visible. + final public var slidersVisible: Bool { + get { + return are_sliders_visible () + } + + set { + set_sliders_visible (newValue) + } + + } + + /// If `true`, the hex color code input field is visible. + final public var hexVisible: Bool { + get { + return is_hex_visible () + } + + set { + set_hex_visible (newValue) + } + + } + + /// If `true`, the Swatches and Recent Colors presets are visible. + final public var presetsVisible: Bool { + get { + return are_presets_visible () + } + + set { + set_presets_visible (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pick_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pick_color") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pick_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_pick_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pick_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pick_color") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pick_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ColorPicker.method_get_pick_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_deferred_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_deferred_mode") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_deferred_mode(_ mode: Bool) { + withUnsafePointer(to: mode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_deferred_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_deferred_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_deferred_mode") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_deferred_mode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_is_deferred_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_mode") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1579114136)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_mode(_ colorMode: ColorPicker.ColorModeType) { + withUnsafePointer(to: colorMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_color_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_mode") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 392907674)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_mode() -> ColorPicker.ColorModeType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ColorPicker.method_get_color_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ColorPicker.ColorModeType (rawValue: _result)! + } + + fileprivate static var method_set_edit_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edit_alpha") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edit_alpha(_ show: Bool) { + withUnsafePointer(to: show) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_edit_alpha, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editing_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editing_alpha") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editing_alpha() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_is_editing_alpha, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_can_add_swatches: GDExtensionMethodBindPtr = { + let methodName = StringName("set_can_add_swatches") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_can_add_swatches(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_can_add_swatches, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_swatches_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("are_swatches_enabled") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_swatches_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_are_swatches_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_presets_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_presets_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_presets_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_presets_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_presets_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("are_presets_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_presets_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_are_presets_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_modes_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_modes_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_modes_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_modes_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_modes_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("are_modes_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_modes_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_are_modes_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sampler_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sampler_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sampler_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_sampler_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sampler_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sampler_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sampler_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_is_sampler_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sliders_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sliders_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sliders_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_sliders_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_sliders_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("are_sliders_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_sliders_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_are_sliders_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hex_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hex_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hex_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_hex_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hex_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hex_visible") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hex_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPicker.method_is_hex_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("add_preset") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. + /// + /// > Note: The presets list is only for _this_ color picker. + /// + public final func addPreset(color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_add_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_erase_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_preset") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Removes the given color from the list of color presets of this color picker. + public final func erasePreset(color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_erase_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_presets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_presets") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + /// Returns the list of colors in the presets of the color picker. + public final func getPresets() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(ColorPicker.method_get_presets, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_recent_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("add_recent_preset") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color. + /// + /// > Note: The recent presets list is only for _this_ color picker. + /// + public final func addRecentPreset(color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_add_recent_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_erase_recent_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_recent_preset") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Removes the given color from the list of color recent presets of this color picker. + public final func eraseRecentPreset(color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_erase_recent_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_recent_presets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_recent_presets") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + /// Returns the list of colors in the recent presets of the color picker. + public final func getRecentPresets() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(ColorPicker.method_get_recent_presets, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_picker_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_picker_shape") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3981373861)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_picker_shape(_ shape: ColorPicker.PickerShapeType) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPicker.method_set_picker_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_picker_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_picker_shape") + return withUnsafePointer(to: &ColorPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1143229889)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_picker_shape() -> ColorPicker.PickerShapeType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ColorPicker.method_get_picker_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ColorPicker.PickerShapeType (rawValue: _result)! + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ color: Color) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Color (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the color is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.colorChanged.connect { color in + /// print ("caught signal") + /// } + /// ``` + public var colorChanged: Signal1 { Signal1 (target: self, signalName: "color_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ color: Color) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Color (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a preset is added. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.presetAdded.connect { color in + /// print ("caught signal") + /// } + /// ``` + public var presetAdded: Signal2 { Signal2 (target: self, signalName: "preset_added") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ color: Color) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Color (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a preset is removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.presetRemoved.connect { color in + /// print ("caught signal") + /// } + /// ``` + public var presetRemoved: Signal3 { Signal3 (target: self, signalName: "preset_removed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ColorPickerButton.swift b/Sources/SwiftGodot/Generated/Api/ColorPickerButton.swift new file mode 100644 index 000000000..203352750 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ColorPickerButton.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that brings up a ``ColorPicker`` when pressed. +/// +/// Encapsulates a ``ColorPicker``, making it accessible by pressing a button. Pressing the button will toggle the ``ColorPicker``'s visibility. +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +/// > Note: By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set ``Control/customMinimumSize`` to a big enough value to give the button enough space. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``colorChanged`` +/// - ``popupClosed`` +/// - ``pickerCreated`` +open class ColorPickerButton: Button { + override open class var godotClassName: StringName { "ColorPickerButton" } + + /* Properties */ + + /// The currently selected color. + final public var color: Color { + get { + return get_pick_color () + } + + set { + set_pick_color (newValue) + } + + } + + /// If `true`, the alpha channel in the displayed ``ColorPicker`` will be visible. + final public var editAlpha: Bool { + get { + return is_editing_alpha () + } + + set { + set_edit_alpha (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pick_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pick_color") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pick_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPickerButton.method_set_pick_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pick_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pick_color") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pick_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ColorPickerButton.method_get_pick_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_picker: GDExtensionMethodBindPtr = { + let methodName = StringName("get_picker") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 331835996)! + } + + } + + }() + + /// Returns the ``ColorPicker`` that this node toggles. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getPicker() -> ColorPicker? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ColorPickerButton.method_get_picker, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("get_popup") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1322440207)! + } + + } + + }() + + /// Returns the control's ``PopupPanel`` which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``Window/visible`` property. + /// + public final func getPopup() -> PopupPanel? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ColorPickerButton.method_get_popup, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_edit_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edit_alpha") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edit_alpha(_ show: Bool) { + withUnsafePointer(to: show) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorPickerButton.method_set_edit_alpha, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editing_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editing_alpha") + return withUnsafePointer(to: &ColorPickerButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editing_alpha() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ColorPickerButton.method_is_editing_alpha, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ color: Color) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Color (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the color changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.colorChanged.connect { color in + /// print ("caught signal") + /// } + /// ``` + public var colorChanged: Signal1 { Signal1 (target: self, signalName: "color_changed") } + + /// Emitted when the ``ColorPicker`` is closed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.popupClosed.connect { + /// print ("caught signal") + /// } + /// ``` + public var popupClosed: SimpleSignal { SimpleSignal (target: self, signalName: "popup_closed") } + + /// Emitted when the ``ColorPicker`` is created (the button is pressed for the first time). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pickerCreated.connect { + /// print ("caught signal") + /// } + /// ``` + public var pickerCreated: SimpleSignal { SimpleSignal (target: self, signalName: "picker_created") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ColorRect.swift b/Sources/SwiftGodot/Generated/Api/ColorRect.swift new file mode 100644 index 000000000..20cede830 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ColorRect.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control that displays a solid color rectangle. +/// +/// Displays a rectangle filled with a solid ``color``. If you need to display the border alone, consider using a ``Panel`` instead. +open class ColorRect: Control { + override open class var godotClassName: StringName { "ColorRect" } + + /* Properties */ + + /// The fill color of the rectangle. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &ColorRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ColorRect.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &ColorRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ColorRect.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Compositor.swift b/Sources/SwiftGodot/Generated/Api/Compositor.swift new file mode 100644 index 000000000..102ef30ee --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Compositor.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Stores attributes used to customize how a Viewport is rendered. +/// +/// The compositor resource stores attributes used to customize how a ``Viewport`` is rendered. +open class Compositor: Resource { + override open class var godotClassName: StringName { "Compositor" } + + /* Properties */ + + /// The custom ``CompositorEffect``s that are applied during rendering of viewports using this compositor. + final public var compositorEffects: ObjectCollection { + get { + return get_compositor_effects () + } + + set { + set_compositor_effects (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_compositor_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_compositor_effects") + return withUnsafePointer(to: &Compositor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_compositor_effects(_ compositorEffects: ObjectCollection) { + withUnsafePointer(to: compositorEffects.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Compositor.method_set_compositor_effects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_compositor_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("get_compositor_effects") + return withUnsafePointer(to: &Compositor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_compositor_effects() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Compositor.method_get_compositor_effects, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompositorEffect.swift b/Sources/SwiftGodot/Generated/Api/CompositorEffect.swift new file mode 100644 index 000000000..055499e28 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompositorEffect.swift @@ -0,0 +1,489 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// This resource allows for creating a custom rendering effect. +/// +/// This resource defines a custom rendering effect that can be applied to ``Viewport``s through the viewports' ``Environment``. You can implement a callback that is called during rendering at a given stage of the rendering pipeline and allows you to insert additional passes. Note that this callback happens on the rendering thread. +open class CompositorEffect: Resource { + override open class var godotClassName: StringName { "CompositorEffect" } + public enum EffectCallbackType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The callback is called before our opaque rendering pass, but after depth prepass (if applicable). + case preOpaque = 0 // EFFECT_CALLBACK_TYPE_PRE_OPAQUE + /// The callback is called after our opaque rendering pass, but before our sky is rendered. + case postOpaque = 1 // EFFECT_CALLBACK_TYPE_POST_OPAQUE + /// The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). + case postSky = 2 // EFFECT_CALLBACK_TYPE_POST_SKY + /// The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. + case preTransparent = 3 // EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT + /// The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. + case postTransparent = 4 // EFFECT_CALLBACK_TYPE_POST_TRANSPARENT + /// Represents the size of the ``CompositorEffect/EffectCallbackType`` enum. + case max = 5 // EFFECT_CALLBACK_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .preOpaque: return ".preOpaque" + case .postOpaque: return ".postOpaque" + case .postSky: return ".postSky" + case .preTransparent: return ".preTransparent" + case .postTransparent: return ".postTransparent" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// If `true` this rendering effect is applied to any viewport it is added to. + final public var enabled: Bool { + get { + return get_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// The type of effect that is implemented, determines at what stage of rendering the callback is called. + final public var effectCallbackType: CompositorEffect.EffectCallbackType { + get { + return get_effect_callback_type () + } + + set { + set_effect_callback_type (newValue) + } + + } + + /// If `true` and MSAA is enabled, this will trigger a color buffer resolve before the effect is run. + /// + /// > Note: In ``_renderCallback(effectCallbackType:renderData:)``, to access the resolved buffer use: + /// + final public var accessResolvedColor: Bool { + get { + return get_access_resolved_color () + } + + set { + set_access_resolved_color (newValue) + } + + } + + /// If `true` and MSAA is enabled, this will trigger a depth buffer resolve before the effect is run. + /// + /// > Note: In ``_renderCallback(effectCallbackType:renderData:)``, to access the resolved buffer use: + /// + final public var accessResolvedDepth: Bool { + get { + return get_access_resolved_depth () + } + + set { + set_access_resolved_depth (newValue) + } + + } + + /// If `true` this triggers motion vectors being calculated during the opaque render state. + /// + /// > Note: In ``_renderCallback(effectCallbackType:renderData:)``, to access the motion vector buffer use: + /// + final public var needsMotionVectors: Bool { + get { + return get_needs_motion_vectors () + } + + set { + set_needs_motion_vectors (newValue) + } + + } + + /// If `true` this triggers normal and roughness data to be output during our depth pre-pass, only applicable for the Forward+ renderer. + /// + /// > Note: In ``_renderCallback(effectCallbackType:renderData:)``, to access the roughness buffer use: + /// + final public var needsNormalRoughness: Bool { + get { + return get_needs_normal_roughness () + } + + set { + set_needs_normal_roughness (newValue) + } + + } + + /// If `true` this triggers specular data being rendered to a separate buffer and combined after effects have been applied, only applicable for the Forward+ renderer. + final public var needsSeparateSpecular: Bool { + get { + return get_needs_separate_specular () + } + + set { + set_needs_separate_specular (newValue) + } + + } + + /* Methods */ + /// Implement this function with your custom rendering code. `effectCallbackType` should always match the effect callback type you've specified in ``effectCallbackType``. `renderData` provides access to the rendering state, it is only valid during rendering and should not be stored. + @_documentation(visibility: public) + open func _renderCallback(effectCallbackType: Int32, renderData: RenderData?) { + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enabled") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_effect_callback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_effect_callback_type") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1390728419)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_effect_callback_type(_ effectCallbackType: CompositorEffect.EffectCallbackType) { + withUnsafePointer(to: effectCallbackType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_effect_callback_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_effect_callback_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_effect_callback_type") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1221912590)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_effect_callback_type() -> CompositorEffect.EffectCallbackType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CompositorEffect.method_get_effect_callback_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CompositorEffect.EffectCallbackType (rawValue: _result)! + } + + fileprivate static var method_set_access_resolved_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_access_resolved_color") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_access_resolved_color(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_access_resolved_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_access_resolved_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_access_resolved_color") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_access_resolved_color() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_access_resolved_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_access_resolved_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_access_resolved_depth") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_access_resolved_depth(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_access_resolved_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_access_resolved_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_access_resolved_depth") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_access_resolved_depth() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_access_resolved_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_needs_motion_vectors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_needs_motion_vectors") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_needs_motion_vectors(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_needs_motion_vectors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_needs_motion_vectors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_needs_motion_vectors") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_needs_motion_vectors() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_needs_motion_vectors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_needs_normal_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_needs_normal_roughness") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_needs_normal_roughness(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_needs_normal_roughness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_needs_normal_roughness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_needs_normal_roughness") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_needs_normal_roughness() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_needs_normal_roughness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_needs_separate_specular: GDExtensionMethodBindPtr = { + let methodName = StringName("set_needs_separate_specular") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_needs_separate_specular(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompositorEffect.method_set_needs_separate_specular, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_needs_separate_specular: GDExtensionMethodBindPtr = { + let methodName = StringName("get_needs_separate_specular") + return withUnsafePointer(to: &CompositorEffect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_needs_separate_specular() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CompositorEffect.method_get_needs_separate_specular, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_render_callback": + return _CompositorEffect_proxy_render_callback + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _CompositorEffect_proxy_render_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + swiftObject._renderCallback (effectCallbackType: args [0]!.assumingMemoryBound (to: Int32.self).pointee, renderData: lookupLiveObject (handleAddress: resolved_1) as? RenderData ?? RenderData (nativeHandle: resolved_1)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedCubemap.swift b/Sources/SwiftGodot/Generated/Api/CompressedCubemap.swift new file mode 100644 index 000000000..8fa255494 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedCubemap.swift @@ -0,0 +1,44 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An optionally compressed ``Cubemap``. +/// +/// A cubemap that is loaded from a `.ccube` file. This file format is internal to Godot; it is created by importing other image formats with the import system. ``CompressedCubemap`` can use one of 4 compression methods: +/// +/// - Lossless (WebP or PNG, uncompressed on the GPU) +/// +/// - Lossy (WebP, uncompressed on the GPU) +/// +/// - VRAM Compressed (compressed on the GPU) +/// +/// - VRAM Uncompressed (uncompressed on the GPU) +/// +/// - Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) +/// +/// Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. +/// +/// Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +/// +/// See ``Cubemap`` for a general description of cubemaps. +/// +open class CompressedCubemap: CompressedTextureLayered { + override open class var godotClassName: StringName { "CompressedCubemap" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedCubemapArray.swift b/Sources/SwiftGodot/Generated/Api/CompressedCubemapArray.swift new file mode 100644 index 000000000..60d1da60d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedCubemapArray.swift @@ -0,0 +1,44 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An optionally compressed ``CubemapArray``. +/// +/// A cubemap array that is loaded from a `.ccubearray` file. This file format is internal to Godot; it is created by importing other image formats with the import system. ``CompressedCubemapArray`` can use one of 4 compression methods: +/// +/// - Lossless (WebP or PNG, uncompressed on the GPU) +/// +/// - Lossy (WebP, uncompressed on the GPU) +/// +/// - VRAM Compressed (compressed on the GPU) +/// +/// - VRAM Uncompressed (uncompressed on the GPU) +/// +/// - Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) +/// +/// Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. +/// +/// Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +/// +/// See ``CubemapArray`` for a general description of cubemap arrays. +/// +open class CompressedCubemapArray: CompressedTextureLayered { + override open class var godotClassName: StringName { "CompressedCubemapArray" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedTexture2D.swift b/Sources/SwiftGodot/Generated/Api/CompressedTexture2D.swift new file mode 100644 index 000000000..4f4edd24b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedTexture2D.swift @@ -0,0 +1,105 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture with 2 dimensions, optionally compressed. +/// +/// A texture that is loaded from a `.ctex` file. This file format is internal to Godot; it is created by importing other image formats with the import system. ``CompressedTexture2D`` can use one of 4 compression methods (including a lack of any compression): +/// +/// - Lossless (WebP or PNG, uncompressed on the GPU) +/// +/// - Lossy (WebP, uncompressed on the GPU) +/// +/// - VRAM Compressed (compressed on the GPU) +/// +/// - VRAM Uncompressed (uncompressed on the GPU) +/// +/// - Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) +/// +/// Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. +/// +/// Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +/// +open class CompressedTexture2D: Texture2D { + override open class var godotClassName: StringName { "CompressedTexture2D" } + + /* Properties */ + + /// The ``CompressedTexture2D``'s file path to a `.ctex` file. + final public var loadPath: String { + get { + return get_load_path () + } + + set { + _ = load (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &CompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + @inline(__always) + /// Loads the texture from the specified `path`. + fileprivate final func load(_ path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompressedTexture2D.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_load_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_load_path") + return withUnsafePointer(to: &CompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_load_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CompressedTexture2D.method_get_load_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedTexture2DArray.swift b/Sources/SwiftGodot/Generated/Api/CompressedTexture2DArray.swift new file mode 100644 index 000000000..53048a644 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedTexture2DArray.swift @@ -0,0 +1,44 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Array of 2-dimensional textures, optionally compressed. +/// +/// A texture array that is loaded from a `.ctexarray` file. This file format is internal to Godot; it is created by importing other image formats with the import system. ``CompressedTexture2DArray`` can use one of 4 compression methods: +/// +/// - Lossless (WebP or PNG, uncompressed on the GPU) +/// +/// - Lossy (WebP, uncompressed on the GPU) +/// +/// - VRAM Compressed (compressed on the GPU) +/// +/// - VRAM Uncompressed (uncompressed on the GPU) +/// +/// - Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed) +/// +/// Only **VRAM Compressed** actually reduces the memory usage on the GPU. The **Lossless** and **Lossy** compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed. +/// +/// Using **VRAM Compressed** also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +/// +/// See ``Texture2DArray`` for a general description of texture arrays. +/// +open class CompressedTexture2DArray: CompressedTextureLayered { + override open class var godotClassName: StringName { "CompressedTexture2DArray" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedTexture3D.swift b/Sources/SwiftGodot/Generated/Api/CompressedTexture3D.swift new file mode 100644 index 000000000..1f5daf20a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedTexture3D.swift @@ -0,0 +1,95 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture with 3 dimensions, optionally compressed. +/// +/// ``CompressedTexture3D`` is the VRAM-compressed counterpart of ``ImageTexture3D``. The file extension for ``CompressedTexture3D`` files is `.ctex3d`. This file format is internal to Godot; it is created by importing other image formats with the import system. +/// +/// ``CompressedTexture3D`` uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D. +/// +/// See ``Texture3D`` for a general description of 3D textures. +/// +open class CompressedTexture3D: Texture3D { + override open class var godotClassName: StringName { "CompressedTexture3D" } + + /* Properties */ + + /// The ``CompressedTexture3D``'s file path to a `.ctex3d` file. + final public var loadPath: String { + get { + return get_load_path () + } + + set { + _ = load (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &CompressedTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + @inline(__always) + /// Loads the texture from the specified `path`. + fileprivate final func load(_ path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompressedTexture3D.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_load_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_load_path") + return withUnsafePointer(to: &CompressedTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_load_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CompressedTexture3D.method_get_load_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CompressedTextureLayered.swift b/Sources/SwiftGodot/Generated/Api/CompressedTextureLayered.swift new file mode 100644 index 000000000..c9f81bca4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CompressedTextureLayered.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for texture arrays that can optionally be compressed. +/// +/// Base class for ``CompressedTexture2DArray`` and ``CompressedTexture3D``. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also ``TextureLayered``. +open class CompressedTextureLayered: TextureLayered { + override open class var godotClassName: StringName { "CompressedTextureLayered" } + + /* Properties */ + + /// The path the texture should be loaded from. + final public var loadPath: String { + get { + return get_load_path () + } + + set { + _ = load (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &CompressedTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + @inline(__always) + /// Loads the texture at `path`. + fileprivate final func load(_ path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CompressedTextureLayered.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_load_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_load_path") + return withUnsafePointer(to: &CompressedTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_load_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(CompressedTextureLayered.method_get_load_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape2D.swift b/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape2D.swift new file mode 100644 index 000000000..fb54867b3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape2D.swift @@ -0,0 +1,96 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D polyline shape used for physics collision. +/// +/// A 2D polyline shape, intended for use in physics. Used internally in ``CollisionPolygon2D`` when it's in ``CollisionPolygon2D/BuildMode/segments`` mode. +/// +/// Being just a collection of interconnected line segments, ``ConcavePolygonShape2D`` is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, ``ConcavePolygonShape2D`` is _hollow_ even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection. +/// +/// > Note: When used for collision, ``ConcavePolygonShape2D`` is intended to work with static ``CollisionShape2D`` nodes like ``StaticBody2D`` and will likely not behave well for ``CharacterBody2D``s or ``RigidBody2D``s in a mode other than Static. +/// +/// > Warning: Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. ``ConcavePolygonShape2D`` is hollow, so it won't detect a collision. +/// +/// **Performance:** Due to its complexity, ``ConcavePolygonShape2D`` is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, ``CollisionPolygon2D``'s ``CollisionPolygon2D/BuildMode/solids`` mode can be used, which decomposes the polygon into convex ones; see ``ConvexPolygonShape2D``'s documentation for instructions. +/// +open class ConcavePolygonShape2D: Shape2D { + override open class var godotClassName: StringName { "ConcavePolygonShape2D" } + + /* Properties */ + + /// The array of points that make up the ``ConcavePolygonShape2D``'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. + final public var segments: PackedVector2Array { + get { + return get_segments () + } + + set { + set_segments (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_segments") + return withUnsafePointer(to: &ConcavePolygonShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_segments(_ segments: PackedVector2Array) { + withUnsafePointer(to: segments.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConcavePolygonShape2D.method_set_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_segments") + return withUnsafePointer(to: &ConcavePolygonShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_segments() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(ConcavePolygonShape2D.method_get_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape3D.swift b/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape3D.swift new file mode 100644 index 000000000..63b3eb5b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConcavePolygonShape3D.swift @@ -0,0 +1,153 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D trimesh shape used for physics collision. +/// +/// A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. +/// +/// Being just a collection of interconnected triangles, ``ConcavePolygonShape3D`` is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, ``ConcavePolygonShape3D`` is _hollow_ even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection. +/// +/// > Note: When used for collision, ``ConcavePolygonShape3D`` is intended to work with static ``CollisionShape3D`` nodes like ``StaticBody3D`` and will likely not behave well for ``CharacterBody3D``s or ``RigidBody3D``s in a mode other than Static. +/// +/// > Warning: Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. ``ConcavePolygonShape3D`` is hollow, so it won't detect a collision. +/// +/// **Performance:** Due to its complexity, ``ConcavePolygonShape3D`` is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, ``ConvexPolygonShape3D`` should be used. For dynamic physics bodies that need concave collision, several ``ConvexPolygonShape3D``s can be used to represent its collision by using convex decomposition; see ``ConvexPolygonShape3D``'s documentation for instructions. +/// +open class ConcavePolygonShape3D: Shape3D { + override open class var godotClassName: StringName { "ConcavePolygonShape3D" } + + /* Properties */ + + final public var data: PackedVector3Array { + get { + return get_faces () + } + + set { + set_faces (newValue) + } + + } + + /// If set to `true`, collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals. + final public var backfaceCollision: Bool { + get { + return is_backface_collision_enabled () + } + + set { + set_backface_collision_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_faces") + return withUnsafePointer(to: &ConcavePolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + /// Sets the faces of the trimesh shape from an array of vertices. The `faces` array should be composed of triples such that each triple of vertices defines a triangle. + fileprivate final func set_faces(_ faces: PackedVector3Array) { + withUnsafePointer(to: faces.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConcavePolygonShape3D.method_set_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_faces") + return withUnsafePointer(to: &ConcavePolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + /// Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle. + fileprivate final func get_faces() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(ConcavePolygonShape3D.method_get_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_backface_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_backface_collision_enabled") + return withUnsafePointer(to: &ConcavePolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_backface_collision_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConcavePolygonShape3D.method_set_backface_collision_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_backface_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_backface_collision_enabled") + return withUnsafePointer(to: &ConcavePolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_backface_collision_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ConcavePolygonShape3D.method_is_backface_collision_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConeTwistJoint3D.swift b/Sources/SwiftGodot/Generated/Api/ConeTwistJoint3D.swift new file mode 100644 index 000000000..f8f0f4c17 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConeTwistJoint3D.swift @@ -0,0 +1,203 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. +/// +/// A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the ``ConeTwistJoint3D``. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc. +open class ConeTwistJoint3D: Joint3D { + override open class var godotClassName: StringName { "ConeTwistJoint3D" } + public enum Param: Int64, CaseIterable, CustomDebugStringConvertible { + /// Swing is rotation from side to side, around the axis perpendicular to the twist axis. + /// + /// The swing span defines, how much rotation will not get corrected along the swing axis. + /// + /// Could be defined as looseness in the ``ConeTwistJoint3D``. + /// + /// If below 0.05, this behavior is locked. + /// + case swingSpan = 0 // PARAM_SWING_SPAN + /// Twist is the rotation around the twist axis, this value defined how far the joint can twist. + /// + /// Twist is locked if below 0.05. + /// + case twistSpan = 1 // PARAM_TWIST_SPAN + /// The speed with which the swing or twist will take place. + /// + /// The higher, the faster. + /// + case bias = 2 // PARAM_BIAS + /// The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + case softness = 3 // PARAM_SOFTNESS + /// Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + case relaxation = 4 // PARAM_RELAXATION + /// Represents the size of the ``ConeTwistJoint3D/Param`` enum. + case max = 5 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .swingSpan: return ".swingSpan" + case .twistSpan: return ".twistSpan" + case .bias: return ".bias" + case .softness: return ".softness" + case .relaxation: return ".relaxation" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// Swing is rotation from side to side, around the axis perpendicular to the twist axis. + /// + /// The swing span defines, how much rotation will not get corrected along the swing axis. + /// + /// Could be defined as looseness in the ``ConeTwistJoint3D``. + /// + /// If below 0.05, this behavior is locked. + /// + final public var swingSpan: Double { + get { + return get_param (ConeTwistJoint3D.Param (rawValue: 0)!) + } + + set { + set_param (ConeTwistJoint3D.Param (rawValue: 0)!, newValue) + } + + } + + /// Twist is the rotation around the twist axis, this value defined how far the joint can twist. + /// + /// Twist is locked if below 0.05. + /// + final public var twistSpan: Double { + get { + return get_param (ConeTwistJoint3D.Param (rawValue: 1)!) + } + + set { + set_param (ConeTwistJoint3D.Param (rawValue: 1)!, newValue) + } + + } + + /// The speed with which the swing or twist will take place. + /// + /// The higher, the faster. + /// + final public var bias: Double { + get { + return get_param (ConeTwistJoint3D.Param (rawValue: 2)!) + } + + set { + set_param (ConeTwistJoint3D.Param (rawValue: 2)!, newValue) + } + + } + + /// The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + final public var softness: Double { + get { + return get_param (ConeTwistJoint3D.Param (rawValue: 3)!) + } + + set { + set_param (ConeTwistJoint3D.Param (rawValue: 3)!, newValue) + } + + } + + /// Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + final public var relaxation: Double { + get { + return get_param (ConeTwistJoint3D.Param (rawValue: 4)!) + } + + set { + set_param (ConeTwistJoint3D.Param (rawValue: 4)!, newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param") + return withUnsafePointer(to: &ConeTwistJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1062470226)! + } + + } + + }() + + @inline(__always) + /// Sets the value of the specified parameter. + final func set_param(_ param: ConeTwistJoint3D.Param, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConeTwistJoint3D.method_set_param, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param") + return withUnsafePointer(to: &ConeTwistJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2928790850)! + } + + } + + }() + + @inline(__always) + /// Returns the value of the specified parameter. + final func get_param(_ param: ConeTwistJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConeTwistJoint3D.method_get_param, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConfigFile.swift b/Sources/SwiftGodot/Generated/Api/ConfigFile.swift new file mode 100644 index 000000000..9e09e50ae --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConfigFile.swift @@ -0,0 +1,542 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Helper class to handle INI-style files. +/// +/// This helper class can be used to store ``Variant`` values on the filesystem using INI-style formatting. The stored values are identified by a section and a key: +/// +/// The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. +/// +/// The following example shows how to create a simple ``ConfigFile`` and save it on disc: +/// +/// This example shows how the above file could be loaded: +/// +/// Any operation that mutates the ConfigFile such as ``setValue(section:key:value:)``, ``clear()``, or ``eraseSection(_:)``, only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with ``save(path:)``, ``saveEncrypted(path:key:)``, or ``saveEncryptedPass(path:password:)``. +/// +/// Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. +/// +/// ConfigFiles can also contain manually written comment lines starting with a semicolon (`;`). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action. +/// +/// > Note: The file extension given to a ConfigFile does not have any impact on its formatting or behavior. By convention, the `.cfg` extension is used here, but any other extension such as `.ini` is also valid. Since neither `.cfg` nor `.ini` are standardized, Godot's ConfigFile formatting may differ from files written by other programs. +/// +open class ConfigFile: RefCounted { + override open class var godotClassName: StringName { "ConfigFile" } + /* Methods */ + fileprivate static var method_set_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_value") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2504492430)! + } + + } + + }() + + /// Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a `null` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. + public final func setValue(section: String, key: String, value: Variant?) { + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_set_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_value") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 89809366)! + } + + } + + }() + + /// Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback `default` value. If `default` is not specified or set to `null`, an error is also raised. + public final func getValue(section: String, key: String, `default`: Variant?) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: `default`.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_get_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_has_section: GDExtensionMethodBindPtr = { + let methodName = StringName("has_section") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the specified section exists. + public final func hasSection(_ section: String) -> Bool { + var _result: Bool = false + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_has_section, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_section_key: GDExtensionMethodBindPtr = { + let methodName = StringName("has_section_key") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 820780508)! + } + + } + + }() + + /// Returns `true` if the specified section-key pair exists. + public final func hasSectionKey(section: String, key: String) -> Bool { + var _result: Bool = false + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_has_section_key, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_sections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sections") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns an array of all defined section identifiers. + public final func getSections() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(ConfigFile.method_get_sections, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_section_keys: GDExtensionMethodBindPtr = { + let methodName = StringName("get_section_keys") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4291131558)! + } + + } + + }() + + /// Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist. + public final func getSectionKeys(section: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_get_section_keys, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_erase_section: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_section") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. + public final func eraseSection(_ section: String) { + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_erase_section, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_erase_section_key: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_section_key") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3186203200)! + } + + } + + }() + + /// Deletes the specified key in a section. Raises an error if either the section or the key do not exist. + public final func eraseSectionKey(section: String, key: String) { + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_erase_section_key, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ``ConfigFile`` object which the method was called on. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func load(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_parse: GDExtensionMethodBindPtr = { + let methodName = StringName("parse") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func parse(data: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let data = GString(data) + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_parse, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save: GDExtensionMethodBindPtr = { + let methodName = StringName("save") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Saves the contents of the ``ConfigFile`` object to the file specified as a parameter. The output file uses an INI-style structure. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func save(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_save, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_encode_to_text: GDExtensionMethodBindPtr = { + let methodName = StringName("encode_to_text") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Obtain the text version of this config file (the same text that would be written to a file). + public final func encodeToText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(ConfigFile.method_encode_to_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_load_encrypted: GDExtensionMethodBindPtr = { + let methodName = StringName("load_encrypted") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 887037711)! + } + + } + + }() + + /// Loads the encrypted config file specified as a parameter, using the provided `key` to decrypt it. The file's contents are parsed and loaded in the ``ConfigFile`` object which the method was called on. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func loadEncrypted(path: String, key: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_load_encrypted, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_encrypted_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("load_encrypted_pass") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Loads the encrypted config file specified as a parameter, using the provided `password` to decrypt it. The file's contents are parsed and loaded in the ``ConfigFile`` object which the method was called on. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func loadEncryptedPass(path: String, password: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + let password = GString(password) + withUnsafePointer(to: password.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_load_encrypted_pass, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_encrypted: GDExtensionMethodBindPtr = { + let methodName = StringName("save_encrypted") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 887037711)! + } + + } + + }() + + /// Saves the contents of the ``ConfigFile`` object to the AES-256 encrypted file specified as a parameter, using the provided `key` to encrypt it. The output file uses an INI-style structure. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func saveEncrypted(path: String, key: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_save_encrypted, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_encrypted_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("save_encrypted_pass") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Saves the contents of the ``ConfigFile`` object to the AES-256 encrypted file specified as a parameter, using the provided `password` to encrypt it. The output file uses an INI-style structure. + /// + /// Returns ``GodotError/ok`` on success, or one of the other ``GodotError`` values if the operation failed. + /// + public final func saveEncryptedPass(path: String, password: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + let password = GString(password) + withUnsafePointer(to: password.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ConfigFile.method_save_encrypted_pass, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &ConfigFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes the entire contents of the config. + public final func clear() { + gi.object_method_bind_ptrcall(ConfigFile.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConfirmationDialog.swift b/Sources/SwiftGodot/Generated/Api/ConfirmationDialog.swift new file mode 100644 index 000000000..aa89adbe0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConfirmationDialog.swift @@ -0,0 +1,112 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A dialog used for confirmation of actions. +/// +/// A dialog used for confirmation of actions. This window is similar to ``AcceptDialog``, but pressing its Cancel button can have a different outcome from pressing the OK button. The order of the two buttons varies depending on the host OS. +/// +/// To get cancel action, you can use: +/// +open class ConfirmationDialog: AcceptDialog { + override open class var godotClassName: StringName { "ConfirmationDialog" } + + /* Properties */ + + /// The text displayed by the cancel button (see ``getCancelButton()``). + final public var cancelButtonText: String { + get { + return get_cancel_button_text () + } + + set { + set_cancel_button_text (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_cancel_button: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cancel_button") + return withUnsafePointer(to: &ConfirmationDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1856205918)! + } + + } + + }() + + /// Returns the cancel button. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getCancelButton() -> Button? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ConfirmationDialog.method_get_cancel_button, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_cancel_button_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cancel_button_text") + return withUnsafePointer(to: &ConfirmationDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cancel_button_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConfirmationDialog.method_set_cancel_button_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cancel_button_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cancel_button_text") + return withUnsafePointer(to: &ConfirmationDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cancel_button_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(ConfirmationDialog.method_get_cancel_button_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Container.swift b/Sources/SwiftGodot/Generated/Api/Container.swift new file mode 100644 index 000000000..ecdf4e647 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Container.swift @@ -0,0 +1,166 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for all GUI containers. +/// +/// Base class for all GUI containers. A ``Container`` automatically arranges its child controls in a certain way. This class can be inherited to make custom container types. +/// +/// +/// This object emits the following signals: +/// +/// - ``preSortChildren`` +/// - ``sortChildren`` +open class Container: Control { + override open class var godotClassName: StringName { "Container" } + /* Constants */ + /// Notification just before children are going to be sorted, in case there's something to process beforehand. + public static let notificationPreSortChildren = 50 + /// Notification for when sorting the children, it must be obeyed immediately. + public static let notificationSortChildren = 51 + /* Methods */ + /// Implement to return a list of allowed horizontal ``Control.SizeFlags`` for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. + /// + /// > Note: Having no size flags is equal to having ``Control/SizeFlags/shrinkBegin``. As such, this value is always implicitly allowed. + /// + @_documentation(visibility: public) + open func _getAllowedSizeFlagsHorizontal() -> PackedInt32Array { + return PackedInt32Array () + } + + /// Implement to return a list of allowed vertical ``Control.SizeFlags`` for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. + /// + /// > Note: Having no size flags is equal to having ``Control/SizeFlags/shrinkBegin``. As such, this value is always implicitly allowed. + /// + @_documentation(visibility: public) + open func _getAllowedSizeFlagsVertical() -> PackedInt32Array { + return PackedInt32Array () + } + + fileprivate static var method_queue_sort: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_sort") + return withUnsafePointer(to: &Container.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Queue resort of the contained children. This is called automatically anyway, but can be called upon request. + public final func queueSort() { + gi.object_method_bind_ptrcall(Container.method_queue_sort, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_fit_child_in_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("fit_child_in_rect") + return withUnsafePointer(to: &Container.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1993438598)! + } + + } + + }() + + /// Fit a child control in a given rect. This is mainly a helper for creating custom container classes. + public final func fitChildInRect(child: Control?, rect: Rect2) { + withUnsafePointer(to: child?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Container.method_fit_child_in_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_allowed_size_flags_horizontal": + return _Container_proxy_get_allowed_size_flags_horizontal + case "_get_allowed_size_flags_vertical": + return _Container_proxy_get_allowed_size_flags_vertical + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when children are going to be sorted. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.preSortChildren.connect { + /// print ("caught signal") + /// } + /// ``` + public var preSortChildren: SimpleSignal { SimpleSignal (target: self, signalName: "pre_sort_children") } + + /// Emitted when sorting the children is needed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sortChildren.connect { + /// print ("caught signal") + /// } + /// ``` + public var sortChildren: SimpleSignal { SimpleSignal (target: self, signalName: "sort_children") } + +} + +// Support methods for proxies +func _Container_proxy_get_allowed_size_flags_horizontal (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAllowedSizeFlagsHorizontal () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedInt32Array + ret.content = PackedInt32Array.zero +} + +func _Container_proxy_get_allowed_size_flags_vertical (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAllowedSizeFlagsVertical () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedInt32Array + ret.content = PackedInt32Array.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/Control.swift b/Sources/SwiftGodot/Generated/Api/Control.swift new file mode 100644 index 000000000..6a44da098 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Control.swift @@ -0,0 +1,4472 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for all GUI controls. Adapts its position and size based on its parent control. +/// +/// Base class for all UI-related nodes. ``Control`` features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and offsets relative to the anchor. The offsets update automatically when the node, any of its parents, or the screen size change. +/// +/// For more information on Godot's UI system, anchors, offsets, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from ``Control`` and ``Container`` nodes. +/// +/// **User Interface nodes and input** +/// +/// Godot propagates input events via viewports. Each ``Viewport`` is responsible for propagating ``InputEvent``s to their child nodes. As the ``SceneTree/root`` is a ``Window``, this already happens automatically for all UI elements in your game. +/// +/// Input events are propagated through the ``SceneTree`` from the root node to all child nodes by calling ``Node/_input(event:)``. For UI elements specifically, it makes more sense to override the virtual method ``_guiInput(event:)``, which filters out unrelated input events, such as by checking z-order, ``mouseFilter``, focus, or if the event was inside of the control's bounding box. +/// +/// Call ``acceptEvent()`` so no other node receives the event. Once you accept an input, it becomes handled so ``Node/_unhandledInput(event:)`` will not process it. +/// +/// Only one ``Control`` node can be in focus. Only the node in focus will receive events. To get the focus, call ``grabFocus()``. ``Control`` nodes lose focus when another node grabs it, or if you hide the node in focus. +/// +/// Sets ``mouseFilter`` to ``MouseFilter/ignore`` to tell a ``Control`` node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. +/// +/// ``Theme`` resources change the Control's appearance. If you change the ``Theme`` on a ``Control`` node, it affects all of its children. To override some of the theme's parameters, call one of the `add_theme_*_override` methods, like ``addThemeFontOverride(name:font:)``. You can override the theme with the Inspector. +/// +/// > Note: Theme items are _not_ ``Object`` properties. This means you can't access their values using ``Object/get(property:)`` and ``Object/set(property:value:)``. Instead, use the `get_theme_*` and `add_theme_*_override` methods provided by this class. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``resized`` +/// - ``guiInput`` +/// - ``mouseEntered`` +/// - ``mouseExited`` +/// - ``focusEntered`` +/// - ``focusExited`` +/// - ``sizeFlagsChanged`` +/// - ``minimumSizeChanged`` +/// - ``themeChanged`` +open class Control: CanvasItem { + override open class var godotClassName: StringName { "Control" } + public enum FocusMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The node cannot grab focus. Use with ``focusMode``. + case none = 0 // FOCUS_NONE + /// The node can only grab focus on mouse clicks. Use with ``focusMode``. + case click = 1 // FOCUS_CLICK + /// The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with ``focusMode``. + case all = 2 // FOCUS_ALL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .click: return ".click" + case .all: return ".all" + } + + } + + } + + public enum CursorShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Show the system's arrow mouse cursor when the user hovers the node. Use with ``mouseDefaultCursorShape``. + case arrow = 0 // CURSOR_ARROW + /// Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. + case ibeam = 1 // CURSOR_IBEAM + /// Show the system's pointing hand mouse cursor when the user hovers the node. + case pointingHand = 2 // CURSOR_POINTING_HAND + /// Show the system's cross mouse cursor when the user hovers the node. + case cross = 3 // CURSOR_CROSS + /// Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. + case wait = 4 // CURSOR_WAIT + /// Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. + case busy = 5 // CURSOR_BUSY + /// Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. + case drag = 6 // CURSOR_DRAG + /// Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. + case canDrop = 7 // CURSOR_CAN_DROP + /// Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. + case forbidden = 8 // CURSOR_FORBIDDEN + /// Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. + case vsize = 9 // CURSOR_VSIZE + /// Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + case hsize = 10 // CURSOR_HSIZE + /// Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + case bdiagsize = 11 // CURSOR_BDIAGSIZE + /// Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of ``CursorShape/bdiagsize``. It tells the user they can resize the window or the panel both horizontally and vertically. + case fdiagsize = 12 // CURSOR_FDIAGSIZE + /// Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. + case move = 13 // CURSOR_MOVE + /// Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as ``CursorShape/vsize``. + case vsplit = 14 // CURSOR_VSPLIT + /// Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as ``CursorShape/hsize``. + case hsplit = 15 // CURSOR_HSPLIT + /// Show the system's help mouse cursor when the user hovers the node, a question mark. + case help = 16 // CURSOR_HELP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .arrow: return ".arrow" + case .ibeam: return ".ibeam" + case .pointingHand: return ".pointingHand" + case .cross: return ".cross" + case .wait: return ".wait" + case .busy: return ".busy" + case .drag: return ".drag" + case .canDrop: return ".canDrop" + case .forbidden: return ".forbidden" + case .vsize: return ".vsize" + case .hsize: return ".hsize" + case .bdiagsize: return ".bdiagsize" + case .fdiagsize: return ".fdiagsize" + case .move: return ".move" + case .vsplit: return ".vsplit" + case .hsplit: return ".hsplit" + case .help: return ".help" + } + + } + + } + + public enum LayoutPreset: Int64, CaseIterable, CustomDebugStringConvertible { + /// Snap all 4 anchors to the top-left of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case topLeft = 0 // PRESET_TOP_LEFT + /// Snap all 4 anchors to the top-right of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case topRight = 1 // PRESET_TOP_RIGHT + /// Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case bottomLeft = 2 // PRESET_BOTTOM_LEFT + /// Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case bottomRight = 3 // PRESET_BOTTOM_RIGHT + /// Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case centerLeft = 4 // PRESET_CENTER_LEFT + /// Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case centerTop = 5 // PRESET_CENTER_TOP + /// Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case centerRight = 6 // PRESET_CENTER_RIGHT + /// Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case centerBottom = 7 // PRESET_CENTER_BOTTOM + /// Snap all 4 anchors to the center of the parent control's bounds. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case center = 8 // PRESET_CENTER + /// Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case leftWide = 9 // PRESET_LEFT_WIDE + /// Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case topWide = 10 // PRESET_TOP_WIDE + /// Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case rightWide = 11 // PRESET_RIGHT_WIDE + /// Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case bottomWide = 12 // PRESET_BOTTOM_WIDE + /// Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case vcenterWide = 13 // PRESET_VCENTER_WIDE + /// Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case hcenterWide = 14 // PRESET_HCENTER_WIDE + /// Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the ``Control`` will fit its parent control. Use with ``setAnchorsPreset(_:keepOffsets:)``. + case fullRect = 15 // PRESET_FULL_RECT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .topLeft: return ".topLeft" + case .topRight: return ".topRight" + case .bottomLeft: return ".bottomLeft" + case .bottomRight: return ".bottomRight" + case .centerLeft: return ".centerLeft" + case .centerTop: return ".centerTop" + case .centerRight: return ".centerRight" + case .centerBottom: return ".centerBottom" + case .center: return ".center" + case .leftWide: return ".leftWide" + case .topWide: return ".topWide" + case .rightWide: return ".rightWide" + case .bottomWide: return ".bottomWide" + case .vcenterWide: return ".vcenterWide" + case .hcenterWide: return ".hcenterWide" + case .fullRect: return ".fullRect" + } + + } + + } + + public enum LayoutPresetMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The control will be resized to its minimum size. + case minsize = 0 // PRESET_MODE_MINSIZE + /// The control's width will not change. + case keepWidth = 1 // PRESET_MODE_KEEP_WIDTH + /// The control's height will not change. + case keepHeight = 2 // PRESET_MODE_KEEP_HEIGHT + /// The control's size will not change. + case keepSize = 3 // PRESET_MODE_KEEP_SIZE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .minsize: return ".minsize" + case .keepWidth: return ".keepWidth" + case .keepHeight: return ".keepHeight" + case .keepSize: return ".keepSize" + } + + } + + } + + public struct SizeFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Tells the parent ``Container`` to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with ``sizeFlagsHorizontal`` and ``sizeFlagsVertical``. + public static let fill = SizeFlags (rawValue: 1) + /// Tells the parent ``Container`` to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See ``sizeFlagsStretchRatio``. Use with ``sizeFlagsHorizontal`` and ``sizeFlagsVertical``. + public static let expand = SizeFlags (rawValue: 2) + /// Sets the node's size flags to both fill and expand. See ``SizeFlags/fill`` and ``SizeFlags/expand`` for more information. + public static let expandFill = SizeFlags (rawValue: 3) + /// Tells the parent ``Container`` to center the node in the available space. It is mutually exclusive with ``SizeFlags/fill`` and other shrink size flags, but can be used with ``SizeFlags/expand`` in some containers. Use with ``sizeFlagsHorizontal`` and ``sizeFlagsVertical``. + public static let shrinkCenter = SizeFlags (rawValue: 4) + /// Tells the parent ``Container`` to align the node with its end, either the bottom or the right edge. It is mutually exclusive with ``SizeFlags/fill`` and other shrink size flags, but can be used with ``SizeFlags/expand`` in some containers. Use with ``sizeFlagsHorizontal`` and ``sizeFlagsVertical``. + public static let shrinkEnd = SizeFlags (rawValue: 8) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.fill) { result += "fill, " } + if self.contains (.expand) { result += "expand, " } + if self.contains (.expandFill) { result += "expandFill, " } + if self.contains (.shrinkCenter) { result += "shrinkCenter, " } + if self.contains (.shrinkEnd) { result += "shrinkEnd, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum MouseFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// The control will receive mouse movement input events and mouse button input events if clicked on through ``_guiInput(event:)``. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. + case stop = 0 // MOUSE_FILTER_STOP + /// The control will receive mouse movement input events and mouse button input events if clicked on through ``_guiInput(event:)``. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to ``Node/_shortcutInput(event:)`` for further processing. + case pass = 1 // MOUSE_FILTER_PASS + /// The control will not receive mouse movement input events and mouse button input events if clicked on through ``_guiInput(event:)``. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. + /// + /// > Note: If the control has received [signal mouse_entered] but not [signal mouse_exited], changing the ``mouseFilter`` to ``MouseFilter/ignore`` will cause [signal mouse_exited] to be emitted. + /// + case ignore = 2 // MOUSE_FILTER_IGNORE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .stop: return ".stop" + case .pass: return ".pass" + case .ignore: return ".ignore" + } + + } + + } + + public enum GrowDirection: Int64, CaseIterable, CustomDebugStringConvertible { + /// The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. + case begin = 0 // GROW_DIRECTION_BEGIN + /// The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. + case end = 1 // GROW_DIRECTION_END + /// The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. + case both = 2 // GROW_DIRECTION_BOTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .begin: return ".begin" + case .end: return ".end" + case .both: return ".both" + } + + } + + } + + public enum Anchor: Int64, CaseIterable, CustomDebugStringConvertible { + /// Snaps one of the 4 anchor's sides to the origin of the node's `Rect`, in the top left. Use it with one of the `anchor_*` member variables, like ``anchorLeft``. To change all 4 anchors at once, use ``setAnchorsPreset(_:keepOffsets:)``. + case begin = 0 // ANCHOR_BEGIN + /// Snaps one of the 4 anchor's sides to the end of the node's `Rect`, in the bottom right. Use it with one of the `anchor_*` member variables, like ``anchorLeft``. To change all 4 anchors at once, use ``setAnchorsPreset(_:keepOffsets:)``. + case end = 1 // ANCHOR_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .begin: return ".begin" + case .end: return ".end" + } + + } + + } + + public enum LayoutDirection: Int64, CaseIterable, CustomDebugStringConvertible { + /// Automatic layout direction, determined from the parent control layout direction. + case inherited = 0 // LAYOUT_DIRECTION_INHERITED + /// Automatic layout direction, determined from the current locale. + case locale = 1 // LAYOUT_DIRECTION_LOCALE + /// Left-to-right layout direction. + case ltr = 2 // LAYOUT_DIRECTION_LTR + /// Right-to-left layout direction. + case rtl = 3 // LAYOUT_DIRECTION_RTL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherited: return ".inherited" + case .locale: return ".locale" + case .ltr: return ".ltr" + case .rtl: return ".rtl" + } + + } + + } + + public enum TextDirection: Int64, CaseIterable, CustomDebugStringConvertible { + /// Text writing direction is the same as layout direction. + case inherited = 3 // TEXT_DIRECTION_INHERITED + /// Automatic text writing direction, determined from the current locale and text content. + case auto = 0 // TEXT_DIRECTION_AUTO + /// Left-to-right text writing direction. + case ltr = 1 // TEXT_DIRECTION_LTR + /// Right-to-left text writing direction. + case rtl = 2 // TEXT_DIRECTION_RTL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherited: return ".inherited" + case .auto: return ".auto" + case .ltr: return ".ltr" + case .rtl: return ".rtl" + } + + } + + } + + /* Constants */ + /// Sent when the node changes size. Use ``size`` to get the new size. + public static let notificationResized = 40 + /// Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect which Control receives the notification. + /// + /// See also ``notificationMouseEnterSelf``. + /// + public static let notificationMouseEnter = 41 + /// Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect which Control receives the notification. + /// + /// See also ``notificationMouseExitSelf``. + /// + public static let notificationMouseExit = 42 + /// Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect which Control receives the notification. + /// + /// See also ``notificationMouseEnter``. + /// + public static let notificationMouseEnterSelf = 60 + /// Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect which Control receives the notification. + /// + /// See also ``notificationMouseExit``. + /// + public static let notificationMouseExitSelf = 61 + /// Sent when the node grabs focus. + public static let notificationFocusEnter = 43 + /// Sent when the node loses focus. + public static let notificationFocusExit = 44 + /// Sent when the node needs to refresh its theme items. This happens in one of the following cases: + /// + /// - The ``theme`` property is changed on this node or any of its ancestors. + /// + /// - The ``themeTypeVariation`` property is changed on this node. + /// + /// - One of the node's theme property overrides is changed. + /// + /// - The node enters the scene tree. + /// + /// > Note: As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. + /// + /// > Note: This notification is received alongside ``Node/notificationEnterTree``, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using ``Node/isNodeReady()``. + /// + public static let notificationThemeChanged = 45 + /// Sent when this node is inside a ``ScrollContainer`` which has begun being scrolled when dragging the scrollable area _with a touch event_. This notification is _not_ sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + /// + /// > Note: This signal is only emitted on Android or iOS, or on desktop/web platforms when ``ProjectSettings/inputDevices/pointing/emulateTouchFromMouse`` is enabled. + /// + public static let notificationScrollBegin = 47 + /// Sent when this node is inside a ``ScrollContainer`` which has stopped being scrolled when dragging the scrollable area _with a touch event_. This notification is _not_ sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + /// + /// > Note: This signal is only emitted on Android or iOS, or on desktop/web platforms when ``ProjectSettings/inputDevices/pointing/emulateTouchFromMouse`` is enabled. + /// + public static let notificationScrollEnd = 48 + /// Sent when control layout direction is changed. + public static let notificationLayoutDirectionChanged = 49 + + /* Properties */ + + /// Enables whether rendering of ``CanvasItem`` based children should be clipped to this control's rectangle. If `true`, parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input. + final public var clipContents: Bool { + get { + return is_clipping_contents () + } + + set { + set_clip_contents (newValue) + } + + } + + /// The minimum size of the node's bounding rectangle. If you set it to a value greater than `(0, 0)`, the node's bounding rectangle will always have at least this size. Note that ``Control`` nodes have their internal minimum size returned by ``getMinimumSize()``. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see ``getCombinedMinimumSize()``). + final public var customMinimumSize: Vector2 { + get { + return get_custom_minimum_size () + } + + set { + set_custom_minimum_size (newValue) + } + + } + + /// Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). + final public var layoutDirection: Control.LayoutDirection { + get { + return get_layout_direction () + } + + set { + set_layout_direction (newValue) + } + + } + + /// Distance between the node's left edge and its parent control, based on ``anchorLeft``. + /// + /// Offsets are often controlled by one or multiple parent ``Container`` nodes, so you should not modify them manually if your node is a direct child of a ``Container``. Offsets update automatically when you move or resize the node. + /// + final public var offsetLeft: Double { + get { + return get_offset (Side (rawValue: 0)!) + } + + set { + set_offset (Side (rawValue: 0)!, newValue) + } + + } + + /// Distance between the node's top edge and its parent control, based on ``anchorTop``. + /// + /// Offsets are often controlled by one or multiple parent ``Container`` nodes, so you should not modify them manually if your node is a direct child of a ``Container``. Offsets update automatically when you move or resize the node. + /// + final public var offsetTop: Double { + get { + return get_offset (Side (rawValue: 1)!) + } + + set { + set_offset (Side (rawValue: 1)!, newValue) + } + + } + + /// Distance between the node's right edge and its parent control, based on ``anchorRight``. + /// + /// Offsets are often controlled by one or multiple parent ``Container`` nodes, so you should not modify them manually if your node is a direct child of a ``Container``. Offsets update automatically when you move or resize the node. + /// + final public var offsetRight: Double { + get { + return get_offset (Side (rawValue: 2)!) + } + + set { + set_offset (Side (rawValue: 2)!, newValue) + } + + } + + /// Distance between the node's bottom edge and its parent control, based on ``anchorBottom``. + /// + /// Offsets are often controlled by one or multiple parent ``Container`` nodes, so you should not modify them manually if your node is a direct child of a ``Container``. Offsets update automatically when you move or resize the node. + /// + final public var offsetBottom: Double { + get { + return get_offset (Side (rawValue: 3)!) + } + + set { + set_offset (Side (rawValue: 3)!, newValue) + } + + } + + /// Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. + final public var growHorizontal: Control.GrowDirection { + get { + return get_h_grow_direction () + } + + set { + set_h_grow_direction (newValue) + } + + } + + /// Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. + final public var growVertical: Control.GrowDirection { + get { + return get_v_grow_direction () + } + + set { + set_v_grow_direction (newValue) + } + + } + + /// The node's rotation around its pivot, in radians. See ``pivotOffset`` to change the pivot's position. + /// + /// > Note: This property is edited in the inspector in degrees. If you want to use degrees in a script, use ``rotationDegrees``. + /// + final public var rotation: Double { + get { + return get_rotation () + } + + set { + set_rotation (newValue) + } + + } + + /// Helper property to access ``rotation`` in degrees instead of radians. + final public var rotationDegrees: Double { + get { + return get_rotation_degrees () + } + + set { + set_rotation_degrees (newValue) + } + + } + + /// The node's scale, relative to its ``size``. Change this property to scale the node around its ``pivotOffset``. The Control's ``tooltipText`` will also scale according to this value. + /// + /// > Note: This property is mainly intended to be used for animation purposes. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the documentation instead of scaling Controls individually. + /// + /// > Note: ``FontFile/oversampling`` does _not_ take ``Control`` ``scale`` into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling ``ProjectSettings/gui/theme/defaultFontMultichannelSignedDistanceField`` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, ``SystemFont/multichannelSignedDistanceField`` can be enabled in the inspector. + /// + /// > Note: If the Control node is a child of a ``Container`` node, the scale will be reset to `Vector2(1, 1)` when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using `await get_tree().process_frame` then set its ``scale`` property. + /// + final public var scale: Vector2 { + get { + return get_scale () + } + + set { + set_scale (newValue) + } + + } + + /// By default, the node's pivot is its top-left corner. When you change its ``rotation`` or ``scale``, it will rotate or scale around this pivot. Set this property to ``size`` / 2 to pivot around the Control's center. + final public var pivotOffset: Vector2 { + get { + return get_pivot_offset () + } + + set { + set_pivot_offset (newValue) + } + + } + + /// Tells the parent ``Container`` nodes how they should resize and place the node on the X axis. Use a combination of the ``Control/SizeFlags`` constants to change the flags. See the constants to learn what each does. + final public var sizeFlagsHorizontal: Control.SizeFlags { + get { + return get_h_size_flags () + } + + set { + set_h_size_flags (newValue) + } + + } + + /// Tells the parent ``Container`` nodes how they should resize and place the node on the Y axis. Use a combination of the ``Control/SizeFlags`` constants to change the flags. See the constants to learn what each does. + final public var sizeFlagsVertical: Control.SizeFlags { + get { + return get_v_size_flags () + } + + set { + set_v_size_flags (newValue) + } + + } + + /// If the node and at least one of its neighbors uses the ``SizeFlags/expand`` size flag, the parent ``Container`` will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space. + final public var sizeFlagsStretchRatio: Double { + get { + return get_stretch_ratio () + } + + set { + set_stretch_ratio (newValue) + } + + } + + /// If `true`, automatically converts code line numbers, list indices, ``SpinBox`` and ``ProgressBar`` values from the Western Arabic (0..9) to the numeral systems used in current locale. + /// + /// > Note: Numbers within the text are not automatically converted, it can be done manually, using ``TextServer/formatNumber(_:language:)``. + /// + final public var localizeNumeralSystem: Bool { + get { + return is_localizing_numeral_system () + } + + set { + set_localize_numeral_system (newValue) + } + + } + + /// Toggles if any text should automatically change to its translated version depending on the current locale. + final public var autoTranslate: Bool { + get { + return is_auto_translating () + } + + set { + set_auto_translate (newValue) + } + + } + + /// The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the ``mouseFilter`` property is not ``MouseFilter/ignore``. The time required for the tooltip to appear can be changed with the ``ProjectSettings/gui/timers/tooltipDelaySec`` option. See also ``getTooltip(atPosition:)``. + /// + /// The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding ``_makeCustomTooltip(forText:)``. The default tooltip includes a ``PopupPanel`` and ``Label`` whose theme properties can be customized using ``Theme`` methods with the `"TooltipPanel"` and `"TooltipLabel"` respectively. For example: + /// + final public var tooltipText: String { + get { + return get_tooltip_text () + } + + set { + set_tooltip_text (newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the ``ProjectSettings/input/uiLeft`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the left of this one. + final public var focusNeighborLeft: NodePath { + get { + return get_focus_neighbor (Side (rawValue: 0)!) + } + + set { + set_focus_neighbor (Side (rawValue: 0)!, newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the ``ProjectSettings/input/uiUp`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the top of this one. + final public var focusNeighborTop: NodePath { + get { + return get_focus_neighbor (Side (rawValue: 1)!) + } + + set { + set_focus_neighbor (Side (rawValue: 1)!, newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the ``ProjectSettings/input/uiRight`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the right of this one. + final public var focusNeighborRight: NodePath { + get { + return get_focus_neighbor (Side (rawValue: 2)!) + } + + set { + set_focus_neighbor (Side (rawValue: 2)!, newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the ``ProjectSettings/input/uiDown`` input action. The node must be a ``Control``. If this property is not set, Godot will give focus to the closest ``Control`` to the bottom of this one. + final public var focusNeighborBottom: NodePath { + get { + return get_focus_neighbor (Side (rawValue: 3)!) + } + + set { + set_focus_neighbor (Side (rawValue: 3)!, newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the ``ProjectSettings/input/uiFocusNext`` input action. + /// + /// If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + /// + final public var focusNext: NodePath { + get { + return get_focus_next () + } + + set { + set_focus_next (newValue) + } + + } + + /// Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the ``ProjectSettings/input/uiFocusPrev`` input action. + /// + /// If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + /// + final public var focusPrevious: NodePath { + get { + return get_focus_previous () + } + + set { + set_focus_previous (newValue) + } + + } + + /// The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard, gamepad, and mouse signals. + final public var focusMode: Control.FocusMode { + get { + return get_focus_mode () + } + + set { + set_focus_mode (newValue) + } + + } + + /// Controls whether the control will be able to receive mouse button input events through ``_guiInput(event:)`` and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. + final public var mouseFilter: Control.MouseFilter { + get { + return get_mouse_filter () + } + + set { + set_mouse_filter (newValue) + } + + } + + /// When enabled, scroll wheel events processed by ``_guiInput(event:)`` will be passed to the parent control even if ``mouseFilter`` is set to ``MouseFilter/stop``. As it defaults to true, this allows nested scrollable containers to work out of the box. + /// + /// You should disable it on the root of your UI if you do not want scroll events to go to the ``Node/_unhandledInput(event:)`` processing. + /// + final public var mouseForcePassScrollEvents: Bool { + get { + return is_force_pass_scroll_events () + } + + set { + set_force_pass_scroll_events (newValue) + } + + } + + /// The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. + /// + /// > Note: On Linux, shapes may vary depending on the cursor theme of the system. + /// + final public var mouseDefaultCursorShape: Control.CursorShape { + get { + return get_default_cursor_shape () + } + + set { + set_default_cursor_shape (newValue) + } + + } + + /// The ``Node`` which must be a parent of the focused ``Control`` for the shortcut to be activated. If `null`, the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. + final public var shortcutContext: Node? { + get { + return get_shortcut_context () + } + + set { + set_shortcut_context (newValue) + } + + } + + /// The ``Theme`` resource this node and all its ``Control`` and ``Window`` children use. If a child node has its own ``Theme`` resource set, theme items are merged with child's definitions having higher priority. + /// + /// > Note: ``Window`` styles will have no effect unless the window is embedded. + /// + final public var theme: Theme? { + get { + return get_theme () + } + + set { + set_theme (newValue) + } + + } + + /// The name of a theme type variation used by this ``Control`` to look up its own theme items. When empty, the class name of the node is used (e.g. [code skip-lint]Button` for the ``Button`` control), as well as the class names of all parent classes (in order of inheritance). + /// + /// When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See ``Theme/setTypeVariation(themeType:baseType:)``. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. + /// + /// > Note: To look up ``Control``'s own items use various `get_theme_*` methods without specifying `theme_type`. + /// + /// > Note: Theme items are looked for in the tree order, from branch to root, where each ``Control`` node is checked for its ``theme`` property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. + /// + final public var themeTypeVariation: StringName { + get { + return get_theme_type_variation () + } + + set { + set_theme_type_variation (newValue) + } + + } + + /* Methods */ + /// Virtual method to be implemented by the user. Returns whether the given `point` is inside this control. + /// + /// If not overridden, default behavior is checking if the point is within control's Rect. + /// + /// > Note: If you want to check if a point is inside the control, you can use `Rect2(Vector2.ZERO, size).has_point(point)`. + /// + @_documentation(visibility: public) + open func _hasPoint(_ point: Vector2) -> Bool { + return false + } + + /// User defined BiDi algorithm override function. + /// + /// Returns an ``GArray`` of ``Vector3i`` text ranges and text base directions, in the left-to-right order. Ranges should cover full source `text` without overlaps. BiDi algorithm will be used on each range separately. + /// + @_documentation(visibility: public) + open func _structuredTextParser(args: GArray, text: String) -> VariantCollection { + return VariantCollection() + } + + /// Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to ``customMinimumSize`` for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). + /// + /// If not overridden, defaults to ``Vector2/zero``. + /// + /// > Note: This method will not be called when the script is attached to a ``Control`` node that already overrides its minimum size (e.g. ``Label``, ``Button``, ``PanelContainer`` etc.). It can only be used with most basic GUI nodes, like ``Control``, ``Container``, ``Panel`` etc. + /// + @_documentation(visibility: public) + open func _getMinimumSize() -> Vector2 { + return Vector2 () + } + + /// Virtual method to be implemented by the user. Returns the tooltip text for the position `atPosition` in control's local coordinates, which will typically appear when the cursor is resting over this control. See ``getTooltip(atPosition:)``. + /// + /// > Note: If this method returns an empty ``String``, no tooltip is displayed. + /// + @_documentation(visibility: public) + open func _getTooltip(atPosition: Vector2) -> String { + return String () + } + + /// Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns `null` if there is no data to drag. Controls that want to receive drop data should implement ``_canDropData(atPosition:data:)`` and ``_dropData(atPosition:data:)``. `atPosition` is local to this control. Drag may be forced with ``forceDrag(data:preview:)``. + /// + /// A preview that will follow the mouse that should represent the data can be set with ``setDragPreview(control:)``. A good time to set the preview is in this method. + /// + @_documentation(visibility: public) + open func _getDragData(atPosition: Vector2) -> Variant? { + return nil + } + + /// Godot calls this method to test if `data` from a control's ``_getDragData(atPosition:)`` can be dropped at `atPosition`. `atPosition` is local to this control. + /// + /// This method should only be used to test the data. Process the data in ``_dropData(atPosition:data:)``. + /// + @_documentation(visibility: public) + open func _canDropData(atPosition: Vector2, data: Variant?) -> Bool { + return false + } + + /// Godot calls this method to pass you the `data` from a control's ``_getDragData(atPosition:)`` result. Godot first calls ``_canDropData(atPosition:data:)`` to test if `data` is allowed to drop at `atPosition` where `atPosition` is local to this control. + /// + @_documentation(visibility: public) + open func _dropData(atPosition: Vector2, data: Variant?) { + } + + /// Virtual method to be implemented by the user. Returns a ``Control`` node that should be used as a tooltip instead of the default one. The `forText` includes the contents of the ``tooltipText`` property. + /// + /// The returned node must be of type ``Control`` or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When `null` or a non-Control node is returned, the default tooltip will be used instead. + /// + /// The returned node will be added as child to a ``PopupPanel``, so you should only provide the contents of that panel. That ``PopupPanel`` can be themed using ``Theme/setStylebox(name:themeType:texture:)`` for the type `"TooltipPanel"` (see ``tooltipText`` for an example). + /// + /// > Note: The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its ``customMinimumSize`` to some non-zero value. + /// + /// > Note: The node (and any relevant children) should be ``CanvasItem/visible`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. + /// + /// **Example of usage with a custom-constructed node:** + /// + /// **Example of usage with a custom scene instance:** + /// + @_documentation(visibility: public) + open func _makeCustomTooltip(forText: String) -> Object? { + return Object () + } + + /// Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See ``acceptEvent()``. + /// + /// **Example usage for clicking a control:** + /// + /// The event won't trigger if: + /// + /// * clicking outside the control (see ``_hasPoint(_:)``); + /// + /// * control has ``mouseFilter`` set to ``MouseFilter/ignore``; + /// + /// * control is obstructed by another ``Control`` on top of it, which doesn't have ``mouseFilter`` set to ``MouseFilter/ignore``; + /// + /// * control's parent has ``mouseFilter`` set to ``MouseFilter/stop`` or has accepted the event; + /// + /// * it happens outside the parent's rectangle and the parent has either ``clipContents`` enabled. + /// + /// > Note: Event position is relative to the control origin. + /// + @_documentation(visibility: public) + open func _guiInput(event: InputEvent?) { + } + + fileprivate static var method_accept_event: GDExtensionMethodBindPtr = { + let methodName = StringName("accept_event") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to ``Node/_unhandledInput(event:)`` or ``Node/_unhandledKeyInput(event:)``. + /// + /// > Note: This does not affect the methods in ``Input``, only the way events are propagated. + /// + public final func acceptEvent() { + gi.object_method_bind_ptrcall(Control.method_accept_event, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_minimum_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minimum_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the minimum size for this control. See ``customMinimumSize``. + public final func getMinimumSize() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_minimum_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_combined_minimum_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_combined_minimum_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns combined minimum size from ``customMinimumSize`` and ``getMinimumSize()``. + public final func getCombinedMinimumSize() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_combined_minimum_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_anchors_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anchors_preset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 509135270)! + } + + } + + }() + + /// Sets the anchors to a `preset` from ``Control.LayoutPreset`` enum. This is the code equivalent to using the Layout menu in the 2D editor. + /// + /// If `keepOffsets` is `true`, control's position will also be updated. + /// + public final func setAnchorsPreset(_ preset: Control.LayoutPreset, keepOffsets: Bool = false) { + withUnsafePointer(to: preset.rawValue) { pArg0 in + withUnsafePointer(to: keepOffsets) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_anchors_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_offsets_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offsets_preset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3724524307)! + } + + } + + }() + + /// Sets the offsets to a `preset` from ``Control.LayoutPreset`` enum. This is the code equivalent to using the Layout menu in the 2D editor. + /// + /// Use parameter `resizeMode` with constants from ``Control.LayoutPresetMode`` to better determine the resulting size of the ``Control``. Constant size will be ignored if used with presets that change size, e.g. ``LayoutPreset/leftWide``. + /// + /// Use parameter `margin` to determine the gap between the ``Control`` and the edges. + /// + public final func setOffsetsPreset(_ preset: Control.LayoutPreset, resizeMode: Control.LayoutPresetMode = .minsize, margin: Int32 = 0) { + withUnsafePointer(to: preset.rawValue) { pArg0 in + withUnsafePointer(to: resizeMode.rawValue) { pArg1 in + withUnsafePointer(to: margin) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_offsets_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_anchors_and_offsets_preset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anchors_and_offsets_preset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3724524307)! + } + + } + + }() + + /// Sets both anchor preset and offset preset. See ``setAnchorsPreset(_:keepOffsets:)`` and ``setOffsetsPreset(_:resizeMode:margin:)``. + public final func setAnchorsAndOffsetsPreset(_ preset: Control.LayoutPreset, resizeMode: Control.LayoutPresetMode = .minsize, margin: Int32 = 0) { + withUnsafePointer(to: preset.rawValue) { pArg0 in + withUnsafePointer(to: resizeMode.rawValue) { pArg1 in + withUnsafePointer(to: margin) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_anchors_and_offsets_preset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_anchor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anchor") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2302782885)! + } + + } + + }() + + /// Sets the anchor for the specified ``Side`` to `anchor`. A setter method for ``anchorBottom``, ``anchorLeft``, ``anchorRight`` and ``anchorTop``. + /// + /// If `keepOffset` is `true`, offsets aren't updated after this operation. + /// + /// If `pushOppositeAnchor` is `true` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If `pushOppositeAnchor` was `false`, the left anchor would get value 0.5. + /// + public final func setAnchor(side: Side, anchor: Double, keepOffset: Bool = false, pushOppositeAnchor: Bool = true) { + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: anchor) { pArg1 in + withUnsafePointer(to: keepOffset) { pArg2 in + withUnsafePointer(to: pushOppositeAnchor) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_anchor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_anchor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_anchor") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2869120046)! + } + + } + + }() + + /// Returns the anchor for the specified ``Side``. A getter method for ``anchorBottom``, ``anchorLeft``, ``anchorRight`` and ``anchorTop``. + public final func getAnchor(side: Side) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_anchor, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4290182280)! + } + + } + + }() + + @inline(__always) + /// Sets the offset for the specified ``Side`` to `offset`. A setter method for ``offsetBottom``, ``offsetLeft``, ``offsetRight`` and ``offsetTop``. + fileprivate final func set_offset(_ side: Side, _ offset: Double) { + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2869120046)! + } + + } + + }() + + @inline(__always) + /// Returns the offset for the specified ``Side``. A getter method for ``offsetBottom``, ``offsetLeft``, ``offsetRight`` and ``offsetTop``. + fileprivate final func get_offset(_ offset: Side) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: offset.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_anchor_and_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anchor_and_offset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4031722181)! + } + + } + + }() + + /// Works the same as ``setAnchor(side:anchor:keepOffset:pushOppositeAnchor:)``, but instead of `keep_offset` argument and automatic update of offset, it allows to set the offset yourself (see ``setOffset(side:offset:)``). + public final func setAnchorAndOffset(side: Side, anchor: Double, offset: Double, pushOppositeAnchor: Bool = false) { + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: anchor) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: pushOppositeAnchor) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_anchor_and_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_begin") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets ``offsetLeft`` and ``offsetTop`` at the same time. Equivalent of changing ``position``. + public final func setBegin(position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_end") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets ``offsetRight`` and ``offsetBottom`` at the same time. + public final func setEnd(position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2436320129)! + } + + } + + }() + + /// Sets the ``position`` to given `position`. + /// + /// If `keepOffsets` is `true`, control's anchors will be updated instead of offsets. + /// + public final func setPosition(_ position: Vector2, keepOffsets: Bool = false) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: keepOffsets) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2436320129)! + } + + } + + }() + + /// Sets the size (see ``size``). + /// + /// If `keepOffsets` is `true`, control's anchors will be updated instead of offsets. + /// + public final func setSize(_ size: Vector2, keepOffsets: Bool = false) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: keepOffsets) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reset_size: GDExtensionMethodBindPtr = { + let methodName = StringName("reset_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Resets the size to ``getCombinedMinimumSize()``. This is equivalent to calling `set_size(Vector2())` (or any size below the minimum). + public final func resetSize() { + gi.object_method_bind_ptrcall(Control.method_reset_size, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_custom_minimum_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_minimum_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_minimum_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_custom_minimum_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_position") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2436320129)! + } + + } + + }() + + /// Sets the ``globalPosition`` to given `position`. + /// + /// If `keepOffsets` is `true`, control's anchors will be updated instead of offsets. + /// + public final func setGlobalPosition(_ position: Vector2, keepOffsets: Bool = false) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: keepOffsets) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_global_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_degrees") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_degrees(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_pivot_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pivot_offset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pivot_offset(_ pivotOffset: Vector2) { + withUnsafePointer(to: pivotOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_pivot_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_begin") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns ``offsetLeft`` and ``offsetTop``. See also ``position``. + public final func getBegin() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_end") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns ``offsetRight`` and ``offsetBottom``. + public final func getEnd() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + public final func getPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + public final func getSize() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Control.method_get_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_degrees") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_degrees() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Control.method_get_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pivot_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pivot_offset") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pivot_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_pivot_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_custom_minimum_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_minimum_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_minimum_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_custom_minimum_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_parent_area_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent_area_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the width/height occupied in the parent control. + public final func getParentAreaSize() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_parent_area_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_position") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + public final func getGlobalPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_global_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_screen_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_position") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the position of this ``Control`` in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + /// + /// Equals to ``globalPosition`` if the window is embedded (see ``Viewport/guiEmbedSubwindows``). + /// + /// **Example usage for showing a popup:** + /// + public final func getScreenPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Control.method_get_screen_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rect") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + /// Returns the position and size of the control in the coordinate system of the containing node. See ``position``, ``scale`` and ``size``. + /// + /// > Note: If ``rotation`` is not the default rotation, the resulting size is not meaningful. + /// + /// > Note: Setting ``Viewport/guiSnapControlsToPixels`` to `true` can lead to rounding inaccuracies between the displayed control and the returned ``Rect2``. + /// + public final func getRect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(Control.method_get_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_rect") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + /// Returns the position and size of the control relative to the containing canvas. See ``globalPosition`` and ``size``. + /// + /// > Note: If the node itself or any parent ``CanvasItem`` between the node and the canvas have a non default rotation or skew, the resulting size is likely not meaningful. + /// + /// > Note: Setting ``Viewport/guiSnapControlsToPixels`` to `true` can lead to rounding inaccuracies between the displayed control and the returned ``Rect2``. + /// + public final func getGlobalRect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(Control.method_get_global_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_focus_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focus_mode") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3232914922)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_focus_mode(_ mode: Control.FocusMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_focus_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focus_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focus_mode") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2132829277)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_focus_mode() -> Control.FocusMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_focus_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.FocusMode (rawValue: _result)! + } + + fileprivate static var method_has_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("has_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this is the current focused control. See ``focusMode``. + public final func hasFocus() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_has_focus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_grab_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("grab_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Steal the focus from another control and become the focused control (see ``focusMode``). + /// + /// > Note: Using this method together with ``Callable/callDeferred()`` makes it more reliable, especially when called inside ``Node/_ready()``. + /// + public final func grabFocus() { + gi.object_method_bind_ptrcall(Control.method_grab_focus, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_release_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("release_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Give up the focus. No other control will be able to receive input. + public final func releaseFocus() { + gi.object_method_bind_ptrcall(Control.method_release_focus, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_find_prev_valid_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("find_prev_valid_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783021301)! + } + + } + + }() + + /// Finds the previous (above in the tree) ``Control`` that can receive the focus. + public final func findPrevValidFocus() -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_find_prev_valid_focus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_find_next_valid_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("find_next_valid_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783021301)! + } + + } + + }() + + /// Finds the next (below in the tree) ``Control`` that can receive the focus. + public final func findNextValidFocus() -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_find_next_valid_focus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_find_valid_focus_neighbor: GDExtensionMethodBindPtr = { + let methodName = StringName("find_valid_focus_neighbor") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1543910170)! + } + + } + + }() + + /// Finds the next ``Control`` that can receive the focus on the specified ``Side``. + /// + /// > Note: This is different from ``getFocusNeighbor(side:)``, which returns the path of a specified focus neighbor. + /// + public final func findValidFocusNeighbor(side: Side) -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_find_valid_focus_neighbor, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_h_size_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_size_flags") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 394851643)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_size_flags(_ flags: Control.SizeFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_h_size_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_size_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_size_flags") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3781367401)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_size_flags() -> Control.SizeFlags { + var _result: Control.SizeFlags = Control.SizeFlags () + gi.object_method_bind_ptrcall(Control.method_get_h_size_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stretch_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stretch_ratio") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stretch_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_stretch_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stretch_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stretch_ratio") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stretch_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Control.method_get_stretch_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_v_size_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_size_flags") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 394851643)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_size_flags(_ flags: Control.SizeFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_v_size_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_size_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_size_flags") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3781367401)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_size_flags() -> Control.SizeFlags { + var _result: Control.SizeFlags = Control.SizeFlags () + gi.object_method_bind_ptrcall(Control.method_get_v_size_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_theme: GDExtensionMethodBindPtr = { + let methodName = StringName("set_theme") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2326690814)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_theme(_ theme: Theme?) { + withUnsafePointer(to: theme?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_theme, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_theme: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3846893731)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_theme() -> Theme? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_get_theme, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_theme_type_variation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_theme_type_variation") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_theme_type_variation(_ themeType: StringName) { + withUnsafePointer(to: themeType.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_theme_type_variation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_theme_type_variation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_type_variation") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_theme_type_variation() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Control.method_get_theme_type_variation, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_begin_bulk_theme_override: GDExtensionMethodBindPtr = { + let methodName = StringName("begin_bulk_theme_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Prevents `*_theme_*_override` methods from emitting ``notificationThemeChanged`` until ``endBulkThemeOverride()`` is called. + public final func beginBulkThemeOverride() { + gi.object_method_bind_ptrcall(Control.method_begin_bulk_theme_override, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_end_bulk_theme_override: GDExtensionMethodBindPtr = { + let methodName = StringName("end_bulk_theme_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Ends a bulk theme override update. See ``beginBulkThemeOverride()``. + public final func endBulkThemeOverride() { + gi.object_method_bind_ptrcall(Control.method_end_bulk_theme_override, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_theme_icon_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_icon_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1373065600)! + } + + } + + }() + + /// Creates a local override for a theme icon with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeIconOverride(name:)``. + /// + /// See also ``getThemeIcon(name:themeType:)``. + /// + public final func addThemeIconOverride(name: StringName, texture: Texture2D?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_icon_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_theme_stylebox_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_stylebox_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4188838905)! + } + + } + + }() + + /// Creates a local override for a theme ``StyleBox`` with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeStyleboxOverride(name:)``. + /// + /// See also ``getThemeStylebox(name:themeType:)``. + /// + /// **Example of modifying a property in a StyleBox by duplicating it:** + /// + public final func addThemeStyleboxOverride(name: StringName, stylebox: StyleBox?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: stylebox?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_stylebox_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_theme_font_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_font_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3518018674)! + } + + } + + }() + + /// Creates a local override for a theme ``Font`` with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeFontOverride(name:)``. + /// + /// See also ``getThemeFont(name:themeType:)``. + /// + public final func addThemeFontOverride(name: StringName, font: Font?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: font?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_font_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_theme_font_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_font_size_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2415702435)! + } + + } + + }() + + /// Creates a local override for a theme font size with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeFontSizeOverride(name:)``. + /// + /// See also ``getThemeFontSize(name:themeType:)``. + /// + public final func addThemeFontSizeOverride(name: StringName, fontSize: Int32) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: fontSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_font_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_theme_color_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_color_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4260178595)! + } + + } + + }() + + /// Creates a local override for a theme ``Color`` with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeColorOverride(name:)``. + /// + /// See also ``getThemeColor(name:themeType:)``. + /// + /// **Example of overriding a label's color and resetting it later:** + /// + public final func addThemeColorOverride(name: StringName, color: Color) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_color_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_theme_constant_override: GDExtensionMethodBindPtr = { + let methodName = StringName("add_theme_constant_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2415702435)! + } + + } + + }() + + /// Creates a local override for a theme constant with the specified `name`. Local overrides always take precedence when fetching theme items for the control. An override can be removed with ``removeThemeConstantOverride(name:)``. + /// + /// See also ``getThemeConstant(name:themeType:)``. + /// + public final func addThemeConstantOverride(name: StringName, constant: Int32) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: constant) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_add_theme_constant_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_theme_icon_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_icon_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme icon with the specified `name` previously added by ``addThemeIconOverride(name:texture:)`` or via the Inspector dock. + public final func removeThemeIconOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_icon_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_theme_stylebox_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_stylebox_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme ``StyleBox`` with the specified `name` previously added by ``addThemeStyleboxOverride(name:stylebox:)`` or via the Inspector dock. + public final func removeThemeStyleboxOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_stylebox_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_theme_font_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_font_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme ``Font`` with the specified `name` previously added by ``addThemeFontOverride(name:font:)`` or via the Inspector dock. + public final func removeThemeFontOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_font_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_theme_font_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_font_size_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme font size with the specified `name` previously added by ``addThemeFontSizeOverride(name:fontSize:)`` or via the Inspector dock. + public final func removeThemeFontSizeOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_font_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_theme_color_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_color_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme ``Color`` with the specified `name` previously added by ``addThemeColorOverride(name:color:)`` or via the Inspector dock. + public final func removeThemeColorOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_color_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_theme_constant_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_theme_constant_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes a local override for a theme constant with the specified `name` previously added by ``addThemeConstantOverride(name:constant:)`` or via the Inspector dock. + public final func removeThemeConstantOverride(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_remove_theme_constant_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_theme_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_icon") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2336455395)! + } + + } + + }() + + /// Returns an icon from the first matching ``Theme`` in the tree if that ``Theme`` has an icon item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeIcon(name: StringName, themeType: StringName = StringName ("")) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_theme_stylebox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_stylebox") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2759935355)! + } + + } + + }() + + /// Returns a ``StyleBox`` from the first matching ``Theme`` in the tree if that ``Theme`` has a stylebox item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeStylebox(name: StringName, themeType: StringName = StringName ("")) -> StyleBox? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_stylebox, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_theme_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_font") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 387378635)! + } + + } + + }() + + /// Returns a ``Font`` from the first matching ``Theme`` in the tree if that ``Theme`` has a font item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeFont(name: StringName, themeType: StringName = StringName ("")) -> Font? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_font, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_theme_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_font_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229578101)! + } + + } + + }() + + /// Returns a font size from the first matching ``Theme`` in the tree if that ``Theme`` has a font size item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeFontSize(name: StringName, themeType: StringName = StringName ("")) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_font_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_theme_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_color") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2377051548)! + } + + } + + }() + + /// Returns a ``Color`` from the first matching ``Theme`` in the tree if that ``Theme`` has a color item with the specified `name` and `themeType`. If `themeType` is omitted the class name of the current control is used as the type, or ``themeTypeVariation`` if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. + /// + /// For the current control its local overrides are considered first (see ``addThemeColorOverride(name:color:)``), then its assigned ``theme``. After the current control, each parent control and its assigned ``theme`` are considered; controls without a ``theme`` assigned are skipped. If no matching ``Theme`` is found in the tree, the custom project ``Theme`` (see ``ProjectSettings/gui/theme/custom``) and the default ``Theme`` are used (see ``ThemeDB``). + /// + public final func getThemeColor(name: StringName, themeType: StringName = StringName ("")) -> Color { + var _result: Color = Color () + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_theme_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_constant") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229578101)! + } + + } + + }() + + /// Returns a constant from the first matching ``Theme`` in the tree if that ``Theme`` has a constant item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeConstant(name: StringName, themeType: StringName = StringName ("")) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_theme_constant, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_icon_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_icon_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme icon with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeIconOverride(name:texture:)``. + /// + public final func hasThemeIconOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_icon_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_stylebox_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_stylebox_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme ``StyleBox`` with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeStyleboxOverride(name:stylebox:)``. + /// + public final func hasThemeStyleboxOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_stylebox_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_font_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_font_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme ``Font`` with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeFontOverride(name:font:)``. + /// + public final func hasThemeFontOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_font_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_font_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_font_size_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme font size with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeFontSizeOverride(name:fontSize:)``. + /// + public final func hasThemeFontSizeOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_font_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_color_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_color_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme ``Color`` with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeColorOverride(name:color:)``. + /// + public final func hasThemeColorOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_color_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_constant_override: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_constant_override") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if there is a local override for a theme constant with the specified `name` in this ``Control`` node. + /// + /// See ``addThemeConstantOverride(name:constant:)``. + /// + public final func hasThemeConstantOverride(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_constant_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_icon") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has an icon item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeIcon(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_stylebox: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_stylebox") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has a stylebox item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeStylebox(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_stylebox, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_font: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_font") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has a font item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeFont(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_font, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_font_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has a font size item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeFontSize(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_font_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_color: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_color") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has a color item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeColor(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_theme_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("has_theme_constant") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187511791)! + } + + } + + }() + + /// Returns `true` if there is a matching ``Theme`` in the tree that has a constant item with the specified `name` and `themeType`. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func hasThemeConstant(name: StringName, themeType: StringName = StringName ("")) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: themeType.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_has_theme_constant, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_theme_default_base_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_default_base_scale") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the default base scale value from the first matching ``Theme`` in the tree if that ``Theme`` has a valid ``Theme/defaultBaseScale`` value. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeDefaultBaseScale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Control.method_get_theme_default_base_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_theme_default_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_default_font") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229501585)! + } + + } + + }() + + /// Returns the default font from the first matching ``Theme`` in the tree if that ``Theme`` has a valid ``Theme/defaultFont`` value. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeDefaultFont() -> Font? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_get_theme_default_font, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_theme_default_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_theme_default_font_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the default font size value from the first matching ``Theme`` in the tree if that ``Theme`` has a valid ``Theme/defaultFontSize`` value. + /// + /// See ``getThemeColor(name:themeType:)`` for details. + /// + public final func getThemeDefaultFontSize() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Control.method_get_theme_default_font_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_parent_control: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent_control") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783021301)! + } + + } + + }() + + /// Returns the parent control node. + public final func getParentControl() -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_get_parent_control, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_h_grow_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_grow_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2022385301)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_grow_direction(_ direction: Control.GrowDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_h_grow_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_grow_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_grow_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635610155)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_grow_direction() -> Control.GrowDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_h_grow_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.GrowDirection (rawValue: _result)! + } + + fileprivate static var method_set_v_grow_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_grow_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2022385301)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_grow_direction(_ direction: Control.GrowDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_v_grow_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_grow_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_grow_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635610155)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_grow_direction() -> Control.GrowDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_v_grow_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.GrowDirection (rawValue: _result)! + } + + fileprivate static var method_set_tooltip_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tooltip_text") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tooltip_text(_ hint: String) { + let hint = GString(hint) + withUnsafePointer(to: hint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_tooltip_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tooltip_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tooltip_text") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tooltip_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Control.method_get_tooltip_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tooltip") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2895288280)! + } + + } + + }() + + /// Returns the tooltip text for the position `atPosition` in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns ``tooltipText``. + /// + /// This method can be overridden to customize its behavior. See ``_getTooltip(atPosition:)``. + /// + /// > Note: If this method returns an empty ``String``, no tooltip is displayed. + /// + public final func getTooltip(atPosition: Vector2 = Vector2 (x: 0, y: 0)) -> String { + let _result = GString () + withUnsafePointer(to: atPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_default_cursor_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_cursor_shape") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 217062046)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_default_cursor_shape(_ shape: Control.CursorShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_default_cursor_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_cursor_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_cursor_shape") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2359535750)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_default_cursor_shape() -> Control.CursorShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_default_cursor_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.CursorShape (rawValue: _result)! + } + + fileprivate static var method_get_cursor_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cursor_shape") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1395773853)! + } + + } + + }() + + /// Returns the mouse cursor shape the control displays on mouse hover. See ``Control/CursorShape``. + public final func getCursorShape(position: Vector2 = Vector2 (x: 0, y: 0)) -> Control.CursorShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_cursor_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Control.CursorShape (rawValue: _result)! + } + + fileprivate static var method_set_focus_neighbor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focus_neighbor") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2024461774)! + } + + } + + }() + + @inline(__always) + /// Sets the focus neighbor for the specified ``Side`` to the ``Control`` at `neighbor` node path. A setter method for ``focusNeighborBottom``, ``focusNeighborLeft``, ``focusNeighborRight`` and ``focusNeighborTop``. + fileprivate final func set_focus_neighbor(_ side: Side, _ neighbor: NodePath) { + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: neighbor.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_focus_neighbor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_focus_neighbor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focus_neighbor") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757935761)! + } + + } + + }() + + @inline(__always) + /// Returns the focus neighbor for the specified ``Side``. A getter method for ``focusNeighborBottom``, ``focusNeighborLeft``, ``focusNeighborRight`` and ``focusNeighborTop``. + /// + /// > Note: To find the next ``Control`` on the specific ``Side``, even if a neighbor is not assigned, use ``findValidFocusNeighbor(side:)``. + /// + fileprivate final func get_focus_neighbor(_ side: Side) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: side.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_get_focus_neighbor, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_focus_next: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focus_next") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_focus_next(_ next: NodePath) { + withUnsafePointer(to: next.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_focus_next, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focus_next: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focus_next") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_focus_next() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Control.method_get_focus_next, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_focus_previous: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focus_previous") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_focus_previous(_ previous: NodePath) { + withUnsafePointer(to: previous.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_focus_previous, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focus_previous: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focus_previous") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_focus_previous() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Control.method_get_focus_previous, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_force_drag: GDExtensionMethodBindPtr = { + let methodName = StringName("force_drag") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3191844692)! + } + + } + + }() + + /// Forces drag and bypasses ``_getDragData(atPosition:)`` and ``setDragPreview(control:)`` by passing `data` and `preview`. Drag will start even if the mouse is neither over nor pressed on this control. + /// + /// The methods ``_canDropData(atPosition:data:)`` and ``_dropData(atPosition:data:)`` must be implemented on controls that want to receive drop data. + /// + public final func forceDrag(data: Variant?, preview: Control?) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: preview?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Control.method_force_drag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_mouse_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mouse_filter") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3891156122)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mouse_filter(_ filter: Control.MouseFilter) { + withUnsafePointer(to: filter.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_mouse_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mouse_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mouse_filter") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1572545674)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mouse_filter() -> Control.MouseFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_mouse_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.MouseFilter (rawValue: _result)! + } + + fileprivate static var method_set_force_pass_scroll_events: GDExtensionMethodBindPtr = { + let methodName = StringName("set_force_pass_scroll_events") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_force_pass_scroll_events(_ forcePassScrollEvents: Bool) { + withUnsafePointer(to: forcePassScrollEvents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_force_pass_scroll_events, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_force_pass_scroll_events: GDExtensionMethodBindPtr = { + let methodName = StringName("is_force_pass_scroll_events") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_force_pass_scroll_events() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_force_pass_scroll_events, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clip_contents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_contents") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clip_contents(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_clip_contents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_clipping_contents: GDExtensionMethodBindPtr = { + let methodName = StringName("is_clipping_contents") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_clipping_contents() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_clipping_contents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_grab_click_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("grab_click_focus") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Creates an ``InputEventMouseButton`` that attempts to click the control. If the event is received, the control acquires focus. + /// + public final func grabClickFocus() { + gi.object_method_bind_ptrcall(Control.method_grab_click_focus, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_drag_forwarding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_forwarding") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1076571380)! + } + + } + + }() + + /// Forwards the handling of this control's ``_getDragData(atPosition:)``, ``_canDropData(atPosition:data:)`` and ``_dropData(atPosition:data:)`` virtual functions to delegate callables. + /// + /// For each argument, if not empty, the delegate callable is used, otherwise the local (virtual) function is used. + /// + /// The function format for each callable should be exactly the same as the virtual functions described above. + /// + public final func setDragForwarding(dragFunc: Callable, canDropFunc: Callable, dropFunc: Callable) { + withUnsafePointer(to: dragFunc.content) { pArg0 in + withUnsafePointer(to: canDropFunc.content) { pArg1 in + withUnsafePointer(to: dropFunc.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_drag_forwarding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_drag_preview: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_preview") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Shows the given control at the mouse pointer. A good time to call this method is in ``_getDragData(atPosition:)``. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. + /// + public final func setDragPreview(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_drag_preview, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drag_successful: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drag_successful") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if a drag operation is successful. Alternative to ``Viewport/guiIsDragSuccessful()``. + /// + /// Best used with ``Node/notificationDragEnd``. + /// + public final func isDragSuccessful() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_drag_successful, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_warp_mouse: GDExtensionMethodBindPtr = { + let methodName = StringName("warp_mouse") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Moves the mouse cursor to `position`, relative to ``position`` of this ``Control``. + /// + /// > Note: ``warpMouse(position:)`` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. + /// + public final func warpMouse(position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_warp_mouse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_shortcut_context: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut_context") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut_context(_ node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_shortcut_context, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shortcut_context: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shortcut_context") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shortcut_context() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Control.method_get_shortcut_context, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_update_minimum_size: GDExtensionMethodBindPtr = { + let methodName = StringName("update_minimum_size") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with ``getMinimumSize()`` when the return value is changed. Setting ``customMinimumSize`` directly calls this method automatically. + public final func updateMinimumSize() { + gi.object_method_bind_ptrcall(Control.method_update_minimum_size, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_layout_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layout_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3310692370)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layout_direction(_ direction: Control.LayoutDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_layout_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layout_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layout_direction") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1546772008)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layout_direction() -> Control.LayoutDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Control.method_get_layout_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.LayoutDirection (rawValue: _result)! + } + + fileprivate static var method_is_layout_rtl: GDExtensionMethodBindPtr = { + let methodName = StringName("is_layout_rtl") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if layout is right-to-left. + public final func isLayoutRtl() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_layout_rtl, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_translate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_translate") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_translate(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_auto_translate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_auto_translating: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_translating") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_translating() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_auto_translating, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_localize_numeral_system: GDExtensionMethodBindPtr = { + let methodName = StringName("set_localize_numeral_system") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_localize_numeral_system(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Control.method_set_localize_numeral_system, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_localizing_numeral_system: GDExtensionMethodBindPtr = { + let methodName = StringName("is_localizing_numeral_system") + return withUnsafePointer(to: &Control.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_localizing_numeral_system() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Control.method_is_localizing_numeral_system, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_can_drop_data": + return _Control_proxy_can_drop_data + case "_drop_data": + return _Control_proxy_drop_data + case "_get_drag_data": + return _Control_proxy_get_drag_data + case "_get_minimum_size": + return _Control_proxy_get_minimum_size + case "_get_tooltip": + return _Control_proxy_get_tooltip + case "_gui_input": + return _Control_proxy_gui_input + case "_has_point": + return _Control_proxy_has_point + case "_make_custom_tooltip": + return _Control_proxy_make_custom_tooltip + case "_structured_text_parser": + return _Control_proxy_structured_text_parser + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when the control changes size. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resized.connect { + /// print ("caught signal") + /// } + /// ``` + public var resized: SimpleSignal { SimpleSignal (target: self, signalName: "resized") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ event: InputEvent) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? InputEvent ?? lookupObject (nativeHandle: ptr_0!) ?? InputEvent (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the node receives an ``InputEvent``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.guiInput.connect { event in + /// print ("caught signal") + /// } + /// ``` + public var guiInput: Signal1 { Signal1 (target: self, signalName: "gui_input") } + + /// Emitted when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect, which Control receives the signal. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseEntered: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_entered") } + + /// Emitted when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its ``mouseFilter`` lets the event reach it and regardless if it's currently focused or not. + /// + /// > Note: ``CanvasItem/zIndex`` doesn't affect, which Control receives the signal. + /// + /// > Note: If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mouseExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var mouseExited: SimpleSignal { SimpleSignal (target: self, signalName: "mouse_exited") } + + /// Emitted when the node gains focus. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.focusEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var focusEntered: SimpleSignal { SimpleSignal (target: self, signalName: "focus_entered") } + + /// Emitted when the node loses focus. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.focusExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var focusExited: SimpleSignal { SimpleSignal (target: self, signalName: "focus_exited") } + + /// Emitted when one of the size flags changes. See ``sizeFlagsHorizontal`` and ``sizeFlagsVertical``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sizeFlagsChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var sizeFlagsChanged: SimpleSignal { SimpleSignal (target: self, signalName: "size_flags_changed") } + + /// Emitted when the node's minimum size changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.minimumSizeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var minimumSizeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "minimum_size_changed") } + + /// Emitted when the ``notificationThemeChanged`` notification is sent. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.themeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var themeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "theme_changed") } + +} + +// Support methods for proxies +func _Control_proxy_can_drop_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canDropData (atPosition: args [0]!.assumingMemoryBound (to: Vector2.self).pointee, data: args [1]!.assumingMemoryBound (to: Variant.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _Control_proxy_drop_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._dropData (atPosition: args [0]!.assumingMemoryBound (to: Vector2.self).pointee, data: args [1]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _Control_proxy_get_drag_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getDragData (atPosition: args [0]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _Control_proxy_get_minimum_size (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getMinimumSize () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _Control_proxy_get_tooltip (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getTooltip (atPosition: args [0]!.assumingMemoryBound (to: Vector2.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _Control_proxy_gui_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._guiInput (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? lookupObject (nativeHandle: resolved_0)!) +} + +func _Control_proxy_has_point (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hasPoint (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _Control_proxy_make_custom_tooltip (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._makeCustomTooltip (forText: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Object +} + +func _Control_proxy_structured_text_parser (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._structuredTextParser (args: GArray (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), text: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Vector3i +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape2D.swift b/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape2D.swift new file mode 100644 index 000000000..de1028eb5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape2D.swift @@ -0,0 +1,123 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D convex polygon shape used for physics collision. +/// +/// A 2D convex polygon shape, intended for use in physics. Used internally in ``CollisionPolygon2D`` when it's in ``CollisionPolygon2D/BuildMode/solids`` mode. +/// +/// ``ConvexPolygonShape2D`` is _solid_, which means it detects collisions from objects that are fully inside it, unlike ``ConcavePolygonShape2D`` which is hollow. This makes it more suitable for both detection and physics. +/// +/// **Convex decomposition:** A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several ``ConvexPolygonShape2D`` nodes or by using the ``CollisionPolygon2D`` node in ``CollisionPolygon2D/BuildMode/solids`` mode. To generate a collision polygon from a sprite, select the ``Sprite2D`` node, go to the **Sprite2D** menu that appears above the viewport, and choose **Create Polygon2D Sibling**. +/// +/// **Performance:** ``ConvexPolygonShape2D`` is faster to check collisions against compared to ``ConcavePolygonShape2D``, but it is slower than primitive collision shapes such as ``CircleShape2D`` and ``RectangleShape2D``. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. +/// +open class ConvexPolygonShape2D: Shape2D { + override open class var godotClassName: StringName { "ConvexPolygonShape2D" } + + /* Properties */ + + /// The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. + /// + /// > Warning: Only set this property to a list of points that actually form a convex hull. Use ``setPointCloud(_:)`` to generate the convex hull of an arbitrary set of points. + /// + final public var points: PackedVector2Array { + get { + return get_points () + } + + set { + set_points (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_point_cloud: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_cloud") + return withUnsafePointer(to: &ConvexPolygonShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + /// Based on the set of points provided, this assigns the ``points`` property using the convex hull algorithm, removing all unneeded points. See ``Geometry2D/convexHull(points:)`` for details. + public final func setPointCloud(_ pointCloud: PackedVector2Array) { + withUnsafePointer(to: pointCloud.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConvexPolygonShape2D.method_set_point_cloud, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_points") + return withUnsafePointer(to: &ConvexPolygonShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_points(_ points: PackedVector2Array) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConvexPolygonShape2D.method_set_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_points") + return withUnsafePointer(to: &ConvexPolygonShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_points() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(ConvexPolygonShape2D.method_get_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape3D.swift b/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape3D.swift new file mode 100644 index 000000000..696500c7d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ConvexPolygonShape3D.swift @@ -0,0 +1,94 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D convex polyhedron shape used for physics collision. +/// +/// A 3D convex polyhedron shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. +/// +/// ``ConvexPolygonShape3D`` is _solid_, which means it detects collisions from objects that are fully inside it, unlike ``ConcavePolygonShape3D`` which is hollow. This makes it more suitable for both detection and physics. +/// +/// **Convex decomposition:** A concave polyhedron can be split up into several convex polyhedra. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several ``ConvexPolygonShape3D`` nodes. To generate a convex decomposition from a mesh, select the ``MeshInstance3D`` node, go to the **Mesh** menu that appears above the viewport, and choose **Create Multiple Convex Collision Siblings**. Alternatively, ``MeshInstance3D/createMultipleConvexCollisions(settings:)`` can be called in a script to perform this decomposition at run-time. +/// +/// **Performance:** ``ConvexPolygonShape3D`` is faster to check collisions against compared to ``ConcavePolygonShape3D``, but it is slower than primitive collision shapes such as ``SphereShape3D`` and ``BoxShape3D``. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. +/// +open class ConvexPolygonShape3D: Shape3D { + override open class var godotClassName: StringName { "ConvexPolygonShape3D" } + + /* Properties */ + + /// The list of 3D points forming the convex polygon shape. + final public var points: PackedVector3Array { + get { + return get_points () + } + + set { + set_points (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_points") + return withUnsafePointer(to: &ConvexPolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_points(_ points: PackedVector3Array) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ConvexPolygonShape3D.method_set_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_points") + return withUnsafePointer(to: &ConvexPolygonShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_points() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(ConvexPolygonShape3D.method_get_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Crypto.swift b/Sources/SwiftGodot/Generated/Api/Crypto.swift new file mode 100644 index 000000000..bb9c9d13c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Crypto.swift @@ -0,0 +1,331 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to advanced cryptographic functionalities. +/// +/// The Crypto class provides access to advanced cryptographic functionalities. +/// +/// Currently, this includes asymmetric key encryption/decryption, signing/verification, and generating cryptographically secure random bytes, RSA keys, HMAC digests, and self-signed ``X509Certificate``s. +/// +open class Crypto: RefCounted { + override open class var godotClassName: StringName { "Crypto" } + /* Methods */ + fileprivate static var method_generate_random_bytes: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_random_bytes") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 47165747)! + } + + } + + }() + + /// Generates a ``PackedByteArray`` of cryptographically secure random bytes with given `size`. + public final func generateRandomBytes(size: Int32) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_generate_random_bytes, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_generate_rsa: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_rsa") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1237515462)! + } + + } + + }() + + /// Generates an RSA ``CryptoKey`` that can be used for creating self-signed certificates and passed to ``StreamPeerTLS/acceptStream(_:serverOptions:)``. + public final func generateRsa(size: Int32) -> CryptoKey? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_generate_rsa, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_generate_self_signed_certificate: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_self_signed_certificate") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 492266173)! + } + + } + + }() + + /// Generates a self-signed ``X509Certificate`` from the given ``CryptoKey`` and `issuerName`. The certificate validity will be defined by `notBefore` and `notAfter` (first valid date and last valid date). The `issuerName` must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). + /// + /// A small example to generate an RSA key and an X509 self-signed certificate. + /// + public final func generateSelfSignedCertificate(key: CryptoKey?, issuerName: String = "CN=myserver,O=myorganisation,C=IT", notBefore: String = "20140101000000", notAfter: String = "20340101000000") -> X509Certificate? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: key?.handle) { pArg0 in + let issuerName = GString(issuerName) + withUnsafePointer(to: issuerName.content) { pArg1 in + let notBefore = GString(notBefore) + withUnsafePointer(to: notBefore.content) { pArg2 in + let notAfter = GString(notAfter) + withUnsafePointer(to: notAfter.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_generate_self_signed_certificate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_sign: GDExtensionMethodBindPtr = { + let methodName = StringName("sign") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1673662703)! + } + + } + + }() + + /// Sign a given `hash` of type `hashType` with the provided private `key`. + public final func sign(hashType: HashingContext.HashType, hash: PackedByteArray, key: CryptoKey?) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: hashType.rawValue) { pArg0 in + withUnsafePointer(to: hash.content) { pArg1 in + withUnsafePointer(to: key?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_sign, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_verify: GDExtensionMethodBindPtr = { + let methodName = StringName("verify") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2805902225)! + } + + } + + }() + + /// Verify that a given `signature` for `hash` of type `hashType` against the provided public `key`. + public final func verify(hashType: HashingContext.HashType, hash: PackedByteArray, signature: PackedByteArray, key: CryptoKey?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: hashType.rawValue) { pArg0 in + withUnsafePointer(to: hash.content) { pArg1 in + withUnsafePointer(to: signature.content) { pArg2 in + withUnsafePointer(to: key?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_verify, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_encrypt: GDExtensionMethodBindPtr = { + let methodName = StringName("encrypt") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2361793670)! + } + + } + + }() + + /// Encrypt the given `plaintext` with the provided public `key`. + /// + /// > Note: The maximum size of accepted plaintext is limited by the key size. + /// + public final func encrypt(key: CryptoKey?, plaintext: PackedByteArray) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: key?.handle) { pArg0 in + withUnsafePointer(to: plaintext.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_encrypt, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_decrypt: GDExtensionMethodBindPtr = { + let methodName = StringName("decrypt") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2361793670)! + } + + } + + }() + + /// Decrypt the given `ciphertext` with the provided private `key`. + /// + /// > Note: The maximum size of accepted ciphertext is limited by the key size. + /// + public final func decrypt(key: CryptoKey?, ciphertext: PackedByteArray) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: key?.handle) { pArg0 in + withUnsafePointer(to: ciphertext.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_decrypt, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_hmac_digest: GDExtensionMethodBindPtr = { + let methodName = StringName("hmac_digest") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2368951203)! + } + + } + + }() + + /// Generates an HMAC digest of `msg` using `key`. The `hashType` parameter is the hashing algorithm that is used for the inner and outer hashes. + /// + /// Currently, only ``HashingContext/HashType/sha256`` and ``HashingContext/HashType/sha1`` are supported. + /// + public final func hmacDigest(hashType: HashingContext.HashType, key: PackedByteArray, msg: PackedByteArray) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: hashType.rawValue) { pArg0 in + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: msg.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_hmac_digest, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_constant_time_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("constant_time_compare") + return withUnsafePointer(to: &Crypto.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1024142237)! + } + + } + + }() + + /// Compares two ``PackedByteArray``s for equality without leaking timing information in order to prevent timing attacks. + /// + /// See this blog post for more information. + /// + public final func constantTimeCompare(trusted: PackedByteArray, received: PackedByteArray) -> Bool { + var _result: Bool = false + withUnsafePointer(to: trusted.content) { pArg0 in + withUnsafePointer(to: received.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Crypto.method_constant_time_compare, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CryptoKey.swift b/Sources/SwiftGodot/Generated/Api/CryptoKey.swift new file mode 100644 index 000000000..d33175116 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CryptoKey.swift @@ -0,0 +1,175 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A cryptographic key (RSA or elliptic-curve). +/// +/// The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other ``Resource``. +/// +/// They can be used to generate a self-signed ``X509Certificate`` via ``Crypto/generateSelfSignedCertificate(key:issuerName:notBefore:notAfter:)`` and as private key in ``StreamPeerTLS/acceptStream(_:serverOptions:)`` along with the appropriate certificate. +/// +open class CryptoKey: Resource { + override open class var godotClassName: StringName { "CryptoKey" } + /* Methods */ + fileprivate static var method_save: GDExtensionMethodBindPtr = { + let methodName = StringName("save") + return withUnsafePointer(to: &CryptoKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 885841341)! + } + + } + + }() + + /// Saves a key to the given `path`. If `publicOnly` is `true`, only the public key will be saved. + /// + /// > Note: `path` should be a "*.pub" file if `publicOnly` is `true`, a "*.key" file otherwise. + /// + public final func save(path: String, publicOnly: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: publicOnly) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CryptoKey.method_save, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &CryptoKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 885841341)! + } + + } + + }() + + /// Loads a key from `path`. If `publicOnly` is `true`, only the public key will be loaded. + /// + /// > Note: `path` should be a "*.pub" file if `publicOnly` is `true`, a "*.key" file otherwise. + /// + public final func load(path: String, publicOnly: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: publicOnly) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CryptoKey.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_public_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_public_only") + return withUnsafePointer(to: &CryptoKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this CryptoKey only has the public part, and not the private one. + public final func isPublicOnly() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CryptoKey.method_is_public_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_save_to_string: GDExtensionMethodBindPtr = { + let methodName = StringName("save_to_string") + return withUnsafePointer(to: &CryptoKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 32795936)! + } + + } + + }() + + /// Returns a string containing the key in PEM format. If `publicOnly` is `true`, only the public key will be included. + public final func saveToString(publicOnly: Bool = false) -> String { + let _result = GString () + withUnsafePointer(to: publicOnly) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CryptoKey.method_save_to_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_load_from_string: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_string") + return withUnsafePointer(to: &CryptoKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 885841341)! + } + + } + + }() + + /// Loads a key from the given `stringKey`. If `publicOnly` is `true`, only the public key will be loaded. + public final func loadFromString(stringKey: String, publicOnly: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let stringKey = GString(stringKey) + withUnsafePointer(to: stringKey.content) { pArg0 in + withUnsafePointer(to: publicOnly) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(CryptoKey.method_load_from_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Cubemap.swift b/Sources/SwiftGodot/Generated/Api/Cubemap.swift new file mode 100644 index 000000000..cb7bbde28 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Cubemap.swift @@ -0,0 +1,53 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Six square textures representing the faces of a cube. Commonly used as a skybox. +/// +/// A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see ``ReflectionProbe``). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. +/// +/// This resource is typically used as a uniform in custom shaders. Few core Godot methods make use of ``Cubemap`` resources. +/// +/// To create such a texture file yourself, reimport your image files using the Godot Editor import presets. +/// +/// > Note: Godot doesn't support using cubemaps in a ``PanoramaSkyMaterial``. You can use this tool to convert a cubemap to an equirectangular sky map. +/// +open class Cubemap: ImageTextureLayered { + override open class var godotClassName: StringName { "Cubemap" } + /* Methods */ + fileprivate static var method_create_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("create_placeholder") + return withUnsafePointer(to: &Cubemap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + /// Creates a placeholder version of this resource (``PlaceholderCubemap``). + public final func createPlaceholder() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Cubemap.method_create_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CubemapArray.swift b/Sources/SwiftGodot/Generated/Api/CubemapArray.swift new file mode 100644 index 000000000..78e7b209e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CubemapArray.swift @@ -0,0 +1,53 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An array of ``Cubemap``s, stored together and with a single reference. +/// +/// ``CubemapArray``s are made of an array of ``Cubemap``s. Like ``Cubemap``s, they are made of multiple textures, the amount of which must be divisible by 6 (one for each face of the cube). +/// +/// The primary benefit of ``CubemapArray``s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple ``Cubemap``s into a shader using a single ``CubemapArray``. ``Cubemap``s are allocated in adjacent cache regions on the GPU, which makes ``CubemapArray``s the most efficient way to store multiple ``Cubemap``s. +/// +/// > Note: Godot uses ``CubemapArray``s internally for many effects, including the ``Sky`` if you set ``ProjectSettings/rendering/reflections/skyReflections/textureArrayReflections`` to `true`. To create such a texture file yourself, reimport your image files using the import presets of the File System dock. +/// +/// > Note: ``CubemapArray`` is not supported in the OpenGL 3 rendering backend. +/// +open class CubemapArray: ImageTextureLayered { + override open class var godotClassName: StringName { "CubemapArray" } + /* Methods */ + fileprivate static var method_create_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("create_placeholder") + return withUnsafePointer(to: &CubemapArray.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + /// Creates a placeholder version of this resource (``PlaceholderCubemapArray``). + public final func createPlaceholder() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CubemapArray.method_create_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Curve.swift b/Sources/SwiftGodot/Generated/Api/Curve.swift new file mode 100644 index 000000000..fb6b9db10 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Curve.swift @@ -0,0 +1,779 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A mathematical curve. +/// +/// This resource describes a mathematical curve by defining a set of points and tangents at each point. By default, it ranges between `0` and `1` on the Y axis and positions points relative to the `0.5` Y position. +/// +/// See also ``Gradient`` which is designed for color interpolation. See also ``Curve2D`` and ``Curve3D``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``rangeChanged`` +open class Curve: Resource { + override open class var godotClassName: StringName { "Curve" } + public enum TangentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The tangent on this side of the point is user-defined. + case free = 0 // TANGENT_FREE + /// The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point. + case linear = 1 // TANGENT_LINEAR + /// The total number of available tangent modes. + case modeCount = 2 // TANGENT_MODE_COUNT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .free: return ".free" + case .linear: return ".linear" + case .modeCount: return ".modeCount" + } + + } + + } + + + /* Properties */ + + /// The minimum value the curve can reach. + final public var minValue: Double { + get { + return get_min_value () + } + + set { + set_min_value (newValue) + } + + } + + /// The maximum value the curve can reach. + final public var maxValue: Double { + get { + return get_max_value () + } + + set { + set_max_value (newValue) + } + + } + + /// The number of points to include in the baked (i.e. cached) curve data. + final public var bakeResolution: Int32 { + get { + return get_bake_resolution () + } + + set { + set_bake_resolution (newValue) + } + + } + + /// The number of points describing the curve. + final public var pointCount: Int32 { + get { + return get_point_count () + } + + set { + set_point_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_point_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Curve.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_count") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_point_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 434072736)! + } + + } + + }() + + /// Adds a point to the curve. For each side, if the `*_mode` is ``TangentMode/linear``, the `*_tangent` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the `*_tangent` angle if `*_mode` is set to ``TangentMode/free``. + public final func addPoint(position: Vector2, leftTangent: Double = 0, rightTangent: Double = 0, leftMode: Curve.TangentMode = .free, rightMode: Curve.TangentMode = .free) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: leftTangent) { pArg1 in + withUnsafePointer(to: rightTangent) { pArg2 in + withUnsafePointer(to: leftMode.rawValue) { pArg3 in + withUnsafePointer(to: rightMode.rawValue) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point at `index` from the curve. + public final func removePoint(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_points: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_points") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all points from the curve. + public final func clearPoints() { + gi.object_method_bind_ptrcall(Curve.method_clear_points, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the curve coordinates for the point at `index`. + public final func getPointPosition(index: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_value") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Assigns the vertical position `y` to the point at `index`. + public final func setPointValue(index: Int32, y: Double) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_offset") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780573764)! + } + + } + + }() + + /// Sets the offset from `0.5`. + public final func setPointOffset(index: Int32, offset: Double) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("sample") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3919130443)! + } + + } + + }() + + /// Returns the Y value for the point that would exist at the X position `offset` along the curve. + public final func sample(offset: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_sample, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_sample_baked: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3919130443)! + } + + } + + }() + + /// Returns the Y value for the point that would exist at the X position `offset` along the curve using the baked cache. Bakes the curve's points if not already baked. + public final func sampleBaked(offset: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_sample_baked, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_left_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_left_tangent") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the left tangent angle (in degrees) for the point at `index`. + public final func getPointLeftTangent(index: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_get_point_left_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_right_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_right_tangent") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the right tangent angle (in degrees) for the point at `index`. + public final func getPointRightTangent(index: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_get_point_right_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_left_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_left_mode") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 426950354)! + } + + } + + }() + + /// Returns the left ``Curve/TangentMode`` for the point at `index`. + public final func getPointLeftMode(index: Int32) -> Curve.TangentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_get_point_left_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Curve.TangentMode (rawValue: _result)! + } + + fileprivate static var method_get_point_right_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_right_mode") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 426950354)! + } + + } + + }() + + /// Returns the right ``Curve/TangentMode`` for the point at `index`. + public final func getPointRightMode(index: Int32) -> Curve.TangentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_get_point_right_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Curve.TangentMode (rawValue: _result)! + } + + fileprivate static var method_set_point_left_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_left_tangent") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the left tangent angle for the point at `index` to `tangent`. + public final func setPointLeftTangent(index: Int32, tangent: Double) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: tangent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_left_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_right_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_right_tangent") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the right tangent angle for the point at `index` to `tangent`. + public final func setPointRightTangent(index: Int32, tangent: Double) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: tangent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_right_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_left_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_left_mode") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1217242874)! + } + + } + + }() + + /// Sets the left ``Curve/TangentMode`` for the point at `index` to `mode`. + public final func setPointLeftMode(index: Int32, mode: Curve.TangentMode) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_left_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_right_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_right_mode") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1217242874)! + } + + } + + }() + + /// Sets the right ``Curve/TangentMode`` for the point at `index` to `mode`. + public final func setPointRightMode(index: Int32, mode: Curve.TangentMode) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_point_right_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_min_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_value") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve.method_get_min_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_value") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_value(_ min: Double) { + withUnsafePointer(to: min) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_min_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_value") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve.method_get_max_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_value") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_value(_ max: Double) { + withUnsafePointer(to: max) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_max_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clean_dupes: GDExtensionMethodBindPtr = { + let methodName = StringName("clean_dupes") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve. + public final func cleanDupes() { + gi.object_method_bind_ptrcall(Curve.method_clean_dupes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_bake: GDExtensionMethodBindPtr = { + let methodName = StringName("bake") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Recomputes the baked cache of points for the curve. + public final func bake() { + gi.object_method_bind_ptrcall(Curve.method_bake, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_bake_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_resolution") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_resolution() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Curve.method_get_bake_resolution, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bake_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_resolution") + return withUnsafePointer(to: &Curve.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_resolution(_ resolution: Int32) { + withUnsafePointer(to: resolution) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve.method_set_bake_resolution, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted when ``maxValue`` or ``minValue`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.rangeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var rangeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "range_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Curve2D.swift b/Sources/SwiftGodot/Generated/Api/Curve2D.swift new file mode 100644 index 000000000..8309f6c28 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Curve2D.swift @@ -0,0 +1,687 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Describes a Bézier curve in 2D space. +/// +/// This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a ``Path2D``, but can be manually sampled for other purposes. +/// +/// It keeps a cache of precalculated points along the curve, to speed up further calculations. +/// +open class Curve2D: Resource { + override open class var godotClassName: StringName { "Curve2D" } + + /* Properties */ + + /// The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the ``getBakedPoints()`` or ``getBakedLength()`` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. + final public var bakeInterval: Double { + get { + return get_bake_interval () + } + + set { + set_bake_interval (newValue) + } + + } + + /// The number of points describing the curve. + final public var pointCount: Int32 { + get { + return get_point_count () + } + + set { + set_point_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_point_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Curve2D.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_count") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_point_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_set_point_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4175465202)! + } + + } + + }() + + /// Adds a point with the specified `position` relative to the curve's own position, with control points `in` and `out`. Appends the new point at the end of the point list. + /// + /// If `index` is given, the new point is inserted before the existing point identified by index `index`. Every existing point starting from `index` is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See ``pointCount``. + /// + public final func addPoint(position: Vector2, `in`: Vector2 = Vector2 (x: 0, y: 0), out: Vector2 = Vector2 (x: 0, y: 0), index: Int32 = -1) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: `in`) { pArg1 in + withUnsafePointer(to: out) { pArg2 in + withUnsafePointer(to: index) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_position") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the position for the vertex `idx`. If the index is out of bounds, the function sends an error to the console. + public final func setPointPosition(idx: Int32, position: Vector2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_set_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. + public final func getPointPosition(idx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_in: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_in") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the position of the control point leading to the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + public final func setPointIn(idx: Int32, position: Vector2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_set_point_in, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_in: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_in") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the control point leading to the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. + public final func getPointIn(idx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_get_point_in, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_out: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_out") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the position of the control point leading out of the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + public final func setPointOut(idx: Int32, position: Vector2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_set_point_out, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_out: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_out") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the control point leading out of the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. + public final func getPointOut(idx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_get_point_out, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Deletes the point `idx` from the curve. Sends an error to the console if `idx` is out of bounds. + public final func removePoint(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_points: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_points") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all points from the curve. + public final func clearPoints() { + gi.object_method_bind_ptrcall(Curve2D.method_clear_points, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("sample") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 26514310)! + } + + } + + }() + + /// Returns the position between the vertex `idx` and the vertex `idx + 1`, where `t` controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of `t` outside the range (`0.0 >= t <=1`) give strange, but predictable results. + /// + /// If `idx` is out of bounds it is truncated to the first or last vertex, and `t` is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0)`. + /// + public final func sample(idx: Int32, t: Double) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: t) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_sample, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_samplef: GDExtensionMethodBindPtr = { + let methodName = StringName("samplef") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3588506812)! + } + + } + + }() + + /// Returns the position at the vertex `fofs`. It calls ``sample(idx:t:)`` using the integer part of `fofs` as `idx`, and its fractional part as `t`. + public final func samplef(fofs: Double) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: fofs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_samplef, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bake_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_interval") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_interval(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_set_bake_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_interval") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve2D.method_get_bake_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_baked_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_length") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the total length of the curve, based on the cached points. Given enough density (see ``bakeInterval``), it should be approximate enough. + public final func getBakedLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve2D.method_get_baked_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_sample_baked: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3464257706)! + } + + } + + }() + + /// Returns a point within the curve at position `offset`, where `offset` is measured as a pixel distance along the curve. + /// + /// To do that, it finds the two cached points where the `offset` lies between, then interpolates the values. This interpolation is cubic if `cubic` is set to `true`, or linear if set to `false`. + /// + /// Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + /// + public final func sampleBaked(offset: Double = 0.0, cubic: Bool = false) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: cubic) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_sample_baked, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_sample_baked_with_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked_with_rotation") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3296056341)! + } + + } + + }() + + /// Similar to ``sampleBaked(offset:cubic:)``, but returns ``Transform2D`` that includes a rotation along the curve, with ``Transform2D/origin`` as the point position and the ``Transform2D/x`` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is `0`. + /// + public final func sampleBakedWithRotation(offset: Double = 0.0, cubic: Bool = false) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: cubic) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_sample_baked_with_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_baked_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_points") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + /// Returns the cache of points as a ``PackedVector2Array``. + public final func getBakedPoints() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(Curve2D.method_get_baked_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Returns the closest point on baked segments (in curve's local space) to `toPoint`. + /// + /// `toPoint` must be in this curve's local space. + /// + public final func getClosestPoint(toPoint: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: toPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_get_closest_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_offset") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2276447920)! + } + + } + + }() + + /// Returns the closest offset to `toPoint`. This offset is meant to be used in ``sampleBaked(offset:cubic:)``. + /// + /// `toPoint` must be in this curve's local space. + /// + public final func getClosestOffset(toPoint: Vector2) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: toPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_get_closest_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_tessellate: GDExtensionMethodBindPtr = { + let methodName = StringName("tessellate") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 958145977)! + } + + } + + }() + + /// Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + /// + /// This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + /// + /// `maxStages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + /// + /// `toleranceDegrees` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + /// + public final func tessellate(maxStages: Int32 = 5, toleranceDegrees: Double = 4) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: maxStages) { pArg0 in + withUnsafePointer(to: toleranceDegrees) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_tessellate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_tessellate_even_length: GDExtensionMethodBindPtr = { + let methodName = StringName("tessellate_even_length") + return withUnsafePointer(to: &Curve2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2319761637)! + } + + } + + }() + + /// Returns a list of points along the curve, with almost uniform density. `maxStages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + /// + /// `toleranceLength` controls the maximal distance between two neighboring points, before the segment has to be subdivided. + /// + public final func tessellateEvenLength(maxStages: Int32 = 5, toleranceLength: Double = 20.0) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: maxStages) { pArg0 in + withUnsafePointer(to: toleranceLength) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve2D.method_tessellate_even_length, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Curve3D.swift b/Sources/SwiftGodot/Generated/Api/Curve3D.swift new file mode 100644 index 000000000..fe19f734b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Curve3D.swift @@ -0,0 +1,874 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Describes a Bézier curve in 3D space. +/// +/// This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a ``Path3D``, but can be manually sampled for other purposes. +/// +/// It keeps a cache of precalculated points along the curve, to speed up further calculations. +/// +open class Curve3D: Resource { + override open class var godotClassName: StringName { "Curve3D" } + + /* Properties */ + + /// The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the ``getBakedPoints()`` or ``getBakedLength()`` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. + final public var bakeInterval: Double { + get { + return get_bake_interval () + } + + set { + set_bake_interval (newValue) + } + + } + + /// The number of points describing the curve. + final public var pointCount: Int32 { + get { + return get_point_count () + } + + set { + set_point_count (newValue) + } + + } + + /// If `true`, the curve will bake up vectors used for orientation. This is used when ``PathFollow3D/rotationMode`` is set to ``PathFollow3D/RotationMode/oriented``. Changing it forces the cache to be recomputed. + final public var upVectorEnabled: Bool { + get { + return is_up_vector_enabled () + } + + set { + set_up_vector_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_point_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Curve3D.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_count") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_point_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_point_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2931053748)! + } + + } + + }() + + /// Adds a point with the specified `position` relative to the curve's own position, with control points `in` and `out`. Appends the new point at the end of the point list. + /// + /// If `index` is given, the new point is inserted before the existing point identified by index `index`. Every existing point starting from `index` is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See ``pointCount``. + /// + public final func addPoint(position: Vector3, `in`: Vector3 = Vector3 (x: 0, y: 0, z: 0), out: Vector3 = Vector3 (x: 0, y: 0, z: 0), index: Int32 = -1) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: `in`) { pArg1 in + withUnsafePointer(to: out) { pArg2 in + withUnsafePointer(to: index) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_position") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the position for the vertex `idx`. If the index is out of bounds, the function sends an error to the console. + public final func setPointPosition(idx: Int32, position: Vector3) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. + public final func getPointPosition(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_tilt") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the tilt angle in radians for the point `idx`. If the index is out of bounds, the function sends an error to the console. + /// + /// The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a ``PathFollow3D``, this tilt is an offset over the natural tilt the ``PathFollow3D`` calculates. + /// + public final func setPointTilt(idx: Int32, tilt: Double) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: tilt) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_point_tilt, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_tilt") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the tilt angle in radians for the point `idx`. If the index is out of bounds, the function sends an error to the console, and returns `0`. + public final func getPointTilt(idx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_point_tilt, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_in: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_in") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the position of the control point leading to the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + public final func setPointIn(idx: Int32, position: Vector3) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_point_in, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_in: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_in") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the control point leading to the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. + public final func getPointIn(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_point_in, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_out: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_out") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the position of the control point leading out of the vertex `idx`. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. + public final func setPointOut(idx: Int32, position: Vector3) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_point_out, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_out: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_out") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the control point leading out of the vertex `idx`. The returned position is relative to the vertex `idx`. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. + public final func getPointOut(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_point_out, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Deletes the point `idx` from the curve. Sends an error to the console if `idx` is out of bounds. + public final func removePoint(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_points: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_points") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all points from the curve. + public final func clearPoints() { + gi.object_method_bind_ptrcall(Curve3D.method_clear_points, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("sample") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3285246857)! + } + + } + + }() + + /// Returns the position between the vertex `idx` and the vertex `idx + 1`, where `t` controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of `t` outside the range (`0.0 >= t <=1`) give strange, but predictable results. + /// + /// If `idx` is out of bounds it is truncated to the first or last vertex, and `t` is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0, 0)`. + /// + public final func sample(idx: Int32, t: Double) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: t) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_sample, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_samplef: GDExtensionMethodBindPtr = { + let methodName = StringName("samplef") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2553580215)! + } + + } + + }() + + /// Returns the position at the vertex `fofs`. It calls ``sample(idx:t:)`` using the integer part of `fofs` as `idx`, and its fractional part as `t`. + public final func samplef(fofs: Double) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: fofs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_samplef, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bake_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_interval") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_interval(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_bake_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_interval") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve3D.method_get_bake_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_up_vector_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_up_vector_enabled") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_up_vector_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_set_up_vector_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_up_vector_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_up_vector_enabled") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_up_vector_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Curve3D.method_is_up_vector_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_baked_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_length") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the total length of the curve, based on the cached points. Given enough density (see ``bakeInterval``), it should be approximate enough. + public final func getBakedLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Curve3D.method_get_baked_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_sample_baked: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1350085894)! + } + + } + + }() + + /// Returns a point within the curve at position `offset`, where `offset` is measured as a distance in 3D units along the curve. To do that, it finds the two cached points where the `offset` lies between, then interpolates the values. This interpolation is cubic if `cubic` is set to `true`, or linear if set to `false`. + /// + /// Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + /// + public final func sampleBaked(offset: Double = 0.0, cubic: Bool = false) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: cubic) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_sample_baked, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_sample_baked_with_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked_with_rotation") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1939359131)! + } + + } + + }() + + /// Returns a ``Transform3D`` with `origin` as point position, `basis.x` as sideway vector, `basis.y` as up vector, `basis.z` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also ``sampleBaked(offset:cubic:)``. + public final func sampleBakedWithRotation(offset: Double = 0.0, cubic: Bool = false, applyTilt: Bool = false) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: cubic) { pArg1 in + withUnsafePointer(to: applyTilt) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_sample_baked_with_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_sample_baked_up_vector: GDExtensionMethodBindPtr = { + let methodName = StringName("sample_baked_up_vector") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1362627031)! + } + + } + + }() + + /// Returns an up vector within the curve at position `offset`, where `offset` is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the `offset` lies between, then interpolates the values. If `applyTilt` is `true`, an interpolated tilt is applied to the interpolated up vector. + /// + /// If the curve has no up vectors, the function sends an error to the console, and returns `(0, 1, 0)`. + /// + public final func sampleBakedUpVector(offset: Double, applyTilt: Bool = false) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: applyTilt) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_sample_baked_up_vector, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_baked_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_points") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + /// Returns the cache of points as a ``PackedVector3Array``. + public final func getBakedPoints() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(Curve3D.method_get_baked_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_baked_tilts: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_tilts") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + /// Returns the cache of tilts as a ``PackedFloat32Array``. + public final func getBakedTilts() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(Curve3D.method_get_baked_tilts, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_baked_up_vectors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baked_up_vectors") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + /// Returns the cache of up vectors as a ``PackedVector3Array``. + /// + /// If ``upVectorEnabled`` is `false`, the cache will be empty. + /// + public final func getBakedUpVectors() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(Curve3D.method_get_baked_up_vectors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 192990374)! + } + + } + + }() + + /// Returns the closest point on baked segments (in curve's local space) to `toPoint`. + /// + /// `toPoint` must be in this curve's local space. + /// + public final func getClosestPoint(toPoint: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: toPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_closest_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_offset") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1109078154)! + } + + } + + }() + + /// Returns the closest offset to `toPoint`. This offset is meant to be used in ``sampleBaked(offset:cubic:)`` or ``sampleBakedUpVector(offset:applyTilt:)``. + /// + /// `toPoint` must be in this curve's local space. + /// + public final func getClosestOffset(toPoint: Vector3) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: toPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_get_closest_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_tessellate: GDExtensionMethodBindPtr = { + let methodName = StringName("tessellate") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1519759391)! + } + + } + + }() + + /// Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + /// + /// This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + /// + /// `maxStages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + /// + /// `toleranceDegrees` controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + /// + public final func tessellate(maxStages: Int32 = 5, toleranceDegrees: Double = 4) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: maxStages) { pArg0 in + withUnsafePointer(to: toleranceDegrees) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_tessellate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_tessellate_even_length: GDExtensionMethodBindPtr = { + let methodName = StringName("tessellate_even_length") + return withUnsafePointer(to: &Curve3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 133237049)! + } + + } + + }() + + /// Returns a list of points along the curve, with almost uniform density. `maxStages` controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + /// + /// `toleranceLength` controls the maximal distance between two neighboring points, before the segment has to be subdivided. + /// + public final func tessellateEvenLength(maxStages: Int32 = 5, toleranceLength: Double = 0.2) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: maxStages) { pArg0 in + withUnsafePointer(to: toleranceLength) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Curve3D.method_tessellate_even_length, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CurveTexture.swift b/Sources/SwiftGodot/Generated/Api/CurveTexture.swift new file mode 100644 index 000000000..67326c64d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CurveTexture.swift @@ -0,0 +1,200 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 1D texture where pixel brightness corresponds to points on a curve. +/// +/// A 1D texture where pixel brightness corresponds to points on a ``Curve`` resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files. +/// +/// If you need to store up to 3 curves within a single texture, use ``CurveXYZTexture`` instead. See also ``GradientTexture1D`` and ``GradientTexture2D``. +/// +open class CurveTexture: Texture2D { + override open class var godotClassName: StringName { "CurveTexture" } + public enum TextureMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values. + case rgb = 0 // TEXTURE_MODE_RGB + /// Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this. + case red = 1 // TEXTURE_MODE_RED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rgb: return ".rgb" + case .red: return ".red" + } + + } + + } + + + /* Properties */ + + /// The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// The format the texture should be generated with. When passing a CurveTexture as an input to a ``Shader``, this may need to be adjusted. + final public var textureMode: CurveTexture.TextureMode { + get { + return get_texture_mode () + } + + set { + set_texture_mode (newValue) + } + + } + + /// The ``Curve`` that is rendered onto the texture. + final public var curve: Curve? { + get { + return get_curve () + } + + set { + set_curve (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &CurveTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveTexture.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve") + return withUnsafePointer(to: &CurveTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveTexture.method_set_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve") + return withUnsafePointer(to: &CurveTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CurveTexture.method_get_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_mode") + return withUnsafePointer(to: &CurveTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321955367)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_mode(_ textureMode: CurveTexture.TextureMode) { + withUnsafePointer(to: textureMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveTexture.method_set_texture_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_mode") + return withUnsafePointer(to: &CurveTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 715756376)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_mode() -> CurveTexture.TextureMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(CurveTexture.method_get_texture_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return CurveTexture.TextureMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CurveXYZTexture.swift b/Sources/SwiftGodot/Generated/Api/CurveXYZTexture.swift new file mode 100644 index 000000000..9c5c10647 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CurveXYZTexture.swift @@ -0,0 +1,240 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 1D texture where the red, green, and blue color channels correspond to points on 3 curves. +/// +/// A 1D texture where the red, green, and blue color channels correspond to points on 3 ``Curve`` resources. Compared to using separate ``CurveTexture``s, this further simplifies the task of saving curves as image files. +/// +/// If you only need to store one curve within a single texture, use ``CurveTexture`` instead. See also ``GradientTexture1D`` and ``GradientTexture2D``. +/// +open class CurveXYZTexture: Texture2D { + override open class var godotClassName: StringName { "CurveXYZTexture" } + + /* Properties */ + + /// The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// The ``Curve`` that is rendered onto the texture's red channel. + final public var curveX: Curve? { + get { + return get_curve_x () + } + + set { + set_curve_x (newValue) + } + + } + + /// The ``Curve`` that is rendered onto the texture's green channel. + final public var curveY: Curve? { + get { + return get_curve_y () + } + + set { + set_curve_y (newValue) + } + + } + + /// The ``Curve`` that is rendered onto the texture's blue channel. + final public var curveZ: Curve? { + get { + return get_curve_z () + } + + set { + set_curve_z (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveXYZTexture.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve_x") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve_x(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveXYZTexture.method_set_curve_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve_x") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve_x() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CurveXYZTexture.method_get_curve_x, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve_y") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve_y(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveXYZTexture.method_set_curve_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve_y") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve_y() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CurveXYZTexture.method_get_curve_y, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_curve_z: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve_z") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve_z(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CurveXYZTexture.method_set_curve_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve_z: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve_z") + return withUnsafePointer(to: &CurveXYZTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve_z() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(CurveXYZTexture.method_get_curve_z, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CylinderMesh.swift b/Sources/SwiftGodot/Generated/Api/CylinderMesh.swift new file mode 100644 index 000000000..d08cd1862 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CylinderMesh.swift @@ -0,0 +1,429 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class representing a cylindrical ``PrimitiveMesh``. +/// +/// Class representing a cylindrical ``PrimitiveMesh``. This class can be used to create cones by setting either the ``topRadius`` or ``bottomRadius`` properties to `0.0`. +open class CylinderMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "CylinderMesh" } + + /* Properties */ + + /// Top radius of the cylinder. If set to `0.0`, the top faces will not be generated, resulting in a conic shape. See also ``capTop``. + final public var topRadius: Double { + get { + return get_top_radius () + } + + set { + set_top_radius (newValue) + } + + } + + /// Bottom radius of the cylinder. If set to `0.0`, the bottom faces will not be generated, resulting in a conic shape. See also ``capBottom``. + final public var bottomRadius: Double { + get { + return get_bottom_radius () + } + + set { + set_bottom_radius (newValue) + } + + } + + /// Full height of the cylinder. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance. + final public var radialSegments: Int32 { + get { + return get_radial_segments () + } + + set { + set_radial_segments (newValue) + } + + } + + /// Number of edge rings along the height of the cylinder. Changing ``rings`` does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, ``rings`` should be kept to its default value. + final public var rings: Int32 { + get { + return get_rings () + } + + set { + set_rings (newValue) + } + + } + + /// If `true`, generates a cap at the top of the cylinder. This can be set to `false` to speed up generation and rendering when the cap is never seen by the camera. See also ``topRadius``. + /// + /// > Note: If ``topRadius`` is `0.0`, cap generation is always skipped even if ``capTop`` is `true`. + /// + final public var capTop: Bool { + get { + return is_cap_top () + } + + set { + set_cap_top (newValue) + } + + } + + /// If `true`, generates a cap at the bottom of the cylinder. This can be set to `false` to speed up generation and rendering when the cap is never seen by the camera. See also ``bottomRadius``. + /// + /// > Note: If ``bottomRadius`` is `0.0`, cap generation is always skipped even if ``capBottom`` is `true`. + /// + final public var capBottom: Bool { + get { + return is_cap_bottom () + } + + set { + set_cap_bottom (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_top_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_top_radius") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_top_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_top_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_top_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_top_radius") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_top_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CylinderMesh.method_get_top_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bottom_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bottom_radius") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bottom_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_bottom_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bottom_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bottom_radius") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bottom_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CylinderMesh.method_get_bottom_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CylinderMesh.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radial_segments") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radial_segments(_ segments: Int32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_radial_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radial_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radial_segments") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radial_segments() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CylinderMesh.method_get_radial_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rings") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rings(_ rings: Int32) { + withUnsafePointer(to: rings) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_rings, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rings") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rings() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(CylinderMesh.method_get_rings, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cap_top: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cap_top") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cap_top(_ capTop: Bool) { + withUnsafePointer(to: capTop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_cap_top, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_cap_top: GDExtensionMethodBindPtr = { + let methodName = StringName("is_cap_top") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_cap_top() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CylinderMesh.method_is_cap_top, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cap_bottom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cap_bottom") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cap_bottom(_ capBottom: Bool) { + withUnsafePointer(to: capBottom) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderMesh.method_set_cap_bottom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_cap_bottom: GDExtensionMethodBindPtr = { + let methodName = StringName("is_cap_bottom") + return withUnsafePointer(to: &CylinderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_cap_bottom() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(CylinderMesh.method_is_cap_bottom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/CylinderShape3D.swift b/Sources/SwiftGodot/Generated/Api/CylinderShape3D.swift new file mode 100644 index 000000000..ddccbdf6d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/CylinderShape3D.swift @@ -0,0 +1,148 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D cylinder shape used for physics collision. +/// +/// A 3D cylinder shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. +/// +/// > Note: There are several known bugs with cylinder collision shapes. Using ``CapsuleShape3D`` or ``BoxShape3D`` instead is recommended. +/// +/// **Performance:** ``CylinderShape3D`` is fast to check collisions against, but it is slower than ``CapsuleShape3D``, ``BoxShape3D``, and ``SphereShape3D``. +/// +open class CylinderShape3D: Shape3D { + override open class var godotClassName: StringName { "CylinderShape3D" } + + /* Properties */ + + /// The cylinder's height. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The cylinder's radius. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &CylinderShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderShape3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &CylinderShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CylinderShape3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &CylinderShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(CylinderShape3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &CylinderShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(CylinderShape3D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DTLSServer.swift b/Sources/SwiftGodot/Generated/Api/DTLSServer.swift new file mode 100644 index 000000000..167a10b35 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DTLSServer.swift @@ -0,0 +1,88 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Helper class to implement a DTLS server. +/// +/// This class is used to store the state of a DTLS server. Upon ``setup(serverOptions:)`` it converts connected ``PacketPeerUDP`` to ``PacketPeerDTLS`` accepting them via ``takeConnection(udpPeer:)`` as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. +/// +/// Below a small example of how to use it: +/// +open class DTLSServer: RefCounted { + override open class var godotClassName: StringName { "DTLSServer" } + /* Methods */ + fileprivate static var method_setup: GDExtensionMethodBindPtr = { + let methodName = StringName("setup") + return withUnsafePointer(to: &DTLSServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1262296096)! + } + + } + + }() + + /// Setup the DTLS server to use the given `serverOptions`. See ``TLSOptions/server(key:certificate:)``. + public final func setup(serverOptions: TLSOptions?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: serverOptions?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DTLSServer.method_setup, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_take_connection: GDExtensionMethodBindPtr = { + let methodName = StringName("take_connection") + return withUnsafePointer(to: &DTLSServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3946580474)! + } + + } + + }() + + /// Try to initiate the DTLS handshake with the given `udpPeer` which must be already connected (see ``PacketPeerUDP/connectToHost(_:port:)``). + /// + /// > Note: You must check that the state of the return PacketPeerUDP is ``PacketPeerDTLS/Status/handshaking``, as it is normal that 50% of the new connections will be invalid due to cookie exchange. + /// + public final func takeConnection(udpPeer: PacketPeerUDP?) -> PacketPeerDTLS? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: udpPeer?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DTLSServer.method_take_connection, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DampedSpringJoint2D.swift b/Sources/SwiftGodot/Generated/Api/DampedSpringJoint2D.swift new file mode 100644 index 000000000..50eb8df0c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DampedSpringJoint2D.swift @@ -0,0 +1,255 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that connects two 2D physics bodies with a spring-like force. +/// +/// A physics joint that connects two 2D physics bodies with a spring-like force. This resembles a spring that always wants to stretch to a given length. +open class DampedSpringJoint2D: Joint2D { + override open class var godotClassName: StringName { "DampedSpringJoint2D" } + + /* Properties */ + + /// The spring joint's maximum length. The two attached bodies cannot stretch it past this value. + final public var length: Double { + get { + return get_length () + } + + set { + set_length (newValue) + } + + } + + /// When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. + final public var restLength: Double { + get { + return get_rest_length () + } + + set { + set_rest_length (newValue) + } + + } + + /// The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. + final public var stiffness: Double { + get { + return get_stiffness () + } + + set { + set_stiffness (newValue) + } + + } + + /// The spring joint's damping ratio. A value between `0` and `1`. When the two bodies move into different directions the system tries to align them to the spring axis again. A high ``damping`` value forces the attached bodies to align faster. + final public var damping: Double { + get { + return get_damping () + } + + set { + set_damping (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_length") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_length(_ length: Double) { + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_set_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rest_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rest_length") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rest_length(_ restLength: Double) { + withUnsafePointer(to: restLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_set_rest_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rest_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rest_length") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rest_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_get_rest_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_stiffness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stiffness") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stiffness(_ stiffness: Double) { + withUnsafePointer(to: stiffness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_set_stiffness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stiffness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stiffness") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stiffness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_get_stiffness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_damping: GDExtensionMethodBindPtr = { + let methodName = StringName("set_damping") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_damping(_ damping: Double) { + withUnsafePointer(to: damping) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_set_damping, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_damping: GDExtensionMethodBindPtr = { + let methodName = StringName("get_damping") + return withUnsafePointer(to: &DampedSpringJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_damping() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(DampedSpringJoint2D.method_get_damping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Decal.swift b/Sources/SwiftGodot/Generated/Api/Decal.swift new file mode 100644 index 000000000..18eeadb77 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Decal.swift @@ -0,0 +1,821 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node that projects a texture onto a ``MeshInstance3D``. +/// +/// ``Decal``s are used to project a texture onto a ``Mesh`` in the scene. Use Decals to add detail to a scene without affecting the underlying ``Mesh``. They are often used to add weathering to building, add dirt or mud to the ground, or add variety to props. Decals can be moved at any time, making them suitable for things like blob shadows or laser sight dots. +/// +/// They are made of an ``AABB`` and a group of ``Texture2D``s specifying ``Color``, normal, ORM (ambient occlusion, roughness, metallic), and emission. Decals are projected within their ``AABB`` so altering the orientation of the Decal affects the direction in which they are projected. By default, Decals are projected down (i.e. from positive Y to negative Y). +/// +/// The ``Texture2D``s associated with the Decal are automatically stored in a texture atlas which is used for drawing the decals so all decals can be drawn at once. Godot uses clustered decals, meaning they are stored in cluster data and drawn when the mesh is drawn, they are not drawn as a post-processing effect after. +/// +/// > Note: Decals cannot affect an underlying material's transparency, regardless of its transparency mode (alpha blend, alpha scissor, alpha hash, opaque pre-pass). This means translucent or transparent areas of a material will remain translucent or transparent even if an opaque decal is applied on them. +/// +/// > Note: Decals are only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, only 8 decals can be displayed on each mesh resource. Attempting to display more than 8 decals on a single mesh resource will result in decals flickering in and out as the camera moves. +/// +/// > Note: When using the Mobile rendering method, decals will only correctly affect meshes whose visibility AABB intersects with the decal's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, ``GeometryInstance3D/extraCullMargin`` must be increased on the mesh. Otherwise, the decal may not be visible on the mesh. +/// +open class Decal: VisualInstance3D { + override open class var godotClassName: StringName { "Decal" } + public enum DecalTexture: Int64, CaseIterable, CustomDebugStringConvertible { + /// ``Texture2D`` corresponding to ``textureAlbedo``. + case albedo = 0 // TEXTURE_ALBEDO + /// ``Texture2D`` corresponding to ``textureNormal``. + case normal = 1 // TEXTURE_NORMAL + /// ``Texture2D`` corresponding to ``textureOrm``. + case orm = 2 // TEXTURE_ORM + /// ``Texture2D`` corresponding to ``textureEmission``. + case emission = 3 // TEXTURE_EMISSION + /// Max size of ``Decal/DecalTexture`` enum. + case max = 4 // TEXTURE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .albedo: return ".albedo" + case .normal: return ".normal" + case .orm: return ".orm" + case .emission: return ".emission" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// Sets the size of the ``AABB`` used by the decal. All dimensions must be set to a value greater than zero (they will be clamped to `0.001` if this is not the case). The AABB goes from `-size/2` to `size/2`. + /// + /// > Note: To improve culling efficiency of "hard surface" decals, set their ``upperFade`` and ``lowerFade`` to `0.0` and set the Y component of the ``size`` as low as possible. This will reduce the decals' AABB size without affecting their appearance. + /// + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// ``Texture2D`` with the base ``Color`` of the Decal. Either this or the ``textureEmission`` must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. + /// + /// > Note: Unlike ``BaseMaterial3D`` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with ``ProjectSettings/rendering/textures/decals/filter``. + /// + final public var textureAlbedo: Texture2D? { + get { + return get_texture (Decal.DecalTexture (rawValue: 0)!) + } + + set { + set_texture (Decal.DecalTexture (rawValue: 0)!, newValue) + } + + } + + /// ``Texture2D`` with the per-pixel normal map for the decal. Use this to add extra detail to decals. + /// + /// > Note: Unlike ``BaseMaterial3D`` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with ``ProjectSettings/rendering/textures/decals/filter``. + /// + /// > Note: Setting this texture alone will not result in a visible decal, as ``textureAlbedo`` must also be set. To create a normal-only decal, load an albedo texture into ``textureAlbedo`` and set ``albedoMix`` to `0.0`. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity). + /// + final public var textureNormal: Texture2D? { + get { + return get_texture (Decal.DecalTexture (rawValue: 1)!) + } + + set { + set_texture (Decal.DecalTexture (rawValue: 1)!, newValue) + } + + } + + /// ``Texture2D`` storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals. + /// + /// > Note: Unlike ``BaseMaterial3D`` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with ``ProjectSettings/rendering/textures/decals/filter``. + /// + /// > Note: Setting this texture alone will not result in a visible decal, as ``textureAlbedo`` must also be set. To create an ORM-only decal, load an albedo texture into ``textureAlbedo`` and set ``albedoMix`` to `0.0`. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). + /// + final public var textureOrm: Texture2D? { + get { + return get_texture (Decal.DecalTexture (rawValue: 2)!) + } + + set { + set_texture (Decal.DecalTexture (rawValue: 2)!, newValue) + } + + } + + /// ``Texture2D`` with the emission ``Color`` of the Decal. Either this or the ``textureAlbedo`` must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. + /// + /// > Note: Unlike ``BaseMaterial3D`` whose filter mode can be adjusted on a per-material basis, the filter mode for ``Decal`` textures is set globally with ``ProjectSettings/rendering/textures/decals/filter``. + /// + final public var textureEmission: Texture2D? { + get { + return get_texture (Decal.DecalTexture (rawValue: 3)!) + } + + set { + set_texture (Decal.DecalTexture (rawValue: 3)!, newValue) + } + + } + + /// Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also ``modulate``. + final public var emissionEnergy: Double { + get { + return get_emission_energy () + } + + set { + set_emission_energy (newValue) + } + + } + + /// Changes the ``Color`` of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also ``emissionEnergy`` and ``albedoMix`` to change the emission and albedo intensity independently of each other. + final public var modulate: Color { + get { + return get_modulate () + } + + set { + set_modulate (newValue) + } + + } + + /// Blends the albedo ``Color`` of the decal with albedo ``Color`` of the underlying mesh. This can be set to `0.0` to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also ``modulate``. + final public var albedoMix: Double { + get { + return get_albedo_mix () + } + + set { + set_albedo_mix (newValue) + } + + } + + /// Fades the Decal if the angle between the Decal's ``AABB`` and the target surface becomes too large. A value of `0` projects the Decal regardless of angle, a value of `1` limits the Decal to surfaces that are nearly perpendicular. + /// + /// > Note: Setting ``normalFade`` to a value greater than `0.0` has a small performance cost due to the added normal angle computations. + /// + final public var normalFade: Double { + get { + return get_normal_fade () + } + + set { + set_normal_fade (newValue) + } + + } + + /// Sets the curve over which the decal will fade as the surface gets further from the center of the ``AABB``. Only positive values are valid (negative values will be clamped to `0.0`). See also ``lowerFade``. + final public var upperFade: Double { + get { + return get_upper_fade () + } + + set { + set_upper_fade (newValue) + } + + } + + /// Sets the curve over which the decal will fade as the surface gets further from the center of the ``AABB``. Only positive values are valid (negative values will be clamped to `0.0`). See also ``upperFade``. + final public var lowerFade: Double { + get { + return get_lower_fade () + } + + set { + set_lower_fade (newValue) + } + + } + + /// If `true`, decals will smoothly fade away when far from the active ``Camera3D`` starting at ``distanceFadeBegin``. The Decal will fade out over ``distanceFadeBegin`` + ``distanceFadeLength``, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance. + final public var distanceFadeEnabled: Bool { + get { + return is_distance_fade_enabled () + } + + set { + set_enable_distance_fade (newValue) + } + + } + + /// The distance from the camera at which the Decal begins to fade away (in 3D units). + final public var distanceFadeBegin: Double { + get { + return get_distance_fade_begin () + } + + set { + set_distance_fade_begin (newValue) + } + + } + + /// The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast. + final public var distanceFadeLength: Double { + get { + return get_distance_fade_length () + } + + set { + set_distance_fade_length (newValue) + } + + } + + /// Specifies which ``VisualInstance3D/layers`` this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. + final public var cullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Decal.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2086764391)! + } + + } + + }() + + @inline(__always) + /// Sets the ``Texture2D`` associated with the specified ``Decal/DecalTexture``. This is a convenience method, in most cases you should access the texture directly. + /// + /// For example, instead of `$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)`, use `$Decal.texture_albedo = albedo_tex`. + /// + /// One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: + /// + fileprivate final func set_texture(_ type: Decal.DecalTexture, _ texture: Texture2D?) { + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3244119503)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Texture2D`` associated with the specified ``Decal/DecalTexture``. This is a convenience method, in most cases you should access the texture directly. + /// + /// For example, instead of `albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)`, use `albedo_tex = $Decal.texture_albedo`. + /// + /// One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: + /// + fileprivate final func get_texture(_ type: Decal.DecalTexture) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_get_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_emission_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_energy") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_energy(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_emission_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_energy") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_emission_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_albedo_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_albedo_mix") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_albedo_mix(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_albedo_mix, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_albedo_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_albedo_mix") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_albedo_mix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_albedo_mix, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_modulate") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_modulate(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_modulate") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Decal.method_get_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_upper_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_upper_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_upper_fade(_ fade: Double) { + withUnsafePointer(to: fade) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_upper_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_upper_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("get_upper_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_upper_fade() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_upper_fade, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lower_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lower_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lower_fade(_ fade: Double) { + withUnsafePointer(to: fade) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_lower_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lower_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lower_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lower_fade() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_lower_fade, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normal_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normal_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normal_fade(_ fade: Double) { + withUnsafePointer(to: fade) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_normal_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_normal_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normal_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_normal_fade() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_normal_fade, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_distance_fade") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_distance_fade(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_enable_distance_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_distance_fade_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_distance_fade_enabled") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_distance_fade_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Decal.method_is_distance_fade_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_begin") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_begin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_distance_fade_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_begin") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_begin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_distance_fade_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_length") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_length(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_distance_fade_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_length") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Decal.method_get_distance_fade_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Decal.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &Decal.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(Decal.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DirAccess.swift b/Sources/SwiftGodot/Generated/Api/DirAccess.swift new file mode 100644 index 000000000..7e735b06a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DirAccess.swift @@ -0,0 +1,1085 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides methods for managing directories and their content. +/// +/// This class is used to manage directories and their content, even outside of the project folder. +/// +/// ``DirAccess`` can't be instantiated directly. Instead it is created with a static method that takes a path for which it will be opened. +/// +/// Most of the methods have a static alternative that can be used without creating a ``DirAccess``. Static methods only support absolute paths (including `res://` and `user://`). +/// +/// > Note: Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. Use ``ResourceLoader`` to access imported resources. +/// +/// Here is an example on how to iterate through the files of a directory: +/// +open class DirAccess: RefCounted { + override open class var godotClassName: StringName { "DirAccess" } + + /* Properties */ + + /// If `true`, `.` and `..` are included when navigating the directory. + /// + /// Affects ``listDirBegin()`` and ``getDirectories()``. + /// + final public var includeNavigational: Bool { + get { + return get_include_navigational () + } + + set { + set_include_navigational (newValue) + } + + } + + /// If `true`, hidden files are included when navigating the directory. + /// + /// Affects ``listDirBegin()``, ``getDirectories()`` and ``getFiles()``. + /// + final public var includeHidden: Bool { + get { + return get_include_hidden () + } + + set { + set_include_hidden (newValue) + } + + } + + /* Methods */ + fileprivate static var method_open: GDExtensionMethodBindPtr = { + let methodName = StringName("open") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1923528528)! + } + + } + + }() + + /// Creates a new ``DirAccess`` object and opens an existing directory of the filesystem. The `path` argument can be within the project tree (`res://folder`), the user directory (`user://folder`) or an absolute path of the user filesystem (e.g. `/tmp/folder` or `C:\tmp\folder`). + /// + /// Returns `null` if opening the directory failed. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func open(path: String) -> DirAccess? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_open, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_open_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_open_error") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Returns the result of the last ``open(path:)`` call in the current thread. + public static func getOpenError() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_open_error, nil, nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_list_dir_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("list_dir_begin") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2610976713)! + } + + } + + }() + + /// Initializes the stream used to list all files and directories using the ``getNext()`` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with ``listDirEnd()``. + /// + /// Affected by ``includeHidden`` and ``includeNavigational``. + /// + /// > Note: The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use ``getFiles()`` or ``getDirectories()``. + /// + public final func listDirBegin() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(DirAccess.method_list_dir_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_next: GDExtensionMethodBindPtr = { + let methodName = StringName("get_next") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns the next element (file or directory) in the current directory. + /// + /// The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty ``String`` and closes the stream automatically (i.e. ``listDirEnd()`` would not be mandatory in such a case). + /// + public final func getNext() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(DirAccess.method_get_next, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_current_is_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("current_is_dir") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the current item processed with the last ``getNext()`` call is a directory (`.` and `..` are considered directories). + public final func currentIsDir() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(DirAccess.method_current_is_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_list_dir_end: GDExtensionMethodBindPtr = { + let methodName = StringName("list_dir_end") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Closes the current stream opened with ``listDirBegin()`` (whether it has been fully processed with ``getNext()`` does not matter). + public final func listDirEnd() { + gi.object_method_bind_ptrcall(DirAccess.method_list_dir_end, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_files: GDExtensionMethodBindPtr = { + let methodName = StringName("get_files") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns a ``PackedStringArray`` containing filenames of the directory contents, excluding directories. The array is sorted alphabetically. + /// + /// Affected by ``includeHidden``. + /// + /// > Note: When used on a `res://` path in an exported project, only the files actually included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level `.godot/` folder, only paths to `*.gd` and `*.import` files are returned (plus a few files such as `project.godot` or `project.binary` and the project icon). In an exported project, the list of returned files will also vary depending on whether ``ProjectSettings/editor/export/convertTextResourcesToBinary`` is `true`. + /// + public final func getFiles() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(DirAccess.method_get_files, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_files_at: GDExtensionMethodBindPtr = { + let methodName = StringName("get_files_at") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3538744774)! + } + + } + + }() + + /// Returns a ``PackedStringArray`` containing filenames of the directory contents, excluding directories, at the given `path`. The array is sorted alphabetically. + /// + /// Use ``getFiles()`` if you want more control of what gets included. + /// + public static func getFilesAt(path: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_files_at, nil, pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_directories: GDExtensionMethodBindPtr = { + let methodName = StringName("get_directories") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns a ``PackedStringArray`` containing filenames of the directory contents, excluding files. The array is sorted alphabetically. + /// + /// Affected by ``includeHidden`` and ``includeNavigational``. + /// + public final func getDirectories() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(DirAccess.method_get_directories, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_directories_at: GDExtensionMethodBindPtr = { + let methodName = StringName("get_directories_at") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3538744774)! + } + + } + + }() + + /// Returns a ``PackedStringArray`` containing filenames of the directory contents, excluding files, at the given `path`. The array is sorted alphabetically. + /// + /// Use ``getDirectories()`` if you want more control of what gets included. + /// + public static func getDirectoriesAt(path: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_directories_at, nil, pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_drive_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drive_count") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// On Windows, returns the number of drives (partitions) mounted on the current filesystem. + /// + /// On macOS, returns the number of mounted volumes. + /// + /// On Linux, returns the number of mounted volumes and GTK 3 bookmarks. + /// + /// On other platforms, the method returns 0. + /// + public static func getDriveCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_drive_count, nil, nil, &_result) + return _result + } + + fileprivate static var method_get_drive_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drive_name") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 990163283)! + } + + } + + }() + + /// On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`). + /// + /// On macOS, returns the path to the mounted volume passed as an argument. + /// + /// On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument. + /// + /// On other platforms, or if the requested drive does not exist, the method returns an empty String. + /// + public static func getDriveName(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_drive_name, nil, pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_current_drive: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_drive") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the currently opened directory's drive index. See ``getDriveName(idx:)`` to convert returned index to the name of the drive. + public final func getCurrentDrive() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(DirAccess.method_get_current_drive, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_change_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("change_dir") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. `newdir` or `../newdir`), or an absolute path (e.g. `/tmp/newdir` or `res://somedir/newdir`). + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + /// > Note: The new directory must be within the same scope, e.g. when you had opened a directory inside `res://`, you can't change it to `user://` directory. If you need to open a directory in another access scope, use ``open(path:)`` to create a new instance instead. + /// + public final func changeDir(toDir: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let toDir = GString(toDir) + withUnsafePointer(to: toDir.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_change_dir, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_current_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_dir") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1287308131)! + } + + } + + }() + + /// Returns the absolute path to the currently opened directory (e.g. `res://folder` or `C:\tmp\folder`). + public final func getCurrentDir(includeDrive: Bool = true) -> String { + let _result = GString () + withUnsafePointer(to: includeDrive) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_get_current_dir, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_make_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("make_dir") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see ``makeDirRecursive(path:)``). + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + public final func makeDir(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_make_dir, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_make_dir_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("make_dir_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Static version of ``makeDir(path:)``. Supports only absolute paths. + public static func makeDirAbsolute(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_make_dir_absolute, nil, pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_make_dir_recursive: GDExtensionMethodBindPtr = { + let methodName = StringName("make_dir_recursive") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Creates a target directory and all necessary intermediate directories in its path, by calling ``makeDir(path:)`` recursively. The argument can be relative to the current directory, or an absolute path. + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + public final func makeDirRecursive(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_make_dir_recursive, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_make_dir_recursive_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("make_dir_recursive_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Static version of ``makeDirRecursive(path:)``. Supports only absolute paths. + public static func makeDirRecursiveAbsolute(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_make_dir_recursive_absolute, nil, pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_file_exists: GDExtensionMethodBindPtr = { + let methodName = StringName("file_exists") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. + /// + /// For a static equivalent, use ``FileAccess/fileExists(path:)``. + /// + public final func fileExists(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_file_exists, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_dir_exists: GDExtensionMethodBindPtr = { + let methodName = StringName("dir_exists") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. + public final func dirExists(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_dir_exists, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_dir_exists_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("dir_exists_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Static version of ``dirExists(path:)``. Supports only absolute paths. + public static func dirExistsAbsolute(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_dir_exists_absolute, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_space_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_space_left") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the available space on the current directory's disk, in bytes. Returns `0` if the platform-specific method to query the available space fails. + public final func getSpaceLeft() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(DirAccess.method_get_space_left, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_copy: GDExtensionMethodBindPtr = { + let methodName = StringName("copy") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1063198817)! + } + + } + + }() + + /// Copies the `from` file to the `to` destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + /// + /// If `chmodFlags` is different than `-1`, the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + public final func copy(from: String, to: String, chmodFlags: Int32 = -1) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let from = GString(from) + withUnsafePointer(to: from.content) { pArg0 in + let to = GString(to) + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: chmodFlags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_copy, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_copy_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("copy_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1063198817)! + } + + } + + }() + + /// Static version of ``copy(from:to:chmodFlags:)``. Supports only absolute paths. + public static func copyAbsolute(from: String, to: String, chmodFlags: Int32 = -1) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let from = GString(from) + withUnsafePointer(to: from.content) { pArg0 in + let to = GString(to) + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: chmodFlags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_copy_absolute, nil, pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_rename: GDExtensionMethodBindPtr = { + let methodName = StringName("rename") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Renames (move) the `from` file or directory to the `to` destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + public final func rename(from: String, to: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let from = GString(from) + withUnsafePointer(to: from.content) { pArg0 in + let to = GString(to) + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_rename, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_rename_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Static version of ``rename(from:to:)``. Supports only absolute paths. + public static func renameAbsolute(from: String, to: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let from = GString(from) + withUnsafePointer(to: from.content) { pArg0 in + let to = GString(to) + withUnsafePointer(to: to.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_rename_absolute, nil, pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_remove: GDExtensionMethodBindPtr = { + let methodName = StringName("remove") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. + /// + /// If you don't want to delete the file/directory permanently, use ``OS/moveToTrash(path:)`` instead. + /// + /// Returns one of the ``GodotError`` code constants (``GodotError/ok`` on success). + /// + public final func remove(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_remove, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_remove_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_absolute") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Static version of ``remove(path:)``. Supports only absolute paths. + public static func removeAbsolute(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_absolute, nil, pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_link: GDExtensionMethodBindPtr = { + let methodName = StringName("is_link") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns `true` if the file or directory is a symbolic link, directory junction, or other reparse point. + /// + /// > Note: This method is implemented on macOS, Linux, and Windows. + /// + public final func isLink(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_is_link, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_read_link: GDExtensionMethodBindPtr = { + let methodName = StringName("read_link") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns target of the symbolic link. + /// + /// > Note: This method is implemented on macOS, Linux, and Windows. + /// + public final func readLink(path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_read_link, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_create_link: GDExtensionMethodBindPtr = { + let methodName = StringName("create_link") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Creates symbolic link between files or folders. + /// + /// > Note: On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled. + /// + /// > Note: This method is implemented on macOS, Linux, and Windows. + /// + public final func createLink(source: String, target: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let source = GString(source) + withUnsafePointer(to: source.content) { pArg0 in + let target = GString(target) + withUnsafePointer(to: target.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_create_link, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_include_navigational: GDExtensionMethodBindPtr = { + let methodName = StringName("set_include_navigational") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_include_navigational(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_set_include_navigational, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_include_navigational: GDExtensionMethodBindPtr = { + let methodName = StringName("get_include_navigational") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_include_navigational() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(DirAccess.method_get_include_navigational, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_include_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_include_hidden") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_include_hidden(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_set_include_hidden, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_include_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("get_include_hidden") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_include_hidden() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(DirAccess.method_get_include_hidden, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_case_sensitive: GDExtensionMethodBindPtr = { + let methodName = StringName("is_case_sensitive") + return withUnsafePointer(to: &DirAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the file system or directory use case sensitive file names. + /// + /// > Note: This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns `true`. + /// + public final func isCaseSensitive(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirAccess.method_is_case_sensitive, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DirectionalLight2D.swift b/Sources/SwiftGodot/Generated/Api/DirectionalLight2D.swift new file mode 100644 index 000000000..1c4cc472b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DirectionalLight2D.swift @@ -0,0 +1,102 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Directional 2D light from a distance. +/// +/// A directional light is a type of ``Light2D`` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight). +/// +/// > Note: ``DirectionalLight2D`` does not support light cull masks (but it supports shadow cull masks). It will always light up 2D nodes, regardless of the 2D node's ``CanvasItem/lightMask``. +/// +open class DirectionalLight2D: Light2D { + override open class var godotClassName: StringName { "DirectionalLight2D" } + + /* Properties */ + + /// The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane). + final public var height: Double { + get { + return getHeight () + } + + set { + setHeight (newValue) + } + + } + + /// The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). ``Camera2D/zoom`` is not taken into account by ``maxDistance``, which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point. + final public var maxDistance: Double { + get { + return get_max_distance () + } + + set { + set_max_distance (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_distance") + return withUnsafePointer(to: &DirectionalLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_distance(_ pixels: Double) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirectionalLight2D.method_set_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_distance") + return withUnsafePointer(to: &DirectionalLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(DirectionalLight2D.method_get_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DirectionalLight3D.swift b/Sources/SwiftGodot/Generated/Api/DirectionalLight3D.swift new file mode 100644 index 000000000..95667c759 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DirectionalLight3D.swift @@ -0,0 +1,309 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Directional light from a distance, as from the Sun. +/// +/// A directional light is a type of ``Light3D`` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction. +open class DirectionalLight3D: Light3D { + override open class var godotClassName: StringName { "DirectionalLight3D" } + public enum ShadowMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects. + case orthogonal = 0 // SHADOW_ORTHOGONAL + /// Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between ``ShadowMode/orthogonal`` and ``ShadowMode/parallel4Splits`` in terms of performance. + case parallel2Splits = 1 // SHADOW_PARALLEL_2_SPLITS + /// Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. + case parallel4Splits = 2 // SHADOW_PARALLEL_4_SPLITS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .orthogonal: return ".orthogonal" + case .parallel2Splits: return ".parallel2Splits" + case .parallel4Splits: return ".parallel4Splits" + } + + } + + } + + public enum SkyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Makes the light visible in both scene lighting and sky rendering. + case lightAndSky = 0 // SKY_MODE_LIGHT_AND_SKY + /// Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. + case lightOnly = 1 // SKY_MODE_LIGHT_ONLY + /// Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). + case skyOnly = 2 // SKY_MODE_SKY_ONLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .lightAndSky: return ".lightAndSky" + case .lightOnly: return ".lightOnly" + case .skyOnly: return ".skyOnly" + } + + } + + } + + + /* Properties */ + + /// The light's shadow rendering algorithm. See ``DirectionalLight3D/ShadowMode``. + final public var directionalShadowMode: DirectionalLight3D.ShadowMode { + get { + return get_shadow_mode () + } + + set { + set_shadow_mode (newValue) + } + + } + + /// The distance from camera to shadow split 1. Relative to ``directionalShadowMaxDistance``. Only used when ``directionalShadowMode`` is ``ShadowMode/parallel2Splits`` or ``ShadowMode/parallel4Splits``. + final public var directionalShadowSplit1: Double { + get { + return get_param (Light3D.Param (rawValue: 10)!) + } + + set { + set_param (Light3D.Param (rawValue: 10)!, newValue) + } + + } + + /// The distance from shadow split 1 to split 2. Relative to ``directionalShadowMaxDistance``. Only used when ``directionalShadowMode`` is ``ShadowMode/parallel4Splits``. + final public var directionalShadowSplit2: Double { + get { + return get_param (Light3D.Param (rawValue: 11)!) + } + + set { + set_param (Light3D.Param (rawValue: 11)!, newValue) + } + + } + + /// The distance from shadow split 2 to split 3. Relative to ``directionalShadowMaxDistance``. Only used when ``directionalShadowMode`` is ``ShadowMode/parallel4Splits``. + final public var directionalShadowSplit3: Double { + get { + return get_param (Light3D.Param (rawValue: 12)!) + } + + set { + set_param (Light3D.Param (rawValue: 12)!, newValue) + } + + } + + /// If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when ``directionalShadowMode`` is ``ShadowMode/orthogonal``. + final public var directionalShadowBlendSplits: Bool { + get { + return is_blend_splits_enabled () + } + + set { + set_blend_splits (newValue) + } + + } + + /// Proportion of ``directionalShadowMaxDistance`` at which point the shadow starts to fade. At ``directionalShadowMaxDistance``, the shadow will disappear. The default value is a balance between smooth fading and distant shadow visibility. If the camera moves fast and the ``directionalShadowMaxDistance`` is low, consider lowering ``directionalShadowFadeStart`` below `0.8` to make shadow transitions less noticeable. On the other hand, if you tuned ``directionalShadowMaxDistance`` to cover the entire scene, you can set ``directionalShadowFadeStart`` to `1.0` to prevent the shadow from fading in the distance (it will suddenly cut off instead). + final public var directionalShadowFadeStart: Double { + get { + return get_param (Light3D.Param (rawValue: 13)!) + } + + set { + set_param (Light3D.Param (rawValue: 13)!, newValue) + } + + } + + /// The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). + final public var directionalShadowMaxDistance: Double { + get { + return get_param (Light3D.Param (rawValue: 9)!) + } + + set { + set_param (Light3D.Param (rawValue: 9)!, newValue) + } + + } + + /// Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to `0` turns off the pancaking effect. + final public var directionalShadowPancakeSize: Double { + get { + return get_param (Light3D.Param (rawValue: 16)!) + } + + set { + set_param (Light3D.Param (rawValue: 16)!, newValue) + } + + } + + /// Set whether this ``DirectionalLight3D`` is visible in the sky, in the scene, or both in the sky and in the scene. See ``DirectionalLight3D/SkyMode`` for options. + final public var skyMode: DirectionalLight3D.SkyMode { + get { + return get_sky_mode () + } + + set { + set_sky_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_mode") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1261211726)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_mode(_ mode: DirectionalLight3D.ShadowMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirectionalLight3D.method_set_shadow_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_mode") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2765228544)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_mode() -> DirectionalLight3D.ShadowMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(DirectionalLight3D.method_get_shadow_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return DirectionalLight3D.ShadowMode (rawValue: _result)! + } + + fileprivate static var method_set_blend_splits: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_splits") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_splits(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirectionalLight3D.method_set_blend_splits, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_blend_splits_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_blend_splits_enabled") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_blend_splits_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(DirectionalLight3D.method_is_blend_splits_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_mode") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2691194817)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_mode(_ mode: DirectionalLight3D.SkyMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(DirectionalLight3D.method_set_sky_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_mode") + return withUnsafePointer(to: &DirectionalLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3819982774)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_mode() -> DirectionalLight3D.SkyMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(DirectionalLight3D.method_get_sky_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return DirectionalLight3D.SkyMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/DisplayServer.swift b/Sources/SwiftGodot/Generated/Api/DisplayServer.swift new file mode 100644 index 000000000..45ba80a4c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/DisplayServer.swift @@ -0,0 +1,6217 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for low-level window management. +/// +/// ``DisplayServer`` handles everything related to window management. It is separated from ``OS`` as a single operating system may support multiple display servers. +/// +/// **Headless mode:** Starting the engine with the `--headless` command line argument disables all rendering and window management functions. Most functions from ``DisplayServer`` will return dummy values in this case. +/// +open class DisplayServer: Object { + /// The shared instance of this class + public static var shared: DisplayServer = { + return withUnsafePointer (to: &DisplayServer.godotClassName.content) { ptr in + DisplayServer (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "DisplayServer" } + public enum Feature: Int64, CaseIterable, CustomDebugStringConvertible { + /// Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS** + case globalMenu = 0 // FEATURE_GLOBAL_MENU + /// Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)** + case subwindows = 1 // FEATURE_SUBWINDOWS + /// Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web** + case touchscreen = 2 // FEATURE_TOUCHSCREEN + /// Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web** + case mouse = 3 // FEATURE_MOUSE + /// Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. **Windows, macOS, Linux (X11/Wayland)** + case mouseWarp = 4 // FEATURE_MOUSE_WARP + /// Display server supports setting and getting clipboard data. See also ``Feature/clipboardPrimary``. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** + case clipboard = 5 // FEATURE_CLIPBOARD + /// Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web** + case virtualKeyboard = 6 // FEATURE_VIRTUAL_KEYBOARD + /// Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web** + case cursorShape = 7 // FEATURE_CURSOR_SHAPE + /// Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web** + case customCursorShape = 8 // FEATURE_CUSTOM_CURSOR_SHAPE + /// Display server supports spawning text dialogs using the operating system's native look-and-feel. See ``dialogShow(title:description:buttons:callback:)``. **Windows, macOS** + case nativeDialog = 9 // FEATURE_NATIVE_DIALOG + /// Display server supports Input Method Editor, which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. **Windows, macOS, Linux (X11)** + case ime = 10 // FEATURE_IME + /// Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)** + case windowTransparency = 11 // FEATURE_WINDOW_TRANSPARENCY + /// Display server supports querying the operating system's display scale factor. This allows for _reliable_ automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, Linux (Wayland), macOS** + case hidpi = 12 // FEATURE_HIDPI + /// Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)** + case icon = 13 // FEATURE_ICON + /// Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS** + case nativeIcon = 14 // FEATURE_NATIVE_ICON + /// Display server supports changing the screen orientation. **Android, iOS** + case orientation = 15 // FEATURE_ORIENTATION + /// Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). **Windows, macOS, Linux (X11/Wayland)** + case swapBuffers = 16 // FEATURE_SWAP_BUFFERS + /// Display server supports Primary clipboard can be used. This is a different clipboard from ``Feature/clipboard``. **Linux (X11/Wayland)** + case clipboardPrimary = 18 // FEATURE_CLIPBOARD_PRIMARY + /// Display server supports text-to-speech. See `tts_*` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** + case textToSpeech = 19 // FEATURE_TEXT_TO_SPEECH + /// Display server supports expanding window content to the title. See ``WindowFlags/extendToTitle``. **macOS** + case extendToTitle = 20 // FEATURE_EXTEND_TO_TITLE + /// Display server supports reading screen pixels. See ``screenGetPixel(position:)``. + case screenCapture = 21 // FEATURE_SCREEN_CAPTURE + /// Display server supports application status indicators. + case statusIndicator = 22 // FEATURE_STATUS_INDICATOR + /// Display server supports native help system search callbacks. See ``helpSetSearchCallbacks(searchCallback:actionCallback:)``. + case nativeHelp = 23 // FEATURE_NATIVE_HELP + /// Display server supports spawning text input dialogs using the operating system's native look-and-feel. See ``dialogInputText(title:description:existingText:callback:)``. **Windows, macOS** + case nativeDialogInput = 24 // FEATURE_NATIVE_DIALOG_INPUT + /// Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See ``fileDialogShow(title:currentDirectory:filename:showHidden:mode:filters:callback:)`` and ``fileDialogWithOptionsShow(title:currentDirectory:root:filename:showHidden:mode:filters:options:callback:)``. **Windows, macOS, Linux (X11/Wayland)** + case nativeDialogFile = 25 // FEATURE_NATIVE_DIALOG_FILE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .globalMenu: return ".globalMenu" + case .subwindows: return ".subwindows" + case .touchscreen: return ".touchscreen" + case .mouse: return ".mouse" + case .mouseWarp: return ".mouseWarp" + case .clipboard: return ".clipboard" + case .virtualKeyboard: return ".virtualKeyboard" + case .cursorShape: return ".cursorShape" + case .customCursorShape: return ".customCursorShape" + case .nativeDialog: return ".nativeDialog" + case .ime: return ".ime" + case .windowTransparency: return ".windowTransparency" + case .hidpi: return ".hidpi" + case .icon: return ".icon" + case .nativeIcon: return ".nativeIcon" + case .orientation: return ".orientation" + case .swapBuffers: return ".swapBuffers" + case .clipboardPrimary: return ".clipboardPrimary" + case .textToSpeech: return ".textToSpeech" + case .extendToTitle: return ".extendToTitle" + case .screenCapture: return ".screenCapture" + case .statusIndicator: return ".statusIndicator" + case .nativeHelp: return ".nativeHelp" + case .nativeDialogInput: return ".nativeDialogInput" + case .nativeDialogFile: return ".nativeDialogFile" + } + + } + + } + + public enum MouseMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Makes the mouse cursor visible if it is hidden. + case visible = 0 // MOUSE_MODE_VISIBLE + /// Makes the mouse cursor hidden if it is visible. + case hidden = 1 // MOUSE_MODE_HIDDEN + /// Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. + /// + /// > Note: If you want to process the mouse's movement in this mode, you need to use ``InputEventMouseMotion/relative``. + /// + case captured = 2 // MOUSE_MODE_CAPTURED + /// Confines the mouse cursor to the game window, and make it visible. + case confined = 3 // MOUSE_MODE_CONFINED + /// Confines the mouse cursor to the game window, and make it hidden. + case confinedHidden = 4 // MOUSE_MODE_CONFINED_HIDDEN + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .visible: return ".visible" + case .hidden: return ".hidden" + case .captured: return ".captured" + case .confined: return ".confined" + case .confinedHidden: return ".confinedHidden" + } + + } + + } + + public enum ScreenOrientation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default landscape orientation. + case landscape = 0 // SCREEN_LANDSCAPE + /// Default portrait orientation. + case portrait = 1 // SCREEN_PORTRAIT + /// Reverse landscape orientation (upside down). + case reverseLandscape = 2 // SCREEN_REVERSE_LANDSCAPE + /// Reverse portrait orientation (upside down). + case reversePortrait = 3 // SCREEN_REVERSE_PORTRAIT + /// Automatic landscape orientation (default or reverse depending on sensor). + case sensorLandscape = 4 // SCREEN_SENSOR_LANDSCAPE + /// Automatic portrait orientation (default or reverse depending on sensor). + case sensorPortrait = 5 // SCREEN_SENSOR_PORTRAIT + /// Automatic landscape or portrait orientation (default or reverse depending on sensor). + case sensor = 6 // SCREEN_SENSOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .landscape: return ".landscape" + case .portrait: return ".portrait" + case .reverseLandscape: return ".reverseLandscape" + case .reversePortrait: return ".reversePortrait" + case .sensorLandscape: return ".sensorLandscape" + case .sensorPortrait: return ".sensorPortrait" + case .sensor: return ".sensor" + } + + } + + } + + public enum VirtualKeyboardType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default text virtual keyboard. + case `default` = 0 // KEYBOARD_TYPE_DEFAULT + /// Multiline virtual keyboard. + case multiline = 1 // KEYBOARD_TYPE_MULTILINE + /// Virtual number keypad, useful for PIN entry. + case number = 2 // KEYBOARD_TYPE_NUMBER + /// Virtual number keypad, useful for entering fractional numbers. + case numberDecimal = 3 // KEYBOARD_TYPE_NUMBER_DECIMAL + /// Virtual phone number keypad. + case phone = 4 // KEYBOARD_TYPE_PHONE + /// Virtual keyboard with additional keys to assist with typing email addresses. + case emailAddress = 5 // KEYBOARD_TYPE_EMAIL_ADDRESS + /// Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + /// + /// > Note: This is not supported on Web. Instead, this behaves identically to ``VirtualKeyboardType/`default```. + /// + case password = 6 // KEYBOARD_TYPE_PASSWORD + /// Virtual keyboard with additional keys to assist with typing URLs. + case url = 7 // KEYBOARD_TYPE_URL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .multiline: return ".multiline" + case .number: return ".number" + case .numberDecimal: return ".numberDecimal" + case .phone: return ".phone" + case .emailAddress: return ".emailAddress" + case .password: return ".password" + case .url: return ".url" + } + + } + + } + + public enum CursorShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a ``LineEdit`` or ``TextEdit``. + case arrow = 0 // CURSOR_ARROW + /// I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as ``LineEdit`` or ``TextEdit``. + case ibeam = 1 // CURSOR_IBEAM + /// Pointing hand cursor shape. This is used by default when hovering a ``LinkButton`` or a URL tag in a ``RichTextLabel``. + case pointingHand = 2 // CURSOR_POINTING_HAND + /// Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. + case cross = 3 // CURSOR_CROSS + /// Wait cursor. On most cursor themes, this displays a spinning icon _besides_ the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also ``CursorShape/busy``. + case wait = 4 // CURSOR_WAIT + /// Wait cursor. On most cursor themes, this _replaces_ the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also ``CursorShape/wait``. + case busy = 5 // CURSOR_BUSY + /// Dragging hand cursor. This is displayed during drag-and-drop operations. See also ``CursorShape/canDrop``. + case drag = 6 // CURSOR_DRAG + /// "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a ``Control`` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also ``CursorShape/drag``. + case canDrop = 7 // CURSOR_CAN_DROP + /// Forbidden cursor. This is displayed during drag-and-drop operations if the hovered ``Control`` can't accept the drag-and-drop event. + case forbidden = 8 // CURSOR_FORBIDDEN + /// Vertical resize cursor. Intended to be displayed when the hovered ``Control`` can be vertically resized using the mouse. See also ``CursorShape/vsplit``. + case vsize = 9 // CURSOR_VSIZE + /// Horizontal resize cursor. Intended to be displayed when the hovered ``Control`` can be horizontally resized using the mouse. See also ``CursorShape/hsplit``. + case hsize = 10 // CURSOR_HSIZE + /// Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered ``Control`` can be resized on both axes at once using the mouse. + case bdiagsize = 11 // CURSOR_BDIAGSIZE + /// Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered ``Control`` can be resized on both axes at once using the mouse. + case fdiagsize = 12 // CURSOR_FDIAGSIZE + /// Move cursor. Intended to be displayed when the hovered ``Control`` can be moved using the mouse. + case move = 13 // CURSOR_MOVE + /// Vertical split cursor. This is displayed when hovering a ``Control`` with splits that can be vertically resized using the mouse, such as ``VSplitContainer``. On some cursor themes, this cursor may have the same appearance as ``CursorShape/vsize``. + case vsplit = 14 // CURSOR_VSPLIT + /// Horizontal split cursor. This is displayed when hovering a ``Control`` with splits that can be horizontally resized using the mouse, such as ``HSplitContainer``. On some cursor themes, this cursor may have the same appearance as ``CursorShape/hsize``. + case hsplit = 15 // CURSOR_HSPLIT + /// Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. + case help = 16 // CURSOR_HELP + /// Represents the size of the ``DisplayServer/CursorShape`` enum. + case max = 17 // CURSOR_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .arrow: return ".arrow" + case .ibeam: return ".ibeam" + case .pointingHand: return ".pointingHand" + case .cross: return ".cross" + case .wait: return ".wait" + case .busy: return ".busy" + case .drag: return ".drag" + case .canDrop: return ".canDrop" + case .forbidden: return ".forbidden" + case .vsize: return ".vsize" + case .hsize: return ".hsize" + case .bdiagsize: return ".bdiagsize" + case .fdiagsize: return ".fdiagsize" + case .move: return ".move" + case .vsplit: return ".vsplit" + case .hsplit: return ".hsplit" + case .help: return ".help" + case .max: return ".max" + } + + } + + } + + public enum FileDialogMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The native file dialog allows selecting one, and only one file. + case openFile = 0 // FILE_DIALOG_MODE_OPEN_FILE + /// The native file dialog allows selecting multiple files. + case openFiles = 1 // FILE_DIALOG_MODE_OPEN_FILES + /// The native file dialog only allows selecting a directory, disallowing the selection of any file. + case openDir = 2 // FILE_DIALOG_MODE_OPEN_DIR + /// The native file dialog allows selecting one file or directory. + case openAny = 3 // FILE_DIALOG_MODE_OPEN_ANY + /// The native file dialog will warn when a file exists. + case saveFile = 4 // FILE_DIALOG_MODE_SAVE_FILE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .openFile: return ".openFile" + case .openFiles: return ".openFiles" + case .openDir: return ".openDir" + case .openAny: return ".openAny" + case .saveFile: return ".saveFile" + } + + } + + } + + public enum WindowMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Windowed mode, i.e. ``Window`` doesn't occupy the whole screen (unless set to the size of the screen). + case windowed = 0 // WINDOW_MODE_WINDOWED + /// Minimized window mode, i.e. ``Window`` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. + case minimized = 1 // WINDOW_MODE_MINIMIZED + /// Maximized window mode, i.e. ``Window`` will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. + case maximized = 2 // WINDOW_MODE_MAXIMIZED + /// Full screen mode with full multi-window support. + /// + /// Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + /// + /// **On Windows:** Multi-window full-screen mode has a 1px border of the ``ProjectSettings/rendering/environment/defaults/defaultClearColor`` color. + /// + /// **On macOS:** A new desktop is used to display the running project. + /// + /// > Note: Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports multiple resolutions when enabling full screen mode. + /// + case fullscreen = 3 // WINDOW_MODE_FULLSCREEN + /// A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). + /// + /// Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. + /// + /// **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. + /// + /// **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. + /// + /// **On Linux (X11):** Exclusive full screen mode bypasses compositor. + /// + /// > Note: Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports multiple resolutions when enabling full screen mode. + /// + case exclusiveFullscreen = 4 // WINDOW_MODE_EXCLUSIVE_FULLSCREEN + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .windowed: return ".windowed" + case .minimized: return ".minimized" + case .maximized: return ".maximized" + case .fullscreen: return ".fullscreen" + case .exclusiveFullscreen: return ".exclusiveFullscreen" + } + + } + + } + + public enum WindowFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// The window can't be resized by dragging its resize grip. It's still possible to resize the window using ``windowSetSize(_:windowId:)``. This flag is ignored for full screen windows. + case resizeDisabled = 0 // WINDOW_FLAG_RESIZE_DISABLED + /// The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. + case borderless = 1 // WINDOW_FLAG_BORDERLESS + /// The window is floating on top of all other windows. This flag is ignored for full-screen windows. + case alwaysOnTop = 2 // WINDOW_FLAG_ALWAYS_ON_TOP + /// The window background can be transparent. + /// + /// > Note: This flag has no effect if ``isWindowTransparencyAvailable()`` returns `false`. + /// + /// > Note: Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. + /// + case transparent = 3 // WINDOW_FLAG_TRANSPARENT + /// The window can't be focused. No-focus window will ignore all input, except mouse clicks. + case noFocus = 4 // WINDOW_FLAG_NO_FOCUS + /// Window is part of menu or ``OptionButton`` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see ``windowSetTransient(windowId:parentWindowId:)``). + case popup = 5 // WINDOW_FLAG_POPUP + /// Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. + /// + /// Use ``windowSetWindowButtonsOffset(_:windowId:)`` to adjust minimize/maximize/close buttons offset. + /// + /// Use ``windowGetSafeTitleMargins(windowId:)`` to determine area under the title bar that is not covered by decorations. + /// + /// > Note: This flag is implemented only on macOS. + /// + case extendToTitle = 6 // WINDOW_FLAG_EXTEND_TO_TITLE + /// All mouse events are passed to the underlying window of the same application. + case mousePassthrough = 7 // WINDOW_FLAG_MOUSE_PASSTHROUGH + /// Max value of the ``DisplayServer/WindowFlags``. + case max = 8 // WINDOW_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .resizeDisabled: return ".resizeDisabled" + case .borderless: return ".borderless" + case .alwaysOnTop: return ".alwaysOnTop" + case .transparent: return ".transparent" + case .noFocus: return ".noFocus" + case .popup: return ".popup" + case .extendToTitle: return ".extendToTitle" + case .mousePassthrough: return ".mousePassthrough" + case .max: return ".max" + } + + } + + } + + public enum WindowEvent: Int64, CaseIterable, CustomDebugStringConvertible { + /// Sent when the mouse pointer enters the window. + case mouseEnter = 0 // WINDOW_EVENT_MOUSE_ENTER + /// Sent when the mouse pointer exits the window. + case mouseExit = 1 // WINDOW_EVENT_MOUSE_EXIT + /// Sent when the window grabs focus. + case focusIn = 2 // WINDOW_EVENT_FOCUS_IN + /// Sent when the window loses focus. + case focusOut = 3 // WINDOW_EVENT_FOCUS_OUT + /// Sent when the user has attempted to close the window (e.g. close button is pressed). + case closeRequest = 4 // WINDOW_EVENT_CLOSE_REQUEST + /// Sent when the device "Back" button is pressed. + /// + /// > Note: This event is implemented only on Android. + /// + case goBackRequest = 5 // WINDOW_EVENT_GO_BACK_REQUEST + /// Sent when the window is moved to the display with different DPI, or display DPI is changed. + /// + /// > Note: This flag is implemented only on macOS. + /// + case dpiChange = 6 // WINDOW_EVENT_DPI_CHANGE + /// Sent when the window title bar decoration is changed (e.g. ``WindowFlags/extendToTitle`` is set or window entered/exited full screen mode). + /// + /// > Note: This flag is implemented only on macOS. + /// + case titlebarChange = 7 // WINDOW_EVENT_TITLEBAR_CHANGE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .mouseEnter: return ".mouseEnter" + case .mouseExit: return ".mouseExit" + case .focusIn: return ".focusIn" + case .focusOut: return ".focusOut" + case .closeRequest: return ".closeRequest" + case .goBackRequest: return ".goBackRequest" + case .dpiChange: return ".dpiChange" + case .titlebarChange: return ".titlebarChange" + } + + } + + } + + public enum VSyncMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of ``Engine/maxFps``). + case disabled = 0 // VSYNC_DISABLED + /// Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of ``Engine/maxFps``). + case enabled = 1 // VSYNC_ENABLED + /// Behaves like ``VSyncMode/disabled`` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of ``Engine/maxFps``). Behaves like ``VSyncMode/enabled`` when using the Compatibility rendering method. + case adaptive = 2 // VSYNC_ADAPTIVE + /// Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of ``Engine/maxFps``). + /// + /// Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). ``VSyncMode/mailbox`` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like ``VSyncMode/enabled`` when using the Compatibility rendering method. + /// + case mailbox = 3 // VSYNC_MAILBOX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .adaptive: return ".adaptive" + case .mailbox: return ".mailbox" + } + + } + + } + + public enum HandleType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Display handle: + /// + /// - Linux (X11): `X11::Display*` for the display. + /// + /// - Android: `EGLDisplay` for the display. + /// + case displayHandle = 0 // DISPLAY_HANDLE + /// Window handle: + /// + /// - Windows: `HWND` for the window. + /// + /// - Linux (X11): `X11::Window*` for the window. + /// + /// - macOS: `NSWindow*` for the window. + /// + /// - iOS: `UIViewController*` for the view controller. + /// + /// - Android: `jObject` for the activity. + /// + case windowHandle = 1 // WINDOW_HANDLE + /// Window view: + /// + /// - Windows: `HDC` for the window (only with the GL Compatibility renderer). + /// + /// - macOS: `NSView*` for the window main view. + /// + /// - iOS: `UIView*` for the window main view. + /// + case windowView = 2 // WINDOW_VIEW + /// OpenGL context (only with the GL Compatibility renderer): + /// + /// - Windows: `HGLRC` for the window (native GL), or `EGLContext` for the window (ANGLE). + /// + /// - Linux (X11): `GLXContext*` for the window. + /// + /// - macOS: `NSOpenGLContext*` for the window (native GL), or `EGLContext` for the window (ANGLE). + /// + /// - Android: `EGLContext` for the window. + /// + case openglContext = 3 // OPENGL_CONTEXT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .displayHandle: return ".displayHandle" + case .windowHandle: return ".windowHandle" + case .windowView: return ".windowView" + case .openglContext: return ".openglContext" + } + + } + + } + + public enum TTSUtteranceEvent: Int64, CaseIterable, CustomDebugStringConvertible { + /// Utterance has begun to be spoken. + case started = 0 // TTS_UTTERANCE_STARTED + /// Utterance was successfully finished. + case ended = 1 // TTS_UTTERANCE_ENDED + /// Utterance was canceled, or TTS service was unable to process it. + case canceled = 2 // TTS_UTTERANCE_CANCELED + /// Utterance reached a word or sentence boundary. + case boundary = 3 // TTS_UTTERANCE_BOUNDARY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .started: return ".started" + case .ended: return ".ended" + case .canceled: return ".canceled" + case .boundary: return ".boundary" + } + + } + + } + + /* Constants */ + /// Represents the screen containing the mouse pointer. + /// + /// > Note: On Linux (Wayland), this constant always represents the screen at index `0`. + /// + public static let screenWithMouseFocus = -4 + /// Represents the screen containing the window with the keyboard focus. + /// + /// > Note: On Linux (Wayland), this constant always represents the screen at index `0`. + /// + public static let screenWithKeyboardFocus = -3 + /// Represents the primary screen. + /// + /// > Note: On Linux (Wayland), this constant always represents the screen at index `0`. + /// + public static let screenPrimary = -2 + /// Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. + /// + /// > Note: On Linux (Wayland), this constant always represents the screen at index `0`. + /// + public static let screenOfMainWindow = -1 + /// The ID of the main window spawned by the engine, which can be passed to methods expecting a `window_id`. + public static let mainWindowId = 0 + /// The ID that refers to a nonexistent window. This is returned by some ``DisplayServer`` methods if no window matches the requested result. + public static let invalidWindowId = -1 + /// The ID that refers to a nonexistent application status indicator. + public static let invalidIndicatorId = -1 + /* Methods */ + fileprivate static var method_has_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("has_feature") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334065950)! + } + + } + + }() + + /// Returns `true` if the specified `feature` is supported by the current ``DisplayServer``, `false` otherwise. + public static func hasFeature(_ feature: DisplayServer.Feature) -> Bool { + var _result: Bool = false + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_feature, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the ``DisplayServer`` currently in use. Most operating systems only have a single ``DisplayServer``, but Linux has access to more than one ``DisplayServer`` (currently X11 and Wayland). + /// + /// The names of built-in display servers are `Windows`, `macOS`, `X11` (Linux), `Wayland` (Linux), `Android`, `iOS`, `web` (HTML5), and `headless` (when started with the `--headless` command line argument). + /// + public static func getName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_help_set_search_callbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("help_set_search_callbacks") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1687350599)! + } + + } + + }() + + /// Sets native help system search callbacks. + /// + /// `searchCallback` has the following arguments: `String search_string, int result_limit` and return a ``GDictionary`` with "key, display name" pairs for the search results. Called when the user enters search terms in the `Help` menu. + /// + /// `actionCallback` has the following arguments: `String key`. Called when the user selects a search result in the `Help` menu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func helpSetSearchCallbacks(searchCallback: Callable, actionCallback: Callable) { + withUnsafePointer(to: searchCallback.content) { pArg0 in + withUnsafePointer(to: actionCallback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_help_set_search_callbacks, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_popup_callbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_popup_callbacks") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3893727526)! + } + + } + + }() + + /// Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments. + public static func globalMenuSetPopupCallbacks(menuRoot: String, openCallback: Callable, closeCallback: Callable) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: openCallback.content) { pArg1 in + withUnsafePointer(to: closeCallback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_popup_callbacks, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_add_submenu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_submenu_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2828985934)! + } + + } + + }() + + /// Adds an item that will act as a submenu of the global menu `menuRoot`. The `submenu` argument is the ID of the global menu root that will be shown when the item is clicked. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddSubmenuItem(menuRoot: String, label: String, submenu: String, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + let submenu = GString(submenu) + withUnsafePointer(to: submenu.content) { pArg2 in + withUnsafePointer(to: index) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_submenu_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3401266716)! + } + + } + + }() + + /// Adds a new item with text `label` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddItem(menuRoot: String, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_check_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3401266716)! + } + + } + + }() + + /// Adds a new checkable item with text `label` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddCheckItem(menuRoot: String, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_icon_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_icon_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4245856523)! + } + + } + + }() + + /// Adds a new item with text `label` and icon `icon` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddIconItem(menuRoot: String, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_icon_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_icon_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_icon_check_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4245856523)! + } + + } + + }() + + /// Adds a new checkable item with text `label` and icon `icon` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddIconCheckItem(menuRoot: String, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_icon_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_radio_check_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3401266716)! + } + + } + + }() + + /// Adds a new radio-checkable item with text `label` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``globalMenuSetItemChecked(menuRoot:idx:checked:)`` for more info on how to control it. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddRadioCheckItem(menuRoot: String, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_radio_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_icon_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_icon_radio_check_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4245856523)! + } + + } + + }() + + /// Adds a new radio-checkable item with text `label` and icon `icon` to the global menu with ID `menuRoot`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``globalMenuSetItemChecked(menuRoot:idx:checked:)`` for more info on how to control it. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddIconRadioCheckItem(menuRoot: String, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_icon_radio_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_multistate_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_multistate_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3431222859)! + } + + } + + }() + + /// Adds a new item with text `label` to the global menu with ID `menuRoot`. + /// + /// Contrarily to normal binary items, multistate items can have more than two states, as defined by `maxStates`. Each press or activate of the item will increase the state by one. The default value is defined by `defaultState`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: By default, there's no indication of the current item state, it should be changed manually. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddMultistateItem(menuRoot: String, label: String, maxStates: Int32, defaultState: Int32, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: maxStates) { pArg2 in + withUnsafePointer(to: defaultState) { pArg3 in + withUnsafePointer(to: callback.content) { pArg4 in + withUnsafePointer(to: keyCallback.content) { pArg5 in + withUnsafePointer(to: tag.content) { pArg6 in + withUnsafePointer(to: accelerator.rawValue) { pArg7 in + withUnsafePointer(to: index) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_multistate_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_add_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_add_separator") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3214812433)! + } + + } + + }() + + /// Adds a separator between items to the global menu with ID `menuRoot`. Separators also occupy an index. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuAddSeparator(menuRoot: String, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_add_separator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_index_from_text: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_index_from_text") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878152881)! + } + + } + + }() + + /// Returns the index of the item with the specified `text`. Indices are automatically assigned to each item by the engine, and cannot be set manually. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemIndexFromText(menuRoot: String, text: String) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_index_from_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_index_from_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_index_from_tag") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2941063483)! + } + + } + + }() + + /// Returns the index of the item with the specified `tag`. Indices are automatically assigned to each item by the engine, and cannot be set manually. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemIndexFromTag(menuRoot: String, tag: Variant?) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: tag.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_index_from_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_is_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_is_item_checked") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511468594)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is checked. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuIsItemChecked(menuRoot: String, idx: Int32) -> Bool { + var _result: Bool = false + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_is_item_checked, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_is_item_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_is_item_checkable") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511468594)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is checkable in some way, i.e. if it has a checkbox or radio button. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuIsItemCheckable(menuRoot: String, idx: Int32) -> Bool { + var _result: Bool = false + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_is_item_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_is_item_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_is_item_radio_checkable") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511468594)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` has radio button-style checkability. + /// + /// > Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuIsItemRadioCheckable(menuRoot: String, idx: Int32) -> Bool { + var _result: Bool = false + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_is_item_radio_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 748666903)! + } + + } + + }() + + /// Returns the callback of the item at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemCallback(menuRoot: String, idx: Int32) -> Callable { + let _result: Callable = Callable () + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_key_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_key_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 748666903)! + } + + } + + }() + + /// Returns the callback of the item accelerator at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemKeyCallback(menuRoot: String, idx: Int32) -> Callable { + let _result: Callable = Callable () + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_key_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_tag") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 330672633)! + } + + } + + }() + + /// Returns the metadata of the specified item, which might be of any type. You can set it with ``globalMenuSetItemTag(menuRoot:idx:tag:)``, which provides a simple way of assigning context data to items. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemTag(menuRoot: String, idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_global_menu_get_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_text") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 591067909)! + } + + } + + }() + + /// Returns the text of the item at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemText(menuRoot: String, idx: Int32) -> String { + let _result = GString () + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_global_menu_get_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_submenu") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 591067909)! + } + + } + + }() + + /// Returns the submenu ID of the item at index `idx`. See ``globalMenuAddSubmenuItem(menuRoot:label:submenu:index:)`` for more info on how to add a submenu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemSubmenu(menuRoot: String, idx: Int32) -> String { + let _result = GString () + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_submenu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_global_menu_get_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_accelerator") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 936065394)! + } + + } + + }() + + /// Returns the accelerator of the item at index `idx`. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemAccelerator(menuRoot: String, idx: Int32) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_accelerator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_global_menu_is_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_is_item_disabled") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511468594)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is disabled. When it is disabled it can't be selected, or its action invoked. + /// + /// See ``globalMenuSetItemDisabled(menuRoot:idx:disabled:)`` for more info on how to disable an item. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuIsItemDisabled(menuRoot: String, idx: Int32) -> Bool { + var _result: Bool = false + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_is_item_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_is_item_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_is_item_hidden") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511468594)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is hidden. + /// + /// See ``globalMenuSetItemHidden(menuRoot:idx:hidden:)`` for more info on how to hide an item. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuIsItemHidden(menuRoot: String, idx: Int32) -> Bool { + var _result: Bool = false + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_is_item_hidden, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_tooltip") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 591067909)! + } + + } + + }() + + /// Returns the tooltip associated with the specified index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemTooltip(menuRoot: String, idx: Int32) -> String { + let _result = GString () + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_tooltip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_global_menu_get_item_state: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_state") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3422818498)! + } + + } + + }() + + /// Returns the state of a multistate item. See ``globalMenuAddMultistateItem(menuRoot:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemState(menuRoot: String, idx: Int32) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_max_states: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_max_states") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3422818498)! + } + + } + + }() + + /// Returns number of states of a multistate item. See ``globalMenuAddMultistateItem(menuRoot:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemMaxStates(menuRoot: String, idx: Int32) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_max_states, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_get_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_icon") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3591713183)! + } + + } + + }() + + /// Returns the icon of the item at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemIcon(menuRoot: String, idx: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_global_menu_get_item_indentation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_indentation_level") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3422818498)! + } + + } + + }() + + /// Returns the horizontal offset of the item at the given `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemIndentationLevel(menuRoot: String, idx: Int32) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_indentation_level, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_set_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_checked") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Sets the checkstate status of the item at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemChecked(menuRoot: String, idx: Int32, checked: Bool) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checked) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_checked, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_checkable") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Sets whether the item at index `idx` has a checkbox. If `false`, sets the type of the item to plain text. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemCheckable(menuRoot: String, idx: Int32, checkable: Bool) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checkable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_radio_checkable") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Sets the type of the item at the specified index `idx` to radio button. If `false`, sets the type of the item to plain text. + /// + /// > Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemRadioCheckable(menuRoot: String, idx: Int32, checkable: Bool) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checkable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_radio_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3809915389)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. Callback is emitted when an item is pressed. + /// + /// > Note: The `callback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemCallback(menuRoot: String, idx: Int32, callback: Callable) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_hover_callbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_hover_callbacks") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3809915389)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. The callback is emitted when an item is hovered. + /// + /// > Note: The `callback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemHoverCallbacks(menuRoot: String, idx: Int32, callback: Callable) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_hover_callbacks, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_key_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_key_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3809915389)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. Callback is emitted when its accelerator is activated. + /// + /// > Note: The `keyCallback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemKeyCallback(menuRoot: String, idx: Int32, keyCallback: Callable) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: keyCallback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_key_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_tag") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 453659863)! + } + + } + + }() + + /// Sets the metadata of an item, which may be of any type. You can later get it with ``globalMenuGetItemTag(menuRoot:idx:)``, which provides a simple way of assigning context data to items. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemTag(menuRoot: String, idx: Int32, tag: Variant?) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: tag.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_text") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 965966136)! + } + + } + + }() + + /// Sets the text of the item at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemText(menuRoot: String, idx: Int32, text: String) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_submenu") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 965966136)! + } + + } + + }() + + /// Sets the submenu of the item at index `idx`. The submenu is the ID of a global menu root that would be shown when the item is clicked. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemSubmenu(menuRoot: String, idx: Int32, submenu: String) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + let submenu = GString(submenu) + withUnsafePointer(to: submenu.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_submenu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_accelerator") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 566943293)! + } + + } + + }() + + /// Sets the accelerator of the item at index `idx`. `keycode` can be a single ``Key``, or a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemAccelerator(menuRoot: String, idx: Int32, keycode: Key) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: keycode.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_accelerator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_disabled") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Enables/disables the item at index `idx`. When it is disabled, it can't be selected and its action can't be invoked. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemDisabled(menuRoot: String, idx: Int32, disabled: Bool) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_hidden") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Hides/shows the item at index `idx`. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemHidden(menuRoot: String, idx: Int32, hidden: Bool) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: hidden) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_hidden, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_tooltip") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 965966136)! + } + + } + + }() + + /// Sets the ``String`` tooltip of the item at the specified index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemTooltip(menuRoot: String, idx: Int32, tooltip: String) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_tooltip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_state: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_state") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3474840532)! + } + + } + + }() + + /// Sets the state of a multistate item. See ``globalMenuAddMultistateItem(menuRoot:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemState(menuRoot: String, idx: Int32, state: Int32) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: state) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_max_states: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_max_states") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3474840532)! + } + + } + + }() + + /// Sets number of state of a multistate item. See ``globalMenuAddMultistateItem(menuRoot:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemMaxStates(menuRoot: String, idx: Int32, maxStates: Int32) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: maxStates) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_max_states, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_icon") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201338066)! + } + + } + + }() + + /// Replaces the ``Texture2D`` icon of the specified `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// > Note: This method is not supported by macOS "_dock" menu items. + /// + public static func globalMenuSetItemIcon(menuRoot: String, idx: Int32, icon: Texture2D?) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: icon?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_set_item_indentation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_set_item_indentation_level") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3474840532)! + } + + } + + }() + + /// Sets the horizontal offset of the item at the given `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuSetItemIndentationLevel(menuRoot: String, idx: Int32, level: Int32) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: level) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_set_item_indentation_level, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_item_count") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns number of items in the global menu with ID `menuRoot`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetItemCount(menuRoot: String) -> Int32 { + var _result: Int32 = 0 + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_get_item_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_global_menu_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_remove_item") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Removes the item at index `idx` from the global menu `menuRoot`. + /// + /// > Note: The indices of items after the removed item will be shifted by one. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuRemoveItem(menuRoot: String, idx: Int32) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_remove_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_menu_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_clear") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes all items from the global menu with ID `menuRoot`. + /// + /// > Note: This method is implemented only on macOS. + /// + /// **Supported system menu IDs:** + /// + public static func globalMenuClear(menuRoot: String) { + let menuRoot = GString(menuRoot) + withUnsafePointer(to: menuRoot.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_global_menu_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_global_menu_get_system_menu_roots: GDExtensionMethodBindPtr = { + let methodName = StringName("global_menu_get_system_menu_roots") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns Dictionary of supported system menu IDs and names. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func globalMenuGetSystemMenuRoots() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_global_menu_get_system_menu_roots, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_tts_is_speaking: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_is_speaking") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the synthesizer is generating speech, or have utterance waiting in the queue. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsIsSpeaking() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_tts_is_speaking, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_tts_is_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_is_paused") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the synthesizer is in a paused state. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsIsPaused() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_tts_is_paused, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_tts_get_voices: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_get_voices") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` of voice information dictionaries. + /// + /// Each ``GDictionary`` contains two ``String`` entries: + /// + /// - `name` is voice name. + /// + /// - `id` is voice identifier. + /// + /// - `language` is language code in `lang_Variant` format. The `lang` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant` part is an engine-dependent string describing country, region or/and dialect. + /// + /// Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsGetVoices() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_tts_get_voices, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_tts_get_voices_for_language: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_get_voices_for_language") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4291131558)! + } + + } + + }() + + /// Returns an ``PackedStringArray`` of voice identifiers for the `language`. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsGetVoicesForLanguage(_ language: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_tts_get_voices_for_language, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_tts_speak: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_speak") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 903992738)! + } + + } + + }() + + /// Adds an utterance to the queue. If `interrupt` is `true`, the queue is cleared first. + /// + /// - `voice` identifier is one of the `"id"` values returned by ``ttsGetVoices()`` or one of the values returned by ``ttsGetVoicesForLanguage(_:)``. + /// + /// - `volume` ranges from `0` (lowest) to `100` (highest). + /// + /// - `pitch` ranges from `0.0` (lowest) to `2.0` (highest), `1.0` is default pitch for the current voice. + /// + /// - `rate` ranges from `0.1` (lowest) to `10.0` (highest), `1.0` is a normal speaking rate. Other values act as a percentage relative. + /// + /// - `utteranceId` is passed as a parameter to the callback functions. + /// + /// > Note: On Windows and Linux (X11/Wayland), utterance `text` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling ``ttsSpeak(text:voice:volume:pitch:rate:utteranceId:interrupt:)``. + /// + /// > Note: The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsSpeak(text: String, voice: String, volume: Int32 = 50, pitch: Double = 1.0, rate: Double = 1.0, utteranceId: Int32 = 0, interrupt: Bool = false) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + let voice = GString(voice) + withUnsafePointer(to: voice.content) { pArg1 in + withUnsafePointer(to: volume) { pArg2 in + withUnsafePointer(to: pitch) { pArg3 in + withUnsafePointer(to: rate) { pArg4 in + withUnsafePointer(to: utteranceId) { pArg5 in + withUnsafePointer(to: interrupt) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_tts_speak, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_tts_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_pause") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Puts the synthesizer into a paused state. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsPause() { + gi.object_method_bind_ptrcall(method_tts_pause, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_tts_resume: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_resume") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Resumes the synthesizer if it was paused. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsResume() { + gi.object_method_bind_ptrcall(method_tts_resume, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_tts_stop: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_stop") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops synthesis in progress and removes all utterances from the queue. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsStop() { + gi.object_method_bind_ptrcall(method_tts_stop, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_tts_set_utterance_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("tts_set_utterance_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 109679083)! + } + + } + + }() + + /// Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. + /// + /// - ``TTSUtteranceEvent/started``, ``TTSUtteranceEvent/ended``, and ``TTSUtteranceEvent/canceled`` callable's method should take one integer parameter, the utterance ID. + /// + /// - ``TTSUtteranceEvent/boundary`` callable's method should take two integer parameters, the index of the character and the utterance ID. + /// + /// > Note: The granularity of the boundary callbacks is engine dependent. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + /// + /// > Note: ``ProjectSettings/audio/general/textToSpeech`` should be `true` to use text-to-speech. + /// + public static func ttsSetUtteranceCallback(event: DisplayServer.TTSUtteranceEvent, callable: Callable) { + withUnsafePointer(to: event.rawValue) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_tts_set_utterance_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_dark_mode_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_dark_mode_supported") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if OS supports dark mode. + /// + /// > Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + /// + public static func isDarkModeSupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_dark_mode_supported, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_is_dark_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_dark_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if OS is using dark mode. + /// + /// > Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + /// + public static func isDarkMode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_dark_mode, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_accent_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_accent_color") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + /// Returns OS theme accent color. Returns `Color(0, 0, 0, 0)`, if accent color is unknown. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getAccentColor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(method_get_accent_color, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_base_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_color") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + /// Returns the OS theme base color (default control background). Returns `Color(0, 0, 0, 0)` if the base color is unknown. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getBaseColor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(method_get_base_color, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_system_theme_change_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_system_theme_change_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Sets the `callable` that should be called when system theme settings are changed. Callback method should have zero arguments. + /// + /// > Note: This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + /// + public static func setSystemThemeChangeCallback(callable: Callable) { + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_system_theme_change_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_mouse_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("mouse_set_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 348288463)! + } + + } + + }() + + /// Sets the current mouse mode. See also ``mouseGetMode()``. + public static func mouseSetMode(mouseMode: DisplayServer.MouseMode) { + withUnsafePointer(to: mouseMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mouse_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_mouse_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("mouse_get_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1353961651)! + } + + } + + }() + + /// Returns the current mouse mode. See also ``mouseSetMode(mouseMode:)``. + public static func mouseGetMode() -> DisplayServer.MouseMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_mouse_get_mode, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return DisplayServer.MouseMode (rawValue: _result)! + } + + fileprivate static var method_warp_mouse: GDExtensionMethodBindPtr = { + let methodName = StringName("warp_mouse") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + /// Sets the mouse cursor position to the given `position` relative to an origin at the upper left corner of the currently focused game Window Manager window. + /// + /// > Note: ``warpMouse(position:)`` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. + /// + public static func warpMouse(position: Vector2i) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_warp_mouse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_mouse_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("mouse_get_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns the mouse cursor's current position in screen coordinates. + public static func mouseGetPosition() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(method_mouse_get_position, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_mouse_get_button_state: GDExtensionMethodBindPtr = { + let methodName = StringName("mouse_get_button_state") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2512161324)! + } + + } + + }() + + /// Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to ``Input/getMouseButtonMask()``. + public static func mouseGetButtonState() -> MouseButtonMask { + var _result: MouseButtonMask = MouseButtonMask () + gi.object_method_bind_ptrcall(method_mouse_get_button_state, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_clipboard_set: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_set") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the user's clipboard content to the given string. + public static func clipboardSet(clipboard: String) { + let clipboard = GString(clipboard) + withUnsafePointer(to: clipboard.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clipboard_set, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clipboard_get: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_get") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the user's clipboard as a string if possible. + public static func clipboardGet() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_clipboard_get, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_clipboard_get_image: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_get_image") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4190603485)! + } + + } + + }() + + /// Returns the user's clipboard as an image if possible. + public static func clipboardGetImage() -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_clipboard_get_image, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_clipboard_has: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_has") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if there is a text content on the user's clipboard. + public static func clipboardHas() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_clipboard_has, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_clipboard_has_image: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_has_image") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if there is an image content on the user's clipboard. + public static func clipboardHasImage() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_clipboard_has_image, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_clipboard_set_primary: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_set_primary") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the user's primary clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + /// + /// > Note: This method is only implemented on Linux (X11/Wayland). + /// + public static func clipboardSetPrimary(clipboardPrimary: String) { + let clipboardPrimary = GString(clipboardPrimary) + withUnsafePointer(to: clipboardPrimary.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clipboard_set_primary, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clipboard_get_primary: GDExtensionMethodBindPtr = { + let methodName = StringName("clipboard_get_primary") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the user's primary clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + /// + /// > Note: This method is only implemented on Linux (X11/Wayland). + /// + public static func clipboardGetPrimary() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_clipboard_get_primary, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_display_cutouts: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_cutouts") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` of ``Rect2``, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also ``getDisplaySafeArea()``. + /// + /// > Note: Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. + /// + public static func getDisplayCutouts() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_display_cutouts, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_display_safe_area: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_safe_area") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 410525958)! + } + + } + + }() + + /// Returns the unobscured area of the display where interactive controls should be rendered. See also ``getDisplayCutouts()``. + public static func getDisplaySafeArea() -> Rect2i { + var _result: Rect2i = Rect2i () + gi.object_method_bind_ptrcall(method_get_display_safe_area, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_screen_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_count") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of displays available. + public static func getScreenCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_screen_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_primary_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("get_primary_screen") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns index of the primary screen. + public static func getPrimaryScreen() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_primary_screen, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_keyboard_focus_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keyboard_focus_screen") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. + public static func getKeyboardFocusScreen() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_keyboard_focus_screen, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_screen_from_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_from_rect") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 741354659)! + } + + } + + }() + + /// Returns index of the screen which contains specified rectangle. + public static func getScreenFromRect(_ rect: Rect2) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_screen_from_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1725937825)! + } + + } + + }() + + /// Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + /// + /// See also ``screenGetSize(screen:)``. + /// + /// > Note: On Linux (Wayland) this method always returns `(0, 0)`. + /// + public static func screenGetPosition(screen: Int32 = -1) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1725937825)! + } + + } + + }() + + /// Returns the screen's size in pixels. See also ``screenGetPosition(screen:)`` and ``screenGetUsableRect(screen:)``. + public static func screenGetSize(screen: Int32 = -1) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_usable_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_usable_rect") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2439012528)! + } + + } + + }() + + /// Returns the portion of the screen that is not obstructed by a status bar in pixels. See also ``screenGetSize(screen:)``. + public static func screenGetUsableRect(screen: Int32 = -1) -> Rect2i { + var _result: Rect2i = Rect2i () + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_usable_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_dpi: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_dpi") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 181039630)! + } + + } + + }() + + /// Returns the dots per inch density of the specified screen. If `screen` is ``screenOfMainWindow`` (the default value), a screen with the main window will be used. + /// + /// > Note: On macOS, returned value is inaccurate if fractional display scaling mode is used. + /// + /// > Note: On Android devices, the actual screen densities are grouped into six generalized densities: + /// + /// > Note: This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns `72` on unsupported platforms. + /// + public static func screenGetDpi(screen: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_dpi, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_scale") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 909105437)! + } + + } + + }() + + /// Returns the scale factor of the specified screen by index. + /// + /// > Note: On macOS, the returned value is `2.0` for hiDPI (Retina) screens, and `1.0` for all other cases. + /// + /// > Note: On Linux (Wayland), the returned value is accurate only when `screen` is ``screenOfMainWindow``. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. `1.25` would get rounded up to `2.0`). + /// + /// > Note: This method is implemented only on macOS and Linux (Wayland). + /// + public static func screenGetScale(screen: Int32 = -1) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_touchscreen_available: GDExtensionMethodBindPtr = { + let methodName = StringName("is_touchscreen_available") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3323674545)! + } + + } + + }() + + /// Returns `true` if touch events are available (Android or iOS), the capability is detected on the Web platform or if ``ProjectSettings/inputDevices/pointing/emulateTouchFromMouse`` is `true`. + public static func isTouchscreenAvailable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_touchscreen_available, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_screen_get_max_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_max_scale") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the greatest scale factor of all screens. + /// + /// > Note: On macOS returned value is `2.0` if there is at least one hiDPI (Retina) screen in the system, and `1.0` in all other cases. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func screenGetMaxScale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_screen_get_max_scale, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_screen_get_refresh_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_refresh_rate") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 909105437)! + } + + } + + }() + + /// Returns the current refresh rate of the specified screen. If `screen` is ``screenOfMainWindow`` (the default value), a screen with the main window will be used. + /// + /// > Note: Returns `-1.0` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, ``screenGetRefreshRate(screen:)`` will always return `-1.0` as there is no way to retrieve the refresh rate on that platform. + /// + /// To fallback to a default refresh rate if the method fails, try: + /// + public static func screenGetRefreshRate(screen: Int32 = -1) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_refresh_rate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_pixel: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_pixel") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1532707496)! + } + + } + + }() + + /// Returns color of the display pixel at the `position`. + /// + /// > Note: This method is implemented on Linux (X11), macOS, and Windows. + /// + /// > Note: On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + /// + public static func screenGetPixel(position: Vector2i) -> Color { + var _result: Color = Color () + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_pixel, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_image: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_image") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3813388802)! + } + + } + + }() + + /// Returns screenshot of the `screen`. + /// + /// > Note: This method is implemented on Linux (X11), macOS, and Windows. + /// + /// > Note: On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + /// + public static func screenGetImage(screen: Int32 = -1) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_image, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_screen_set_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_set_orientation") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2211511631)! + } + + } + + }() + + /// Sets the `screen`'s `orientation`. See also ``screenGetOrientation(screen:)``. + /// + /// > Note: On iOS, this method has no effect if ``ProjectSettings/display/window/handheld/orientation`` is not set to ``ScreenOrientation/sensor``. + /// + public static func screenSetOrientation(_ orientation: DisplayServer.ScreenOrientation, screen: Int32 = -1) { + withUnsafePointer(to: orientation.rawValue) { pArg0 in + withUnsafePointer(to: screen) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_screen_set_orientation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_screen_get_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_orientation") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 133818562)! + } + + } + + }() + + /// Returns the `screen`'s current orientation. See also ``screenSetOrientation(_:screen:)``. + /// + /// > Note: This method is implemented on Android and iOS. + /// + public static func screenGetOrientation(screen: Int32 = -1) -> DisplayServer.ScreenOrientation { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_get_orientation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return DisplayServer.ScreenOrientation (rawValue: _result)! + } + + fileprivate static var method_screen_set_keep_on: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_set_keep_on") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the screen should never be turned off by the operating system's power-saving measures. See also ``screenIsKeptOn()``. + public static func screenSetKeepOn(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_screen_set_keep_on, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_screen_is_kept_on: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_is_kept_on") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the screen should never be turned off by the operating system's power-saving measures. See also ``screenSetKeepOn(enable:)``. + public static func screenIsKeptOn() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_screen_is_kept_on, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_window_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_window_list") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Returns the list of Godot window IDs belonging to this process. + /// + /// > Note: Native dialogs are not included in this list. + /// + public static func getWindowList() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(method_get_window_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_window_at_screen_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_window_at_screen_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2485466453)! + } + + } + + }() + + /// Returns the ID of the window at the specified screen `position` (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + /// + public static func getWindowAtScreenPosition(_ position: Vector2i) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_window_at_screen_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_get_native_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_native_handle") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1096425680)! + } + + } + + }() + + /// Returns internal structure pointers for use in plugins. + /// + /// > Note: This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows. + /// + public static func windowGetNativeHandle(handleType: DisplayServer.HandleType, windowId: Int32 = 0) -> Int { + var _result: Int = 0 + withUnsafePointer(to: handleType.rawValue) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_native_handle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_window_get_active_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_active_popup") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns ID of the active popup window, or ``invalidWindowId`` if there is none. + public static func windowGetActivePopup() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_window_get_active_popup, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_window_set_popup_safe_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_popup_safe_rect") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3317281434)! + } + + } + + }() + + /// Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup. + public static func windowSetPopupSafeRect(window: Int32, rect: Rect2i) { + withUnsafePointer(to: window) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_popup_safe_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_popup_safe_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_popup_safe_rect") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2161169500)! + } + + } + + }() + + /// Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. + public static func windowGetPopupSafeRect(window: Int32) -> Rect2i { + var _result: Rect2i = Rect2i () + withUnsafePointer(to: window) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_popup_safe_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_title: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_title") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 441246282)! + } + + } + + }() + + /// Sets the title of the given window to `title`. + /// + /// > Note: It's recommended to change this value using ``Window/title`` instead. + /// + /// > Note: Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. + /// + public static func windowSetTitle(_ title: String, windowId: Int32 = 0) { + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_title, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_title_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_title_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2925301799)! + } + + } + + }() + + /// Returns the estimated window title bar size (including text and window buttons) for the window specified by `windowId` (in pixels). This method does not change the window title. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func windowGetTitleSize(title: String, windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_title_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_mouse_passthrough: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_mouse_passthrough") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1993637420)! + } + + } + + }() + + /// Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. + /// + /// Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). + /// + /// > Note: On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. + /// + /// > Note: This method is implemented on Linux (X11), macOS and Windows. + /// + public static func windowSetMousePassthrough(region: PackedVector2Array, windowId: Int32 = 0) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_mouse_passthrough, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_current_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_current_screen") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the screen the window specified by `windowId` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also ``windowSetCurrentScreen(_:windowId:)``. + public static func windowGetCurrentScreen(windowId: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_current_screen, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_current_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_current_screen") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2230941749)! + } + + } + + }() + + /// Moves the window specified by `windowId` to the specified `screen`. See also ``windowGetCurrentScreen(windowId:)``. + public static func windowSetCurrentScreen(_ screen: Int32, windowId: Int32 = 0) { + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_current_screen, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the position of the client area of the given window on the screen. + public static func windowGetPosition(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_get_position_with_decorations: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_position_with_decorations") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the position of the given window on the screen including the borders drawn by the operating system. See also ``windowGetPosition(windowId:)``. + public static func windowGetPositionWithDecorations(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_position_with_decorations, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// Sets the position of the given window to `position`. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + /// + /// See also ``windowGetPosition(windowId:)`` and ``windowSetSize(_:windowId:)``. + /// + /// > Note: It's recommended to change this value using ``Window/position`` instead. + /// + /// > Note: On Linux (Wayland): this method is a no-op. + /// + public static func windowSetPosition(_ position: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the size of the window specified by `windowId` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also ``windowGetSizeWithDecorations(windowId:)``, ``windowSetSize(_:windowId:)`` and ``windowGetPosition(windowId:)``. + public static func windowGetSize(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// Sets the size of the given window to `size` (in pixels). See also ``windowGetSize(windowId:)`` and ``windowGetPosition(windowId:)``. + /// + /// > Note: It's recommended to change this value using ``Window/size`` instead. + /// + public static func windowSetSize(_ size: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_rect_changed_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_rect_changed_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091192925)! + } + + } + + }() + + /// Sets the `callback` that will be called when the window specified by `windowId` is moved or resized. + /// + /// > Warning: Advanced users only! Adding such a callback to a ``Window`` node will override its default implementation, which can introduce bugs. + /// + public static func windowSetRectChangedCallback(_ callback: Callable, windowId: Int32 = 0) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_rect_changed_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_window_event_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_window_event_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091192925)! + } + + } + + }() + + /// Sets the `callback` that will be called when an event occurs in the window specified by `windowId`. + /// + /// > Warning: Advanced users only! Adding such a callback to a ``Window`` node will override its default implementation, which can introduce bugs. + /// + public static func windowSetWindowEventCallback(_ callback: Callable, windowId: Int32 = 0) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_window_event_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_input_event_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_input_event_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091192925)! + } + + } + + }() + + /// Sets the `callback` that should be called when any ``InputEvent`` is sent to the window specified by `windowId`. + /// + /// > Warning: Advanced users only! Adding such a callback to a ``Window`` node will override its default implementation, which can introduce bugs. + /// + public static func windowSetInputEventCallback(_ callback: Callable, windowId: Int32 = 0) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_input_event_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_input_text_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_input_text_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091192925)! + } + + } + + }() + + /// Sets the `callback` that should be called when text is entered using the virtual keyboard to the window specified by `windowId`. + /// + /// > Warning: Advanced users only! Adding such a callback to a ``Window`` node will override its default implementation, which can introduce bugs. + /// + public static func windowSetInputTextCallback(_ callback: Callable, windowId: Int32 = 0) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_input_text_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_drop_files_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_drop_files_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091192925)! + } + + } + + }() + + /// Sets the `callback` that should be called when files are dropped from the operating system's file manager to the window specified by `windowId`. `callback` should take one ``PackedStringArray`` argument, which is the list of dropped files. + /// + /// > Warning: Advanced users only! Adding such a callback to a ``Window`` node will override its default implementation, which can introduce bugs. + /// + /// > Note: This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web. + /// + public static func windowSetDropFilesCallback(_ callback: Callable, windowId: Int32 = 0) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_drop_files_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_attached_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_attached_instance_id") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the ``Object/getInstanceId()`` of the ``Window`` the `windowId` is attached to. + public static func windowGetAttachedInstanceId(windowId: Int32 = 0) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_attached_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_get_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_max_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the window's maximum size (in pixels). See also ``windowSetMaxSize(_:windowId:)``. + public static func windowGetMaxSize(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_max_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_max_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// Sets the maximum size of the window specified by `windowId` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also ``windowGetMaxSize(windowId:)``. + /// + /// > Note: It's recommended to change this value using ``Window/maxSize`` instead. + /// + /// > Note: Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. + /// + public static func windowSetMaxSize(_ maxSize: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: maxSize) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_max_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_min_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_min_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the window's minimum size (in pixels). See also ``windowSetMinSize(_:windowId:)``. + public static func windowGetMinSize(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_min_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_min_size: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_min_size") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// Sets the minimum size for the given window to `minSize` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also ``windowGetMinSize(windowId:)``. + /// + /// > Note: It's recommended to change this value using ``Window/minSize`` instead. + /// + /// > Note: By default, the main window has a minimum size of `Vector2i(64, 64)`. This prevents issues that can arise when the window is resized to a near-zero size. + /// + /// > Note: Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. + /// + public static func windowSetMinSize(_ minSize: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: minSize) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_min_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_size_with_decorations: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_size_with_decorations") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 763922886)! + } + + } + + }() + + /// Returns the size of the window specified by `windowId` (in pixels), including the borders drawn by the operating system. See also ``windowGetSize(windowId:)``. + public static func windowGetSizeWithDecorations(windowId: Int32 = 0) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_size_with_decorations, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2185728461)! + } + + } + + }() + + /// Returns the mode of the given window. + public static func windowGetMode(windowId: Int32 = 0) -> DisplayServer.WindowMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return DisplayServer.WindowMode (rawValue: _result)! + } + + fileprivate static var method_window_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1319965401)! + } + + } + + }() + + /// Sets window mode for the given window to `mode`. See ``DisplayServer/WindowMode`` for possible values and how each mode behaves. + /// + /// > Note: Setting the window to full screen forcibly sets the borderless flag to `true`, so make sure to set it back to `false` when not wanted. + /// + public static func windowSetMode(_ mode: DisplayServer.WindowMode, windowId: Int32 = 0) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_flag") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 254894155)! + } + + } + + }() + + /// Enables or disables the given window's given `flag`. See ``DisplayServer/WindowFlags`` for possible values and their behavior. + public static func windowSetFlag(_ flag: DisplayServer.WindowFlags, enabled: Bool, windowId: Int32 = 0) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: windowId) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_flag") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 802816991)! + } + + } + + }() + + /// Returns the current value of the given window's `flag`. + public static func windowGetFlag(_ flag: DisplayServer.WindowFlags, windowId: Int32 = 0) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_window_buttons_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_window_buttons_offset") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// When ``WindowFlags/extendToTitle`` flag is set, set offset to the center of the first titlebar button. + /// + /// > Note: This flag is implemented only on macOS. + /// + public static func windowSetWindowButtonsOffset(_ offset: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_window_buttons_offset, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_safe_title_margins: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_safe_title_margins") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2295066620)! + } + + } + + }() + + /// Returns left margins (`x`), right margins (`y`) and height (`z`) of the title that are safe to use (contains no buttons or other elements) when ``WindowFlags/extendToTitle`` flag is set. + public static func windowGetSafeTitleMargins(windowId: Int32 = 0) -> Vector3i { + var _result: Vector3i = Vector3i () + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_safe_title_margins, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_request_attention: GDExtensionMethodBindPtr = { + let methodName = StringName("window_request_attention") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Makes the window specified by `windowId` request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system. + public static func windowRequestAttention(windowId: Int32 = 0) { + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_request_attention, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_window_move_to_foreground: GDExtensionMethodBindPtr = { + let methodName = StringName("window_move_to_foreground") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Moves the window specified by `windowId` to the foreground, so that it is visible over other windows. + public static func windowMoveToForeground(windowId: Int32 = 0) { + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_move_to_foreground, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_window_is_focused: GDExtensionMethodBindPtr = { + let methodName = StringName("window_is_focused") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1051549951)! + } + + } + + }() + + /// Returns `true` if the window specified by `windowId` is focused. + public static func windowIsFocused(windowId: Int32 = 0) -> Bool { + var _result: Bool = false + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_is_focused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_can_draw: GDExtensionMethodBindPtr = { + let methodName = StringName("window_can_draw") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1051549951)! + } + + } + + }() + + /// Returns `true` if anything can be drawn in the window specified by `windowId`, `false` otherwise. Using the `--disable-render-loop` command line argument or a headless build will return `false`. + public static func windowCanDraw(windowId: Int32 = 0) -> Bool { + var _result: Bool = false + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_can_draw, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_set_transient: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_transient") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. + /// + /// > Note: It's recommended to change this value using ``Window/transient`` instead. + /// + /// > Note: The behavior might be different depending on the platform. + /// + public static func windowSetTransient(windowId: Int32, parentWindowId: Int32) { + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: parentWindowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_transient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_exclusive: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_exclusive") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If set to `true`, this window will always stay on top of its parent window, parent window will ignore input while this window is opened. + /// + /// > Note: On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func windowSetExclusive(windowId: Int32, exclusive: Bool) { + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: exclusive) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_exclusive, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_ime_active: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_ime_active") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1661950165)! + } + + } + + }() + + /// Sets whether Input Method Editor should be enabled for the window specified by `windowId`. See also ``windowSetImePosition(_:windowId:)``. + public static func windowSetImeActive(_ active: Bool, windowId: Int32 = 0) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_ime_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_ime_position: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_ime_position") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2019273902)! + } + + } + + }() + + /// Sets the position of the Input Method Editor popup for the specified `windowId`. Only effective if ``windowSetImeActive(_:windowId:)`` was set to `true` for the specified `windowId`. + public static func windowSetImePosition(_ position: Vector2i, windowId: Int32 = 0) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_ime_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_set_vsync_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("window_set_vsync_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2179333492)! + } + + } + + }() + + /// Sets the V-Sync mode of the given window. See also ``ProjectSettings/display/window/vsync/vsyncMode``. + /// + /// See ``DisplayServer.VSyncMode`` for possible values and how they affect the behavior of your application. + /// + /// Depending on the platform and used renderer, the engine will fall back to ``VSyncMode/enabled`` if the desired mode is not supported. + /// + /// > Note: V-Sync modes other than ``VSyncMode/enabled`` are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + /// + public static func windowSetVsyncMode(_ vsyncMode: DisplayServer.VSyncMode, windowId: Int32 = 0) { + withUnsafePointer(to: vsyncMode.rawValue) { pArg0 in + withUnsafePointer(to: windowId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_window_set_vsync_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_window_get_vsync_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("window_get_vsync_mode") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 578873795)! + } + + } + + }() + + /// Returns the V-Sync mode of the given window. + public static func windowGetVsyncMode(windowId: Int32 = 0) -> DisplayServer.VSyncMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_get_vsync_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return DisplayServer.VSyncMode (rawValue: _result)! + } + + fileprivate static var method_window_is_maximize_allowed: GDExtensionMethodBindPtr = { + let methodName = StringName("window_is_maximize_allowed") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1051549951)! + } + + } + + }() + + /// Returns `true` if the given window can be maximized (the maximize button is enabled). + public static func windowIsMaximizeAllowed(windowId: Int32 = 0) -> Bool { + var _result: Bool = false + withUnsafePointer(to: windowId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_window_is_maximize_allowed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_window_maximize_on_title_dbl_click: GDExtensionMethodBindPtr = { + let methodName = StringName("window_maximize_on_title_dbl_click") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true`, if double-click on a window title should maximize it. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func windowMaximizeOnTitleDblClick() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_window_maximize_on_title_dbl_click, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_window_minimize_on_title_dbl_click: GDExtensionMethodBindPtr = { + let methodName = StringName("window_minimize_on_title_dbl_click") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true`, if double-click on a window title should minimize it. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func windowMinimizeOnTitleDblClick() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_window_minimize_on_title_dbl_click, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_ime_get_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("ime_get_selection") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns the text selection in the Input Method Editor composition string, with the ``Vector2i``'s `x` component being the caret position and `y` being the length of the selection. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func imeGetSelection() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(method_ime_get_selection, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_ime_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("ime_get_text") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the composition string contained within the Input Method Editor window. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func imeGetText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_ime_get_text, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_virtual_keyboard_show: GDExtensionMethodBindPtr = { + let methodName = StringName("virtual_keyboard_show") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3042891259)! + } + + } + + }() + + /// Shows the virtual keyboard if the platform has one. + /// + /// `existingText` parameter is useful for implementing your own ``LineEdit`` or ``TextEdit``, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + /// + /// `position` parameter is the screen space ``Rect2`` of the edited text. + /// + /// `type` parameter allows configuring which type of virtual keyboard to show. + /// + /// `maxLength` limits the number of characters that can be entered if different from `-1`. + /// + /// `cursorStart` can optionally define the current text cursor position if `cursorEnd` is not set. + /// + /// `cursorStart` and `cursorEnd` can optionally define the current text selection. + /// + /// > Note: This method is implemented on Android, iOS and Web. + /// + public static func virtualKeyboardShow(existingText: String, position: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), type: DisplayServer.VirtualKeyboardType = .`default`, maxLength: Int32 = -1, cursorStart: Int32 = -1, cursorEnd: Int32 = -1) { + let existingText = GString(existingText) + withUnsafePointer(to: existingText.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: type.rawValue) { pArg2 in + withUnsafePointer(to: maxLength) { pArg3 in + withUnsafePointer(to: cursorStart) { pArg4 in + withUnsafePointer(to: cursorEnd) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_virtual_keyboard_show, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_virtual_keyboard_hide: GDExtensionMethodBindPtr = { + let methodName = StringName("virtual_keyboard_hide") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Hides the virtual keyboard if it is shown, does nothing otherwise. + public static func virtualKeyboardHide() { + gi.object_method_bind_ptrcall(method_virtual_keyboard_hide, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_virtual_keyboard_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("virtual_keyboard_get_height") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. + public static func virtualKeyboardGetHeight() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_virtual_keyboard_get_height, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_cursor_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("cursor_set_shape") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2026291549)! + } + + } + + }() + + /// Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also ``cursorGetShape()`` and ``cursorSetCustomImage(cursor:shape:hotspot:)``. + public static func cursorSetShape(_ shape: DisplayServer.CursorShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_cursor_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_cursor_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("cursor_get_shape") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1087724927)! + } + + } + + }() + + /// Returns the default mouse cursor shape set by ``cursorSetShape(_:)``. + public static func cursorGetShape() -> DisplayServer.CursorShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_cursor_get_shape, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return DisplayServer.CursorShape (rawValue: _result)! + } + + fileprivate static var method_cursor_set_custom_image: GDExtensionMethodBindPtr = { + let methodName = StringName("cursor_set_custom_image") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1816663697)! + } + + } + + }() + + /// Sets a custom mouse cursor image for the given `shape`. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. + /// + /// `cursor` can be either a ``Texture2D`` or an ``Image``, and it should not be larger than 256×256 to display correctly. Optionally, `hotspot` can be set to offset the image's position relative to the click point. By default, `hotspot` is set to the top-left corner of the image. See also ``cursorSetShape(_:)``. + /// + public static func cursorSetCustomImage(cursor: Resource?, shape: DisplayServer.CursorShape = .arrow, hotspot: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: cursor?.handle) { pArg0 in + withUnsafePointer(to: shape.rawValue) { pArg1 in + withUnsafePointer(to: hotspot) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_cursor_set_custom_image, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_swap_cancel_ok: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swap_cancel_ok") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing ``ProjectSettings/gui/common/swapCancelOk``. + /// + /// > Note: This doesn't affect native dialogs such as the ones spawned by ``DisplayServer/dialogShow(title:description:buttons:callback:)``. + /// + public static func getSwapCancelOk() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_get_swap_cancel_ok, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_enable_for_stealing_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("enable_for_stealing_focus") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Allows the `processId` PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. + /// + /// > Note: This method is implemented only on Windows. + /// + public static func enableForStealingFocus(processId: Int) { + withUnsafePointer(to: processId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_enable_for_stealing_focus, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_dialog_show: GDExtensionMethodBindPtr = { + let methodName = StringName("dialog_show") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4115553226)! + } + + } + + }() + + /// Shows a text dialog which uses the operating system's native look-and-feel. `callback` should accept a single integer parameter which corresponds to the index of the pressed button. + /// + /// > Note: This method is implemented if the display server has the ``Feature/nativeDialog`` feature. Supported platforms include macOS and Windows. + /// + public static func dialogShow(title: String, description: String, buttons: PackedStringArray, callback: Callable) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + let description = GString(description) + withUnsafePointer(to: description.content) { pArg1 in + withUnsafePointer(to: buttons.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_dialog_show, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_dialog_input_text: GDExtensionMethodBindPtr = { + let methodName = StringName("dialog_input_text") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3088703427)! + } + + } + + }() + + /// Shows a text input dialog which uses the operating system's native look-and-feel. `callback` should accept a single ``String`` parameter which contains the text field's contents. + /// + /// > Note: This method is implemented if the display server has the ``Feature/nativeDialogInput`` feature. Supported platforms include macOS and Windows. + /// + public static func dialogInputText(title: String, description: String, existingText: String, callback: Callable) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + let description = GString(description) + withUnsafePointer(to: description.content) { pArg1 in + let existingText = GString(existingText) + withUnsafePointer(to: existingText.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_dialog_input_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_file_dialog_show: GDExtensionMethodBindPtr = { + let methodName = StringName("file_dialog_show") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1531299078)! + } + + } + + }() + + /// Displays OS native dialog for selecting files or directories in the file system. + /// + /// Each filter string in the `filters` array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. See also ``FileDialog/filters``. + /// + /// Callbacks have the following arguments: `status: bool, selected_paths: PackedStringArray, selected_filter_index: int`. + /// + /// > Note: This method is implemented if the display server has the ``Feature/nativeDialogFile`` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + /// + /// > Note: `currentDirectory` might be ignored. + /// + /// > Note: On Linux, `showHidden` is ignored. + /// + /// > Note: On macOS, native file dialogs have no title. + /// + /// > Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use ``OS/getGrantedPermissions()`` to get a list of saved bookmarks. + /// + public static func fileDialogShow(title: String, currentDirectory: String, filename: String, showHidden: Bool, mode: DisplayServer.FileDialogMode, filters: PackedStringArray, callback: Callable) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + let currentDirectory = GString(currentDirectory) + withUnsafePointer(to: currentDirectory.content) { pArg1 in + let filename = GString(filename) + withUnsafePointer(to: filename.content) { pArg2 in + withUnsafePointer(to: showHidden) { pArg3 in + withUnsafePointer(to: mode.rawValue) { pArg4 in + withUnsafePointer(to: filters.content) { pArg5 in + withUnsafePointer(to: callback.content) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_file_dialog_show, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_file_dialog_with_options_show: GDExtensionMethodBindPtr = { + let methodName = StringName("file_dialog_with_options_show") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1305318754)! + } + + } + + }() + + /// Displays OS native dialog for selecting files or directories in the file system with additional user selectable options. + /// + /// Each filter string in the `filters` array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. See also ``FileDialog/filters``. + /// + /// `options` is array of ``GDictionary``s with the following keys: + /// + /// - `"name"` - option's name ``String``. + /// + /// - `"values"` - ``PackedStringArray`` of values. If empty, boolean option (check box) is used. + /// + /// - `"default"` - default selected option index (integer) or default boolean value ([bool]). + /// + /// Callbacks have the following arguments: `status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary`. + /// + /// > Note: This method is implemented if the display server has the ``Feature/nativeDialogFile`` feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + /// + /// > Note: `currentDirectory` might be ignored. + /// + /// > Note: On Linux (X11), `showHidden` is ignored. + /// + /// > Note: On macOS, native file dialogs have no title. + /// + /// > Note: On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use ``OS/getGrantedPermissions()`` to get a list of saved bookmarks. + /// + public static func fileDialogWithOptionsShow(title: String, currentDirectory: String, root: String, filename: String, showHidden: Bool, mode: DisplayServer.FileDialogMode, filters: PackedStringArray, options: VariantCollection, callback: Callable) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + let currentDirectory = GString(currentDirectory) + withUnsafePointer(to: currentDirectory.content) { pArg1 in + let root = GString(root) + withUnsafePointer(to: root.content) { pArg2 in + let filename = GString(filename) + withUnsafePointer(to: filename.content) { pArg3 in + withUnsafePointer(to: showHidden) { pArg4 in + withUnsafePointer(to: mode.rawValue) { pArg5 in + withUnsafePointer(to: filters.content) { pArg6 in + withUnsafePointer(to: options.array.content) { pArg7 in + withUnsafePointer(to: callback.content) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(method_file_dialog_with_options_show, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_keyboard_get_layout_count: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_layout_count") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of keyboard layouts. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardGetLayoutCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_keyboard_get_layout_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_keyboard_get_current_layout: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_current_layout") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns active keyboard layout index. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS, and Windows. + /// + public static func keyboardGetCurrentLayout() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_keyboard_get_current_layout, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_keyboard_set_current_layout: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_set_current_layout") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the active keyboard layout. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardSetCurrentLayout(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_keyboard_set_current_layout, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_keyboard_get_layout_language: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_layout_language") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the ISO-639/BCP-47 language code of the keyboard layout at position `index`. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardGetLayoutLanguage(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_keyboard_get_layout_language, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_keyboard_get_layout_name: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_layout_name") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the localized name of the keyboard layout at position `index`. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardGetLayoutName(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_keyboard_get_layout_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_keyboard_get_keycode_from_physical: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_keycode_from_physical") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3447613187)! + } + + } + + }() + + /// Converts a physical (US QWERTY) `keycode` to one in the active keyboard layout. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardGetKeycodeFromPhysical(keycode: Key) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_keyboard_get_keycode_from_physical, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_keyboard_get_label_from_physical: GDExtensionMethodBindPtr = { + let methodName = StringName("keyboard_get_label_from_physical") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3447613187)! + } + + } + + }() + + /// Converts a physical (US QWERTY) `keycode` to localized label printed on the key in the active keyboard layout. + /// + /// > Note: This method is implemented on Linux (X11/Wayland), macOS and Windows. + /// + public static func keyboardGetLabelFromPhysical(keycode: Key) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_keyboard_get_label_from_physical, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_process_events: GDExtensionMethodBindPtr = { + let methodName = StringName("process_events") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Perform window manager processing, including input flushing. See also ``forceProcessAndDropEvents()``, ``Input/flushBufferedEvents()`` and ``Input/useAccumulatedInput``. + public static func processEvents() { + gi.object_method_bind_ptrcall(method_process_events, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_force_process_and_drop_events: GDExtensionMethodBindPtr = { + let methodName = StringName("force_process_and_drop_events") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces window manager processing while ignoring all ``InputEvent``s. See also ``processEvents()``. + /// + /// > Note: This method is implemented on Windows and macOS. + /// + public static func forceProcessAndDropEvents() { + gi.object_method_bind_ptrcall(method_force_process_and_drop_events, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_set_native_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_native_icon") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the window icon (usually displayed in the top-left corner) in the operating system's _native_ format. The file at `filename` must be in `.ico` format on Windows or `.icns` on macOS. By using specially crafted `.ico` or `.icns` icons, ``setNativeIcon(filename:)`` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use ``setIcon(image:)`` instead. + /// + /// > Note: Requires support for ``Feature/nativeIcon``. + /// + public static func setNativeIcon(filename: String) { + let filename = GString(filename) + withUnsafePointer(to: filename.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_native_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_icon") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + /// Sets the window icon (usually displayed in the top-left corner) with an ``Image``. To use icons in the operating system's native format, use ``setNativeIcon(filename:)`` instead. + /// + /// > Note: Requires support for ``Feature/icon``. + /// + public static func setIcon(image: Image?) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_create_status_indicator: GDExtensionMethodBindPtr = { + let methodName = StringName("create_status_indicator") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1904285171)! + } + + } + + }() + + /// Creates a new application status indicator with the specified icon, tooltip, and activation callback. + /// + /// `callback` should take two arguments: the pressed mouse button (one of the ``MouseButton`` constants) and the click position in screen coordinates (a ``Vector2i``). + /// + public static func createStatusIndicator(icon: Texture2D?, tooltip: String, callback: Callable) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: icon?.handle) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_create_status_indicator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_status_indicator_set_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("status_indicator_set_icon") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets the application status indicator icon. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func statusIndicatorSetIcon(id: Int32, icon: Texture2D?) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_status_indicator_set_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_status_indicator_set_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("status_indicator_set_tooltip") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the application status indicator tooltip. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func statusIndicatorSetTooltip(id: Int32, tooltip: String) { + withUnsafePointer(to: id) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_status_indicator_set_tooltip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_status_indicator_set_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("status_indicator_set_menu") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4040184819)! + } + + } + + }() + + /// Sets the application status indicator native popup menu. + /// + /// > Note: On macOS, the menu is activated by any mouse button. Its activation callback is _not_ triggered. + /// + /// > Note: On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered. + /// + /// > Note: Native popup is only supported if ``NativeMenu`` supports the ``NativeMenu/Feature/popupMenu`` feature. + /// + public static func statusIndicatorSetMenu(id: Int32, menuRid: RID) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: menuRid.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_status_indicator_set_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_status_indicator_set_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("status_indicator_set_callback") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 957362965)! + } + + } + + }() + + /// Sets the application status indicator activation callback. `callback` should take two arguments: integer mouse button index (one of ``MouseButton`` values) and ``Vector2i`` click position in screen coordinates. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func statusIndicatorSetCallback(id: Int32, callback: Callable) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_status_indicator_set_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_status_indicator_get_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("status_indicator_get_rect") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3327874267)! + } + + } + + }() + + /// Returns the rectangle for the given status indicator `id` in screen coordinates. If the status indicator is not visible, returns an empty ``Rect2``. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func statusIndicatorGetRect(id: Int32) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_status_indicator_get_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_delete_status_indicator: GDExtensionMethodBindPtr = { + let methodName = StringName("delete_status_indicator") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the application status indicator. + public static func deleteStatusIndicator(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_delete_status_indicator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_tablet_get_driver_count: GDExtensionMethodBindPtr = { + let methodName = StringName("tablet_get_driver_count") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of available tablet drivers. + /// + /// > Note: This method is implemented only on Windows. + /// + public static func tabletGetDriverCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_tablet_get_driver_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_tablet_get_driver_name: GDExtensionMethodBindPtr = { + let methodName = StringName("tablet_get_driver_name") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the tablet driver name for the given index. + /// + /// > Note: This method is implemented only on Windows. + /// + public static func tabletGetDriverName(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_tablet_get_driver_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_tablet_get_current_driver: GDExtensionMethodBindPtr = { + let methodName = StringName("tablet_get_current_driver") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns current active tablet driver name. + /// + /// > Note: This method is implemented only on Windows. + /// + public static func tabletGetCurrentDriver() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_tablet_get_current_driver, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_tablet_set_current_driver: GDExtensionMethodBindPtr = { + let methodName = StringName("tablet_set_current_driver") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Set active tablet driver name. + /// + /// Supported drivers: + /// + /// - `winink`: Windows Ink API, default (Windows 8.1+ required). + /// + /// - `wintab`: Wacom Wintab API (compatible device driver required). + /// + /// - `dummy`: Dummy driver, tablet input is disabled. + /// + /// > Note: This method is implemented only on Windows. + /// + public static func tabletSetCurrentDriver(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_tablet_set_current_driver, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_window_transparency_available: GDExtensionMethodBindPtr = { + let methodName = StringName("is_window_transparency_available") + return withUnsafePointer(to: &DisplayServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the window background can be made transparent. This method returns `false` if ``ProjectSettings/display/window/perPixelTransparency/allowed`` is set to `false`, or if transparency is not supported by the renderer or OS compositor. + public static func isWindowTransparencyAvailable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_window_transparency_available, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ENetConnection.swift b/Sources/SwiftGodot/Generated/Api/ENetConnection.swift new file mode 100644 index 000000000..bb4948456 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ENetConnection.swift @@ -0,0 +1,610 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A wrapper class for an ENetHost. +/// +/// ENet's purpose is to provide a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). +open class ENetConnection: RefCounted { + override open class var godotClassName: StringName { "ENetConnection" } + public enum CompressionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. This option may also be used to make network debugging using tools like Wireshark easier. + case none = 0 // COMPRESS_NONE + /// ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB. + case rangeCoder = 1 // COMPRESS_RANGE_CODER + /// FastLZ compression. This option uses less CPU resources compared to ``CompressionMode/zlib``, at the expense of using more bandwidth. + case fastlz = 2 // COMPRESS_FASTLZ + /// Zlib compression. This option uses less bandwidth compared to ``CompressionMode/fastlz``, at the expense of using more CPU resources. + case zlib = 3 // COMPRESS_ZLIB + /// Zstandard compression. Note that this algorithm is not very efficient on packets smaller than 4 KB. Therefore, it's recommended to use other compression algorithms in most cases. + case zstd = 4 // COMPRESS_ZSTD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .rangeCoder: return ".rangeCoder" + case .fastlz: return ".fastlz" + case .zlib: return ".zlib" + case .zstd: return ".zstd" + } + + } + + } + + public enum EventType: Int64, CaseIterable, CustomDebugStringConvertible { + /// An error occurred during ``service(timeout:)``. You will likely need to ``destroy()`` the host and recreate it. + case error = -1 // EVENT_ERROR + /// No event occurred within the specified time limit. + case none = 0 // EVENT_NONE + /// A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected. + case connect = 1 // EVENT_CONNECT + /// A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by ``ENetPacketPeer/peerDisconnect(data:)``, if a peer has timed out, or if a connection request initialized by ``connectToHost(address:port:channels:data:)`` has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. + case disconnect = 2 // EVENT_DISCONNECT + /// A packet has been received from a peer. The array will contain the peer which sent the packet and the channel number upon which the packet was received. The received packet will be queued to the associated ``ENetPacketPeer``. + case receive = 3 // EVENT_RECEIVE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .error: return ".error" + case .none: return ".none" + case .connect: return ".connect" + case .disconnect: return ".disconnect" + case .receive: return ".receive" + } + + } + + } + + public enum HostStatistic: Int64, CaseIterable, CustomDebugStringConvertible { + /// Total data sent. + case sentData = 0 // HOST_TOTAL_SENT_DATA + /// Total UDP packets sent. + case sentPackets = 1 // HOST_TOTAL_SENT_PACKETS + /// Total data received. + case receivedData = 2 // HOST_TOTAL_RECEIVED_DATA + /// Total UDP packets received. + case receivedPackets = 3 // HOST_TOTAL_RECEIVED_PACKETS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .sentData: return ".sentData" + case .sentPackets: return ".sentPackets" + case .receivedData: return ".receivedData" + case .receivedPackets: return ".receivedPackets" + } + + } + + } + + /* Methods */ + fileprivate static var method_create_host_bound: GDExtensionMethodBindPtr = { + let methodName = StringName("create_host_bound") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1515002313)! + } + + } + + }() + + /// Create an ENetHost like ``createHost(maxPeers:maxChannels:inBandwidth:outBandwidth:)`` which is also bound to the given `bindAddress` and `bindPort`. + public final func createHostBound(bindAddress: String, bindPort: Int32, maxPeers: Int32 = 32, maxChannels: Int32 = 0, inBandwidth: Int32 = 0, outBandwidth: Int32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let bindAddress = GString(bindAddress) + withUnsafePointer(to: bindAddress.content) { pArg0 in + withUnsafePointer(to: bindPort) { pArg1 in + withUnsafePointer(to: maxPeers) { pArg2 in + withUnsafePointer(to: maxChannels) { pArg3 in + withUnsafePointer(to: inBandwidth) { pArg4 in + withUnsafePointer(to: outBandwidth) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_create_host_bound, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_create_host: GDExtensionMethodBindPtr = { + let methodName = StringName("create_host") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 117198950)! + } + + } + + }() + + /// Create an ENetHost that will allow up to `maxPeers` connected peers, each allocating up to `maxChannels` channels, optionally limiting bandwidth to `inBandwidth` and `outBandwidth`. + public final func createHost(maxPeers: Int32 = 32, maxChannels: Int32 = 0, inBandwidth: Int32 = 0, outBandwidth: Int32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: maxPeers) { pArg0 in + withUnsafePointer(to: maxChannels) { pArg1 in + withUnsafePointer(to: inBandwidth) { pArg2 in + withUnsafePointer(to: outBandwidth) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_create_host, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_destroy: GDExtensionMethodBindPtr = { + let methodName = StringName("destroy") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Destroys the host and all resources associated with it. + public final func destroy() { + gi.object_method_bind_ptrcall(ENetConnection.method_destroy, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_connect_to_host: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_to_host") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2171300490)! + } + + } + + }() + + /// Initiates a connection to a foreign `address` using the specified `port` and allocating the requested `channels`. Optional `data` can be passed during connection in the form of a 32 bit integer. + /// + /// > Note: You must call either ``createHost(maxPeers:maxChannels:inBandwidth:outBandwidth:)`` or ``createHostBound(bindAddress:bindPort:maxPeers:maxChannels:inBandwidth:outBandwidth:)`` before calling this method. + /// + public final func connectToHost(address: String, port: Int32, channels: Int32 = 0, data: Int32 = 0) -> ENetPacketPeer? { + var _result = UnsafeRawPointer (bitPattern: 0) + let address = GString(address) + withUnsafePointer(to: address.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: channels) { pArg2 in + withUnsafePointer(to: data) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_connect_to_host, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_service: GDExtensionMethodBindPtr = { + let methodName = StringName("service") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2402345344)! + } + + } + + }() + + /// Waits for events on the host specified and shuttles packets between the host and its peers. The returned ``GArray`` will have 4 elements. An ``ENetConnection/EventType``, the ``ENetPacketPeer`` which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is ``EventType/receive``, the received packet will be queued to the associated ``ENetPacketPeer``. + /// + /// Call this function regularly to handle connections, disconnections, and to receive new packets. + /// + public final func service(timeout: Int32 = 0) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: timeout) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_service, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_flush: GDExtensionMethodBindPtr = { + let methodName = StringName("flush") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sends any queued packets on the host specified to its designated peers. + public final func flush() { + gi.object_method_bind_ptrcall(ENetConnection.method_flush, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_bandwidth_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("bandwidth_limit") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2302169788)! + } + + } + + }() + + /// Adjusts the bandwidth limits of a host. + public final func bandwidthLimit(inBandwidth: Int32 = 0, outBandwidth: Int32 = 0) { + withUnsafePointer(to: inBandwidth) { pArg0 in + withUnsafePointer(to: outBandwidth) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_bandwidth_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_channel_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("channel_limit") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Limits the maximum allowed channels of future incoming connections. + public final func channelLimit(_ limit: Int32) { + withUnsafePointer(to: limit) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_channel_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_broadcast: GDExtensionMethodBindPtr = { + let methodName = StringName("broadcast") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2772371345)! + } + + } + + }() + + /// Queues a `packet` to be sent to all peers associated with the host over the specified `channel`. See ``ENetPacketPeer`` `FLAG_*` constants for available packet flags. + public final func broadcast(channel: Int32, packet: PackedByteArray, flags: Int32) { + withUnsafePointer(to: channel) { pArg0 in + withUnsafePointer(to: packet.content) { pArg1 in + withUnsafePointer(to: flags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_broadcast, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compress: GDExtensionMethodBindPtr = { + let methodName = StringName("compress") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2660215187)! + } + + } + + }() + + /// Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. + /// + /// > Note: Most games' network design involve sending many small packets frequently (smaller than 4 KB each). If in doubt, it is recommended to keep the default compression algorithm as it works best on these small packets. + /// + /// > Note: The compression mode must be set to the same value on both the server and all its clients. Clients will fail to connect if the compression mode set on the client differs from the one set on the server. + /// + public final func compress(mode: ENetConnection.CompressionMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_compress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_dtls_server_setup: GDExtensionMethodBindPtr = { + let methodName = StringName("dtls_server_setup") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1262296096)! + } + + } + + }() + + /// Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after ``createHostBound(bindAddress:bindPort:maxPeers:maxChannels:inBandwidth:outBandwidth:)`` to have ENet expect peers to connect using DTLS. See ``TLSOptions/server(key:certificate:)``. + public final func dtlsServerSetup(serverOptions: TLSOptions?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: serverOptions?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_dtls_server_setup, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_dtls_client_setup: GDExtensionMethodBindPtr = { + let methodName = StringName("dtls_client_setup") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1966198364)! + } + + } + + }() + + /// Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before ``connectToHost(address:port:channels:data:)`` to have ENet connect using DTLS validating the server certificate against `hostname`. You can pass the optional `clientOptions` parameter to customize the trusted certification authorities, or disable the common name verification. See ``TLSOptions/client(trustedChain:commonNameOverride:)`` and ``TLSOptions/clientUnsafe(trustedChain:)``. + public final func dtlsClientSetup(hostname: String, clientOptions: TLSOptions? = nil) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let hostname = GString(hostname) + withUnsafePointer(to: hostname.content) { pArg0 in + withUnsafePointer(to: clientOptions?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_dtls_client_setup, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_refuse_new_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("refuse_new_connections") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Configures the DTLS server to automatically drop new connections. + /// + /// > Note: This method is only relevant after calling ``dtlsServerSetup(serverOptions:)``. + /// + public final func refuseNewConnections(refuse: Bool) { + withUnsafePointer(to: refuse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_refuse_new_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_pop_statistic: GDExtensionMethodBindPtr = { + let methodName = StringName("pop_statistic") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2166904170)! + } + + } + + }() + + /// Returns and resets host statistics. See ``ENetConnection/HostStatistic`` for more info. + public final func popStatistic(_ statistic: ENetConnection.HostStatistic) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: statistic.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_pop_statistic, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_max_channels: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_channels") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the maximum number of channels allowed for connected peers. + public final func getMaxChannels() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ENetConnection.method_get_max_channels, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_local_port: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_port") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the local port to which this peer is bound. + public final func getLocalPort() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ENetConnection.method_get_local_port, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_peers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_peers") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of peers associated with this host. + /// + /// > Note: This list might include some peers that are not fully connected or are still being disconnected. + /// + public final func getPeers() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(ENetConnection.method_get_peers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_socket_send: GDExtensionMethodBindPtr = { + let methodName = StringName("socket_send") + return withUnsafePointer(to: &ENetConnection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1100646812)! + } + + } + + }() + + /// Sends a `packet` toward a destination from the address and port currently bound by this ENetConnection instance. + /// + /// This is useful as it serves to establish entries in NAT routing tables on all devices between this bound instance and the public facing internet, allowing a prospective client's connection packets to be routed backward through the NAT device(s) between the public internet and this host. + /// + /// This requires forward knowledge of a prospective client's address and communication port as seen by the public internet - after any NAT devices have handled their connection request. This information can be obtained by a STUN service, and must be handed off to your host by an entity that is not the prospective client. This will never work for a client behind a Symmetric NAT due to the nature of the Symmetric NAT routing algorithm, as their IP and Port cannot be known beforehand. + /// + public final func socketSend(destinationAddress: String, destinationPort: Int32, packet: PackedByteArray) { + let destinationAddress = GString(destinationAddress) + withUnsafePointer(to: destinationAddress.content) { pArg0 in + withUnsafePointer(to: destinationPort) { pArg1 in + withUnsafePointer(to: packet.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ENetConnection.method_socket_send, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ENetMultiplayerPeer.swift b/Sources/SwiftGodot/Generated/Api/ENetMultiplayerPeer.swift new file mode 100644 index 000000000..4524d5674 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ENetMultiplayerPeer.swift @@ -0,0 +1,256 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A MultiplayerPeer implementation using the ENet library. +/// +/// A MultiplayerPeer implementation that should be passed to ``MultiplayerAPI/multiplayerPeer`` after being initialized as either a client, server, or mesh. Events can then be handled by connecting to ``MultiplayerAPI`` signals. See ``ENetConnection`` for more information on the ENet library wrapper. +/// +/// > Note: ENet only uses UDP, not TCP. When forwarding the server port to make your server accessible on the public Internet, you only need to forward the server port in UDP. You can use the ``UPNP`` class to try to forward the server port automatically when starting the server. +/// +open class ENetMultiplayerPeer: MultiplayerPeer { + override open class var godotClassName: StringName { "ENetMultiplayerPeer" } + + /* Properties */ + + /// The underlying ``ENetConnection`` created after ``createClient(address:port:channelCount:inBandwidth:outBandwidth:localPort:)`` and ``createServer(port:maxClients:maxChannels:inBandwidth:outBandwidth:)``. + final public var host: ENetConnection? { + get { + return get_host () + } + + } + + /* Methods */ + fileprivate static var method_create_server: GDExtensionMethodBindPtr = { + let methodName = StringName("create_server") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2917761309)! + } + + } + + }() + + /// Create server that listens to connections via `port`. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use ``setBindIp(_:)``. The default IP is the wildcard `"*"`, which listens on all available interfaces. `maxClients` is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see ``createClient(address:port:channelCount:inBandwidth:outBandwidth:localPort:)``. Returns ``GodotError/ok`` if a server was created, ``GodotError/errAlreadyInUse`` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call ``MultiplayerPeer/close()`` first) or ``GodotError/errCantCreate`` if the server could not be created. + public final func createServer(port: Int32, maxClients: Int32 = 32, maxChannels: Int32 = 0, inBandwidth: Int32 = 0, outBandwidth: Int32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: port) { pArg0 in + withUnsafePointer(to: maxClients) { pArg1 in + withUnsafePointer(to: maxChannels) { pArg2 in + withUnsafePointer(to: inBandwidth) { pArg3 in + withUnsafePointer(to: outBandwidth) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_create_server, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_create_client: GDExtensionMethodBindPtr = { + let methodName = StringName("create_client") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2327163476)! + } + + } + + }() + + /// Create client that connects to a server at `address` using specified `port`. The given address needs to be either a fully qualified domain name (e.g. `"www.example.com"`) or an IP address in IPv4 or IPv6 format (e.g. `"192.168.1.1"`). The `port` is the port the server is listening on. The `channelCount` parameter can be used to specify the number of ENet channels allocated for the connection. The `inBandwidth` and `outBandwidth` parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns ``GodotError/ok`` if a client was created, ``GodotError/errAlreadyInUse`` if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call ``MultiplayerPeer/close()`` first) or ``GodotError/errCantCreate`` if the client could not be created. If `localPort` is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. + public final func createClient(address: String, port: Int32, channelCount: Int32 = 0, inBandwidth: Int32 = 0, outBandwidth: Int32 = 0, localPort: Int32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let address = GString(address) + withUnsafePointer(to: address.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: channelCount) { pArg2 in + withUnsafePointer(to: inBandwidth) { pArg3 in + withUnsafePointer(to: outBandwidth) { pArg4 in + withUnsafePointer(to: localPort) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_create_client, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_create_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("create_mesh") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844576869)! + } + + } + + }() + + /// Initialize this ``MultiplayerPeer`` in mesh mode. The provided `uniqueId` will be used as the local peer network unique ID once assigned as the ``MultiplayerAPI/multiplayerPeer``. In the mesh configuration you will need to set up each new peer manually using ``ENetConnection`` before calling ``addMeshPeer(peerId:host:)``. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). + public final func createMesh(uniqueId: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: uniqueId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_create_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_add_mesh_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("add_mesh_peer") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1293458335)! + } + + } + + }() + + /// Add a new remote peer with the given `peerId` connected to the given `host`. + /// + /// > Note: The `host` must have exactly one peer in the ``ENetPacketPeer/PeerState/connected`` state. + /// + public final func addMeshPeer(peerId: Int32, host: ENetConnection?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: peerId) { pArg0 in + withUnsafePointer(to: host?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_add_mesh_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_bind_ip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bind_ip") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// The IP used when creating a server. This is set to the wildcard `"*"` by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: `"192.168.1.1"`. + public final func setBindIp(_ ip: String) { + let ip = GString(ip) + withUnsafePointer(to: ip.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_set_bind_ip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_host: GDExtensionMethodBindPtr = { + let methodName = StringName("get_host") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4103238886)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_host() -> ENetConnection? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_get_host, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_peer") + return withUnsafePointer(to: &ENetMultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3793311544)! + } + + } + + }() + + /// Returns the ``ENetPacketPeer`` associated to the given `id`. + public final func getPeer(id: Int32) -> ENetPacketPeer? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetMultiplayerPeer.method_get_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ENetPacketPeer.swift b/Sources/SwiftGodot/Generated/Api/ENetPacketPeer.swift new file mode 100644 index 000000000..19f94a529 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ENetPacketPeer.swift @@ -0,0 +1,500 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A wrapper class for an ENetPeer. +/// +/// A PacketPeer implementation representing a peer of an ``ENetConnection``. +/// +/// This class cannot be instantiated directly but can be retrieved during ``ENetConnection/service(timeout:)`` or via ``ENetConnection/getPeers()``. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +open class ENetPacketPeer: PacketPeer { + override open class var godotClassName: StringName { "ENetPacketPeer" } + public enum PeerState: Int64, CaseIterable, CustomDebugStringConvertible { + /// The peer is disconnected. + case disconnected = 0 // STATE_DISCONNECTED + /// The peer is currently attempting to connect. + case connecting = 1 // STATE_CONNECTING + /// The peer has acknowledged the connection request. + case acknowledgingConnect = 2 // STATE_ACKNOWLEDGING_CONNECT + /// The peer is currently connecting. + case connectionPending = 3 // STATE_CONNECTION_PENDING + /// The peer has successfully connected, but is not ready to communicate with yet (``PeerState/connected``). + case connectionSucceeded = 4 // STATE_CONNECTION_SUCCEEDED + /// The peer is currently connected and ready to communicate with. + case connected = 5 // STATE_CONNECTED + /// The peer is slated to disconnect after it has no more outgoing packets to send. + case disconnectLater = 6 // STATE_DISCONNECT_LATER + /// The peer is currently disconnecting. + case disconnecting = 7 // STATE_DISCONNECTING + /// The peer has acknowledged the disconnection request. + case acknowledgingDisconnect = 8 // STATE_ACKNOWLEDGING_DISCONNECT + /// The peer has lost connection, but is not considered truly disconnected (as the peer didn't acknowledge the disconnection request). + case zombie = 9 // STATE_ZOMBIE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disconnected: return ".disconnected" + case .connecting: return ".connecting" + case .acknowledgingConnect: return ".acknowledgingConnect" + case .connectionPending: return ".connectionPending" + case .connectionSucceeded: return ".connectionSucceeded" + case .connected: return ".connected" + case .disconnectLater: return ".disconnectLater" + case .disconnecting: return ".disconnecting" + case .acknowledgingDisconnect: return ".acknowledgingDisconnect" + case .zombie: return ".zombie" + } + + } + + } + + public enum PeerStatistic: Int64, CaseIterable, CustomDebugStringConvertible { + /// Mean packet loss of reliable packets as a ratio with respect to the ``packetLossScale``. + case packetLoss = 0 // PEER_PACKET_LOSS + /// Packet loss variance. + case packetLossVariance = 1 // PEER_PACKET_LOSS_VARIANCE + /// The time at which packet loss statistics were last updated (in milliseconds since the connection started). The interval for packet loss statistics updates is 10 seconds, and at least one packet must have been sent since the last statistics update. + case packetLossEpoch = 2 // PEER_PACKET_LOSS_EPOCH + /// Mean packet round trip time for reliable packets. + case roundTripTime = 3 // PEER_ROUND_TRIP_TIME + /// Variance of the mean round trip time. + case roundTripTimeVariance = 4 // PEER_ROUND_TRIP_TIME_VARIANCE + /// Last recorded round trip time for a reliable packet. + case lastRoundTripTime = 5 // PEER_LAST_ROUND_TRIP_TIME + /// Variance of the last trip time recorded. + case lastRoundTripTimeVariance = 6 // PEER_LAST_ROUND_TRIP_TIME_VARIANCE + /// The peer's current throttle status. + case packetThrottle = 7 // PEER_PACKET_THROTTLE + /// The maximum number of unreliable packets that should not be dropped. This value is always greater than or equal to `1`. The initial value is equal to ``packetThrottleScale``. + case packetThrottleLimit = 8 // PEER_PACKET_THROTTLE_LIMIT + /// Internal value used to increment the packet throttle counter. The value is hardcoded to `7` and cannot be changed. You probably want to look at ``PeerStatistic/packetThrottleAcceleration`` instead. + case packetThrottleCounter = 9 // PEER_PACKET_THROTTLE_COUNTER + /// The time at which throttle statistics were last updated (in milliseconds since the connection started). The interval for throttle statistics updates is ``PeerStatistic/packetThrottleInterval``. + case packetThrottleEpoch = 10 // PEER_PACKET_THROTTLE_EPOCH + /// The throttle's acceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent _more_ often. The default value is `2`. + case packetThrottleAcceleration = 11 // PEER_PACKET_THROTTLE_ACCELERATION + /// The throttle's deceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent _less_ often. The default value is `2`. + case packetThrottleDeceleration = 12 // PEER_PACKET_THROTTLE_DECELERATION + /// The interval over which the lowest mean round trip time should be measured for use by the throttle mechanism (in milliseconds). The default value is `5000`. + case packetThrottleInterval = 13 // PEER_PACKET_THROTTLE_INTERVAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .packetLoss: return ".packetLoss" + case .packetLossVariance: return ".packetLossVariance" + case .packetLossEpoch: return ".packetLossEpoch" + case .roundTripTime: return ".roundTripTime" + case .roundTripTimeVariance: return ".roundTripTimeVariance" + case .lastRoundTripTime: return ".lastRoundTripTime" + case .lastRoundTripTimeVariance: return ".lastRoundTripTimeVariance" + case .packetThrottle: return ".packetThrottle" + case .packetThrottleLimit: return ".packetThrottleLimit" + case .packetThrottleCounter: return ".packetThrottleCounter" + case .packetThrottleEpoch: return ".packetThrottleEpoch" + case .packetThrottleAcceleration: return ".packetThrottleAcceleration" + case .packetThrottleDeceleration: return ".packetThrottleDeceleration" + case .packetThrottleInterval: return ".packetThrottleInterval" + } + + } + + } + + /* Constants */ + /// The reference scale for packet loss. See ``getStatistic(_:)`` and ``PeerStatistic/packetLoss``. + public static let packetLossScale = 65536 + /// The reference value for throttle configuration. The default value is `32`. See ``throttleConfigure(interval:acceleration:deceleration:)``. + public static let packetThrottleScale = 32 + /// Mark the packet to be sent as reliable. + public static let flagReliable = 1 + /// Mark the packet to be sent unsequenced (unreliable). + public static let flagUnsequenced = 2 + /// Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped). + public static let flagUnreliableFragment = 8 + /* Methods */ + fileprivate static var method_peer_disconnect: GDExtensionMethodBindPtr = { + let methodName = StringName("peer_disconnect") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Request a disconnection from a peer. An ``ENetConnection/EventType/disconnect`` will be generated during ``ENetConnection/service(timeout:)`` once the disconnection is complete. + public final func peerDisconnect(data: Int32 = 0) { + withUnsafePointer(to: data) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_peer_disconnect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_peer_disconnect_later: GDExtensionMethodBindPtr = { + let methodName = StringName("peer_disconnect_later") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Request a disconnection from a peer, but only after all queued outgoing packets are sent. An ``ENetConnection/EventType/disconnect`` will be generated during ``ENetConnection/service(timeout:)`` once the disconnection is complete. + public final func peerDisconnectLater(data: Int32 = 0) { + withUnsafePointer(to: data) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_peer_disconnect_later, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_peer_disconnect_now: GDExtensionMethodBindPtr = { + let methodName = StringName("peer_disconnect_now") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Force an immediate disconnection from a peer. No ``ENetConnection/EventType/disconnect`` will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function. + public final func peerDisconnectNow(data: Int32 = 0) { + withUnsafePointer(to: data) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_peer_disconnect_now, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_ping: GDExtensionMethodBindPtr = { + let methodName = StringName("ping") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sends a ping request to a peer. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests. + public final func ping() { + gi.object_method_bind_ptrcall(ENetPacketPeer.method_ping, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_ping_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("ping_interval") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the `pingInterval` in milliseconds at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. The default ping interval is `500` milliseconds. + public final func pingInterval(pingInterval: Int32) { + withUnsafePointer(to: pingInterval) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_ping_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("reset") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forcefully disconnects a peer. The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host. + public final func reset() { + gi.object_method_bind_ptrcall(ENetPacketPeer.method_reset, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_send: GDExtensionMethodBindPtr = { + let methodName = StringName("send") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 120522849)! + } + + } + + }() + + /// Queues a `packet` to be sent over the specified `channel`. See `FLAG_*` constants for available packet flags. + public final func send(channel: Int32, packet: PackedByteArray, flags: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: channel) { pArg0 in + withUnsafePointer(to: packet.content) { pArg1 in + withUnsafePointer(to: flags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_send, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_throttle_configure: GDExtensionMethodBindPtr = { + let methodName = StringName("throttle_configure") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1649997291)! + } + + } + + }() + + /// Configures throttle parameter for a peer. + /// + /// Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. By measuring fluctuations in round trip times of reliable packets over the specified `interval`, ENet will either increase the probability by the amount specified in the `acceleration` parameter, or decrease it by the amount specified in the `deceleration` parameter (both are ratios to ``packetThrottleScale``). + /// + /// When the throttle has a value of ``packetThrottleScale``, no unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. + /// + /// When the throttle has a value of `0`, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. + /// + /// Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions. + /// + public final func throttleConfigure(interval: Int32, acceleration: Int32, deceleration: Int32) { + withUnsafePointer(to: interval) { pArg0 in + withUnsafePointer(to: acceleration) { pArg1 in + withUnsafePointer(to: deceleration) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_throttle_configure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_timeout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_timeout") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1649997291)! + } + + } + + }() + + /// Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. + /// + /// The `timeout` is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached `timeoutMin`. The `timeoutMax` parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. + /// + public final func setTimeout(_ timeout: Int32, timeoutMin: Int32, timeoutMax: Int32) { + withUnsafePointer(to: timeout) { pArg0 in + withUnsafePointer(to: timeoutMin) { pArg1 in + withUnsafePointer(to: timeoutMax) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_set_timeout, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_remote_address: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remote_address") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the IP address of this peer. + public final func getRemoteAddress() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(ENetPacketPeer.method_get_remote_address, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_remote_port: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remote_port") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the remote port of this peer. + public final func getRemotePort() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ENetPacketPeer.method_get_remote_port, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_statistic: GDExtensionMethodBindPtr = { + let methodName = StringName("get_statistic") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1642578323)! + } + + } + + }() + + /// Returns the requested `statistic` for this peer. See ``ENetPacketPeer/PeerStatistic``. + public final func getStatistic(_ statistic: ENetPacketPeer.PeerStatistic) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: statistic.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ENetPacketPeer.method_get_statistic, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_state") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711068532)! + } + + } + + }() + + /// Returns the current peer state. See ``ENetPacketPeer/PeerState``. + public final func getState() -> ENetPacketPeer.PeerState { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ENetPacketPeer.method_get_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ENetPacketPeer.PeerState (rawValue: _result)! + } + + fileprivate static var method_get_channels: GDExtensionMethodBindPtr = { + let methodName = StringName("get_channels") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of channels allocated for communication with peer. + public final func getChannels() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ENetPacketPeer.method_get_channels, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_active") + return withUnsafePointer(to: &ENetPacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the peer is currently active (i.e. the associated ``ENetConnection`` is still valid). + public final func isActive() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ENetPacketPeer.method_is_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorCommandPalette.swift b/Sources/SwiftGodot/Generated/Api/EditorCommandPalette.swift new file mode 100644 index 000000000..106e381f6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorCommandPalette.swift @@ -0,0 +1,110 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's command palette. +/// +/// Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through **Editor > Command Palette** menu. +/// +/// Command key names use slash delimiters to distinguish sections, for example: `"example/command1"` then `example` will be the section name. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getCommandPalette()``. +/// +open class EditorCommandPalette: ConfirmationDialog { + override open class var godotClassName: StringName { "EditorCommandPalette" } + /* Methods */ + fileprivate static var method_add_command: GDExtensionMethodBindPtr = { + let methodName = StringName("add_command") + return withUnsafePointer(to: &EditorCommandPalette.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 864043298)! + } + + } + + }() + + /// Adds a custom command to EditorCommandPalette. + /// + /// - `commandName`: ``String`` (Name of the **Command**. This is displayed to the user.) + /// + /// - `keyName`: ``String`` (Name of the key for a particular **Command**. This is used to uniquely identify the **Command**.) + /// + /// - `bindedCallable`: ``Callable`` (Callable of the **Command**. This will be executed when the **Command** is selected.) + /// + /// - `shortcutText`: ``String`` (Shortcut text of the **Command** if available.) + /// + public final func addCommand(commandName: String, keyName: String, bindedCallable: Callable, shortcutText: String = "None") { + let commandName = GString(commandName) + withUnsafePointer(to: commandName.content) { pArg0 in + let keyName = GString(keyName) + withUnsafePointer(to: keyName.content) { pArg1 in + withUnsafePointer(to: bindedCallable.content) { pArg2 in + let shortcutText = GString(shortcutText) + withUnsafePointer(to: shortcutText.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorCommandPalette.method_add_command, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_command: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_command") + return withUnsafePointer(to: &EditorCommandPalette.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes the custom command from EditorCommandPalette. + /// + /// - `keyName`: ``String`` (Name of the key for a particular **Command**.) + /// + public final func removeCommand(keyName: String) { + let keyName = GString(keyName) + withUnsafePointer(to: keyName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorCommandPalette.method_remove_command, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorDebuggerPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorDebuggerPlugin.swift new file mode 100644 index 000000000..24bf91cec --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorDebuggerPlugin.swift @@ -0,0 +1,184 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A base class to implement debugger plugins. +/// +/// ``EditorDebuggerPlugin`` provides functions related to the editor side of the debugger. +/// +/// To interact with the debugger, an instance of this class must be added to the editor via ``EditorPlugin/addDebuggerPlugin(script:)``. +/// +/// Once added, the ``_setupSession(sessionId:)`` callback will be called for every ``EditorDebuggerSession`` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). +/// +/// You can retrieve the available ``EditorDebuggerSession``s via ``getSessions()`` or get a specific one via ``getSession(id:)``. +/// +open class EditorDebuggerPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorDebuggerPlugin" } + /* Methods */ + /// Override this method to be notified whenever a new ``EditorDebuggerSession`` is created (the session may be inactive during this stage). + @_documentation(visibility: public) + open func _setupSession(sessionId: Int32) { + } + + /// Override this method to enable receiving messages from the debugger. If `capture` is "my_message" then messages starting with "my_message:" will be passes to the ``_capture(message:data:sessionId:)`` method. + @_documentation(visibility: public) + open func _hasCapture(_ capture: String) -> Bool { + return false + } + + /// Override this method to process incoming messages. The `sessionId` is the ID of the ``EditorDebuggerSession`` that received the message (which you can retrieve via ``getSession(id:)``). + @_documentation(visibility: public) + open func _capture(message: String, data: GArray, sessionId: Int32) -> Bool { + return false + } + + /// Override this method to be notified when a breakpoint line has been clicked in the debugger breakpoint panel. + @_documentation(visibility: public) + open func _gotoScriptLine(script: Script?, line: Int32) { + } + + /// Override this method to be notified when all breakpoints are cleared in the editor. + @_documentation(visibility: public) + open func _breakpointsClearedInTree() { + } + + /// Override this method to be notified when a breakpoint is set in the editor. + @_documentation(visibility: public) + open func _breakpointSetInTree(script: Script?, line: Int32, enabled: Bool) { + } + + fileprivate static var method_get_session: GDExtensionMethodBindPtr = { + let methodName = StringName("get_session") + return withUnsafePointer(to: &EditorDebuggerPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3061968499)! + } + + } + + }() + + /// Returns the ``EditorDebuggerSession`` with the given `id`. + public final func getSession(id: Int32) -> EditorDebuggerSession? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerPlugin.method_get_session, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_sessions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sessions") + return withUnsafePointer(to: &EditorDebuggerPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of ``EditorDebuggerSession`` currently available to this debugger plugin. + /// + /// > Note: Sessions in the array may be inactive, check their state via ``EditorDebuggerSession/isActive()``. + /// + public final func getSessions() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(EditorDebuggerPlugin.method_get_sessions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_breakpoint_set_in_tree": + return _EditorDebuggerPlugin_proxy_breakpoint_set_in_tree + case "_breakpoints_cleared_in_tree": + return _EditorDebuggerPlugin_proxy_breakpoints_cleared_in_tree + case "_capture": + return _EditorDebuggerPlugin_proxy_capture + case "_goto_script_line": + return _EditorDebuggerPlugin_proxy_goto_script_line + case "_has_capture": + return _EditorDebuggerPlugin_proxy_has_capture + case "_setup_session": + return _EditorDebuggerPlugin_proxy_setup_session + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorDebuggerPlugin_proxy_breakpoint_set_in_tree (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._breakpointSetInTree (script: lookupLiveObject (handleAddress: resolved_0) as? Script ?? Script (nativeHandle: resolved_0), line: args [1]!.assumingMemoryBound (to: Int32.self).pointee, enabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorDebuggerPlugin_proxy_breakpoints_cleared_in_tree (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._breakpointsClearedInTree () +} + +func _EditorDebuggerPlugin_proxy_capture (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._capture (message: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", data: GArray (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), sessionId: args [2]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorDebuggerPlugin_proxy_goto_script_line (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._gotoScriptLine (script: lookupLiveObject (handleAddress: resolved_0) as? Script ?? Script (nativeHandle: resolved_0), line: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _EditorDebuggerPlugin_proxy_has_capture (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hasCapture (GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorDebuggerPlugin_proxy_setup_session (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setupSession (sessionId: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorDebuggerSession.swift b/Sources/SwiftGodot/Generated/Api/EditorDebuggerSession.swift new file mode 100644 index 000000000..7b8bf6084 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorDebuggerSession.swift @@ -0,0 +1,371 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class to interact with the editor debugger. +/// +/// This class cannot be directly instantiated and must be retrieved via a ``EditorDebuggerPlugin``. +/// +/// You can add tabs to the session UI via ``addSessionTab(control:)``, send messages via ``sendMessage(_:data:)``, and toggle ``EngineProfiler``s via ``toggleProfiler(_:enable:data:)``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``started`` +/// - ``stopped`` +/// - ``breaked`` +/// - ``continued`` +open class EditorDebuggerSession: RefCounted { + override open class var godotClassName: StringName { "EditorDebuggerSession" } + /* Methods */ + fileprivate static var method_send_message: GDExtensionMethodBindPtr = { + let methodName = StringName("send_message") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 85656714)! + } + + } + + }() + + /// Sends the given `message` to the attached remote instance, optionally passing additionally `data`. See ``EngineDebugger`` for how to retrieve those messages. + public final func sendMessage(_ message: String, data: GArray = GArray ()) { + let message = GString(message) + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_send_message, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_toggle_profiler: GDExtensionMethodBindPtr = { + let methodName = StringName("toggle_profiler") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1198443697)! + } + + } + + }() + + /// Toggle the given `profiler` on the attached remote instance, optionally passing additionally `data`. See ``EngineProfiler`` for more details. + public final func toggleProfiler(_ profiler: String, enable: Bool, data: GArray = GArray ()) { + let profiler = GString(profiler) + withUnsafePointer(to: profiler.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_toggle_profiler, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_breaked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_breaked") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the attached remote instance is currently in the debug loop. + public final func isBreaked() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_is_breaked, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_debuggable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_debuggable") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the attached remote instance can be debugged. + public final func isDebuggable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_is_debuggable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_active") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the debug session is currently attached to a remote instance. + public final func isActive() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_is_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_session_tab: GDExtensionMethodBindPtr = { + let methodName = StringName("add_session_tab") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Adds the given `control` to the debug session UI in the debugger bottom panel. + public final func addSessionTab(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_add_session_tab, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_session_tab: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_session_tab") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Removes the given `control` from the debug session UI in the debugger bottom panel. + public final func removeSessionTab(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_remove_session_tab, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_breakpoint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_breakpoint") + return withUnsafePointer(to: &EditorDebuggerSession.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108344793)! + } + + } + + }() + + /// Enables or disables a specific breakpoint based on `enabled`, updating the Editor Breakpoint Panel accordingly. + public final func setBreakpoint(path: String, line: Int32, enabled: Bool) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: line) { pArg1 in + withUnsafePointer(to: enabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorDebuggerSession.method_set_breakpoint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + // Signals + /// Emitted when a remote instance is attached to this session (i.e. the session becomes active). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.started.connect { + /// print ("caught signal") + /// } + /// ``` + public var started: SimpleSignal { SimpleSignal (target: self, signalName: "started") } + + /// Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.stopped.connect { + /// print ("caught signal") + /// } + /// ``` + public var stopped: SimpleSignal { SimpleSignal (target: self, signalName: "stopped") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ canDebug: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Bool (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the attached remote instance enters a break state. If `canDebug` is `true`, the remote instance will enter the debug loop. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.breaked.connect { canDebug in + /// print ("caught signal") + /// } + /// ``` + public var breaked: Signal1 { Signal1 (target: self, signalName: "breaked") } + + /// Emitted when the attached remote instance exits a break state. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.continued.connect { + /// print ("caught signal") + /// } + /// ``` + public var continued: SimpleSignal { SimpleSignal (target: self, signalName: "continued") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatform.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatform.swift new file mode 100644 index 000000000..6126b3fdf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatform.swift @@ -0,0 +1,49 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Identifies a supported export platform, and internally provides the functionality of exporting to that platform. +/// +/// Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting. +/// +/// Used in scripting by ``EditorExportPlugin`` to configure platform-specific customization of scenes and resources. See ``EditorExportPlugin/_beginCustomizeScenes(platform:features:)`` and ``EditorExportPlugin/_beginCustomizeResources(platform:features:)`` for more details. +/// +open class EditorExportPlatform: RefCounted { + override open class var godotClassName: StringName { "EditorExportPlatform" } + /* Methods */ + fileprivate static var method_get_os_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_os_name") + return withUnsafePointer(to: &EditorExportPlatform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the export operating system handled by this ``EditorExportPlatform`` class, as a friendly string. Possible return values are `Windows`, `Linux`, `macOS`, `Android`, `iOS`, and `Web`. + public final func getOsName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorExportPlatform.method_get_os_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformAndroid.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformAndroid.swift new file mode 100644 index 000000000..b8783123a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformAndroid.swift @@ -0,0 +1,25 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for Android. +open class EditorExportPlatformAndroid: EditorExportPlatform { + override open class var godotClassName: StringName { "EditorExportPlatformAndroid" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformIOS.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformIOS.swift new file mode 100644 index 000000000..833ac0114 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformIOS.swift @@ -0,0 +1,25 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for iOS. +open class EditorExportPlatformIOS: EditorExportPlatform { + override open class var godotClassName: StringName { "EditorExportPlatformIOS" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformLinuxBSD.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformLinuxBSD.swift new file mode 100644 index 000000000..a0dfc16c3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformLinuxBSD.swift @@ -0,0 +1,25 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for Linux/BSD. +open class EditorExportPlatformLinuxBSD: EditorExportPlatformPC { + override open class var godotClassName: StringName { "EditorExportPlatformLinuxBSD" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformMacOS.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformMacOS.swift new file mode 100644 index 000000000..a7fd5b99e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformMacOS.swift @@ -0,0 +1,25 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for macOS. +open class EditorExportPlatformMacOS: EditorExportPlatform { + override open class var godotClassName: StringName { "EditorExportPlatformMacOS" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformPC.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformPC.swift new file mode 100644 index 000000000..65c339c75 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformPC.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for the desktop platform exporter (Windows and Linux/BSD). +/// +/// The base class for the desktop platform exporters. These include Windows and Linux/BSD, but not macOS. See the classes inheriting this one for more details. +open class EditorExportPlatformPC: EditorExportPlatform { + override open class var godotClassName: StringName { "EditorExportPlatformPC" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWeb.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWeb.swift new file mode 100644 index 000000000..416fad3dd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWeb.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for the Web. +/// +/// The Web exporter customizes how a web build is handled. In the editor's "Export" window, it is created when adding a new "Web" preset. +/// +/// > Note: Godot on Web is rendered inside a `` tag. Normally, the canvas cannot be positioned or resized manually, but otherwise acts as the main ``Window`` of the application. +/// +open class EditorExportPlatformWeb: EditorExportPlatform { + override open class var godotClassName: StringName { "EditorExportPlatformWeb" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWindows.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWindows.swift new file mode 100644 index 000000000..74730278e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlatformWindows.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exporter for Windows. +/// +/// The Windows exporter customizes how a Windows build is handled. In the editor's "Export" window, it is created when adding a new "Windows" preset. +open class EditorExportPlatformWindows: EditorExportPlatformPC { + override open class var godotClassName: StringName { "EditorExportPlatformWindows" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorExportPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorExportPlugin.swift new file mode 100644 index 000000000..2ca337fa6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorExportPlugin.swift @@ -0,0 +1,838 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A script that is executed when exporting the project. +/// +/// ``EditorExportPlugin``s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, ``_exportBegin(features:isDebug:path:flags:)`` is called at the beginning of the export process and then ``_exportFile(path:type:features:)`` is called for each exported file. +/// +/// To use ``EditorExportPlugin``, register it using the ``EditorPlugin/addExportPlugin(_:)`` method first. +/// +open class EditorExportPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorExportPlugin" } + /* Methods */ + /// Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. `path` is the path of the file, `type` is the ``Resource`` represented by the file (e.g. ``PackedScene``) and `features` is the list of features for the export. + /// + /// Calling ``skip()`` inside this callback will make the file not included in the export. + /// + @_documentation(visibility: public) + open func _exportFile(path: String, type: String, features: PackedStringArray) { + } + + /// Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. `features` is the list of features for the export, `isDebug` is `true` for debug builds, `path` is the target path for the exported project. `flags` is only used when running a runnable profile, e.g. when using native run on Android. + @_documentation(visibility: public) + open func _exportBegin(features: PackedStringArray, isDebug: Bool, path: String, flags: UInt32) { + } + + /// Virtual method to be overridden by the user. Called when the export is finished. + @_documentation(visibility: public) + open func _exportEnd() { + } + + /// Return `true` if this plugin will customize resources based on the platform and features used. + /// + /// When enabled, ``_getCustomizationConfigurationHash()``, ``_customizeResource(_:path:)`` and ``_customizeScene(_:path:)`` will be called and must be implemented. + /// + @_documentation(visibility: public) + open func _beginCustomizeResources(platform: EditorExportPlatform?, features: PackedStringArray) -> Bool { + return false + } + + /// Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return `null`. + /// + /// The _path_ argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. + /// + /// Implementing this method is required if ``_beginCustomizeResources(platform:features:)`` returns `true`. + /// + @_documentation(visibility: public) + open func _customizeResource(_ resource: Resource?, path: String) -> Resource? { + return Resource () + } + + /// Return true if this plugin will customize scenes based on the platform and features used. + @_documentation(visibility: public) + open func _beginCustomizeScenes(platform: EditorExportPlatform?, features: PackedStringArray) -> Bool { + return false + } + + /// Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return `null`. If a new scene is returned, it is up to you to dispose of the old one. + /// + /// Implementing this method is required if ``_beginCustomizeScenes(platform:features:)`` returns `true`. + /// + @_documentation(visibility: public) + open func _customizeScene(_ scene: Node?, path: String) -> Node? { + return Node () + } + + /// Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. + /// + /// Implementing this method is required if ``_beginCustomizeResources(platform:features:)`` returns `true`. + /// + @_documentation(visibility: public) + open func _getCustomizationConfigurationHash() -> UInt { + return 0 + } + + /// This is called when the customization process for scenes ends. + @_documentation(visibility: public) + open func _endCustomizeScenes() { + } + + /// This is called when the customization process for resources ends. + @_documentation(visibility: public) + open func _endCustomizeResources() { + } + + /// Return a list of export options that can be configured for this export plugin. + /// + /// Each element in the return value is a ``GDictionary`` with the following keys: + /// + /// - `option`: A dictionary with the structure documented by ``Object/getPropertyList()``, but all keys are optional. + /// + /// - `default_value`: The default value for this option. + /// + /// - `update_visibility`: An optional boolean value. If set to `true`, the preset will emit [signal Object.property_list_changed] when the option is changed. + /// + @_documentation(visibility: public) + open func _getExportOptions(platform: EditorExportPlatform?) -> VariantCollection { + return VariantCollection() + } + + /// Return a ``GDictionary`` of override values for export options, that will be used instead of user-provided values. Overridden options will be hidden from the user interface. + /// + @_documentation(visibility: public) + open func _getExportOptionsOverrides(platform: EditorExportPlatform?) -> GDictionary { + return GDictionary () + } + + /// Return `true`, if the result of ``_getExportOptions(platform:)`` has changed and the export options of preset corresponding to `platform` should be updated. + @_documentation(visibility: public) + open func _shouldUpdateExportOptions(platform: EditorExportPlatform?) -> Bool { + return false + } + + /// Check the requirements for the given `option` and return a non-empty warning string if they are not met. + /// + /// > Note: Use ``getOption(name:)`` to check the value of the export options. + /// + @_documentation(visibility: public) + open func _getExportOptionWarning(platform: EditorExportPlatform?, option: String) -> String { + return String () + } + + /// Return a ``PackedStringArray`` of additional features this preset, for the given `platform`, should have. + @_documentation(visibility: public) + open func _getExportFeatures(platform: EditorExportPlatform?, debug: Bool) -> PackedStringArray { + return PackedStringArray () + } + + /// Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. + /// + /// Implementing this method is required. + /// + @_documentation(visibility: public) + open func _getName() -> String { + return String () + } + + /// Return `true` if the plugin supports the given `platform`. + @_documentation(visibility: public) + open func _supportsPlatform(_ platform: EditorExportPlatform?) -> Bool { + return false + } + + /// Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: `org.godot.example:my-plugin:0.0.0` + /// + /// For more information see Android documentation on dependencies. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidDependencies(platform: EditorExportPlatform?, debug: Bool) -> PackedStringArray { + return PackedStringArray () + } + + /// Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin. + /// + /// For more information see Gradle documentation on dependency management. + /// + /// > Note: Google's Maven repo and the Maven Central repo are already included by default. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidDependenciesMavenRepos(platform: EditorExportPlatform?, debug: Bool) -> PackedStringArray { + return PackedStringArray () + } + + /// Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin. + /// + /// > Note: Relative paths **must** be relative to Godot's `res://addons/` directory. For example, an AAR file located under `res://addons/hello_world_plugin/HelloWorld.release.aar` can be returned as an absolute path using `res://addons/hello_world_plugin/HelloWorld.release.aar` or a relative path using `hello_world_plugin/HelloWorld.release.aar`. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidLibraries(platform: EditorExportPlatform?, debug: Bool) -> PackedStringArray { + return PackedStringArray () + } + + /// Virtual method to be overridden by the user. This is used at export time to update the contents of the `activity` element in the generated Android manifest. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidManifestActivityElementContents(platform: EditorExportPlatform?, debug: Bool) -> String { + return String () + } + + /// Virtual method to be overridden by the user. This is used at export time to update the contents of the `application` element in the generated Android manifest. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidManifestApplicationElementContents(platform: EditorExportPlatform?, debug: Bool) -> String { + return String () + } + + /// Virtual method to be overridden by the user. This is used at export time to update the contents of the `manifest` element in the generated Android manifest. + /// + /// > Note: Only supported on Android and requires ``EditorExportPlatformAndroid/gradleBuild/useGradleBuild`` to be enabled. + /// + @_documentation(visibility: public) + open func _getAndroidManifestElementContents(platform: EditorExportPlatform?, debug: Bool) -> String { + return String () + } + + fileprivate static var method_add_shared_object: GDExtensionMethodBindPtr = { + let methodName = StringName("add_shared_object") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3098291045)! + } + + } + + }() + + /// Adds a shared object or a directory containing only shared objects with the given `tags` and destination `path`. + /// + /// > Note: In case of macOS exports, those shared objects will be added to `Frameworks` directory of app bundle. + /// + /// In case of a directory code-sign will error if you place non code object in directory. + /// + public final func addSharedObject(path: String, tags: PackedStringArray, target: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: tags.content) { pArg1 in + let target = GString(target) + withUnsafePointer(to: target.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_shared_object, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_ios_project_static_lib: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_project_static_lib") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a static lib from the given `path` to the iOS project. + public final func addIosProjectStaticLib(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_project_static_lib, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_file: GDExtensionMethodBindPtr = { + let methodName = StringName("add_file") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 527928637)! + } + + } + + }() + + /// Adds a custom file to be exported. `path` is the virtual path that can be used to load the file, `file` is the binary data of the file. + /// + /// When called inside ``_exportFile(path:type:features:)`` and `remap` is `true`, the current file will not be exported, but instead remapped to this custom file. `remap` is ignored when called in other places. + /// + public final func addFile(path: String, file: PackedByteArray, remap: Bool) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: file.content) { pArg1 in + withUnsafePointer(to: remap) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_ios_framework: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_framework") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project. + public final func addIosFramework(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_framework, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_ios_embedded_framework: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_embedded_framework") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. + /// + /// > Note: For static libraries (*.a) works in same way as ``addIosFramework(path:)``. + /// + /// > Note: This method should not be used for System libraries as they are already present on the device. + /// + public final func addIosEmbeddedFramework(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_embedded_framework, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_ios_plist_content: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_plist_content") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds content for iOS Property List files. + public final func addIosPlistContent(_ plistContent: String) { + let plistContent = GString(plistContent) + withUnsafePointer(to: plistContent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_plist_content, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_ios_linker_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_linker_flags") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds linker flags for the iOS export. + public final func addIosLinkerFlags(_ flags: String) { + let flags = GString(flags) + withUnsafePointer(to: flags.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_linker_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_ios_bundle_file: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_bundle_file") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds an iOS bundle file from the given `path` to the exported project. + public final func addIosBundleFile(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_bundle_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_ios_cpp_code: GDExtensionMethodBindPtr = { + let methodName = StringName("add_ios_cpp_code") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. + public final func addIosCppCode(_ code: String) { + let code = GString(code) + withUnsafePointer(to: code.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_ios_cpp_code, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_macos_plugin_file: GDExtensionMethodBindPtr = { + let methodName = StringName("add_macos_plugin_file") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds file or directory matching `path` to `PlugIns` directory of macOS app bundle. + /// + /// > Note: This is useful only for macOS exports. + /// + public final func addMacosPluginFile(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_add_macos_plugin_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_skip: GDExtensionMethodBindPtr = { + let methodName = StringName("skip") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// To be called inside ``_exportFile(path:type:features:)``, ``_customizeResource(_:path:)``, or ``_customizeScene(_:path:)``. Skips the current file, so it's not included in the export. + public final func skip() { + gi.object_method_bind_ptrcall(EditorExportPlugin.method_skip, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_option: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option") + return withUnsafePointer(to: &EditorExportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Returns the current value of an export option supplied by ``_getExportOptions(platform:)``. + public final func getOption(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorExportPlugin.method_get_option, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_begin_customize_resources": + return _EditorExportPlugin_proxy_begin_customize_resources + case "_begin_customize_scenes": + return _EditorExportPlugin_proxy_begin_customize_scenes + case "_customize_resource": + return _EditorExportPlugin_proxy_customize_resource + case "_customize_scene": + return _EditorExportPlugin_proxy_customize_scene + case "_end_customize_resources": + return _EditorExportPlugin_proxy_end_customize_resources + case "_end_customize_scenes": + return _EditorExportPlugin_proxy_end_customize_scenes + case "_export_begin": + return _EditorExportPlugin_proxy_export_begin + case "_export_end": + return _EditorExportPlugin_proxy_export_end + case "_export_file": + return _EditorExportPlugin_proxy_export_file + case "_get_android_dependencies": + return _EditorExportPlugin_proxy_get_android_dependencies + case "_get_android_dependencies_maven_repos": + return _EditorExportPlugin_proxy_get_android_dependencies_maven_repos + case "_get_android_libraries": + return _EditorExportPlugin_proxy_get_android_libraries + case "_get_android_manifest_activity_element_contents": + return _EditorExportPlugin_proxy_get_android_manifest_activity_element_contents + case "_get_android_manifest_application_element_contents": + return _EditorExportPlugin_proxy_get_android_manifest_application_element_contents + case "_get_android_manifest_element_contents": + return _EditorExportPlugin_proxy_get_android_manifest_element_contents + case "_get_customization_configuration_hash": + return _EditorExportPlugin_proxy_get_customization_configuration_hash + case "_get_export_features": + return _EditorExportPlugin_proxy_get_export_features + case "_get_export_option_warning": + return _EditorExportPlugin_proxy_get_export_option_warning + case "_get_export_options": + return _EditorExportPlugin_proxy_get_export_options + case "_get_export_options_overrides": + return _EditorExportPlugin_proxy_get_export_options_overrides + case "_get_name": + return _EditorExportPlugin_proxy_get_name + case "_should_update_export_options": + return _EditorExportPlugin_proxy_should_update_export_options + case "_supports_platform": + return _EditorExportPlugin_proxy_supports_platform + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorExportPlugin_proxy_begin_customize_resources (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._beginCustomizeResources (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), features: PackedStringArray (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorExportPlugin_proxy_begin_customize_scenes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._beginCustomizeScenes (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), features: PackedStringArray (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorExportPlugin_proxy_customize_resource (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._customizeResource (lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0), path: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Resource +} + +func _EditorExportPlugin_proxy_customize_scene (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._customizeScene (lookupLiveObject (handleAddress: resolved_0) as? Node ?? Node (nativeHandle: resolved_0), path: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Node +} + +func _EditorExportPlugin_proxy_end_customize_resources (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._endCustomizeResources () +} + +func _EditorExportPlugin_proxy_end_customize_scenes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._endCustomizeScenes () +} + +func _EditorExportPlugin_proxy_export_begin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._exportBegin (features: PackedStringArray (content: args [0]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), isDebug: args [1]!.assumingMemoryBound (to: Bool.self).pointee, path: GString.stringFromGStringPtr (ptr: args [2]!) ?? "", flags: args [3]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _EditorExportPlugin_proxy_export_end (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._exportEnd () +} + +func _EditorExportPlugin_proxy_export_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._exportFile (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", type: GString.stringFromGStringPtr (ptr: args [1]!) ?? "", features: PackedStringArray (content: args [2]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _EditorExportPlugin_proxy_get_android_dependencies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getAndroidDependencies (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorExportPlugin_proxy_get_android_dependencies_maven_repos (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getAndroidDependenciesMavenRepos (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorExportPlugin_proxy_get_android_libraries (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getAndroidLibraries (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorExportPlugin_proxy_get_android_manifest_activity_element_contents (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = GString (swiftObject._getAndroidManifestActivityElementContents (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorExportPlugin_proxy_get_android_manifest_application_element_contents (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = GString (swiftObject._getAndroidManifestApplicationElementContents (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorExportPlugin_proxy_get_android_manifest_element_contents (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = GString (swiftObject._getAndroidManifestElementContents (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorExportPlugin_proxy_get_customization_configuration_hash (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCustomizationConfigurationHash () + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _EditorExportPlugin_proxy_get_export_features (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getExportFeatures (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), debug: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorExportPlugin_proxy_get_export_option_warning (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = GString (swiftObject._getExportOptionWarning (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0), option: GString.stringFromGStringPtr (ptr: args [1]!) ?? "")) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorExportPlugin_proxy_get_export_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getExportOptions (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorExportPlugin_proxy_get_export_options_overrides (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getExportOptionsOverrides (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _EditorExportPlugin_proxy_get_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorExportPlugin_proxy_should_update_export_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._shouldUpdateExportOptions (platform: lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorExportPlugin_proxy_supports_platform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._supportsPlatform (lookupLiveObject (handleAddress: resolved_0) as? EditorExportPlatform ?? EditorExportPlatform (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorFeatureProfile.swift b/Sources/SwiftGodot/Generated/Api/EditorFeatureProfile.swift new file mode 100644 index 000000000..ad8b91062 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorFeatureProfile.swift @@ -0,0 +1,387 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An editor feature profile which can be used to disable specific features. +/// +/// An editor feature profile can be used to disable specific features of the Godot editor. When disabled, the features won't appear in the editor, which makes the editor less cluttered. This is useful in education settings to reduce confusion or when working in a team. For example, artists and level designers could use a feature profile that disables the script editor to avoid accidentally making changes to files they aren't supposed to edit. +/// +/// To manage editor feature profiles visually, use **Editor > Manage Feature Profiles...** at the top of the editor window. +/// +open class EditorFeatureProfile: RefCounted { + override open class var godotClassName: StringName { "EditorFeatureProfile" } + public enum Feature: Int64, CaseIterable, CustomDebugStringConvertible { + /// The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog. + case feature3d = 0 // FEATURE_3D + /// The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display. + case script = 1 // FEATURE_SCRIPT + /// The AssetLib tab. If this feature is disabled, the AssetLib tab won't display. + case assetLib = 2 // FEATURE_ASSET_LIB + /// Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only. + case sceneTree = 3 // FEATURE_SCENE_TREE + /// The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor. + case nodeDock = 4 // FEATURE_NODE_DOCK + /// The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible. + case filesystemDock = 5 // FEATURE_FILESYSTEM_DOCK + /// The Import dock. If this feature is disabled, the Import dock won't be visible. + case importDock = 6 // FEATURE_IMPORT_DOCK + /// The History dock. If this feature is disabled, the History dock won't be visible. + case historyDock = 7 // FEATURE_HISTORY_DOCK + /// Represents the size of the ``EditorFeatureProfile/Feature`` enum. + case max = 8 // FEATURE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .feature3d: return ".feature3d" + case .script: return ".script" + case .assetLib: return ".assetLib" + case .sceneTree: return ".sceneTree" + case .nodeDock: return ".nodeDock" + case .filesystemDock: return ".filesystemDock" + case .importDock: return ".importDock" + case .historyDock: return ".historyDock" + case .max: return ".max" + } + + } + + } + + /* Methods */ + fileprivate static var method_set_disable_class: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_class") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2524380260)! + } + + } + + }() + + /// If `disable` is `true`, disables the class specified by `className`. When disabled, the class won't appear in the Create New Node dialog. + public final func setDisableClass(className: StringName, disable: Bool) { + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_set_disable_class, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_class_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class_disabled") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the class specified by `className` is disabled. When disabled, the class won't appear in the Create New Node dialog. + public final func isClassDisabled(className: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_is_class_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_disable_class_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_class_editor") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2524380260)! + } + + } + + }() + + /// If `disable` is `true`, disables editing for the class specified by `className`. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. + public final func setDisableClassEditor(className: StringName, disable: Bool) { + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_set_disable_class_editor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_class_editor_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class_editor_disabled") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if editing for the class specified by `className` is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. + public final func isClassEditorDisabled(className: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_is_class_editor_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_disable_class_property: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_class_property") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 865197084)! + } + + } + + }() + + /// If `disable` is `true`, disables editing for `property` in the class specified by `className`. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by `className`. + public final func setDisableClassProperty(className: StringName, property: StringName, disable: Bool) { + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: disable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_set_disable_class_property, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_class_property_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class_property_disabled") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns `true` if `property` is disabled in the class specified by `className`. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by `className`. + public final func isClassPropertyDisabled(className: StringName, property: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: className.content) { pArg0 in + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_is_class_property_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_disable_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_feature") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1884871044)! + } + + } + + }() + + /// If `disable` is `true`, disables the editor feature specified in `feature`. When a feature is disabled, it will disappear from the editor entirely. + public final func setDisableFeature(_ feature: EditorFeatureProfile.Feature, disable: Bool) { + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_set_disable_feature, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_feature_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_feature_disabled") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2974403161)! + } + + } + + }() + + /// Returns `true` if the `feature` is disabled. When a feature is disabled, it will disappear from the editor entirely. + public final func isFeatureDisabled(feature: EditorFeatureProfile.Feature) -> Bool { + var _result: Bool = false + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_is_feature_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_feature_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_feature_name") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3401335809)! + } + + } + + }() + + /// Returns the specified `feature`'s human-readable name. + public final func getFeatureName(feature: EditorFeatureProfile.Feature) -> String { + let _result = GString () + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_get_feature_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_save_to_file: GDExtensionMethodBindPtr = { + let methodName = StringName("save_to_file") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the ``loadFromFile(path:)`` method. + /// + /// > Note: Feature profiles created via the user interface are saved in the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using ``EditorPaths/getConfigDir()``. + /// + public final func saveToFile(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_save_to_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_from_file: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_file") + return withUnsafePointer(to: &EditorFeatureProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the ``saveToFile(path:)`` method. + /// + /// > Note: Feature profiles created via the user interface are loaded from the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using ``EditorPaths/getConfigDir()``. + /// + public final func loadFromFile(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFeatureProfile.method_load_from_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorFileDialog.swift b/Sources/SwiftGodot/Generated/Api/EditorFileDialog.swift new file mode 100644 index 000000000..cdaaf6e97 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorFileDialog.swift @@ -0,0 +1,1287 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A modified version of ``FileDialog`` used by the editor. +/// +/// ``EditorFileDialog`` is an enhanced version of ``FileDialog`` available only to editor plugins. Additional features include list of favorited/recent files and the ability to see files as thumbnails grid instead of list. +/// +/// +/// This object emits the following signals: +/// +/// - ``fileSelected`` +/// - ``filesSelected`` +/// - ``dirSelected`` +open class EditorFileDialog: ConfirmationDialog { + override open class var godotClassName: StringName { "EditorFileDialog" } + public enum FileMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``EditorFileDialog`` can select only one file. Accepting the window will open the file. + case openFile = 0 // FILE_MODE_OPEN_FILE + /// The ``EditorFileDialog`` can select multiple files. Accepting the window will open all files. + case openFiles = 1 // FILE_MODE_OPEN_FILES + /// The ``EditorFileDialog`` can select only one directory. Accepting the window will open the directory. + case openDir = 2 // FILE_MODE_OPEN_DIR + /// The ``EditorFileDialog`` can select a file or directory. Accepting the window will open it. + case openAny = 3 // FILE_MODE_OPEN_ANY + /// The ``EditorFileDialog`` can select only one file. Accepting the window will save the file. + case saveFile = 4 // FILE_MODE_SAVE_FILE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .openFile: return ".openFile" + case .openFiles: return ".openFiles" + case .openDir: return ".openDir" + case .openAny: return ".openAny" + case .saveFile: return ".saveFile" + } + + } + + } + + public enum Access: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``EditorFileDialog`` can only view `res://` directory contents. + case resources = 0 // ACCESS_RESOURCES + /// The ``EditorFileDialog`` can only view `user://` directory contents. + case userdata = 1 // ACCESS_USERDATA + /// The ``EditorFileDialog`` can view the entire local file system. + case filesystem = 2 // ACCESS_FILESYSTEM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .resources: return ".resources" + case .userdata: return ".userdata" + case .filesystem: return ".filesystem" + } + + } + + } + + public enum DisplayMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``EditorFileDialog`` displays resources as thumbnails. + case thumbnails = 0 // DISPLAY_THUMBNAILS + /// The ``EditorFileDialog`` displays resources as a list of filenames. + case list = 1 // DISPLAY_LIST + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .thumbnails: return ".thumbnails" + case .list: return ".list" + } + + } + + } + + + /* Properties */ + + /// The location from which the user may select a file, including `res://`, `user://`, and the local file system. + final public var access: EditorFileDialog.Access { + get { + return get_access () + } + + set { + set_access (newValue) + } + + } + + /// The view format in which the ``EditorFileDialog`` displays resources to the user. + final public var displayMode: EditorFileDialog.DisplayMode { + get { + return get_display_mode () + } + + set { + set_display_mode (newValue) + } + + } + + /// The dialog's open or save mode, which affects the selection behavior. See ``EditorFileDialog/FileMode``. + final public var fileMode: EditorFileDialog.FileMode { + get { + return get_file_mode () + } + + set { + set_file_mode (newValue) + } + + } + + /// The currently occupied directory. + final public var currentDir: String { + get { + return get_current_dir () + } + + set { + set_current_dir (newValue) + } + + } + + /// The currently selected file. + final public var currentFile: String { + get { + return get_current_file () + } + + set { + set_current_file (newValue) + } + + } + + /// The file system path in the address bar. + final public var currentPath: String { + get { + return get_current_path () + } + + set { + set_current_path (newValue) + } + + } + + /// The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))`. Multiple file types can also be specified in a single filter. `"*.png, *.jpg, *.jpeg ; Supported Images"` will show both PNG and JPEG files when selected. + final public var filters: PackedStringArray { + get { + return get_filters () + } + + set { + set_filters (newValue) + } + + } + + /// The number of additional ``OptionButton``s and ``CheckBox``es in the dialog. + final public var optionCount: Int32 { + get { + return get_option_count () + } + + set { + set_option_count (newValue) + } + + } + + /// If `true`, hidden files and directories will be visible in the ``EditorFileDialog``. This property is synchronized with ``EditorSettings/filesystem/fileDialog/showHiddenFiles``. + final public var showHiddenFiles: Bool { + get { + return is_showing_hidden_files () + } + + set { + set_show_hidden_files (newValue) + } + + } + + /// If `true`, the ``EditorFileDialog`` will not warn the user before overwriting files. + final public var disableOverwriteWarning: Bool { + get { + return is_overwrite_warning_disabled () + } + + set { + set_disable_overwrite_warning (newValue) + } + + } + + /* Methods */ + fileprivate static var method_clear_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_filters") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all filters except for "All Files (*)". + public final func clearFilters() { + gi.object_method_bind_ptrcall(EditorFileDialog.method_clear_filters, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("add_filter") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3388804757)! + } + + } + + }() + + /// Adds a comma-delimited file name `filter` option to the ``EditorFileDialog`` with an optional `description`, which restricts what files can be picked. + /// + /// A `filter` should be of the form `"filename.extension"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed. + /// + /// For example, a `filter` of `"*.tscn, *.scn"` and a `description` of `"Scenes"` results in filter text "Scenes (*.tscn, *.scn)". + /// + public final func addFilter(_ filter: String, description: String = "") { + let filter = GString(filter) + withUnsafePointer(to: filter.content) { pArg0 in + let description = GString(description) + withUnsafePointer(to: description.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_add_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filters") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filters(_ filters: PackedStringArray) { + withUnsafePointer(to: filters.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_filters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filters") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filters() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_filters, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_option_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_name") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func getOptionName(option: Int32) -> String { + let _result = GString () + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_option_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_option_values: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_values") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 647634434)! + } + + } + + }() + + /// Returns an array of values of the ``OptionButton`` with index `option`. + public final func getOptionValues(option: Int32) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_option_values, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_option_default: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_default") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the default value index of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func getOptionDefault(option: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_option_default, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_option_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_name") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the name of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func setOptionName(option: Int32, name: String) { + withUnsafePointer(to: option) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_option_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_values: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_values") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3353661094)! + } + + } + + }() + + /// Sets the option values of the ``OptionButton`` with index `option`. + public final func setOptionValues(option: Int32, values: PackedStringArray) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: values.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_option_values, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_default: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_default") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the default value index of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func setOptionDefault(option: Int32, defaultValueIndex: Int32) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: defaultValueIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_option_default, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_count") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_option_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_option_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_option_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_count") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_option_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_option_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_option: GDExtensionMethodBindPtr = { + let methodName = StringName("add_option") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 149592325)! + } + + } + + }() + + /// Adds an additional ``OptionButton`` to the file dialog. If `values` is empty, a ``CheckBox`` is added instead. + /// + /// `defaultValueIndex` should be an index of the value in the `values`. If `values` is empty it should be either `1` (checked), or `0` (unchecked). + /// + public final func addOption(name: String, values: PackedStringArray, defaultValueIndex: Int32) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: values.content) { pArg1 in + withUnsafePointer(to: defaultValueIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_add_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_selected_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_options") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a ``GDictionary`` with the selected values of the additional ``OptionButton``s and/or ``CheckBox``es. ``GDictionary`` keys are names and values are selected value indices. + public final func getSelectedOptions() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_selected_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_dir") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_dir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_current_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_current_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_file") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_file() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_current_file, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_current_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_path") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_current_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_current_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_dir") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_dir(_ dir: String) { + let dir = GString(dir) + withUnsafePointer(to: dir.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_current_dir, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_current_file: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_file") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_file(_ file: String) { + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_current_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_current_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_path") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_path(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_current_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_file_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_file_mode") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 274150415)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_file_mode(_ mode: EditorFileDialog.FileMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_file_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_file_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_mode") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2681044145)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_file_mode() -> EditorFileDialog.FileMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_file_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return EditorFileDialog.FileMode (rawValue: _result)! + } + + fileprivate static var method_get_vbox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vbox") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 915758477)! + } + + } + + }() + + /// Returns the ``VBoxContainer`` used to display the file system. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getVbox() -> VBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_vbox, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_line_edit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_edit") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4071694264)! + } + + } + + }() + + /// Returns the LineEdit for the selected file. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getLineEdit() -> LineEdit? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_line_edit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_access: GDExtensionMethodBindPtr = { + let methodName = StringName("set_access") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3882893764)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_access(_ access: EditorFileDialog.Access) { + withUnsafePointer(to: access.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_access, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_access: GDExtensionMethodBindPtr = { + let methodName = StringName("get_access") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 778734016)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_access() -> EditorFileDialog.Access { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_access, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return EditorFileDialog.Access (rawValue: _result)! + } + + fileprivate static var method_set_show_hidden_files: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_hidden_files") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_hidden_files(_ show: Bool) { + withUnsafePointer(to: show) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_show_hidden_files, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_hidden_files: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_hidden_files") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_hidden_files() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorFileDialog.method_is_showing_hidden_files, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_display_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_display_mode") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3049004050)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_display_mode(_ mode: EditorFileDialog.DisplayMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_display_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_display_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_mode") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3517174669)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_display_mode() -> EditorFileDialog.DisplayMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(EditorFileDialog.method_get_display_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return EditorFileDialog.DisplayMode (rawValue: _result)! + } + + fileprivate static var method_set_disable_overwrite_warning: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_overwrite_warning") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disable_overwrite_warning(_ disable: Bool) { + withUnsafePointer(to: disable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_set_disable_overwrite_warning, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_overwrite_warning_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_overwrite_warning_disabled") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_overwrite_warning_disabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorFileDialog.method_is_overwrite_warning_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_side_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("add_side_menu") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402368861)! + } + + } + + }() + + /// Adds the given `menu` to the side of the file dialog with the given `title` text on top. Only one side menu is allowed. + public final func addSideMenu(_ menu: Control?, title: String = "") { + withUnsafePointer(to: menu?.handle) { pArg0 in + let title = GString(title) + withUnsafePointer(to: title.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorFileDialog.method_add_side_menu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_popup_file_dialog: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_file_dialog") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Shows the ``EditorFileDialog`` at the default size and position for file dialogs in the editor, and selects the file name if there is a current file. + public final func popupFileDialog() { + gi.object_method_bind_ptrcall(EditorFileDialog.method_popup_file_dialog, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_invalidate: GDExtensionMethodBindPtr = { + let methodName = StringName("invalidate") + return withUnsafePointer(to: &EditorFileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Notify the ``EditorFileDialog`` that its view of the data is no longer accurate. Updates the view contents on next view update. + public final func invalidate() { + gi.object_method_bind_ptrcall(EditorFileDialog.method_invalidate, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ path: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a file is selected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.fileSelected.connect { path in + /// print ("caught signal") + /// } + /// ``` + public var fileSelected: Signal1 { Signal1 (target: self, signalName: "file_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ paths: PackedStringArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when multiple files are selected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.filesSelected.connect { paths in + /// print ("caught signal") + /// } + /// ``` + public var filesSelected: Signal2 { Signal2 (target: self, signalName: "files_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ dir: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a directory is selected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.dirSelected.connect { dir in + /// print ("caught signal") + /// } + /// ``` + public var dirSelected: Signal3 { Signal3 (target: self, signalName: "dir_selected") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorFileSystem.swift b/Sources/SwiftGodot/Generated/Api/EditorFileSystem.swift new file mode 100644 index 000000000..6c5e06e41 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorFileSystem.swift @@ -0,0 +1,521 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Resource filesystem, as the editor sees it. +/// +/// This object holds information of all resources in the filesystem, their types, etc. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getResourceFilesystem()``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``filesystemChanged`` +/// - ``scriptClassesUpdated`` +/// - ``sourcesChanged`` +/// - ``resourcesReimported`` +/// - ``resourcesReload`` +open class EditorFileSystem: Node { + override open class var godotClassName: StringName { "EditorFileSystem" } + /* Methods */ + fileprivate static var method_get_filesystem: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filesystem") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 842323275)! + } + + } + + }() + + /// Gets the root directory object. + public final func getFilesystem() -> EditorFileSystemDirectory? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorFileSystem.method_get_filesystem, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_scanning: GDExtensionMethodBindPtr = { + let methodName = StringName("is_scanning") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the filesystem is being scanned. + public final func isScanning() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorFileSystem.method_is_scanning, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_scanning_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scanning_progress") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the scan progress for 0 to 1 if the FS is being scanned. + public final func getScanningProgress() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(EditorFileSystem.method_get_scanning_progress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_scan: GDExtensionMethodBindPtr = { + let methodName = StringName("scan") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Scan the filesystem for changes. + public final func scan() { + gi.object_method_bind_ptrcall(EditorFileSystem.method_scan, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_scan_sources: GDExtensionMethodBindPtr = { + let methodName = StringName("scan_sources") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Check if the source of any imported resource changed. + public final func scanSources() { + gi.object_method_bind_ptrcall(EditorFileSystem.method_scan_sources, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_update_file: GDExtensionMethodBindPtr = { + let methodName = StringName("update_file") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. + /// + /// This will not import the file. To reimport, call ``reimportFiles(_:)`` or ``scan()`` methods. + /// + public final func updateFile(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystem.method_update_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filesystem_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filesystem_path") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3188521125)! + } + + } + + }() + + /// Returns a view into the filesystem at `path`. + public final func getFilesystemPath(_ path: String) -> EditorFileSystemDirectory? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystem.method_get_filesystem_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_file_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_type") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3135753539)! + } + + } + + }() + + /// Returns the resource type of the file, given the full path. This returns a string such as `"Resource"` or `"GDScript"`, _not_ a file extension such as `".gd"`. + public final func getFileType(path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystem.method_get_file_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_reimport_files: GDExtensionMethodBindPtr = { + let methodName = StringName("reimport_files") + return withUnsafePointer(to: &EditorFileSystem.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + /// Reimports a set of files. Call this if these files or their `.import` files were directly edited by script or an external program. + /// + /// If the file type changed or the file was newly created, use ``updateFile(path:)`` or ``scan()``. + /// + /// > Note: This function blocks until the import is finished. However, the main loop iteration, including timers and ``Node/_process(delta:)``, will occur during the import process due to progress bar updates. Avoid calls to ``reimportFiles(_:)`` or ``scan()`` while an import is in progress. + /// + public final func reimportFiles(_ files: PackedStringArray) { + withUnsafePointer(to: files.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystem.method_reimport_files, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted if the filesystem changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.filesystemChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var filesystemChanged: SimpleSignal { SimpleSignal (target: self, signalName: "filesystem_changed") } + + /// Emitted when the list of global script classes gets updated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.scriptClassesUpdated.connect { + /// print ("caught signal") + /// } + /// ``` + public var scriptClassesUpdated: SimpleSignal { SimpleSignal (target: self, signalName: "script_classes_updated") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ exist: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Bool (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted if the source of any imported file changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sourcesChanged.connect { exist in + /// print ("caught signal") + /// } + /// ``` + public var sourcesChanged: Signal1 { Signal1 (target: self, signalName: "sources_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resources: PackedStringArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted if a resource is reimported. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourcesReimported.connect { resources in + /// print ("caught signal") + /// } + /// ``` + public var resourcesReimported: Signal2 { Signal2 (target: self, signalName: "resources_reimported") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resources: PackedStringArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted if at least one resource is reloaded when the filesystem is scanned. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourcesReload.connect { resources in + /// print ("caught signal") + /// } + /// ``` + public var resourcesReload: Signal3 { Signal3 (target: self, signalName: "resources_reload") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorFileSystemDirectory.swift b/Sources/SwiftGodot/Generated/Api/EditorFileSystemDirectory.swift new file mode 100644 index 000000000..5549d8dd8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorFileSystemDirectory.swift @@ -0,0 +1,363 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A directory for the resource filesystem. +/// +/// A more generalized, low-level variation of the directory concept. +open class EditorFileSystemDirectory: Object { + override open class var godotClassName: StringName { "EditorFileSystemDirectory" } + /* Methods */ + fileprivate static var method_get_subdir_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdir_count") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of subdirectories in this directory. + public final func getSubdirCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_subdir_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_subdir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdir") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2330964164)! + } + + } + + }() + + /// Returns the subdirectory at index `idx`. + public final func getSubdir(idx: Int32) -> EditorFileSystemDirectory? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_subdir, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_file_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_count") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of files in this directory. + public final func getFileCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the file at index `idx`. + public final func getFile(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_file_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_path") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the path to the file at index `idx`. + public final func getFilePath(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_file_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_type") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the resource type of the file at index `idx`. This returns a string such as `"Resource"` or `"GDScript"`, _not_ a file extension such as `".gd"`. + public final func getFileType(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_file_script_class_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_script_class_name") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. + public final func getFileScriptClassName(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_script_class_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_file_script_class_extends: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_script_class_extends") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the base class of the script class defined in the file at index `idx`. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. + public final func getFileScriptClassExtends(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_script_class_extends, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_file_import_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_import_is_valid") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the file at index `idx` imported properly. + public final func getFileImportIsValid(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_file_import_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns the name of this directory. + public final func getName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the path to this directory. + public final func getPath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 842323275)! + } + + } + + }() + + /// Returns the parent directory for this directory or `null` if called on a directory at `res://` or `user://`. + public final func getParent() -> EditorFileSystemDirectory? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_get_parent, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_find_file_index: GDExtensionMethodBindPtr = { + let methodName = StringName("find_file_index") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the index of the file with name `name` or `-1` if not found. + public final func findFileIndex(name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_find_file_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_find_dir_index: GDExtensionMethodBindPtr = { + let methodName = StringName("find_dir_index") + return withUnsafePointer(to: &EditorFileSystemDirectory.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the index of the directory with name `name` or `-1` if not found. + public final func findDirIndex(name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorFileSystemDirectory.method_find_dir_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorFileSystemImportFormatSupportQuery.swift b/Sources/SwiftGodot/Generated/Api/EditorFileSystemImportFormatSupportQuery.swift new file mode 100644 index 000000000..8ad4a965e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorFileSystemImportFormatSupportQuery.swift @@ -0,0 +1,84 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Used to query and configure import format support. +/// +/// This class is used to query and configure a certain import format. It is used in conjunction with asset format import plugins. +open class EditorFileSystemImportFormatSupportQuery: RefCounted { + override open class var godotClassName: StringName { "EditorFileSystemImportFormatSupportQuery" } + /* Methods */ + /// Return whether this importer is active. + @_documentation(visibility: public) + open func _isActive() -> Bool { + return false + } + + /// Return the file extensions supported. + @_documentation(visibility: public) + open func _getFileExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// Query support. Return false if import must not continue. + @_documentation(visibility: public) + open func _query() -> Bool { + return false + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_file_extensions": + return _EditorFileSystemImportFormatSupportQuery_proxy_get_file_extensions + case "_is_active": + return _EditorFileSystemImportFormatSupportQuery_proxy_is_active + case "_query": + return _EditorFileSystemImportFormatSupportQuery_proxy_query + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorFileSystemImportFormatSupportQuery_proxy_get_file_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getFileExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorFileSystemImportFormatSupportQuery_proxy_is_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isActive () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorFileSystemImportFormatSupportQuery_proxy_query (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._query () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorImportPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorImportPlugin.swift new file mode 100644 index 000000000..1628f7011 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorImportPlugin.swift @@ -0,0 +1,297 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type. +/// +/// ``EditorImportPlugin``s provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. +/// +/// EditorImportPlugins work by associating with specific file extensions and a resource type. See ``_getRecognizedExtensions()`` and ``_getResourceType()``. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the `.godot/imported` directory (see ``ProjectSettings/application/config/useHiddenProjectDataDirectory``). +/// +/// Below is an example EditorImportPlugin that imports a ``Mesh`` from a file with the extension ".special" or ".spec": +/// +/// To use ``EditorImportPlugin``, register it using the ``EditorPlugin/addImportPlugin(importer:firstPriority:)`` method first. +/// +open class EditorImportPlugin: ResourceImporter { + override open class var godotClassName: StringName { "EditorImportPlugin" } + /* Methods */ + /// Gets the unique name of the importer. + @_documentation(visibility: public) + open func _getImporterName() -> String { + return String () + } + + /// Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". + @_documentation(visibility: public) + open func _getVisibleName() -> String { + return String () + } + + /// Gets the number of initial presets defined by the plugin. Use ``_getImportOptions(path:presetIndex:)`` to get the default options for the preset and ``_getPresetName(presetIndex:)`` to get the name of the preset. + @_documentation(visibility: public) + open func _getPresetCount() -> Int32 { + return 0 + } + + /// Gets the name of the options preset at this index. + @_documentation(visibility: public) + open func _getPresetName(presetIndex: Int32) -> String { + return String () + } + + /// Gets the list of file extensions to associate with this loader (case-insensitive). e.g. `["obj"]`. + @_documentation(visibility: public) + open func _getRecognizedExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: `name`, `default_value`, `property_hint` (optional), `hint_string` (optional), `usage` (optional). + @_documentation(visibility: public) + open func _getImportOptions(path: String, presetIndex: Int32) -> VariantCollection { + return VariantCollection() + } + + /// Gets the extension used to save this resource in the `.godot/imported` directory (see ``ProjectSettings/application/config/useHiddenProjectDataDirectory``). + @_documentation(visibility: public) + open func _getSaveExtension() -> String { + return String () + } + + /// Gets the Godot resource type associated with this loader. e.g. `"Mesh"` or `"Animation"`. + @_documentation(visibility: public) + open func _getResourceType() -> String { + return String () + } + + /// Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is `1.0`. + @_documentation(visibility: public) + open func _getPriority() -> Double { + return 0.0 + } + + /// Gets the order of this importer to be run when importing resources. Importers with _lower_ import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is `0` unless overridden by a specific importer. See ``ResourceImporter.ImportOrder`` for some predefined values. + @_documentation(visibility: public) + open func _getImportOrder() -> Int32 { + return 0 + } + + /// This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: + /// + /// Returns `true` to make all options always visible. + /// + @_documentation(visibility: public) + open func _getOptionVisibility(path: String, optionName: StringName, options: GDictionary) -> Bool { + return false + } + + /// Imports `sourceFile` into `savePath` with the import `options` specified. The `platformVariants` and `genFiles` arrays will be modified by this function. + /// + /// This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. + /// + @_documentation(visibility: public) + open func _import(sourceFile: String, savePath: String, options: GDictionary, platformVariants: VariantCollection, genFiles: VariantCollection) -> GodotError { + return .ok + } + + /// Tells whether this importer can be run in parallel on threads, or, on the contrary, it's only safe for the editor to call it from the main thread, for one file at a time. + /// + /// If this method is not overridden, it will return `true` by default (i.e., safe for parallel importing). + /// + @_documentation(visibility: public) + open func _canImportThreaded() -> Bool { + return false + } + + fileprivate static var method_append_import_external_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("append_import_external_resource") + return withUnsafePointer(to: &EditorImportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 320493106)! + } + + } + + }() + + /// This function can only be called during the ``_import(sourceFile:savePath:options:platformVariants:genFiles:)`` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the `customOptions`. Additionally, in cases where multiple importers can handle a file, the `customImporter` ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. `generatorParameters` defines optional extra metadata which will be stored as [code skip-lint]generator_parameters` in the `remap` section of the `.import` file, for example to store a md5 hash of the source data. + public final func appendImportExternalResource(path: String, customOptions: GDictionary = GDictionary (), customImporter: String = "", generatorParameters: Variant?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: customOptions.content) { pArg1 in + let customImporter = GString(customImporter) + withUnsafePointer(to: customImporter.content) { pArg2 in + withUnsafePointer(to: generatorParameters.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorImportPlugin.method_append_import_external_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_can_import_threaded": + return _EditorImportPlugin_proxy_can_import_threaded + case "_get_import_options": + return _EditorImportPlugin_proxy_get_import_options + case "_get_import_order": + return _EditorImportPlugin_proxy_get_import_order + case "_get_importer_name": + return _EditorImportPlugin_proxy_get_importer_name + case "_get_option_visibility": + return _EditorImportPlugin_proxy_get_option_visibility + case "_get_preset_count": + return _EditorImportPlugin_proxy_get_preset_count + case "_get_preset_name": + return _EditorImportPlugin_proxy_get_preset_name + case "_get_priority": + return _EditorImportPlugin_proxy_get_priority + case "_get_recognized_extensions": + return _EditorImportPlugin_proxy_get_recognized_extensions + case "_get_resource_type": + return _EditorImportPlugin_proxy_get_resource_type + case "_get_save_extension": + return _EditorImportPlugin_proxy_get_save_extension + case "_get_visible_name": + return _EditorImportPlugin_proxy_get_visible_name + case "_import": + return _EditorImportPlugin_proxy_import + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorImportPlugin_proxy_can_import_threaded (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canImportThreaded () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorImportPlugin_proxy_get_import_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getImportOptions (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", presetIndex: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorImportPlugin_proxy_get_import_order (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getImportOrder () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _EditorImportPlugin_proxy_get_importer_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getImporterName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorImportPlugin_proxy_get_option_visibility (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getOptionVisibility (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", optionName: StringName (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), options: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorImportPlugin_proxy_get_preset_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPresetCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _EditorImportPlugin_proxy_get_preset_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getPresetName (presetIndex: args [0]!.assumingMemoryBound (to: Int32.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorImportPlugin_proxy_get_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPriority () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _EditorImportPlugin_proxy_get_recognized_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRecognizedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorImportPlugin_proxy_get_resource_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getResourceType ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorImportPlugin_proxy_get_save_extension (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getSaveExtension ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorImportPlugin_proxy_get_visible_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getVisibleName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorImportPlugin_proxy_import (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._import (sourceFile: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", savePath: GString.stringFromGStringPtr (ptr: args [1]!) ?? "", options: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), platformVariants: args [3]!.assumingMemoryBound (to: VariantCollection.self).pointee, genFiles: args [4]!.assumingMemoryBound (to: VariantCollection.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorInspector.swift b/Sources/SwiftGodot/Generated/Api/EditorInspector.swift new file mode 100644 index 000000000..599b2dec0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorInspector.swift @@ -0,0 +1,697 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control used to edit properties of an object. +/// +/// This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the ``EditorInspector`` used in the editor's Inspector dock, use ``EditorInterface/getInspector()``. +/// +/// ``EditorInspector`` will show properties in the same order as the array returned by ``Object/getPropertyList()``. +/// +/// If a property's name is path-like (i.e. if it contains forward slashes), ``EditorInspector`` will create nested sections for "directories" along the path. For example, if a property is named `highlighting/gdscript/node_path_color`, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. +/// +/// If a property has ``PropertyUsageFlags/propertyUsageGroup`` usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. ``EditorInspector`` will create a top-level section for each group. For example, if a property with group usage is named `Collide With` and its hint string is `collide_with_`, a subsequent `collide_with_area` property will be shown as "Area" inside the "Collide With" section. There is also a special case: when the hint string contains the name of a property, that property is grouped too. This is mainly to help grouping properties like `font`, `font_color` and `font_size` (using the hint string `font_`). +/// +/// If a property has ``PropertyUsageFlags/propertyUsageSubgroup`` usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. +/// +/// > Note: Unlike sections created from path-like property names, ``EditorInspector`` won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``propertySelected`` +/// - ``propertyKeyed`` +/// - ``propertyDeleted`` +/// - ``resourceSelected`` +/// - ``objectIdSelected`` +/// - ``propertyEdited`` +/// - ``propertyToggled`` +/// - ``editedObjectChanged`` +/// - ``restartRequested`` +open class EditorInspector: ScrollContainer { + override open class var godotClassName: StringName { "EditorInspector" } + /* Methods */ + fileprivate static var method_get_selected_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_path") + return withUnsafePointer(to: &EditorInspector.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Gets the path of the currently selected property. + public final func getSelectedPath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorInspector.method_get_selected_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_edited_object: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_object") + return withUnsafePointer(to: &EditorInspector.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2050059866)! + } + + } + + }() + + /// Returns the object currently selected in this inspector. + public final func getEditedObject() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInspector.method_get_edited_object, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property is selected in the inspector. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertySelected.connect { property in + /// print ("caught signal") + /// } + /// ``` + public var propertySelected: Signal1 { Signal1 (target: self, signalName: "property_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: String, _ value: Variant?, _ advance: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = args [1] + let arg_2 = Bool (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyKeyed.connect { property, value, advance in + /// print ("caught signal") + /// } + /// ``` + public var propertyKeyed: Signal2 { Signal2 (target: self, signalName: "property_keyed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property is removed from the inspector. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyDeleted.connect { property in + /// print ("caught signal") + /// } + /// ``` + public var propertyDeleted: Signal3 { Signal3 (target: self, signalName: "property_deleted") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resource: Resource, _ path: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Resource ?? Resource (nativeHandle: ptr_0!) + let arg_1 = GString (args [1]!)!.description + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a resource is selected in the inspector. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceSelected.connect { resource, path in + /// print ("caught signal") + /// } + /// ``` + public var resourceSelected: Signal4 { Signal4 (target: self, signalName: "resource_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the Edit button of an ``Object`` has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.objectIdSelected.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var objectIdSelected: Signal5 { Signal5 (target: self, signalName: "object_id_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property is edited in the inspector. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyEdited.connect { property in + /// print ("caught signal") + /// } + /// ``` + public var propertyEdited: Signal6 { Signal6 (target: self, signalName: "property_edited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: String, _ checked: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a boolean property is toggled in the inspector. + /// + /// > Note: This signal is never emitted if the internal `autoclear` property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyToggled.connect { property, checked in + /// print ("caught signal") + /// } + /// ``` + public var propertyToggled: Signal7 { Signal7 (target: self, signalName: "property_toggled") } + + /// Emitted when the object being edited by the inspector has changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.editedObjectChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var editedObjectChanged: SimpleSignal { SimpleSignal (target: self, signalName: "edited_object_changed") } + + /// Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.restartRequested.connect { + /// print ("caught signal") + /// } + /// ``` + public var restartRequested: SimpleSignal { SimpleSignal (target: self, signalName: "restart_requested") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorInspectorPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorInspectorPlugin.swift new file mode 100644 index 000000000..743937431 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorInspectorPlugin.swift @@ -0,0 +1,252 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plugin for adding custom property editors on the inspector. +/// +/// ``EditorInspectorPlugin`` allows adding custom property editors to ``EditorInspector``. +/// +/// When an object is edited, the ``_canHandle(object:)`` function is called and must return `true` if the object type is supported. +/// +/// If supported, the function ``_parseBegin(object:)`` will be called, allowing to place custom controls at the beginning of the class. +/// +/// Subsequently, the ``_parseCategory(object:category:)`` and ``_parseProperty(object:type:name:hintType:hintString:usageFlags:wide:)`` are called for every category and property. They offer the ability to add custom controls to the inspector too. +/// +/// Finally, ``_parseEnd(object:)`` will be called. +/// +/// On each of these calls, the "add" functions can be called. +/// +/// To use ``EditorInspectorPlugin``, register it using the ``EditorPlugin/addInspectorPlugin(_:)`` method first. +/// +open class EditorInspectorPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorInspectorPlugin" } + /* Methods */ + /// Returns `true` if this object can be handled by this plugin. + @_documentation(visibility: public) + open func _canHandle(object: Object?) -> Bool { + return false + } + + /// Called to allow adding controls at the beginning of the property list for `object`. + @_documentation(visibility: public) + open func _parseBegin(object: Object?) { + } + + /// Called to allow adding controls at the beginning of a category in the property list for `object`. + @_documentation(visibility: public) + open func _parseCategory(object: Object?, category: String) { + } + + /// Called to allow adding controls at the beginning of a group or a sub-group in the property list for `object`. + @_documentation(visibility: public) + open func _parseGroup(object: Object?, group: String) { + } + + /// Called to allow adding property-specific editors to the property list for `object`. The added editor control must extend ``EditorProperty``. Returning `true` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. + @_documentation(visibility: public) + open func _parseProperty(object: Object?, type: Variant.GType, name: String, hintType: PropertyHint, hintString: String, usageFlags: PropertyUsageFlags, wide: Bool) -> Bool { + return false + } + + /// Called to allow adding controls at the end of the property list for `object`. + @_documentation(visibility: public) + open func _parseEnd(object: Object?) { + } + + fileprivate static var method_add_custom_control: GDExtensionMethodBindPtr = { + let methodName = StringName("add_custom_control") + return withUnsafePointer(to: &EditorInspectorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Adds a custom control, which is not necessarily a property editor. + public final func addCustomControl(_ control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInspectorPlugin.method_add_custom_control, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_property_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("add_property_editor") + return withUnsafePointer(to: &EditorInspectorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2042698479)! + } + + } + + }() + + /// Adds a property editor for an individual property. The `editor` control must extend ``EditorProperty``. + /// + /// There can be multiple property editors for a property. If `addToEnd` is `true`, this newly added editor will be displayed after all the other editors of the property whose `addToEnd` is `false`. For example, the editor uses this parameter to add an "Edit Region" button for ``Sprite2D/regionRect`` below the regular ``Rect2`` editor. + /// + /// `label` can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead. + /// + public final func addPropertyEditor(property: String, editor: Control?, addToEnd: Bool = false, label: String = "") { + let property = GString(property) + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: editor?.handle) { pArg1 in + withUnsafePointer(to: addToEnd) { pArg2 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorInspectorPlugin.method_add_property_editor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_property_editor_for_multiple_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("add_property_editor_for_multiple_properties") + return withUnsafePointer(to: &EditorInspectorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 788598683)! + } + + } + + }() + + /// Adds an editor that allows modifying multiple properties. The `editor` control must extend ``EditorProperty``. + public final func addPropertyEditorForMultipleProperties(label: String, properties: PackedStringArray, editor: Control?) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: properties.content) { pArg1 in + withUnsafePointer(to: editor?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorInspectorPlugin.method_add_property_editor_for_multiple_properties, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_can_handle": + return _EditorInspectorPlugin_proxy_can_handle + case "_parse_begin": + return _EditorInspectorPlugin_proxy_parse_begin + case "_parse_category": + return _EditorInspectorPlugin_proxy_parse_category + case "_parse_end": + return _EditorInspectorPlugin_proxy_parse_end + case "_parse_group": + return _EditorInspectorPlugin_proxy_parse_group + case "_parse_property": + return _EditorInspectorPlugin_proxy_parse_property + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorInspectorPlugin_proxy_can_handle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._canHandle (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorInspectorPlugin_proxy_parse_begin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._parseBegin (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0)) +} + +func _EditorInspectorPlugin_proxy_parse_category (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._parseCategory (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), category: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") +} + +func _EditorInspectorPlugin_proxy_parse_end (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._parseEnd (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0)) +} + +func _EditorInspectorPlugin_proxy_parse_group (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._parseGroup (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), group: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") +} + +func _EditorInspectorPlugin_proxy_parse_property (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._parseProperty (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), type: args [1]!.assumingMemoryBound (to: Variant.GType.self).pointee, name: GString.stringFromGStringPtr (ptr: args [2]!) ?? "", hintType: args [3]!.assumingMemoryBound (to: PropertyHint.self).pointee, hintString: GString.stringFromGStringPtr (ptr: args [4]!) ?? "", usageFlags: args [5]!.assumingMemoryBound (to: PropertyUsageFlags.self).pointee, wide: args [6]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorInterface.swift b/Sources/SwiftGodot/Generated/Api/EditorInterface.swift new file mode 100644 index 000000000..898b10b74 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorInterface.swift @@ -0,0 +1,1365 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's interface. +/// +/// ``EditorInterface`` gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to ``EditorSettings``, ``EditorFileSystem``, ``EditorResourcePreview``, ``ScriptEditor``, the editor viewport, and information about scenes. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton directly by its name. +/// +open class EditorInterface: Object { + /// The shared instance of this class + public static var shared: EditorInterface = { + return withUnsafePointer (to: &EditorInterface.godotClassName.content) { ptr in + EditorInterface (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "EditorInterface" } + + /* Properties */ + + /// If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view. + final public var distractionFreeMode: Bool { + get { + return is_distraction_free_mode_enabled () + } + + set { + set_distraction_free_mode (newValue) + } + + } + + /// If `true`, the Movie Maker mode is enabled in the editor. See ``MovieWriter`` for more information. + final public var movieMakerEnabled: Bool { + get { + return is_movie_maker_enabled () + } + + set { + set_movie_maker_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_restart_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("restart_editor") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3216645846)! + } + + } + + }() + + /// Restarts the editor. This closes the editor and then opens the same project. If `save` is `true`, the project will be saved before restarting. + public final func restartEditor(save: Bool = true) { + withUnsafePointer(to: save) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_restart_editor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_command_palette: GDExtensionMethodBindPtr = { + let methodName = StringName("get_command_palette") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2471163807)! + } + + } + + }() + + /// Returns the editor's ``EditorCommandPalette`` instance. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getCommandPalette() -> EditorCommandPalette? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_command_palette, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_resource_filesystem: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resource_filesystem") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 780151678)! + } + + } + + }() + + /// Returns the editor's ``EditorFileSystem`` instance. + public final func getResourceFilesystem() -> EditorFileSystem? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_resource_filesystem, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_paths") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1595760068)! + } + + } + + }() + + /// Returns the ``EditorPaths`` singleton. + public final func getEditorPaths() -> EditorPaths? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_paths, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_resource_previewer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resource_previewer") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 943486957)! + } + + } + + }() + + /// Returns the editor's ``EditorResourcePreview`` instance. + public final func getResourcePreviewer() -> EditorResourcePreview? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_resource_previewer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selection") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2690272531)! + } + + } + + }() + + /// Returns the editor's ``EditorSelection`` instance. + public final func getSelection() -> EditorSelection? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_settings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_settings") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4086932459)! + } + + } + + }() + + /// Returns the editor's ``EditorSettings`` instance. + public final func getEditorSettings() -> EditorSettings? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_settings, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_make_mesh_previews: GDExtensionMethodBindPtr = { + let methodName = StringName("make_mesh_previews") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 878078554)! + } + + } + + }() + + /// Returns mesh previews rendered at the given size as an ``GArray`` of ``Texture2D``s. + public final func makeMeshPreviews(meshes: ObjectCollection, previewSize: Int32) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: meshes.array.content) { pArg0 in + withUnsafePointer(to: previewSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_make_mesh_previews, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_plugin_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_plugin_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Sets the enabled status of a plugin. The plugin name is the same as its directory name. + public final func setPluginEnabled(plugin: String, enabled: Bool) { + let plugin = GString(plugin) + withUnsafePointer(to: plugin.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_set_plugin_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_plugin_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_plugin_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the specified `plugin` is enabled. The plugin name is the same as its directory name. + public final func isPluginEnabled(plugin: String) -> Bool { + var _result: Bool = false + let plugin = GString(plugin) + withUnsafePointer(to: plugin.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_is_plugin_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_editor_theme: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_theme") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3846893731)! + } + + } + + }() + + /// Returns the editor's ``Theme``. + /// + /// > Note: When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the `get_theme_*` methods. + /// + public final func getEditorTheme() -> Theme? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_theme, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_base_control: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_control") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783021301)! + } + + } + + }() + + /// Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. + /// + /// > Warning: Removing and freeing this node will render the editor useless and may cause a crash. + /// + public final func getBaseControl() -> Control? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_base_control, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_main_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_main_screen") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706218421)! + } + + } + + }() + + /// Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement ``EditorPlugin/_hasMainScreen()``. + /// + /// > Note: This node is a ``VBoxContainer``, which means that if you add a ``Control`` child to it, you need to set the child's ``Control/sizeFlagsVertical`` to ``Control/SizeFlags/expandFill`` to make it use the full available space. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getEditorMainScreen() -> VBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_main_screen, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_script_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_editor") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 90868003)! + } + + } + + }() + + /// Returns the editor's ``ScriptEditor`` instance. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getScriptEditor() -> ScriptEditor? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_script_editor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_viewport_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_viewport_2d") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3750751911)! + } + + } + + }() + + /// Returns the 2D editor ``SubViewport``. It does not have a camera. Instead, the view transforms are done directly and can be accessed with ``Viewport/globalCanvasTransform``. + public final func getEditorViewport2d() -> SubViewport? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_viewport_2d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_viewport_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_viewport_3d") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1970834490)! + } + + } + + }() + + /// Returns the specified 3D editor ``SubViewport``, from `0` to `3`. The viewport can be used to access the active editor cameras with ``Viewport/getCamera3d()``. + public final func getEditorViewport3d(idx: Int32 = 0) -> SubViewport? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_viewport_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_main_screen_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_main_screen_editor") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the editor's current main screen to the one specified in `name`. `name` must match the title of the tab in question exactly (e.g. `2D`, `3D`, [code skip-lint]Script`, or `AssetLib` for default tabs). + public final func setMainScreenEditor(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_set_main_screen_editor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_distraction_free_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distraction_free_mode") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distraction_free_mode(_ enter: Bool) { + withUnsafePointer(to: enter) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_set_distraction_free_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_distraction_free_mode_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_distraction_free_mode_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_distraction_free_mode_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorInterface.method_is_distraction_free_mode_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_multi_window_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_multi_window_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if multiple window support is enabled in the editor. Multiple window support is enabled if _all_ of these statements are true: + /// + /// - ``EditorSettings/interface/multiWindow/enable`` is `true`. + /// + /// - ``EditorSettings/interface/editor/singleWindowMode`` is `false`. + /// + /// - ``Viewport/guiEmbedSubwindows`` is `false`. This is forced to `true` on platforms that don't support multiple windows such as Web, or when the `--single-window` command line argument is used. + /// + public final func isMultiWindowEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorInterface.method_is_multi_window_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_editor_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_scale") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the actual scale of the editor UI (`1.0` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. + /// + /// > Note: This value is set via the `interface/editor/display_scale` and `interface/editor/custom_display_scale` editor settings. Editor must be restarted for changes to be properly applied. + /// + public final func getEditorScale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(EditorInterface.method_get_editor_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_popup_dialog: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_dialog") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2015770942)! + } + + } + + }() + + /// Pops up the `dialog` in the editor UI with ``Window/popupExclusive(fromNode:rect:)``. The dialog must have no current parent, otherwise the method fails. + /// + /// See also ``Window/setUnparentWhenInvisible(unparent:)``. + /// + public final func popupDialog(_ dialog: Window?, rect: Rect2i = Rect2i (x: 0, y: 0, width: 0, height: 0)) { + withUnsafePointer(to: dialog?.handle) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_dialog, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_popup_dialog_centered: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_dialog_centered") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 346557367)! + } + + } + + }() + + /// Pops up the `dialog` in the editor UI with ``Window/popupExclusiveCentered(fromNode:minsize:)``. The dialog must have no current parent, otherwise the method fails. + /// + /// See also ``Window/setUnparentWhenInvisible(unparent:)``. + /// + public final func popupDialogCentered(dialog: Window?, minsize: Vector2i = Vector2i (x: 0, y: 0)) { + withUnsafePointer(to: dialog?.handle) { pArg0 in + withUnsafePointer(to: minsize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_dialog_centered, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_popup_dialog_centered_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_dialog_centered_ratio") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2093669136)! + } + + } + + }() + + /// Pops up the `dialog` in the editor UI with ``Window/popupExclusiveCenteredRatio(fromNode:ratio:)``. The dialog must have no current parent, otherwise the method fails. + /// + /// See also ``Window/setUnparentWhenInvisible(unparent:)``. + /// + public final func popupDialogCenteredRatio(dialog: Window?, ratio: Double = 0.8) { + withUnsafePointer(to: dialog?.handle) { pArg0 in + withUnsafePointer(to: ratio) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_dialog_centered_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_popup_dialog_centered_clamped: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_dialog_centered_clamped") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3763385571)! + } + + } + + }() + + /// Pops up the `dialog` in the editor UI with ``Window/popupExclusiveCenteredClamped(fromNode:minsize:fallbackRatio:)``. The dialog must have no current parent, otherwise the method fails. + /// + /// See also ``Window/setUnparentWhenInvisible(unparent:)``. + /// + public final func popupDialogCenteredClamped(dialog: Window?, minsize: Vector2i = Vector2i (x: 0, y: 0), fallbackRatio: Double = 0.75) { + withUnsafePointer(to: dialog?.handle) { pArg0 in + withUnsafePointer(to: minsize) { pArg1 in + withUnsafePointer(to: fallbackRatio) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_dialog_centered_clamped, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_current_feature_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_feature_profile") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. + /// + /// In order to get a reference to the ``EditorFeatureProfile``, you must load the feature profile using ``EditorFeatureProfile/loadFromFile(path:)``. + /// + /// > Note: Feature profiles created via the user interface are loaded from the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using ``EditorPaths/getConfigDir()``. + /// + public final func getCurrentFeatureProfile() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorInterface.method_get_current_feature_profile, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_current_feature_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_feature_profile") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Selects and activates the specified feature profile with the given `profileName`. Set `profileName` to an empty string to reset to the default feature profile. + /// + /// A feature profile can be created programmatically using the ``EditorFeatureProfile`` class. + /// + /// > Note: The feature profile that gets activated must be located in the `feature_profiles` directory, as a file with the `.profile` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using ``EditorPaths/getConfigDir()``. + /// + public final func setCurrentFeatureProfile(profileName: String) { + let profileName = GString(profileName) + withUnsafePointer(to: profileName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_set_current_feature_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_popup_node_selector: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_node_selector") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2271411043)! + } + + } + + }() + + /// Pops up an editor dialog for selecting a ``Node`` from the edited scene. The `callback` must take a single argument of type ``NodePath``. It is called on the selected ``NodePath`` or the empty path `^""` if the dialog is canceled. If `validTypes` is provided, the dialog will only show Nodes that match one of the listed Node types. + /// + /// **Example:** + /// + public final func popupNodeSelector(callback: Callable, validTypes: VariantCollection = VariantCollection ()) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: validTypes.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_node_selector, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_popup_property_selector: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_property_selector") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 261221679)! + } + + } + + }() + + /// Pops up an editor dialog for selecting properties from `object`. The `callback` must take a single argument of type ``NodePath``. It is called on the selected property path (see ``NodePath/getAsPropertyPath()``) or the empty path `^""` if the dialog is canceled. If `typeFilter` is provided, the dialog will only show properties that match one of the listed ``Variant.GType`` values. + /// + /// **Example:** + /// + public final func popupPropertySelector(object: Object?, callback: Callable, typeFilter: PackedInt32Array = PackedInt32Array()) { + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: typeFilter.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_popup_property_selector, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_file_system_dock: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_system_dock") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3751012327)! + } + + } + + }() + + /// Returns the editor's ``FileSystemDock`` instance. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getFileSystemDock() -> FileSystemDock? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_file_system_dock, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_select_file: GDExtensionMethodBindPtr = { + let methodName = StringName("select_file") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Selects the file, with the path provided by `file`, in the FileSystem dock. + public final func selectFile(_ file: String) { + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_select_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_selected_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_paths") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns an array containing the paths of the currently selected files (and directories) in the ``FileSystemDock``. + public final func getSelectedPaths() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorInterface.method_get_selected_paths, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_path") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the current path being viewed in the ``FileSystemDock``. + public final func getCurrentPath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorInterface.method_get_current_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_current_directory: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_directory") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the current directory being viewed in the ``FileSystemDock``. If a file is selected, its base directory will be returned using ``GString/getBaseDir()`` instead. + public final func getCurrentDirectory() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorInterface.method_get_current_directory, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_inspector: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inspector") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3517113938)! + } + + } + + }() + + /// Returns the editor's ``EditorInspector`` instance. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getInspector() -> EditorInspector? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_inspector, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_inspect_object: GDExtensionMethodBindPtr = { + let methodName = StringName("inspect_object") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 127962172)! + } + + } + + }() + + /// Shows the given property on the given `object` in the editor's Inspector dock. If `inspectorOnly` is `true`, plugins will not attempt to edit `object`. + public final func inspectObject(_ object: Object?, forProperty: String = "", inspectorOnly: Bool = false) { + withUnsafePointer(to: object?.handle) { pArg0 in + let forProperty = GString(forProperty) + withUnsafePointer(to: forProperty.content) { pArg1 in + withUnsafePointer(to: inspectorOnly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_inspect_object, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_edit_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("edit_resource") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + /// Edits the given ``Resource``. If the resource is a ``Script`` you can also edit it with ``editScript(_:line:column:grabFocus:)`` to specify the line and column position. + public final func editResource(_ resource: Resource?) { + withUnsafePointer(to: resource?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_edit_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_edit_node: GDExtensionMethodBindPtr = { + let methodName = StringName("edit_node") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Edits the given ``Node``. The node will be also selected if it's inside the scene tree. + public final func editNode(_ node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_edit_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_edit_script: GDExtensionMethodBindPtr = { + let methodName = StringName("edit_script") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 219829402)! + } + + } + + }() + + /// Edits the given ``Script``. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor. + public final func editScript(_ script: Script?, line: Int32 = -1, column: Int32 = 0, grabFocus: Bool = true) { + withUnsafePointer(to: script?.handle) { pArg0 in + withUnsafePointer(to: line) { pArg1 in + withUnsafePointer(to: column) { pArg2 in + withUnsafePointer(to: grabFocus) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_edit_script, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_open_scene_from_path: GDExtensionMethodBindPtr = { + let methodName = StringName("open_scene_from_path") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Opens the scene at the given path. + public final func openSceneFromPath(sceneFilepath: String) { + let sceneFilepath = GString(sceneFilepath) + withUnsafePointer(to: sceneFilepath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_open_scene_from_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_reload_scene_from_path: GDExtensionMethodBindPtr = { + let methodName = StringName("reload_scene_from_path") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Reloads the scene at the given path. + public final func reloadSceneFromPath(sceneFilepath: String) { + let sceneFilepath = GString(sceneFilepath) + withUnsafePointer(to: sceneFilepath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_reload_scene_from_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_open_scenes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_open_scenes") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns an ``GArray`` with the file paths of the currently opened scenes. + public final func getOpenScenes() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorInterface.method_get_open_scenes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_edited_scene_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_scene_root") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + /// Returns the edited (current) scene's root ``Node``. + public final func getEditedSceneRoot() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorInterface.method_get_edited_scene_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_save_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("save_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Saves the currently active scene. Returns either ``GodotError/ok`` or ``GodotError/errCantCreate``. + public final func saveScene() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(EditorInterface.method_save_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_scene_as: GDExtensionMethodBindPtr = { + let methodName = StringName("save_scene_as") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3647332257)! + } + + } + + }() + + /// Saves the currently active scene as a file at `path`. + public final func saveSceneAs(path: String, withPreview: Bool = true) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: withPreview) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_save_scene_as, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_save_all_scenes: GDExtensionMethodBindPtr = { + let methodName = StringName("save_all_scenes") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Saves all opened scenes in the editor. + public final func saveAllScenes() { + gi.object_method_bind_ptrcall(EditorInterface.method_save_all_scenes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_mark_scene_as_unsaved: GDExtensionMethodBindPtr = { + let methodName = StringName("mark_scene_as_unsaved") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Marks the current scene tab as unsaved. + public final func markSceneAsUnsaved() { + gi.object_method_bind_ptrcall(EditorInterface.method_mark_scene_as_unsaved, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_play_main_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("play_main_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Plays the main scene. + public final func playMainScene() { + gi.object_method_bind_ptrcall(EditorInterface.method_play_main_scene, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_play_current_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("play_current_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Plays the currently active scene. + public final func playCurrentScene() { + gi.object_method_bind_ptrcall(EditorInterface.method_play_current_scene, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_play_custom_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("play_custom_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Plays the scene specified by its filepath. + public final func playCustomScene(sceneFilepath: String) { + let sceneFilepath = GString(sceneFilepath) + withUnsafePointer(to: sceneFilepath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_play_custom_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_stop_playing_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("stop_playing_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the scene that is currently playing. + public final func stopPlayingScene() { + gi.object_method_bind_ptrcall(EditorInterface.method_stop_playing_scene, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_playing_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("is_playing_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if a scene is currently being played, `false` otherwise. Paused scenes are considered as being played. + public final func isPlayingScene() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorInterface.method_is_playing_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_playing_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_playing_scene") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. + public final func getPlayingScene() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorInterface.method_get_playing_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_movie_maker_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_movie_maker_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_movie_maker_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorInterface.method_set_movie_maker_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_movie_maker_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_movie_maker_enabled") + return withUnsafePointer(to: &EditorInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_movie_maker_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorInterface.method_is_movie_maker_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmo.swift b/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmo.swift new file mode 100644 index 000000000..0ee1b60a6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmo.swift @@ -0,0 +1,593 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Gizmo for editing ``Node3D`` objects. +/// +/// Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for ``Node3D`` objects. Can be overridden to create custom gizmos, but for simple gizmos creating a ``EditorNode3DGizmoPlugin`` is usually recommended. +open class EditorNode3DGizmo: Node3DGizmo { + override open class var godotClassName: StringName { "EditorNode3DGizmo" } + /* Methods */ + /// Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call ``clear()`` at the beginning of this method and then add visual elements depending on the node's properties. + @_documentation(visibility: public) + open func _redraw() { + } + + /// Override this method to return the name of an edited handle (handles must have been previously added by ``addHandles(_:material:ids:billboard:secondary:)``). Handles can be named for reference to the user when editing. + /// + /// The `secondary` argument is `true` when the requested handle is secondary (see ``addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + @_documentation(visibility: public) + open func _getHandleName(id: Int32, secondary: Bool) -> String { + return String () + } + + /// Override this method to return `true` whenever the given handle should be highlighted in the editor. + /// + /// The `secondary` argument is `true` when the requested handle is secondary (see ``addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + @_documentation(visibility: public) + open func _isHandleHighlighted(id: Int32, secondary: Bool) -> Bool { + return false + } + + /// Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in ``_commitHandle(id:secondary:restore:cancel:)``. + /// + /// The `secondary` argument is `true` when the requested handle is secondary (see ``addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + @_documentation(visibility: public) + open func _getHandleValue(id: Int32, secondary: Bool) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _beginHandleAction(id: Int32, secondary: Bool) { + } + + /// Override this method to update the node properties when the user drags a gizmo handle (previously added with ``addHandles(_:material:ids:billboard:secondary:)``). The provided `point` is the mouse position in screen coordinates and the `camera` can be used to convert it to raycasts. + /// + /// The `secondary` argument is `true` when the edited handle is secondary (see ``addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + @_documentation(visibility: public) + open func _setHandle(id: Int32, secondary: Bool, camera: Camera3D?, point: Vector2) { + } + + /// Override this method to commit a handle being edited (handles must have been previously added by ``addHandles(_:material:ids:billboard:secondary:)``). This usually means creating an ``UndoRedo`` action for the change, using the current handle value as "do" and the `restore` argument as "undo". + /// + /// If the `cancel` argument is `true`, the `restore` value should be directly set, without any ``UndoRedo`` action. + /// + /// The `secondary` argument is `true` when the committed handle is secondary (see ``addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + @_documentation(visibility: public) + open func _commitHandle(id: Int32, secondary: Bool, restore: Variant?, cancel: Bool) { + } + + /// Override this method to allow selecting subgizmos using mouse clicks. Given a `camera` and a `point` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like ``_getSubgizmoTransform(id:)`` or ``_commitSubgizmos(ids:restores:cancel:)``. + @_documentation(visibility: public) + open func _subgizmosIntersectRay(camera: Camera3D?, point: Vector2) -> Int32 { + return 0 + } + + /// Override this method to allow selecting subgizmos using mouse drag box selection. Given a `camera` and a `frustum`, this method should return which subgizmos are contained within the frustum. The `frustum` argument consists of an array with all the ``Plane``s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like ``_getSubgizmoTransform(id:)`` or ``_commitSubgizmos(ids:restores:cancel:)``. + @_documentation(visibility: public) + open func _subgizmosIntersectFrustum(camera: Camera3D?, frustum: VariantCollection) -> PackedInt32Array { + return PackedInt32Array () + } + + /// Override this method to update the node properties during subgizmo editing (see ``_subgizmosIntersectRay(camera:point:)`` and ``_subgizmosIntersectFrustum(camera:frustum:)``). The `transform` is given in the ``Node3D``'s local coordinate system. + @_documentation(visibility: public) + open func _setSubgizmoTransform(id: Int32, transform: Transform3D) { + } + + /// Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the `restore` argument in ``_commitSubgizmos(ids:restores:cancel:)``. + @_documentation(visibility: public) + open func _getSubgizmoTransform(id: Int32) -> Transform3D { + return Transform3D () + } + + /// Override this method to commit a group of subgizmos being edited (see ``_subgizmosIntersectRay(camera:point:)`` and ``_subgizmosIntersectFrustum(camera:frustum:)``). This usually means creating an ``UndoRedo`` action for the change, using the current transforms as "do" and the `restores` transforms as "undo". + /// + /// If the `cancel` argument is `true`, the `restores` transforms should be directly set, without any ``UndoRedo`` action. + /// + @_documentation(visibility: public) + open func _commitSubgizmos(ids: PackedInt32Array, restores: VariantCollection, cancel: Bool) { + } + + fileprivate static var method_add_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("add_lines") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2910971437)! + } + + } + + }() + + /// Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during ``_redraw()``. + public final func addLines(_ lines: PackedVector3Array, material: Material?, billboard: Bool = false, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: lines.content) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: billboard) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_lines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("add_mesh") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1579955111)! + } + + } + + }() + + /// Adds a mesh to the gizmo with the specified `material`, local `transform` and `skeleton`. Call this method during ``_redraw()``. + public final func addMesh(_ mesh: Mesh?, material: Material? = nil, transform: Transform3D = Transform3D (xAxis: Vector3 (x: 1, y: 0, z: 0), yAxis: Vector3 (x: 0, y: 1, z: 0), zAxis: Vector3(x: 0, y: 0, z: 1), origin: Vector3 (x: 0, y: 0, z: 0)), skeleton: SkinReference? = nil) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: skeleton?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_collision_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("add_collision_segments") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + /// Adds the specified `segments` to the gizmo's collision shape for picking. Call this method during ``_redraw()``. + public final func addCollisionSegments(_ segments: PackedVector3Array) { + withUnsafePointer(to: segments.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_collision_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_collision_triangles: GDExtensionMethodBindPtr = { + let methodName = StringName("add_collision_triangles") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 54901064)! + } + + } + + }() + + /// Adds collision triangles to the gizmo for picking. A ``TriangleMesh`` can be generated from a regular ``Mesh`` too. Call this method during ``_redraw()``. + public final func addCollisionTriangles(_ triangles: TriangleMesh?) { + withUnsafePointer(to: triangles?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_collision_triangles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_unscaled_billboard: GDExtensionMethodBindPtr = { + let methodName = StringName("add_unscaled_billboard") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 520007164)! + } + + } + + }() + + /// Adds an unscaled billboard for visualization and selection. Call this method during ``_redraw()``. + public final func addUnscaledBillboard(material: Material?, defaultScale: Double = 1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: defaultScale) { pArg1 in + withUnsafePointer(to: modulate) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_unscaled_billboard, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_handles: GDExtensionMethodBindPtr = { + let methodName = StringName("add_handles") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2254560097)! + } + + } + + }() + + /// Adds a list of handles (points) which can be used to edit the properties of the gizmo's ``Node3D``. The `ids` argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the `handles` argument order. + /// + /// The `secondary` argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. + /// + /// There are virtual methods which will be called upon editing of these handles. Call this method during ``_redraw()``. + /// + public final func addHandles(_ handles: PackedVector3Array, material: Material?, ids: PackedInt32Array, billboard: Bool = false, secondary: Bool = false) { + withUnsafePointer(to: handles.content) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: ids.content) { pArg2 in + withUnsafePointer(to: billboard) { pArg3 in + withUnsafePointer(to: secondary) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_add_handles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_node_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_3d") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets the reference ``Node3D`` node for the gizmo. `node` must inherit from ``Node3D``. + public final func setNode3d(node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_set_node_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_node_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_3d") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 151077316)! + } + + } + + }() + + /// Returns the ``Node3D`` node associated with this gizmo. + public final func getNode3d() -> Node3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_get_node_3d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_plugin") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4250544552)! + } + + } + + }() + + /// Returns the ``EditorNode3DGizmoPlugin`` that owns this gizmo. It's useful to retrieve materials using ``EditorNode3DGizmoPlugin/getMaterial(name:gizmo:)``. + public final func getPlugin() -> EditorNode3DGizmoPlugin? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_get_plugin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes everything in the gizmo including meshes, collisions and handles. + public final func clear() { + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hidden") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets the gizmo's hidden state. If `true`, the gizmo will be hidden. If `false`, it will be shown. + public final func setHidden(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_set_hidden, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_subgizmo_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_subgizmo_selected") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the given subgizmo is currently selected. Can be used to highlight selected elements during ``_redraw()``. + public final func isSubgizmoSelected(id: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_is_subgizmo_selected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_subgizmo_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subgizmo_selection") + return withUnsafePointer(to: &EditorNode3DGizmo.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during ``_redraw()``. + public final func getSubgizmoSelection() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(EditorNode3DGizmo.method_get_subgizmo_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_begin_handle_action": + return _EditorNode3DGizmo_proxy_begin_handle_action + case "_commit_handle": + return _EditorNode3DGizmo_proxy_commit_handle + case "_commit_subgizmos": + return _EditorNode3DGizmo_proxy_commit_subgizmos + case "_get_handle_name": + return _EditorNode3DGizmo_proxy_get_handle_name + case "_get_handle_value": + return _EditorNode3DGizmo_proxy_get_handle_value + case "_get_subgizmo_transform": + return _EditorNode3DGizmo_proxy_get_subgizmo_transform + case "_is_handle_highlighted": + return _EditorNode3DGizmo_proxy_is_handle_highlighted + case "_redraw": + return _EditorNode3DGizmo_proxy_redraw + case "_set_handle": + return _EditorNode3DGizmo_proxy_set_handle + case "_set_subgizmo_transform": + return _EditorNode3DGizmo_proxy_set_subgizmo_transform + case "_subgizmos_intersect_frustum": + return _EditorNode3DGizmo_proxy_subgizmos_intersect_frustum + case "_subgizmos_intersect_ray": + return _EditorNode3DGizmo_proxy_subgizmos_intersect_ray + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorNode3DGizmo_proxy_begin_handle_action (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._beginHandleAction (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmo_proxy_commit_handle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._commitHandle (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee, restore: args [2]!.assumingMemoryBound (to: Variant.self).pointee, cancel: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmo_proxy_commit_subgizmos (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._commitSubgizmos (ids: PackedInt32Array (content: args [0]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), restores: args [1]!.assumingMemoryBound (to: VariantCollection.self).pointee, cancel: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmo_proxy_get_handle_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getHandleName (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorNode3DGizmo_proxy_get_handle_value (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getHandleValue (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorNode3DGizmo_proxy_get_subgizmo_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSubgizmoTransform (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _EditorNode3DGizmo_proxy_is_handle_highlighted (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isHandleHighlighted (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorNode3DGizmo_proxy_redraw (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._redraw () +} + +func _EditorNode3DGizmo_proxy_set_handle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + swiftObject._setHandle (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [1]!.assumingMemoryBound (to: Bool.self).pointee, camera: lookupLiveObject (handleAddress: resolved_2) as? Camera3D ?? Camera3D (nativeHandle: resolved_2), point: args [3]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _EditorNode3DGizmo_proxy_set_subgizmo_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setSubgizmoTransform (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [1]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _EditorNode3DGizmo_proxy_subgizmos_intersect_frustum (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._subgizmosIntersectFrustum (camera: lookupLiveObject (handleAddress: resolved_0) as? Camera3D ?? Camera3D (nativeHandle: resolved_0), frustum: args [1]!.assumingMemoryBound (to: VariantCollection.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedInt32Array + ret.content = PackedInt32Array.zero +} + +func _EditorNode3DGizmo_proxy_subgizmos_intersect_ray (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._subgizmosIntersectRay (camera: lookupLiveObject (handleAddress: resolved_0) as? Camera3D ?? Camera3D (nativeHandle: resolved_0), point: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmoPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmoPlugin.swift new file mode 100644 index 000000000..4ae62e401 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorNode3DGizmoPlugin.swift @@ -0,0 +1,543 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class used by the editor to define Node3D gizmo types. +/// +/// ``EditorNode3DGizmoPlugin`` allows you to define a new type of Gizmo. There are two main ways to do so: extending ``EditorNode3DGizmoPlugin`` for the simpler gizmos, or creating a new ``EditorNode3DGizmo`` type. See the tutorial in the documentation for more info. +/// +/// To use ``EditorNode3DGizmoPlugin``, register it using the ``EditorPlugin/addNode3dGizmoPlugin(_:)`` method first. +/// +open class EditorNode3DGizmoPlugin: Resource { + override open class var godotClassName: StringName { "EditorNode3DGizmoPlugin" } + /* Methods */ + /// Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a ``Node3D`` node is added to a scene this method is called, if it returns `true` the node gets a generic ``EditorNode3DGizmo`` assigned and is added to this plugin's list of active gizmos. + @_documentation(visibility: public) + open func _hasGizmo(forNode3d: Node3D?) -> Bool { + return false + } + + /// Override this method to return a custom ``EditorNode3DGizmo`` for the spatial nodes of your choice, return `null` for the rest of nodes. See also ``_hasGizmo(forNode3d:)``. + @_documentation(visibility: public) + open func _createGizmo(forNode3d: Node3D?) -> EditorNode3DGizmo? { + return EditorNode3DGizmo () + } + + /// Override this method to provide the name that will appear in the gizmo visibility menu. + @_documentation(visibility: public) + open func _getGizmoName() -> String { + return String () + } + + /// Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. + /// + /// All built-in editor gizmos return a priority of `-1`. If not overridden, this method will return `0`, which means custom gizmos will automatically get higher priority than built-in gizmos. + /// + @_documentation(visibility: public) + open func _getPriority() -> Int32 { + return 0 + } + + /// Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns `true` if not overridden. + @_documentation(visibility: public) + open func _canBeHidden() -> Bool { + return false + } + + /// Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. + @_documentation(visibility: public) + open func _isSelectableWhenHidden() -> Bool { + return false + } + + /// Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call ``EditorNode3DGizmo/clear()`` at the beginning of this method and then add visual elements depending on the node's properties. + @_documentation(visibility: public) + open func _redraw(gizmo: EditorNode3DGizmo?) { + } + + /// Override this method to provide gizmo's handle names. The `secondary` argument is `true` when the requested handle is secondary (see ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` for more information). Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _getHandleName(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool) -> String { + return String () + } + + /// Override this method to return `true` whenever to given handle should be highlighted in the editor. The `secondary` argument is `true` when the requested handle is secondary (see ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` for more information). Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _isHandleHighlighted(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool) -> Bool { + return false + } + + /// Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in ``_commitHandle(gizmo:handleId:secondary:restore:cancel:)``. + /// + /// The `secondary` argument is `true` when the requested handle is secondary (see ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + /// Called for this plugin's active gizmos. + /// + @_documentation(visibility: public) + open func _getHandleValue(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _beginHandleAction(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool) { + } + + /// Override this method to update the node's properties when the user drags a gizmo handle (previously added with ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)``). The provided `screenPos` is the mouse position in screen coordinates and the `camera` can be used to convert it to raycasts. + /// + /// The `secondary` argument is `true` when the edited handle is secondary (see ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + /// Called for this plugin's active gizmos. + /// + @_documentation(visibility: public) + open func _setHandle(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool, camera: Camera3D?, screenPos: Vector2) { + } + + /// Override this method to commit a handle being edited (handles must have been previously added by ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` during ``_redraw(gizmo:)``). This usually means creating an ``UndoRedo`` action for the change, using the current handle value as "do" and the `restore` argument as "undo". + /// + /// If the `cancel` argument is `true`, the `restore` value should be directly set, without any ``UndoRedo`` action. + /// + /// The `secondary` argument is `true` when the committed handle is secondary (see ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)`` for more information). + /// + /// Called for this plugin's active gizmos. + /// + @_documentation(visibility: public) + open func _commitHandle(gizmo: EditorNode3DGizmo?, handleId: Int32, secondary: Bool, restore: Variant?, cancel: Bool) { + } + + /// Override this method to allow selecting subgizmos using mouse clicks. Given a `camera` and a `screenPos` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like ``_getSubgizmoTransform(gizmo:subgizmoId:)`` or ``_commitSubgizmos(gizmo:ids:restores:cancel:)``. Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _subgizmosIntersectRay(gizmo: EditorNode3DGizmo?, camera: Camera3D?, screenPos: Vector2) -> Int32 { + return 0 + } + + /// Override this method to allow selecting subgizmos using mouse drag box selection. Given a `camera` and `frustumPlanes`, this method should return which subgizmos are contained within the frustums. The `frustumPlanes` argument consists of an array with all the ``Plane``s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like ``_getSubgizmoTransform(gizmo:subgizmoId:)`` or ``_commitSubgizmos(gizmo:ids:restores:cancel:)``. Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _subgizmosIntersectFrustum(gizmo: EditorNode3DGizmo?, camera: Camera3D?, frustumPlanes: VariantCollection) -> PackedInt32Array { + return PackedInt32Array () + } + + /// Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the `restore` argument in ``_commitSubgizmos(gizmo:ids:restores:cancel:)``. Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _getSubgizmoTransform(gizmo: EditorNode3DGizmo?, subgizmoId: Int32) -> Transform3D { + return Transform3D () + } + + /// Override this method to update the node properties during subgizmo editing (see ``_subgizmosIntersectRay(gizmo:camera:screenPos:)`` and ``_subgizmosIntersectFrustum(gizmo:camera:frustumPlanes:)``). The `transform` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. + @_documentation(visibility: public) + open func _setSubgizmoTransform(gizmo: EditorNode3DGizmo?, subgizmoId: Int32, transform: Transform3D) { + } + + /// Override this method to commit a group of subgizmos being edited (see ``_subgizmosIntersectRay(gizmo:camera:screenPos:)`` and ``_subgizmosIntersectFrustum(gizmo:camera:frustumPlanes:)``). This usually means creating an ``UndoRedo`` action for the change, using the current transforms as "do" and the `restores` transforms as "undo". + /// + /// If the `cancel` argument is `true`, the `restores` transforms should be directly set, without any ``UndoRedo`` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. + /// + @_documentation(visibility: public) + open func _commitSubgizmos(gizmo: EditorNode3DGizmo?, ids: PackedInt32Array, restores: VariantCollection, cancel: Bool) { + } + + fileprivate static var method_create_material: GDExtensionMethodBindPtr = { + let methodName = StringName("create_material") + return withUnsafePointer(to: &EditorNode3DGizmoPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3486012546)! + } + + } + + }() + + /// Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with ``getMaterial(name:gizmo:)`` and used in ``EditorNode3DGizmo/addMesh(_:material:transform:skeleton:)`` and ``EditorNode3DGizmo/addLines(_:material:billboard:modulate:)``. Should not be overridden. + public final func createMaterial(name: String, color: Color, billboard: Bool = false, onTop: Bool = false, useVertexColor: Bool = false) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: billboard) { pArg2 in + withUnsafePointer(to: onTop) { pArg3 in + withUnsafePointer(to: useVertexColor) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmoPlugin.method_create_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_create_icon_material: GDExtensionMethodBindPtr = { + let methodName = StringName("create_icon_material") + return withUnsafePointer(to: &EditorNode3DGizmoPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3804976916)! + } + + } + + }() + + /// Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with ``getMaterial(name:gizmo:)`` and used in ``EditorNode3DGizmo/addUnscaledBillboard(material:defaultScale:modulate:)``. Should not be overridden. + public final func createIconMaterial(name: String, texture: Texture2D?, onTop: Bool = false, color: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: onTop) { pArg2 in + withUnsafePointer(to: color) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmoPlugin.method_create_icon_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_create_handle_material: GDExtensionMethodBindPtr = { + let methodName = StringName("create_handle_material") + return withUnsafePointer(to: &EditorNode3DGizmoPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2486475223)! + } + + } + + }() + + /// Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with ``getMaterial(name:gizmo:)`` and used in ``EditorNode3DGizmo/addHandles(_:material:ids:billboard:secondary:)``. Should not be overridden. + /// + /// You can optionally provide a texture to use instead of the default icon. + /// + public final func createHandleMaterial(name: String, billboard: Bool = false, texture: Texture2D? = nil) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: billboard) { pArg1 in + withUnsafePointer(to: texture?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmoPlugin.method_create_handle_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_material: GDExtensionMethodBindPtr = { + let methodName = StringName("add_material") + return withUnsafePointer(to: &EditorNode3DGizmoPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1374068695)! + } + + } + + }() + + /// Adds a new material to the internal material list for the plugin. It can then be accessed with ``getMaterial(name:gizmo:)``. Should not be overridden. + public final func addMaterial(name: String, material: StandardMaterial3D?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmoPlugin.method_add_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &EditorNode3DGizmoPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974464017)! + } + + } + + }() + + /// Gets material from the internal list of materials. If an ``EditorNode3DGizmo`` is provided, it will try to get the corresponding variant (selected and/or editable). + public final func getMaterial(name: String, gizmo: EditorNode3DGizmo? = nil) -> StandardMaterial3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: gizmo?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorNode3DGizmoPlugin.method_get_material, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_begin_handle_action": + return _EditorNode3DGizmoPlugin_proxy_begin_handle_action + case "_can_be_hidden": + return _EditorNode3DGizmoPlugin_proxy_can_be_hidden + case "_commit_handle": + return _EditorNode3DGizmoPlugin_proxy_commit_handle + case "_commit_subgizmos": + return _EditorNode3DGizmoPlugin_proxy_commit_subgizmos + case "_create_gizmo": + return _EditorNode3DGizmoPlugin_proxy_create_gizmo + case "_get_gizmo_name": + return _EditorNode3DGizmoPlugin_proxy_get_gizmo_name + case "_get_handle_name": + return _EditorNode3DGizmoPlugin_proxy_get_handle_name + case "_get_handle_value": + return _EditorNode3DGizmoPlugin_proxy_get_handle_value + case "_get_priority": + return _EditorNode3DGizmoPlugin_proxy_get_priority + case "_get_subgizmo_transform": + return _EditorNode3DGizmoPlugin_proxy_get_subgizmo_transform + case "_has_gizmo": + return _EditorNode3DGizmoPlugin_proxy_has_gizmo + case "_is_handle_highlighted": + return _EditorNode3DGizmoPlugin_proxy_is_handle_highlighted + case "_is_selectable_when_hidden": + return _EditorNode3DGizmoPlugin_proxy_is_selectable_when_hidden + case "_redraw": + return _EditorNode3DGizmoPlugin_proxy_redraw + case "_set_handle": + return _EditorNode3DGizmoPlugin_proxy_set_handle + case "_set_subgizmo_transform": + return _EditorNode3DGizmoPlugin_proxy_set_subgizmo_transform + case "_subgizmos_intersect_frustum": + return _EditorNode3DGizmoPlugin_proxy_subgizmos_intersect_frustum + case "_subgizmos_intersect_ray": + return _EditorNode3DGizmoPlugin_proxy_subgizmos_intersect_ray + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorNode3DGizmoPlugin_proxy_begin_handle_action (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._beginHandleAction (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmoPlugin_proxy_can_be_hidden (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canBeHidden () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorNode3DGizmoPlugin_proxy_commit_handle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._commitHandle (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee, restore: args [3]!.assumingMemoryBound (to: Variant.self).pointee, cancel: args [4]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmoPlugin_proxy_commit_subgizmos (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._commitSubgizmos (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), ids: PackedInt32Array (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), restores: args [2]!.assumingMemoryBound (to: VariantCollection.self).pointee, cancel: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorNode3DGizmoPlugin_proxy_create_gizmo (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._createGizmo (forNode3d: lookupLiveObject (handleAddress: resolved_0) as? Node3D ?? Node3D (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // EditorNode3DGizmo +} + +func _EditorNode3DGizmoPlugin_proxy_get_gizmo_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getGizmoName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorNode3DGizmoPlugin_proxy_get_handle_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = GString (swiftObject._getHandleName (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorNode3DGizmoPlugin_proxy_get_handle_value (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getHandleValue (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorNode3DGizmoPlugin_proxy_get_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPriority () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _EditorNode3DGizmoPlugin_proxy_get_subgizmo_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getSubgizmoTransform (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), subgizmoId: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _EditorNode3DGizmoPlugin_proxy_has_gizmo (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._hasGizmo (forNode3d: lookupLiveObject (handleAddress: resolved_0) as? Node3D ?? Node3D (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorNode3DGizmoPlugin_proxy_is_handle_highlighted (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._isHandleHighlighted (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorNode3DGizmoPlugin_proxy_is_selectable_when_hidden (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isSelectableWhenHidden () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorNode3DGizmoPlugin_proxy_redraw (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._redraw (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0)) +} + +func _EditorNode3DGizmoPlugin_proxy_set_handle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_3 = args [3]!.load (as: UnsafeRawPointer.self) + + swiftObject._setHandle (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), handleId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, secondary: args [2]!.assumingMemoryBound (to: Bool.self).pointee, camera: lookupLiveObject (handleAddress: resolved_3) as? Camera3D ?? Camera3D (nativeHandle: resolved_3), screenPos: args [4]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _EditorNode3DGizmoPlugin_proxy_set_subgizmo_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._setSubgizmoTransform (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), subgizmoId: args [1]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _EditorNode3DGizmoPlugin_proxy_subgizmos_intersect_frustum (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._subgizmosIntersectFrustum (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), camera: lookupLiveObject (handleAddress: resolved_1) as? Camera3D ?? Camera3D (nativeHandle: resolved_1), frustumPlanes: args [2]!.assumingMemoryBound (to: VariantCollection.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedInt32Array + ret.content = PackedInt32Array.zero +} + +func _EditorNode3DGizmoPlugin_proxy_subgizmos_intersect_ray (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._subgizmosIntersectRay (gizmo: lookupLiveObject (handleAddress: resolved_0) as? EditorNode3DGizmo ?? EditorNode3DGizmo (nativeHandle: resolved_0), camera: lookupLiveObject (handleAddress: resolved_1) as? Camera3D ?? Camera3D (nativeHandle: resolved_1), screenPos: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorPaths.swift b/Sources/SwiftGodot/Generated/Api/EditorPaths.swift new file mode 100644 index 000000000..632c57a60 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorPaths.swift @@ -0,0 +1,159 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Editor-only singleton that returns paths to various OS-specific data folders and files. +/// +/// This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system. +/// +/// > Note: This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use ``Engine/hasSingleton(name:)`` to check whether the singleton is available before using it. +/// +/// > Note: On the Linux/BSD platform, Godot complies with the XDG Base Directory Specification. You can override environment variables following the specification to change the editor and project data paths. +/// +open class EditorPaths: Object { + override open class var godotClassName: StringName { "EditorPaths" } + /* Methods */ + fileprivate static var method_get_data_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data_dir") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute path to the user's data folder. This folder should be used for _persistent_ user data files such as installed export templates. + /// + /// **Default paths per platform:** + /// + public final func getDataDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPaths.method_get_data_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_config_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_config_dir") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute path to the user's configuration folder. This folder should be used for _persistent_ user configuration files. + /// + /// **Default paths per platform:** + /// + public final func getConfigDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPaths.method_get_config_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_cache_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_dir") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails). + /// + /// **Default paths per platform:** + /// + public final func getCacheDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPaths.method_get_cache_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_self_contained: GDExtensionMethodBindPtr = { + let methodName = StringName("is_self_contained") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the editor is marked as self-contained, `false` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an `editor_data/` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. + /// + /// Self-contained mode can be enabled by creating a file named `._sc_` or `_sc_` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also ``getSelfContainedFile()``. + /// + /// > Note: On macOS, quarantine flag should be manually removed before using self-contained mode, see Running on macOS. + /// + /// > Note: On macOS, placing `_sc_` or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead. + /// + /// > Note: The Steam release of Godot uses self-contained mode by default. + /// + public final func isSelfContained() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorPaths.method_is_self_contained, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_self_contained_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_self_contained_file") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also ``isSelfContained()``. + public final func getSelfContainedFile() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPaths.method_get_self_contained_file, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_project_settings_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_project_settings_dir") + return withUnsafePointer(to: &EditorPaths.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. + public final func getProjectSettingsDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPaths.method_get_project_settings_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorPlugin.swift new file mode 100644 index 000000000..2b2e94f5f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorPlugin.swift @@ -0,0 +1,2224 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Used by the editor to extend its functionality. +/// +/// Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also ``EditorScript`` to add functions to the editor. +/// +/// > Note: Some names in this class contain "left" or "right" (e.g. ``DockSlot/leftUl``). These APIs assume left-to-right layout, and would be backwards when using right-to-left layout. These names are kept for compatibility reasons. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``sceneChanged`` +/// - ``sceneClosed`` +/// - ``mainScreenChanged`` +/// - ``resourceSaved`` +/// - ``sceneSaved`` +/// - ``projectSettingsChanged`` +open class EditorPlugin: Node { + override open class var godotClassName: StringName { "EditorPlugin" } + public enum CustomControlContainer: Int64, CaseIterable, CustomDebugStringConvertible { + /// Main editor toolbar, next to play buttons. + case toolbar = 0 // CONTAINER_TOOLBAR + /// The toolbar that appears when 3D editor is active. + case spatialEditorMenu = 1 // CONTAINER_SPATIAL_EDITOR_MENU + /// Left sidebar of the 3D editor. + case spatialEditorSideLeft = 2 // CONTAINER_SPATIAL_EDITOR_SIDE_LEFT + /// Right sidebar of the 3D editor. + case spatialEditorSideRight = 3 // CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT + /// Bottom panel of the 3D editor. + case spatialEditorBottom = 4 // CONTAINER_SPATIAL_EDITOR_BOTTOM + /// The toolbar that appears when 2D editor is active. + case canvasEditorMenu = 5 // CONTAINER_CANVAS_EDITOR_MENU + /// Left sidebar of the 2D editor. + case canvasEditorSideLeft = 6 // CONTAINER_CANVAS_EDITOR_SIDE_LEFT + /// Right sidebar of the 2D editor. + case canvasEditorSideRight = 7 // CONTAINER_CANVAS_EDITOR_SIDE_RIGHT + /// Bottom panel of the 2D editor. + case canvasEditorBottom = 8 // CONTAINER_CANVAS_EDITOR_BOTTOM + /// Bottom section of the inspector. + case inspectorBottom = 9 // CONTAINER_INSPECTOR_BOTTOM + /// Tab of Project Settings dialog, to the left of other tabs. + case projectSettingTabLeft = 10 // CONTAINER_PROJECT_SETTING_TAB_LEFT + /// Tab of Project Settings dialog, to the right of other tabs. + case projectSettingTabRight = 11 // CONTAINER_PROJECT_SETTING_TAB_RIGHT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .toolbar: return ".toolbar" + case .spatialEditorMenu: return ".spatialEditorMenu" + case .spatialEditorSideLeft: return ".spatialEditorSideLeft" + case .spatialEditorSideRight: return ".spatialEditorSideRight" + case .spatialEditorBottom: return ".spatialEditorBottom" + case .canvasEditorMenu: return ".canvasEditorMenu" + case .canvasEditorSideLeft: return ".canvasEditorSideLeft" + case .canvasEditorSideRight: return ".canvasEditorSideRight" + case .canvasEditorBottom: return ".canvasEditorBottom" + case .inspectorBottom: return ".inspectorBottom" + case .projectSettingTabLeft: return ".projectSettingTabLeft" + case .projectSettingTabRight: return ".projectSettingTabRight" + } + + } + + } + + public enum DockSlot: Int64, CaseIterable, CustomDebugStringConvertible { + /// Dock slot, left side, upper-left (empty in default layout). + case leftUl = 0 // DOCK_SLOT_LEFT_UL + /// Dock slot, left side, bottom-left (empty in default layout). + case leftBl = 1 // DOCK_SLOT_LEFT_BL + /// Dock slot, left side, upper-right (in default layout includes Scene and Import docks). + case leftUr = 2 // DOCK_SLOT_LEFT_UR + /// Dock slot, left side, bottom-right (in default layout includes FileSystem dock). + case leftBr = 3 // DOCK_SLOT_LEFT_BR + /// Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). + case rightUl = 4 // DOCK_SLOT_RIGHT_UL + /// Dock slot, right side, bottom-left (empty in default layout). + case rightBl = 5 // DOCK_SLOT_RIGHT_BL + /// Dock slot, right side, upper-right (empty in default layout). + case rightUr = 6 // DOCK_SLOT_RIGHT_UR + /// Dock slot, right side, bottom-right (empty in default layout). + case rightBr = 7 // DOCK_SLOT_RIGHT_BR + /// Represents the size of the ``EditorPlugin/DockSlot`` enum. + case max = 8 // DOCK_SLOT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .leftUl: return ".leftUl" + case .leftBl: return ".leftBl" + case .leftUr: return ".leftUr" + case .leftBr: return ".leftBr" + case .rightUl: return ".rightUl" + case .rightBl: return ".rightBl" + case .rightUr: return ".rightUr" + case .rightBr: return ".rightBr" + case .max: return ".max" + } + + } + + } + + public enum AfterGUIInput: Int64, CaseIterable, CustomDebugStringConvertible { + /// Forwards the ``InputEvent`` to other EditorPlugins. + case pass = 0 // AFTER_GUI_INPUT_PASS + /// Prevents the ``InputEvent`` from reaching other Editor classes. + case stop = 1 // AFTER_GUI_INPUT_STOP + /// Pass the ``InputEvent`` to other editor plugins except the main ``Node3D`` one. This can be used to prevent node selection changes and work with sub-gizmos instead. + case custom = 2 // AFTER_GUI_INPUT_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .pass: return ".pass" + case .stop: return ".stop" + case .custom: return ".custom" + } + + } + + } + + /* Methods */ + /// Called when there is a root node in the current edited scene, ``_handles(object:)`` is implemented and an ``InputEvent`` happens in the 2D viewport. Intercepts the ``InputEvent``, if `return true` ``EditorPlugin`` consumes the `event`, otherwise forwards `event` to other Editor classes. + /// + /// **Example:** + /// + /// Must `return false` in order to forward the ``InputEvent`` to other Editor classes. + /// + /// **Example:** + /// + @_documentation(visibility: public) + open func _forwardCanvasGuiInput(event: InputEvent?) -> Bool { + return false + } + + /// Called by the engine when the 2D editor's viewport is updated. Use the `overlay` ``Control`` for drawing. You can update the viewport manually by calling ``updateOverlays()``. + /// + @_documentation(visibility: public) + open func _forwardCanvasDrawOverViewport(viewportControl: Control?) { + } + + /// This method is the same as ``_forwardCanvasDrawOverViewport(viewportControl:)``, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + /// + /// You need to enable calling of this method by using ``setForceDrawOverForwardingEnabled()``. + /// + @_documentation(visibility: public) + open func _forwardCanvasForceDrawOverViewport(viewportControl: Control?) { + } + + /// Called when there is a root node in the current edited scene, ``_handles(object:)`` is implemented, and an ``InputEvent`` happens in the 3D viewport. The return value decides whether the ``InputEvent`` is consumed or forwarded to other ``EditorPlugin``s. See ``EditorPlugin/AfterGUIInput`` for options. + /// + /// **Example:** + /// + /// Must `return EditorPlugin.AFTER_GUI_INPUT_PASS` in order to forward the ``InputEvent`` to other Editor classes. + /// + /// **Example:** + /// + @_documentation(visibility: public) + open func _forward3dGuiInput(viewportCamera: Camera3D?, event: InputEvent?) -> Int32 { + return 0 + } + + /// Called by the engine when the 3D editor's viewport is updated. Use the `overlay` ``Control`` for drawing. You can update the viewport manually by calling ``updateOverlays()``. + /// + @_documentation(visibility: public) + open func _forward3dDrawOverViewport(viewportControl: Control?) { + } + + /// This method is the same as ``_forward3dDrawOverViewport(viewportControl:)``, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + /// + /// You need to enable calling of this method by using ``setForceDrawOverForwardingEnabled()``. + /// + @_documentation(visibility: public) + open func _forward3dForceDrawOverViewport(viewportControl: Control?) { + } + + /// Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. + /// + /// For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. + /// + @_documentation(visibility: public) + open func _getPluginName() -> String { + return String () + } + + /// Override this method in your plugin to return a ``Texture2D`` in order to give it an icon. + /// + /// For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. + /// + /// Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size. + /// + @_documentation(visibility: public) + open func _getPluginIcon() -> Texture2D? { + return Texture2D () + } + + /// Returns `true` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). + /// + /// When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of ``EditorInterface/getEditorMainScreen()`` and made visible inside ``_makeVisible(_:)``. + /// + /// Use ``_getPluginName()`` and ``_getPluginIcon()`` to customize the plugin button's appearance. + /// + @_documentation(visibility: public) + open func _hasMainScreen() -> Bool { + return false + } + + /// This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. + /// + /// Remember that you have to manage the visibility of all your editor controls manually. + /// + @_documentation(visibility: public) + open func _makeVisible(_ visible: Bool) { + } + + /// This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. + /// + /// `object` can be `null` if the plugin was editing an object, but there is no longer any selected object handled by this plugin. It can be used to cleanup editing state. + /// + @_documentation(visibility: public) + open func _edit(object: Object?) { + } + + /// Implement this function if your plugin edits a specific type of object (Resource or Node). If you return `true`, then you will get the functions ``_edit(object:)`` and ``_makeVisible(_:)`` called when the editor requests them. If you have declared the methods ``_forwardCanvasGuiInput(event:)`` and ``_forward3dGuiInput(viewportCamera:event:)`` these will be called too. + /// + /// > Note: Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors. + /// + @_documentation(visibility: public) + open func _handles(object: Object?) -> Bool { + return false + } + + /// Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an `editstate` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use ``_getWindowLayout(configuration:)`` instead. + /// + /// Use ``_setState(_:)`` to restore your saved state. + /// + /// > Note: This method should not be used to save important settings that should persist with the project. + /// + /// > Note: You must implement ``_getPluginName()`` for the state to be stored and restored correctly. + /// + @_documentation(visibility: public) + open func _getState() -> GDictionary { + return GDictionary () + } + + /// Restore the state saved by ``_getState()``. This method is called when the current scene tab is changed in the editor. + /// + /// > Note: Your plugin must implement ``_getPluginName()``, otherwise it will not be recognized and this method will not be called. + /// + @_documentation(visibility: public) + open func _setState(_ state: GDictionary) { + } + + /// Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. + @_documentation(visibility: public) + open func _clear() { + } + + /// Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes. + /// + /// When closing a scene, `forScene` is the path to the scene being closed. You can use it to handle built-in resources in that scene. + /// + /// If the user confirms saving, ``_saveExternalData()`` will be called, before closing the editor. + /// + /// If the plugin has no scene-specific changes, you can ignore the calls when closing scenes: + /// + @_documentation(visibility: public) + open func _getUnsavedStatus(forScene: String) -> String { + return String () + } + + /// This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. + @_documentation(visibility: public) + open func _saveExternalData() { + } + + /// This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. + /// + /// This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. + /// + @_documentation(visibility: public) + open func _applyChanges() { + } + + /// This is for editors that edit script-based objects. You can return a list of breakpoints in the format (`script:line`), for example: `res://path_to_script.gd:25`. + @_documentation(visibility: public) + open func _getBreakpoints() -> PackedStringArray { + return PackedStringArray () + } + + /// Restore the plugin GUI layout and data saved by ``_getWindowLayout(configuration:)``. This method is called for every plugin on editor startup. Use the provided `configuration` file to read your saved data. + /// + @_documentation(visibility: public) + open func _setWindowLayout(configuration: ConfigFile?) { + } + + /// Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when ``queueSaveLayout()`` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the `editor_layout.cfg` file in the editor metadata directory. + /// + /// Use ``_setWindowLayout(configuration:)`` to restore your saved layout. + /// + @_documentation(visibility: public) + open func _getWindowLayout(configuration: ConfigFile?) { + } + + /// This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. + /// + /// This method must return a boolean. If this method returns `false`, the project will not run. The run is aborted immediately, so this also prevents all other plugins' ``_build()`` methods from running. + /// + @_documentation(visibility: public) + open func _build() -> Bool { + return false + } + + /// Called by the engine when the user enables the ``EditorPlugin`` in the Plugin tab of the project settings window. + @_documentation(visibility: public) + open func _enablePlugin() { + } + + /// Called by the engine when the user disables the ``EditorPlugin`` in the Plugin tab of the project settings window. + @_documentation(visibility: public) + open func _disablePlugin() { + } + + fileprivate static var method_add_control_to_container: GDExtensionMethodBindPtr = { + let methodName = StringName("add_control_to_container") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3092750152)! + } + + } + + }() + + /// Adds a custom control to a container (see ``EditorPlugin/CustomControlContainer``). There are many locations where custom controls can be added in the editor UI. + /// + /// Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). + /// + /// When your plugin is deactivated, make sure to remove your custom control with ``removeControlFromContainer(_:control:)`` and free it with ``Node/queueFree()``. + /// + public final func addControlToContainer(_ container: EditorPlugin.CustomControlContainer, control: Control?) { + withUnsafePointer(to: container.rawValue) { pArg0 in + withUnsafePointer(to: control?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_control_to_container, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_control_to_bottom_panel: GDExtensionMethodBindPtr = { + let methodName = StringName("add_control_to_bottom_panel") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 111032269)! + } + + } + + }() + + /// Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with ``removeControlFromBottomPanel(control:)`` and free it with ``Node/queueFree()``. + /// + /// Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier. + /// + public final func addControlToBottomPanel(control: Control?, title: String, shortcut: Shortcut? = nil) -> Button? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: control?.handle) { pArg0 in + let title = GString(title) + withUnsafePointer(to: title.content) { pArg1 in + withUnsafePointer(to: shortcut?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_control_to_bottom_panel, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_control_to_dock: GDExtensionMethodBindPtr = { + let methodName = StringName("add_control_to_dock") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2994930786)! + } + + } + + }() + + /// Adds the control to a specific dock slot (see ``EditorPlugin/DockSlot`` for options). + /// + /// If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. + /// + /// When your plugin is deactivated, make sure to remove your custom control with ``removeControlFromDocks(control:)`` and free it with ``Node/queueFree()``. + /// + /// Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier. + /// + public final func addControlToDock(slot: EditorPlugin.DockSlot, control: Control?, shortcut: Shortcut? = nil) { + withUnsafePointer(to: slot.rawValue) { pArg0 in + withUnsafePointer(to: control?.handle) { pArg1 in + withUnsafePointer(to: shortcut?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_control_to_dock, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_control_from_docks: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_control_from_docks") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Removes the control from the dock. You have to manually ``Node/queueFree()`` the control. + public final func removeControlFromDocks(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_control_from_docks, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_control_from_bottom_panel: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_control_from_bottom_panel") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Removes the control from the bottom panel. You have to manually ``Node/queueFree()`` the control. + public final func removeControlFromBottomPanel(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_control_from_bottom_panel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_control_from_container: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_control_from_container") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3092750152)! + } + + } + + }() + + /// Removes the control from the specified container. You have to manually ``Node/queueFree()`` the control. + public final func removeControlFromContainer(_ container: EditorPlugin.CustomControlContainer, control: Control?) { + withUnsafePointer(to: container.rawValue) { pArg0 in + withUnsafePointer(to: control?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_control_from_container, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_dock_tab_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dock_tab_icon") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3450529724)! + } + + } + + }() + + /// Sets the tab icon for the given control in a dock slot. Setting to `null` removes the icon. + public final func setDockTabIcon(control: Control?, icon: Texture2D?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_set_dock_tab_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_tool_menu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_tool_menu_item") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2137474292)! + } + + } + + }() + + /// Adds a custom menu item to **Project > Tools** named `name`. When clicked, the provided `callable` will be called. + public final func addToolMenuItem(name: String, callable: Callable) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_tool_menu_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_tool_submenu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_tool_submenu_item") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1019428915)! + } + + } + + }() + + /// Adds a custom ``PopupMenu`` submenu under **Project > Tools >** `name`. Use ``removeToolMenuItem(name:)`` on plugin clean up to remove the menu. + public final func addToolSubmenuItem(name: String, submenu: PopupMenu?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: submenu?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_tool_submenu_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_tool_menu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_tool_menu_item") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes a menu `name` from **Project > Tools**. + public final func removeToolMenuItem(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_tool_menu_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_export_as_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_export_as_menu") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1775878644)! + } + + } + + }() + + /// Returns the ``PopupMenu`` under **Scene > Export As...**. + public final func getExportAsMenu() -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorPlugin.method_get_export_as_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_custom_type: GDExtensionMethodBindPtr = { + let methodName = StringName("add_custom_type") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1986814599)! + } + + } + + }() + + /// Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. + /// + /// When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. + /// + /// > Note: The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. + /// + /// You can use the virtual method ``_handles(object:)`` to check if your custom object is being edited by checking the script or using the `is` keyword. + /// + /// During run-time, this will be a simple object with a script so this function does not need to be called then. + /// + /// > Note: Custom types added this way are not true classes. They are just a helper to create a node with specific script. + /// + public final func addCustomType(_ type: String, base: String, script: Script?, icon: Texture2D?) { + let type = GString(type) + withUnsafePointer(to: type.content) { pArg0 in + let base = GString(base) + withUnsafePointer(to: base.content) { pArg1 in + withUnsafePointer(to: script?.handle) { pArg2 in + withUnsafePointer(to: icon?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_custom_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_custom_type: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_custom_type") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes a custom type added by ``addCustomType(_:base:script:icon:)``. + public final func removeCustomType(_ type: String) { + let type = GString(type) + withUnsafePointer(to: type.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_custom_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_autoload_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("add_autoload_singleton") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3186203200)! + } + + } + + }() + + /// Adds a script at `path` to the Autoload list as `name`. + public final func addAutoloadSingleton(name: String, path: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_autoload_singleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_autoload_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_autoload_singleton") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes an Autoload `name` from the list. + public final func removeAutoloadSingleton(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_autoload_singleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_update_overlays: GDExtensionMethodBindPtr = { + let methodName = StringName("update_overlays") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Updates the overlays of the 2D and 3D editor viewport. Causes methods ``_forwardCanvasDrawOverViewport(viewportControl:)``, ``_forwardCanvasForceDrawOverViewport(viewportControl:)``, ``_forward3dDrawOverViewport(viewportControl:)`` and ``_forward3dForceDrawOverViewport(viewportControl:)`` to be called. + public final func updateOverlays() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(EditorPlugin.method_update_overlays, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_make_bottom_panel_item_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("make_bottom_panel_item_visible") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Makes a specific item in the bottom panel visible. + public final func makeBottomPanelItemVisible(item: Control?) { + withUnsafePointer(to: item?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_make_bottom_panel_item_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_hide_bottom_panel: GDExtensionMethodBindPtr = { + let methodName = StringName("hide_bottom_panel") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Minimizes the bottom panel. + public final func hideBottomPanel() { + gi.object_method_bind_ptrcall(EditorPlugin.method_hide_bottom_panel, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_undo_redo: GDExtensionMethodBindPtr = { + let methodName = StringName("get_undo_redo") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 773492341)! + } + + } + + }() + + /// Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. + public final func getUndoRedo() -> EditorUndoRedoManager? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorPlugin.method_get_undo_redo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_undo_redo_inspector_hook_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("add_undo_redo_inspector_hook_callback") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. + /// + /// The callback should have 4 arguments: ``Object`` `undo_redo`, ``Object`` `modified_object`, ``String`` `property` and ``Variant`` `new_value`. They are, respectively, the ``UndoRedo`` object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take. + /// + public final func addUndoRedoInspectorHookCallback(callable: Callable) { + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_undo_redo_inspector_hook_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_undo_redo_inspector_hook_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_undo_redo_inspector_hook_callback") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Removes a callback previously added by ``addUndoRedoInspectorHookCallback(callable:)``. + public final func removeUndoRedoInspectorHookCallback(callable: Callable) { + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_undo_redo_inspector_hook_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_queue_save_layout: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_save_layout") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Queue save the project's editor layout. + public final func queueSaveLayout() { + gi.object_method_bind_ptrcall(EditorPlugin.method_queue_save_layout, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_translation_parser_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_translation_parser_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3116463128)! + } + + } + + }() + + /// Registers a custom translation parser plugin for extracting translatable strings from custom files. + public final func addTranslationParserPlugin(parser: EditorTranslationParserPlugin?) { + withUnsafePointer(to: parser?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_translation_parser_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_translation_parser_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_translation_parser_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3116463128)! + } + + } + + }() + + /// Removes a custom translation parser plugin registered by ``addTranslationParserPlugin(parser:)``. + public final func removeTranslationParserPlugin(parser: EditorTranslationParserPlugin?) { + withUnsafePointer(to: parser?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_translation_parser_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_import_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_import_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3113975762)! + } + + } + + }() + + /// Registers a new ``EditorImportPlugin``. Import plugins are used to import custom and unsupported assets as a custom ``Resource`` type. + /// + /// If `firstPriority` is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + /// + /// > Note: If you want to import custom 3D asset formats use ``addSceneFormatImporterPlugin(sceneFormatImporter:firstPriority:)`` instead. + /// + /// See ``addInspectorPlugin(_:)`` for an example of how to register a plugin. + /// + public final func addImportPlugin(importer: EditorImportPlugin?, firstPriority: Bool = false) { + withUnsafePointer(to: importer?.handle) { pArg0 in + withUnsafePointer(to: firstPriority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_import_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_import_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_import_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312482773)! + } + + } + + }() + + /// Removes an import plugin registered by ``addImportPlugin(importer:firstPriority:)``. + public final func removeImportPlugin(importer: EditorImportPlugin?) { + withUnsafePointer(to: importer?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_import_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_scene_format_importer_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_scene_format_importer_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2764104752)! + } + + } + + }() + + /// Registers a new ``EditorSceneFormatImporter``. Scene importers are used to import custom 3D asset formats as scenes. + /// + /// If `firstPriority` is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + /// + public final func addSceneFormatImporterPlugin(sceneFormatImporter: EditorSceneFormatImporter?, firstPriority: Bool = false) { + withUnsafePointer(to: sceneFormatImporter?.handle) { pArg0 in + withUnsafePointer(to: firstPriority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_scene_format_importer_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_scene_format_importer_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_scene_format_importer_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2637776123)! + } + + } + + }() + + /// Removes a scene format importer registered by ``addSceneFormatImporterPlugin(sceneFormatImporter:firstPriority:)``. + public final func removeSceneFormatImporterPlugin(sceneFormatImporter: EditorSceneFormatImporter?) { + withUnsafePointer(to: sceneFormatImporter?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_scene_format_importer_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_scene_post_import_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_scene_post_import_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3492436322)! + } + + } + + }() + + /// Add a ``EditorScenePostImportPlugin``. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. + /// + /// If `firstPriority` is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + /// + public final func addScenePostImportPlugin(sceneImportPlugin: EditorScenePostImportPlugin?, firstPriority: Bool = false) { + withUnsafePointer(to: sceneImportPlugin?.handle) { pArg0 in + withUnsafePointer(to: firstPriority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_scene_post_import_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_scene_post_import_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_scene_post_import_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3045178206)! + } + + } + + }() + + /// Remove the ``EditorScenePostImportPlugin``, added with ``addScenePostImportPlugin(sceneImportPlugin:firstPriority:)``. + public final func removeScenePostImportPlugin(sceneImportPlugin: EditorScenePostImportPlugin?) { + withUnsafePointer(to: sceneImportPlugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_scene_post_import_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_export_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_export_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4095952207)! + } + + } + + }() + + /// Registers a new ``EditorExportPlugin``. Export plugins are used to perform tasks when the project is being exported. + /// + /// See ``addInspectorPlugin(_:)`` for an example of how to register a plugin. + /// + public final func addExportPlugin(_ plugin: EditorExportPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_export_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_export_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_export_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4095952207)! + } + + } + + }() + + /// Removes an export plugin registered by ``addExportPlugin(_:)``. + public final func removeExportPlugin(_ plugin: EditorExportPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_export_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_node_3d_gizmo_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_node_3d_gizmo_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1541015022)! + } + + } + + }() + + /// Registers a new ``EditorNode3DGizmoPlugin``. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a ``Node3D``. + /// + /// See ``addInspectorPlugin(_:)`` for an example of how to register a plugin. + /// + public final func addNode3dGizmoPlugin(_ plugin: EditorNode3DGizmoPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_node_3d_gizmo_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_node_3d_gizmo_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_node_3d_gizmo_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1541015022)! + } + + } + + }() + + /// Removes a gizmo plugin registered by ``addNode3dGizmoPlugin(_:)``. + public final func removeNode3dGizmoPlugin(_ plugin: EditorNode3DGizmoPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_node_3d_gizmo_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_inspector_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_inspector_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 546395733)! + } + + } + + }() + + /// Registers a new ``EditorInspectorPlugin``. Inspector plugins are used to extend ``EditorInspector`` and provide custom configuration tools for your object's properties. + /// + /// > Note: Always use ``removeInspectorPlugin(_:)`` to remove the registered ``EditorInspectorPlugin`` when your ``EditorPlugin`` is disabled to prevent leaks and an unexpected behavior. + /// + public final func addInspectorPlugin(_ plugin: EditorInspectorPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_inspector_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_inspector_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_inspector_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 546395733)! + } + + } + + }() + + /// Removes an inspector plugin registered by ``addImportPlugin(importer:firstPriority:)`` + public final func removeInspectorPlugin(_ plugin: EditorInspectorPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_inspector_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_resource_conversion_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_resource_conversion_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2124849111)! + } + + } + + }() + + /// Registers a new ``EditorResourceConversionPlugin``. Resource conversion plugins are used to add custom resource converters to the editor inspector. + /// + /// See ``EditorResourceConversionPlugin`` for an example of how to create a resource conversion plugin. + /// + public final func addResourceConversionPlugin(_ plugin: EditorResourceConversionPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_resource_conversion_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_resource_conversion_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_resource_conversion_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2124849111)! + } + + } + + }() + + /// Removes a resource conversion plugin registered by ``addResourceConversionPlugin(_:)``. + public final func removeResourceConversionPlugin(_ plugin: EditorResourceConversionPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_resource_conversion_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_input_event_forwarding_always_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_event_forwarding_always_enabled") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Use this method if you always want to receive inputs from 3D view screen inside ``_forward3dGuiInput(viewportCamera:event:)``. It might be especially usable if your plugin will want to use raycast in the scene. + public final func setInputEventForwardingAlwaysEnabled() { + gi.object_method_bind_ptrcall(EditorPlugin.method_set_input_event_forwarding_always_enabled, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_force_draw_over_forwarding_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_force_draw_over_forwarding_enabled") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Enables calling of ``_forwardCanvasForceDrawOverViewport(viewportControl:)`` for the 2D editor and ``_forward3dForceDrawOverViewport(viewportControl:)`` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. + public final func setForceDrawOverForwardingEnabled() { + gi.object_method_bind_ptrcall(EditorPlugin.method_set_force_draw_over_forwarding_enabled, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_editor_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_interface") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4223731786)! + } + + } + + }() + + /// Returns the ``EditorInterface`` singleton instance. + public final func getEditorInterface() -> EditorInterface? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorPlugin.method_get_editor_interface, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_script_create_dialog: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_create_dialog") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3121871482)! + } + + } + + }() + + /// Gets the Editor's dialog used for making scripts. + /// + /// > Note: Users can configure it before use. + /// + /// > Warning: Removing and freeing this node will render a part of the editor useless and may cause a crash. + /// + public final func getScriptCreateDialog() -> ScriptCreateDialog? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorPlugin.method_get_script_create_dialog, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_debugger_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_debugger_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3749880309)! + } + + } + + }() + + /// Adds a ``Script`` as debugger plugin to the Debugger. The script must extend ``EditorDebuggerPlugin``. + public final func addDebuggerPlugin(script: EditorDebuggerPlugin?) { + withUnsafePointer(to: script?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_add_debugger_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_debugger_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_debugger_plugin") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3749880309)! + } + + } + + }() + + /// Removes the debugger plugin with given script from the Debugger. + public final func removeDebuggerPlugin(script: EditorDebuggerPlugin?) { + withUnsafePointer(to: script?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorPlugin.method_remove_debugger_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_plugin_version: GDExtensionMethodBindPtr = { + let methodName = StringName("get_plugin_version") + return withUnsafePointer(to: &EditorPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Provide the version of the plugin declared in the `plugin.cfg` config file. + public final func getPluginVersion() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorPlugin.method_get_plugin_version, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_apply_changes": + return _EditorPlugin_proxy_apply_changes + case "_build": + return _EditorPlugin_proxy_build + case "_clear": + return _EditorPlugin_proxy_clear + case "_disable_plugin": + return _EditorPlugin_proxy_disable_plugin + case "_edit": + return _EditorPlugin_proxy_edit + case "_enable_plugin": + return _EditorPlugin_proxy_enable_plugin + case "_forward_3d_draw_over_viewport": + return _EditorPlugin_proxy_forward_3d_draw_over_viewport + case "_forward_3d_force_draw_over_viewport": + return _EditorPlugin_proxy_forward_3d_force_draw_over_viewport + case "_forward_3d_gui_input": + return _EditorPlugin_proxy_forward_3d_gui_input + case "_forward_canvas_draw_over_viewport": + return _EditorPlugin_proxy_forward_canvas_draw_over_viewport + case "_forward_canvas_force_draw_over_viewport": + return _EditorPlugin_proxy_forward_canvas_force_draw_over_viewport + case "_forward_canvas_gui_input": + return _EditorPlugin_proxy_forward_canvas_gui_input + case "_get_breakpoints": + return _EditorPlugin_proxy_get_breakpoints + case "_get_plugin_icon": + return _EditorPlugin_proxy_get_plugin_icon + case "_get_plugin_name": + return _EditorPlugin_proxy_get_plugin_name + case "_get_state": + return _EditorPlugin_proxy_get_state + case "_get_unsaved_status": + return _EditorPlugin_proxy_get_unsaved_status + case "_get_window_layout": + return _EditorPlugin_proxy_get_window_layout + case "_handles": + return _EditorPlugin_proxy_handles + case "_has_main_screen": + return _EditorPlugin_proxy_has_main_screen + case "_make_visible": + return _EditorPlugin_proxy_make_visible + case "_save_external_data": + return _EditorPlugin_proxy_save_external_data + case "_set_state": + return _EditorPlugin_proxy_set_state + case "_set_window_layout": + return _EditorPlugin_proxy_set_window_layout + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ sceneRoot: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be `null`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sceneChanged.connect { sceneRoot in + /// print ("caught signal") + /// } + /// ``` + public var sceneChanged: Signal1 { Signal1 (target: self, signalName: "scene_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ filepath: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when user closes a scene. The argument is a file path to the closed scene. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sceneClosed.connect { filepath in + /// print ("caught signal") + /// } + /// ``` + public var sceneClosed: Signal2 { Signal2 (target: self, signalName: "scene_closed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ screenName: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mainScreenChanged.connect { screenName in + /// print ("caught signal") + /// } + /// ``` + public var mainScreenChanged: Signal3 { Signal3 (target: self, signalName: "main_screen_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resource: Resource) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Resource ?? Resource (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given `resource` was saved on disc. See also [signal scene_saved]. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceSaved.connect { resource in + /// print ("caught signal") + /// } + /// ``` + public var resourceSaved: Signal4 { Signal4 (target: self, signalName: "resource_saved") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ filepath: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a scene was saved on disc. The argument is a file path to the saved scene. See also [signal resource_saved]. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sceneSaved.connect { filepath in + /// print ("caught signal") + /// } + /// ``` + public var sceneSaved: Signal5 { Signal5 (target: self, signalName: "scene_saved") } + + /// Emitted when any project setting has changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.projectSettingsChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var projectSettingsChanged: SimpleSignal { SimpleSignal (target: self, signalName: "project_settings_changed") } + +} + +// Support methods for proxies +func _EditorPlugin_proxy_apply_changes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyChanges () +} + +func _EditorPlugin_proxy_build (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._build () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorPlugin_proxy_clear (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._clear () +} + +func _EditorPlugin_proxy_disable_plugin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._disablePlugin () +} + +func _EditorPlugin_proxy_edit (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._edit (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_enable_plugin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._enablePlugin () +} + +func _EditorPlugin_proxy_forward_3d_draw_over_viewport (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._forward3dDrawOverViewport (viewportControl: lookupLiveObject (handleAddress: resolved_0) as? Control ?? Control (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_forward_3d_force_draw_over_viewport (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._forward3dForceDrawOverViewport (viewportControl: lookupLiveObject (handleAddress: resolved_0) as? Control ?? Control (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_forward_3d_gui_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._forward3dGuiInput (viewportCamera: lookupLiveObject (handleAddress: resolved_0) as? Camera3D ?? Camera3D (nativeHandle: resolved_0), event: lookupLiveObject (handleAddress: resolved_1) as? InputEvent ?? InputEvent (nativeHandle: resolved_1)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _EditorPlugin_proxy_forward_canvas_draw_over_viewport (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._forwardCanvasDrawOverViewport (viewportControl: lookupLiveObject (handleAddress: resolved_0) as? Control ?? Control (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_forward_canvas_force_draw_over_viewport (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._forwardCanvasForceDrawOverViewport (viewportControl: lookupLiveObject (handleAddress: resolved_0) as? Control ?? Control (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_forward_canvas_gui_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._forwardCanvasGuiInput (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? InputEvent (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorPlugin_proxy_get_breakpoints (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBreakpoints () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorPlugin_proxy_get_plugin_icon (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPluginIcon () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Texture2D +} + +func _EditorPlugin_proxy_get_plugin_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getPluginName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorPlugin_proxy_get_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getState () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _EditorPlugin_proxy_get_unsaved_status (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getUnsavedStatus (forScene: GString.stringFromGStringPtr (ptr: args [0]!) ?? "")) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorPlugin_proxy_get_window_layout (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._getWindowLayout (configuration: lookupLiveObject (handleAddress: resolved_0) as? ConfigFile ?? ConfigFile (nativeHandle: resolved_0)) +} + +func _EditorPlugin_proxy_handles (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._handles (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorPlugin_proxy_has_main_screen (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hasMainScreen () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorPlugin_proxy_make_visible (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._makeVisible (args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorPlugin_proxy_save_external_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._saveExternalData () +} + +func _EditorPlugin_proxy_set_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setState (GDictionary (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _EditorPlugin_proxy_set_window_layout (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._setWindowLayout (configuration: lookupLiveObject (handleAddress: resolved_0) as? ConfigFile ?? ConfigFile (nativeHandle: resolved_0)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorProperty.swift b/Sources/SwiftGodot/Generated/Api/EditorProperty.swift new file mode 100644 index 000000000..5e60f23fb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorProperty.swift @@ -0,0 +1,1524 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Custom control for editing properties that can be added to the ``EditorInspector``. +/// +/// A custom control for editing properties that can be added to the ``EditorInspector``. It is added via ``EditorInspectorPlugin``. +/// +/// +/// This object emits the following signals: +/// +/// - ``propertyChanged`` +/// - ``multiplePropertiesChanged`` +/// - ``propertyKeyed`` +/// - ``propertyDeleted`` +/// - ``propertyKeyedWithValue`` +/// - ``propertyChecked`` +/// - ``propertyPinned`` +/// - ``propertyCanRevertChanged`` +/// - ``resourceSelected`` +/// - ``objectIdSelected`` +/// - ``selected`` +open class EditorProperty: Container { + override open class var godotClassName: StringName { "EditorProperty" } + + /* Properties */ + + /// Set this property to change the label (if you want to show one). + final public var label: String { + get { + return get_label () + } + + set { + set_label (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property is read-only. + final public var readOnly: Bool { + get { + return is_read_only () + } + + set { + set_read_only (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property is checkable. + final public var checkable: Bool { + get { + return is_checkable () + } + + set { + set_checkable (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property is checked. + final public var checked: Bool { + get { + return is_checked () + } + + set { + set_checked (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property is drawn with the editor theme's warning color. This is used for editable children's properties. + final public var drawWarning: Bool { + get { + return is_draw_warning () + } + + set { + set_draw_warning (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property can add keys for animation. + final public var keying: Bool { + get { + return is_keying () + } + + set { + set_keying (newValue) + } + + } + + /// Used by the inspector, set to `true` when the property can be deleted by the user. + final public var deletable: Bool { + get { + return is_deletable () + } + + set { + set_deletable (newValue) + } + + } + + /* Methods */ + /// When this virtual function is called, you must update your editor. + @_documentation(visibility: public) + open func _updateProperty() { + } + + /// Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state. + @_documentation(visibility: public) + open func _setReadOnly(_ readOnly: Bool) { + } + + fileprivate static var method_set_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_label") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_label(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_label") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_label() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorProperty.method_get_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_read_only: GDExtensionMethodBindPtr = { + let methodName = StringName("set_read_only") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_read_only(_ readOnly: Bool) { + withUnsafePointer(to: readOnly) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_read_only, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_read_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_read_only") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_read_only() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_read_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_checkable") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_checkable(_ checkable: Bool) { + withUnsafePointer(to: checkable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_checkable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_checkable") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_checkable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_checkable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("set_checked") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_checked(_ checked: Bool) { + withUnsafePointer(to: checked) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_checked, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_checked") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_checked() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_checked, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_warning: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_warning") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_warning(_ drawWarning: Bool) { + withUnsafePointer(to: drawWarning) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_draw_warning, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_draw_warning: GDExtensionMethodBindPtr = { + let methodName = StringName("is_draw_warning") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_draw_warning() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_draw_warning, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_keying: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keying") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keying(_ keying: Bool) { + withUnsafePointer(to: keying) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_keying, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_keying: GDExtensionMethodBindPtr = { + let methodName = StringName("is_keying") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_keying() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_keying, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_deletable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_deletable") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_deletable(_ deletable: Bool) { + withUnsafePointer(to: deletable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_deletable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_deletable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_deletable") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_deletable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorProperty.method_is_deletable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_edited_property: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_property") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + /// Gets the edited property. If your editor is for a single property (added via ``EditorInspectorPlugin/_parseProperty(object:type:name:hintType:hintString:usageFlags:wide:)``), then this will return the property. + public final func getEditedProperty() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(EditorProperty.method_get_edited_property, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_edited_object: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_object") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2050059866)! + } + + } + + }() + + /// Gets the edited object. + public final func getEditedObject() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorProperty.method_get_edited_object, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_update_property: GDExtensionMethodBindPtr = { + let methodName = StringName("update_property") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces refresh of the property display. + public final func updateProperty() { + gi.object_method_bind_ptrcall(EditorProperty.method_update_property, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_focusable: GDExtensionMethodBindPtr = { + let methodName = StringName("add_focusable") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed. + public final func addFocusable(control: Control?) { + withUnsafePointer(to: control?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_add_focusable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_bottom_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bottom_editor") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1496901182)! + } + + } + + }() + + /// Puts the `editor` control below the property label. The control must be previously added using ``Node/addChild(node:forceReadableName:`internal`:)``. + public final func setBottomEditor(_ editor: Control?) { + withUnsafePointer(to: editor?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_set_bottom_editor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_emit_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("emit_changed") + return withUnsafePointer(to: &EditorProperty.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3069422438)! + } + + } + + }() + + /// If one or several properties have changed, this must be called. `field` is used in case your editor can modify fields separately (as an example, Vector3.x). The `changing` argument avoids the editor requesting this property to be refreshed (leave as `false` if unsure). + public final func emitChanged(property: StringName, value: Variant?, field: StringName = StringName (""), changing: Bool = false) { + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: field.content) { pArg2 in + withUnsafePointer(to: changing) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorProperty.method_emit_changed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_set_read_only": + return _EditorProperty_proxy_set_read_only + case "_update_property": + return _EditorProperty_proxy_update_property + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ value: Variant?, _ field: StringName, _ changing: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = args [1] + let arg_2 = StringName (args [2]!)! + let arg_3 = Bool (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Do not emit this manually, use the ``emitChanged(property:value:field:changing:)`` method instead. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyChanged.connect { property, value, field, changing in + /// print ("caught signal") + /// } + /// ``` + public var propertyChanged: Signal1 { Signal1 (target: self, signalName: "property_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ properties: PackedStringArray, _ value: GArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + let arg_1 = GArray (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emit it if you want multiple properties modified at the same time. Do not use if added via ``EditorInspectorPlugin/_parseProperty(object:type:name:hintType:hintString:usageFlags:wide:)``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.multiplePropertiesChanged.connect { properties, value in + /// print ("caught signal") + /// } + /// ``` + public var multiplePropertiesChanged: Signal2 { Signal2 (target: self, signalName: "multiple_properties_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emit it if you want to add this value as an animation key (check for keying being enabled first). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyKeyed.connect { property in + /// print ("caught signal") + /// } + /// ``` + public var propertyKeyed: Signal3 { Signal3 (target: self, signalName: "property_keyed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property was deleted. Used internally. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyDeleted.connect { property in + /// print ("caught signal") + /// } + /// ``` + public var propertyDeleted: Signal4 { Signal4 (target: self, signalName: "property_deleted") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ value: Variant?) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = args [1] + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emit it if you want to key a property with a single value. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyKeyedWithValue.connect { property, value in + /// print ("caught signal") + /// } + /// ``` + public var propertyKeyedWithValue: Signal5 { Signal5 (target: self, signalName: "property_keyed_with_value") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ checked: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a property was checked. Used internally. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyChecked.connect { property, checked in + /// print ("caught signal") + /// } + /// ``` + public var propertyChecked: Signal6 { Signal6 (target: self, signalName: "property_checked") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ pinned: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. + /// + /// The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyPinned.connect { property, pinned in + /// print ("caught signal") + /// } + /// ``` + public var propertyPinned: Signal7 { Signal7 (target: self, signalName: "property_pinned") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal8/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal8/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal8/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal8 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal8 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ canRevert: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyCanRevertChanged.connect { property, canRevert in + /// print ("caught signal") + /// } + /// ``` + public var propertyCanRevertChanged: Signal8 { Signal8 (target: self, signalName: "property_can_revert_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal9/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal9/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal9/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal9 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal9 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ path: String, _ resource: Resource) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Resource ?? Resource (nativeHandle: ptr_1!) + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// If you want a sub-resource to be edited, emit this signal with the resource. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceSelected.connect { path, resource in + /// print ("caught signal") + /// } + /// ``` + public var resourceSelected: Signal9 { Signal9 (target: self, signalName: "resource_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal10/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal10/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal10/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal10 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal10 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ property: StringName, _ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Used by sub-inspectors. Emit it if what was selected was an Object ID. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.objectIdSelected.connect { property, id in + /// print ("caught signal") + /// } + /// ``` + public var objectIdSelected: Signal10 { Signal10 (target: self, signalName: "object_id_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal11/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal11/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal11/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal11 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal11 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ path: String, _ focusableIdx: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = Int64 (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when selected. Used internally. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.selected.connect { path, focusableIdx in + /// print ("caught signal") + /// } + /// ``` + public var selected: Signal11 { Signal11 (target: self, signalName: "selected") } + +} + +// Support methods for proxies +func _EditorProperty_proxy_set_read_only (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setReadOnly (args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorProperty_proxy_update_property (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._updateProperty () +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorResourceConversionPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorResourceConversionPlugin.swift new file mode 100644 index 000000000..47a30b950 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorResourceConversionPlugin.swift @@ -0,0 +1,95 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plugin for adding custom converters from one resource format to another in the editor resource picker context menu; for example, converting a ``StandardMaterial3D`` to a ``ShaderMaterial``. +/// +/// ``EditorResourceConversionPlugin`` is invoked when the context menu is brought up for a resource in the editor inspector. Relevant conversion plugins will appear as menu options to convert the given resource to a target type. +/// +/// Below shows an example of a basic plugin that will convert an ``ImageTexture`` to a ``PortableCompressedTexture2D``. +/// +/// To use an ``EditorResourceConversionPlugin``, register it using the ``EditorPlugin/addResourceConversionPlugin(_:)`` method first. +/// +open class EditorResourceConversionPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorResourceConversionPlugin" } + /* Methods */ + /// Returns the class name of the target type of ``Resource`` that this plugin converts source resources to. + @_documentation(visibility: public) + open func _convertsTo() -> String { + return String () + } + + /// Called to determine whether a particular ``Resource`` can be converted to the target resource type by this plugin. + @_documentation(visibility: public) + open func _handles(resource: Resource?) -> Bool { + return false + } + + /// Takes an input ``Resource`` and converts it to the type given in ``_convertsTo()``. The returned ``Resource`` is the result of the conversion, and the input ``Resource`` remains unchanged. + @_documentation(visibility: public) + open func _convert(resource: Resource?) -> Resource? { + return Resource () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_convert": + return _EditorResourceConversionPlugin_proxy_convert + case "_converts_to": + return _EditorResourceConversionPlugin_proxy_converts_to + case "_handles": + return _EditorResourceConversionPlugin_proxy_handles + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorResourceConversionPlugin_proxy_convert (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._convert (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Resource +} + +func _EditorResourceConversionPlugin_proxy_converts_to (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._convertsTo ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorResourceConversionPlugin_proxy_handles (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._handles (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorResourcePicker.swift b/Sources/SwiftGodot/Generated/Api/EditorResourcePicker.swift new file mode 100644 index 000000000..defc69eac --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorResourcePicker.swift @@ -0,0 +1,522 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's control for selecting ``Resource`` type properties. +/// +/// This ``Control`` node is used in the editor's Inspector dock to allow editing of ``Resource`` type properties. It provides options for creating, loading, saving and converting resources. Can be used with ``EditorInspectorPlugin`` to recreate the same behavior. +/// +/// > Note: This ``Control`` does not include any editor for the resource, as editing is controlled by the Inspector dock itself or sub-Inspectors. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``resourceSelected`` +/// - ``resourceChanged`` +open class EditorResourcePicker: HBoxContainer { + override open class var godotClassName: StringName { "EditorResourcePicker" } + + /* Properties */ + + /// The base type of allowed resource types. Can be a comma-separated list of several options. + final public var baseType: String { + get { + return get_base_type () + } + + set { + set_base_type (newValue) + } + + } + + /// The edited resource value. + final public var editedResource: Resource? { + get { + return get_edited_resource () + } + + set { + set_edited_resource (newValue) + } + + } + + /// If `true`, the value can be selected and edited. + final public var editable: Bool { + get { + return is_editable () + } + + set { + set_editable (newValue) + } + + } + + /// If `true`, the main button with the resource preview works in the toggle mode. Use ``setTogglePressed(_:)`` to manually set the state. + final public var toggleMode: Bool { + get { + return is_toggle_mode () + } + + set { + set_toggle_mode (newValue) + } + + } + + /* Methods */ + /// This virtual method is called when updating the context menu of ``EditorResourcePicker``. Implement this method to override the "New ..." items with your own options. `menuNode` is a reference to the ``PopupMenu`` node. + /// + /// > Note: Implement ``_handleMenuSelected(id:)`` to handle these custom items. + /// + @_documentation(visibility: public) + open func _setCreateOptions(menuNode: Object?) { + } + + /// This virtual method can be implemented to handle context menu items not handled by default. See ``_setCreateOptions(menuNode:)``. + @_documentation(visibility: public) + open func _handleMenuSelected(id: Int32) -> Bool { + return false + } + + fileprivate static var method_set_base_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_base_type") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_base_type(_ baseType: String) { + let baseType = GString(baseType) + withUnsafePointer(to: baseType.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePicker.method_set_base_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_base_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_type") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_base_type() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorResourcePicker.method_get_base_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_allowed_types: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allowed_types") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns a list of all allowed types and subtypes corresponding to the ``baseType``. If the ``baseType`` is empty, an empty list is returned. + public final func getAllowedTypes() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorResourcePicker.method_get_allowed_types, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_edited_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edited_resource") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edited_resource(_ resource: Resource?) { + withUnsafePointer(to: resource?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePicker.method_set_edited_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_edited_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_resource") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2674603643)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_edited_resource() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorResourcePicker.method_get_edited_resource, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_toggle_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_toggle_mode") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_toggle_mode(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePicker.method_set_toggle_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_toggle_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_toggle_mode") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_toggle_mode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorResourcePicker.method_is_toggle_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_toggle_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_toggle_pressed") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets the toggle mode state for the main button. Works only if ``toggleMode`` is set to `true`. + public final func setTogglePressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePicker.method_set_toggle_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_editable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editable") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editable(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePicker.method_set_editable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editable") + return withUnsafePointer(to: &EditorResourcePicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorResourcePicker.method_is_editable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_handle_menu_selected": + return _EditorResourcePicker_proxy_handle_menu_selected + case "_set_create_options": + return _EditorResourcePicker_proxy_set_create_options + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resource: Resource, _ inspect: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Resource ?? lookupObject (nativeHandle: ptr_0!) ?? Resource (nativeHandle: ptr_0!) + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the resource value was set and user clicked to edit it. When `inspect` is `true`, the signal was caused by the context menu "Edit" or "Inspect" option. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceSelected.connect { resource, inspect in + /// print ("caught signal") + /// } + /// ``` + public var resourceSelected: Signal1 { Signal1 (target: self, signalName: "resource_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resource: Resource) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Resource ?? lookupObject (nativeHandle: ptr_0!) ?? Resource (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the value of the edited resource was changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceChanged.connect { resource in + /// print ("caught signal") + /// } + /// ``` + public var resourceChanged: Signal2 { Signal2 (target: self, signalName: "resource_changed") } + +} + +// Support methods for proxies +func _EditorResourcePicker_proxy_handle_menu_selected (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._handleMenuSelected (id: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorResourcePicker_proxy_set_create_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._setCreateOptions (menuNode: lookupLiveObject (handleAddress: resolved_0) as? Object ?? lookupObject (nativeHandle: resolved_0)!) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorResourcePreview.swift b/Sources/SwiftGodot/Generated/Api/EditorResourcePreview.swift new file mode 100644 index 000000000..67460ba53 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorResourcePreview.swift @@ -0,0 +1,274 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used to generate previews of resources or files. +/// +/// This node is used to generate previews for resources or files. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getResourcePreviewer()``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``previewInvalidated`` +open class EditorResourcePreview: Node { + override open class var godotClassName: StringName { "EditorResourcePreview" } + /* Methods */ + fileprivate static var method_queue_resource_preview: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_resource_preview") + return withUnsafePointer(to: &EditorResourcePreview.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 233177534)! + } + + } + + }() + + /// Queue a resource file located at `path` for preview. Once the preview is ready, the `receiver`'s `receiverFunc` will be called. The `receiverFunc` must take the following four arguments: ``String`` path, ``Texture2D`` preview, ``Texture2D`` thumbnail_preview, ``Variant`` userdata. `userdata` can be anything, and will be returned when `receiverFunc` is called. + /// + /// > Note: If it was not possible to create the preview the `receiverFunc` will still be called, but the preview will be null. + /// + public final func queueResourcePreview(path: String, receiver: Object?, receiverFunc: StringName, userdata: Variant?) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: receiver?.handle) { pArg1 in + withUnsafePointer(to: receiverFunc.content) { pArg2 in + withUnsafePointer(to: userdata.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePreview.method_queue_resource_preview, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_queue_edited_resource_preview: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_edited_resource_preview") + return withUnsafePointer(to: &EditorResourcePreview.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1608376650)! + } + + } + + }() + + /// Queue the `resource` being edited for preview. Once the preview is ready, the `receiver`'s `receiverFunc` will be called. The `receiverFunc` must take the following four arguments: ``String`` path, ``Texture2D`` preview, ``Texture2D`` thumbnail_preview, ``Variant`` userdata. `userdata` can be anything, and will be returned when `receiverFunc` is called. + /// + /// > Note: If it was not possible to create the preview the `receiverFunc` will still be called, but the preview will be null. + /// + public final func queueEditedResourcePreview(resource: Resource?, receiver: Object?, receiverFunc: StringName, userdata: Variant?) { + withUnsafePointer(to: resource?.handle) { pArg0 in + withUnsafePointer(to: receiver?.handle) { pArg1 in + withUnsafePointer(to: receiverFunc.content) { pArg2 in + withUnsafePointer(to: userdata.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePreview.method_queue_edited_resource_preview, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_preview_generator: GDExtensionMethodBindPtr = { + let methodName = StringName("add_preview_generator") + return withUnsafePointer(to: &EditorResourcePreview.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 332288124)! + } + + } + + }() + + /// Create an own, custom preview generator. + public final func addPreviewGenerator(_ generator: EditorResourcePreviewGenerator?) { + withUnsafePointer(to: generator?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePreview.method_add_preview_generator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_preview_generator: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_preview_generator") + return withUnsafePointer(to: &EditorResourcePreview.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 332288124)! + } + + } + + }() + + /// Removes a custom preview generator. + public final func removePreviewGenerator(_ generator: EditorResourcePreviewGenerator?) { + withUnsafePointer(to: generator?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePreview.method_remove_preview_generator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_check_for_invalidation: GDExtensionMethodBindPtr = { + let methodName = StringName("check_for_invalidation") + return withUnsafePointer(to: &EditorResourcePreview.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. + public final func checkForInvalidation(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorResourcePreview.method_check_for_invalidation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ path: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted if a preview was invalidated (changed). `path` corresponds to the path of the preview. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.previewInvalidated.connect { path in + /// print ("caught signal") + /// } + /// ``` + public var previewInvalidated: Signal1 { Signal1 (target: self, signalName: "preview_invalidated") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorResourcePreviewGenerator.swift b/Sources/SwiftGodot/Generated/Api/EditorResourcePreviewGenerator.swift new file mode 100644 index 000000000..54024e864 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorResourcePreviewGenerator.swift @@ -0,0 +1,138 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Custom generator of previews. +/// +/// Custom code to generate previews. Please check `file_dialog/thumbnail_size` in ``EditorSettings`` to find out the right size to do previews at. +open class EditorResourcePreviewGenerator: RefCounted { + override open class var godotClassName: StringName { "EditorResourcePreviewGenerator" } + /* Methods */ + /// Returns `true` if your generator supports the resource of type `type`. + @_documentation(visibility: public) + open func _handles(type: String) -> Bool { + return false + } + + /// Generate a preview from a given resource with the specified size. This must always be implemented. + /// + /// Returning an empty texture is an OK way to fail and let another generator take care. + /// + /// Care must be taken because this function is always called from a thread (not the main thread). + /// + /// `metadata` dictionary can be modified to store file-specific metadata that can be used in ``EditorResourceTooltipPlugin/_makeTooltipForPath(_:metadata:base:)`` (like image size, sample length etc.). + /// + @_documentation(visibility: public) + open func _generate(resource: Resource?, size: Vector2i, metadata: GDictionary) -> Texture2D? { + return Texture2D () + } + + /// Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call ``_generate(resource:size:metadata:)``. + /// + /// Returning an empty texture is an OK way to fail and let another generator take care. + /// + /// Care must be taken because this function is always called from a thread (not the main thread). + /// + /// `metadata` dictionary can be modified to store file-specific metadata that can be used in ``EditorResourceTooltipPlugin/_makeTooltipForPath(_:metadata:base:)`` (like image size, sample length etc.). + /// + @_documentation(visibility: public) + open func _generateFromPath(_ path: String, size: Vector2i, metadata: GDictionary) -> Texture2D? { + return Texture2D () + } + + /// If this function returns `true`, the generator will automatically generate the small previews from the normal preview texture generated by the methods ``_generate(resource:size:metadata:)`` or ``_generateFromPath(_:size:metadata:)``. + /// + /// By default, it returns `false`. + /// + @_documentation(visibility: public) + open func _generateSmallPreviewAutomatically() -> Bool { + return false + } + + /// If this function returns `true`, the generator will call ``_generate(resource:size:metadata:)`` or ``_generateFromPath(_:size:metadata:)`` for small previews as well. + /// + /// By default, it returns `false`. + /// + @_documentation(visibility: public) + open func _canGenerateSmallPreview() -> Bool { + return false + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_can_generate_small_preview": + return _EditorResourcePreviewGenerator_proxy_can_generate_small_preview + case "_generate": + return _EditorResourcePreviewGenerator_proxy_generate + case "_generate_from_path": + return _EditorResourcePreviewGenerator_proxy_generate_from_path + case "_generate_small_preview_automatically": + return _EditorResourcePreviewGenerator_proxy_generate_small_preview_automatically + case "_handles": + return _EditorResourcePreviewGenerator_proxy_handles + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorResourcePreviewGenerator_proxy_can_generate_small_preview (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canGenerateSmallPreview () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorResourcePreviewGenerator_proxy_generate (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._generate (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0), size: args [1]!.assumingMemoryBound (to: Vector2i.self).pointee, metadata: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Texture2D +} + +func _EditorResourcePreviewGenerator_proxy_generate_from_path (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._generateFromPath (GString.stringFromGStringPtr (ptr: args [0]!) ?? "", size: args [1]!.assumingMemoryBound (to: Vector2i.self).pointee, metadata: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Texture2D +} + +func _EditorResourcePreviewGenerator_proxy_generate_small_preview_automatically (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._generateSmallPreviewAutomatically () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorResourcePreviewGenerator_proxy_handles (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._handles (type: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorResourceTooltipPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorResourceTooltipPlugin.swift new file mode 100644 index 000000000..dba3164d0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorResourceTooltipPlugin.swift @@ -0,0 +1,114 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A plugin that advanced tooltip for its handled resource type. +/// +/// Resource tooltip plugins are used by ``FileSystemDock`` to generate customized tooltips for specific resources. E.g. tooltip for a ``Texture2D`` displays a bigger preview and the texture's dimensions. +/// +/// A plugin must be first registered with ``FileSystemDock/addResourceTooltipPlugin(_:)``. When the user hovers a resource in filesystem dock which is handled by the plugin, ``_makeTooltipForPath(_:metadata:base:)`` is called to create the tooltip. It works similarly to ``Control/_makeCustomTooltip(forText:)``. +/// +open class EditorResourceTooltipPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorResourceTooltipPlugin" } + /* Methods */ + /// Return `true` if the plugin is going to handle the given ``Resource`` `type`. + @_documentation(visibility: public) + open func _handles(type: String) -> Bool { + return false + } + + /// Create and return a tooltip that will be displayed when the user hovers a resource under the given `path` in filesystem dock. + /// + /// The `metadata` dictionary is provided by preview generator (see ``EditorResourcePreviewGenerator/_generate(resource:size:metadata:)``). + /// + /// `base` is the base default tooltip, which is a ``VBoxContainer`` with a file name, type and size labels. If another plugin handled the same file type, `base` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned ``Control``. + /// + /// > Note: It's unadvised to use ``ResourceLoader/load(path:typeHint:cacheMode:)``, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use ``requestThumbnail(path:control:)`` if you want to display a preview in your tooltip. + /// + /// > Note: If you decide to discard the `base`, make sure to call ``Node/queueFree()``, because it's not freed automatically. + /// + @_documentation(visibility: public) + open func _makeTooltipForPath(_ path: String, metadata: GDictionary, base: Control?) -> Control? { + return Control () + } + + fileprivate static var method_request_thumbnail: GDExtensionMethodBindPtr = { + let methodName = StringName("request_thumbnail") + return withUnsafePointer(to: &EditorResourceTooltipPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3245519720)! + } + + } + + }() + + /// Requests a thumbnail for the given ``TextureRect``. The thumbnail is created asynchronously by ``EditorResourcePreview`` and automatically set when available. + public final func requestThumbnail(path: String, control: TextureRect?) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: control?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorResourceTooltipPlugin.method_request_thumbnail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_handles": + return _EditorResourceTooltipPlugin_proxy_handles + case "_make_tooltip_for_path": + return _EditorResourceTooltipPlugin_proxy_make_tooltip_for_path + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorResourceTooltipPlugin_proxy_handles (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._handles (type: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorResourceTooltipPlugin_proxy_make_tooltip_for_path (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._makeTooltipForPath (GString.stringFromGStringPtr (ptr: args [0]!) ?? "", metadata: GDictionary (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), base: lookupLiveObject (handleAddress: resolved_2) as? Control ?? Control (nativeHandle: resolved_2)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Control +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporter.swift b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporter.swift new file mode 100644 index 000000000..5308d5a87 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporter.swift @@ -0,0 +1,134 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports scenes from third-parties' 3D files. +/// +/// ``EditorSceneFormatImporter`` allows to define an importer script for a third-party 3D format. +/// +/// To use ``EditorSceneFormatImporter``, register it using the ``EditorPlugin/addSceneFormatImporterPlugin(sceneFormatImporter:firstPriority:)`` method first. +/// +open class EditorSceneFormatImporter: RefCounted { + override open class var godotClassName: StringName { "EditorSceneFormatImporter" } + /* Constants */ + /// + public static let importScene = 1 + /// + public static let importAnimation = 2 + /// + public static let importFailOnMissingDependencies = 4 + /// + public static let importGenerateTangentArrays = 8 + /// + public static let importUseNamedSkinBinds = 16 + /// + public static let importDiscardMeshesAndMaterials = 32 + /// + public static let importForceDisableMeshCompression = 64 + /* Methods */ + /// + @_documentation(visibility: public) + open func _getImportFlags() -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// + @_documentation(visibility: public) + open func _importScene(path: String, flags: UInt32, options: GDictionary) -> Object? { + return Object () + } + + /// + @_documentation(visibility: public) + open func _getImportOptions(path: String) { + } + + /// + @_documentation(visibility: public) + open func _getOptionVisibility(path: String, forAnimation: Bool, option: String) -> Variant? { + return nil + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_extensions": + return _EditorSceneFormatImporter_proxy_get_extensions + case "_get_import_flags": + return _EditorSceneFormatImporter_proxy_get_import_flags + case "_get_import_options": + return _EditorSceneFormatImporter_proxy_get_import_options + case "_get_option_visibility": + return _EditorSceneFormatImporter_proxy_get_option_visibility + case "_import_scene": + return _EditorSceneFormatImporter_proxy_import_scene + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorSceneFormatImporter_proxy_get_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorSceneFormatImporter_proxy_get_import_flags (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getImportFlags () + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _EditorSceneFormatImporter_proxy_get_import_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._getImportOptions (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorSceneFormatImporter_proxy_get_option_visibility (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getOptionVisibility (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", forAnimation: args [1]!.assumingMemoryBound (to: Bool.self).pointee, option: GString.stringFromGStringPtr (ptr: args [2]!) ?? "") + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorSceneFormatImporter_proxy_import_scene (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._importScene (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", flags: args [1]!.assumingMemoryBound (to: UInt32.self).pointee, options: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Object +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterBlend.swift b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterBlend.swift new file mode 100644 index 000000000..b9c3acdbd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterBlend.swift @@ -0,0 +1,36 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Importer for Blender's `.blend` scene file format. +/// +/// Imports Blender scenes in the `.blend` file format through the glTF 2.0 3D import pipeline. This importer requires Blender to be installed by the user, so that it can be used to export the scene as glTF 2.0. +/// +/// The location of the Blender binary is set via the `filesystem/import/blender/blender_path` editor setting. +/// +/// This importer is only used if ``ProjectSettings/filesystem/import/blender/enabled`` is enabled, otherwise `.blend` files present in the project folder are not imported. +/// +/// Blend import requires Blender 3.0. +/// +/// Internally, the EditorSceneFormatImporterBlend uses the Blender glTF "Use Original" mode to reference external textures. +/// +open class EditorSceneFormatImporterBlend: EditorSceneFormatImporter { + override open class var godotClassName: StringName { "EditorSceneFormatImporterBlend" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterFBX2GLTF.swift b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterFBX2GLTF.swift new file mode 100644 index 000000000..5b4de1e58 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterFBX2GLTF.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Importer for the `.fbx` scene file format. +/// +/// Imports Autodesk FBX 3D scenes by way of converting them to glTF 2.0 using the FBX2glTF command line tool. +/// +/// The location of the FBX2glTF binary is set via the ``EditorSettings/filesystem/import/fbx/fbx2gltfPath`` editor setting. +/// +/// This importer is only used if ``ProjectSettings/filesystem/import/fbx2gltf/enabled`` is set to `true`. +/// +open class EditorSceneFormatImporterFBX2GLTF: EditorSceneFormatImporter { + override open class var godotClassName: StringName { "EditorSceneFormatImporterFBX2GLTF" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterGLTF.swift b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterGLTF.swift new file mode 100644 index 000000000..42ee85f03 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterGLTF.swift @@ -0,0 +1,24 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class EditorSceneFormatImporterGLTF: EditorSceneFormatImporter { + override open class var godotClassName: StringName { "EditorSceneFormatImporterGLTF" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterUFBX.swift b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterUFBX.swift new file mode 100644 index 000000000..68df5f3c8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSceneFormatImporterUFBX.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Import FBX files using the ufbx library. +/// +/// EditorSceneFormatImporterUFBX is designed to load FBX files and supports both binary and ASCII FBX files from version 3000 onward. This class supports various 3D object types like meshes, skins, blend shapes, materials, and rigging information. The class aims for feature parity with the official FBX SDK and supports FBX 7.4 specifications. +open class EditorSceneFormatImporterUFBX: EditorSceneFormatImporter { + override open class var godotClassName: StringName { "EditorSceneFormatImporterUFBX" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorScenePostImport.swift b/Sources/SwiftGodot/Generated/Api/EditorScenePostImport.swift new file mode 100644 index 000000000..a46a73a0f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorScenePostImport.swift @@ -0,0 +1,77 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Post-processes scenes after import. +/// +/// Imported scenes can be automatically modified right after import by setting their **Custom Script** Import property to a `tool` script that inherits from this class. +/// +/// The ``_postImport(scene:)`` callback receives the imported scene's root node and returns the modified version of the scene. Usage example: +/// +open class EditorScenePostImport: RefCounted { + override open class var godotClassName: StringName { "EditorScenePostImport" } + /* Methods */ + /// Called after the scene was imported. This method must return the modified version of the scene. + @_documentation(visibility: public) + open func _postImport(scene: Node?) -> Object? { + return Object () + } + + fileprivate static var method_get_source_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_file") + return withUnsafePointer(to: &EditorScenePostImport.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the source file path which got imported (e.g. `res://scene.dae`). + public final func getSourceFile() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorScenePostImport.method_get_source_file, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_post_import": + return _EditorScenePostImport_proxy_post_import + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorScenePostImport_proxy_post_import (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._postImport (scene: lookupLiveObject (handleAddress: resolved_0) as? Node ?? Node (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Object +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorScenePostImportPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorScenePostImportPlugin.swift new file mode 100644 index 000000000..2620f0596 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorScenePostImportPlugin.swift @@ -0,0 +1,301 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plugin to control and modifying the process of importing a scene. +/// +/// This plugin type exists to modify the process of importing scenes, allowing to change the content as well as add importer options at every stage of the process. +open class EditorScenePostImportPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorScenePostImportPlugin" } + public enum InternalImportCategory: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case node = 0 // INTERNAL_IMPORT_CATEGORY_NODE + /// + case mesh3dNode = 1 // INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE + /// + case mesh = 2 // INTERNAL_IMPORT_CATEGORY_MESH + /// + case material = 3 // INTERNAL_IMPORT_CATEGORY_MATERIAL + /// + case animation = 4 // INTERNAL_IMPORT_CATEGORY_ANIMATION + /// + case animationNode = 5 // INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE + /// + case skeleton3dNode = 6 // INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE + /// + case max = 7 // INTERNAL_IMPORT_CATEGORY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .node: return ".node" + case .mesh3dNode: return ".mesh3dNode" + case .mesh: return ".mesh" + case .material: return ".material" + case .animation: return ".animation" + case .animationNode: return ".animationNode" + case .skeleton3dNode: return ".skeleton3dNode" + case .max: return ".max" + } + + } + + } + + /* Methods */ + /// Override to add internal import options. These will appear in the 3D scene import dialog. Add options via ``addImportOption(name:value:)`` and ``addImportOptionAdvanced(type:name:defaultValue:hint:hintString:usageFlags:)``. + @_documentation(visibility: public) + open func _getInternalImportOptions(category: Int32) { + } + + /// Return true or false whether a given option should be visible. Return null to ignore. + @_documentation(visibility: public) + open func _getInternalOptionVisibility(category: Int32, forAnimation: Bool, option: String) -> Variant? { + return nil + } + + /// Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed. + @_documentation(visibility: public) + open func _getInternalOptionUpdateViewRequired(category: Int32, option: String) -> Variant? { + return nil + } + + /// Process a specific node or resource for a given category. + @_documentation(visibility: public) + open func _internalProcess(category: Int32, baseNode: Node?, node: Node?, resource: Resource?) { + } + + /// Override to add general import options. These will appear in the main import dock on the editor. Add options via ``addImportOption(name:value:)`` and ``addImportOptionAdvanced(type:name:defaultValue:hint:hintString:usageFlags:)``. + @_documentation(visibility: public) + open func _getImportOptions(path: String) { + } + + /// Return true or false whether a given option should be visible. Return null to ignore. + @_documentation(visibility: public) + open func _getOptionVisibility(path: String, forAnimation: Bool, option: String) -> Variant? { + return nil + } + + /// Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. + @_documentation(visibility: public) + open func _preProcess(scene: Node?) { + } + + /// Post process the scene. This function is called after the final scene has been configured. + @_documentation(visibility: public) + open func _postProcess(scene: Node?) { + } + + fileprivate static var method_get_option_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_value") + return withUnsafePointer(to: &EditorScenePostImportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Query the value of an option. This function can only be called from those querying visibility, or processing. + public final func getOptionValue(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorScenePostImportPlugin.method_get_option_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_add_import_option: GDExtensionMethodBindPtr = { + let methodName = StringName("add_import_option") + return withUnsafePointer(to: &EditorScenePostImportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402577236)! + } + + } + + }() + + /// Add a specific import option (name and default value only). This function can only be called from ``_getImportOptions(path:)`` and ``_getInternalImportOptions(category:)``. + public final func addImportOption(name: String, value: Variant?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorScenePostImportPlugin.method_add_import_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_import_option_advanced: GDExtensionMethodBindPtr = { + let methodName = StringName("add_import_option_advanced") + return withUnsafePointer(to: &EditorScenePostImportPlugin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3674075649)! + } + + } + + }() + + /// Add a specific import option. This function can only be called from ``_getImportOptions(path:)`` and ``_getInternalImportOptions(category:)``. + public final func addImportOptionAdvanced(type: Variant.GType, name: String, defaultValue: Variant?, hint: PropertyHint = .none, hintString: String = "", usageFlags: Int32 = 6) { + withUnsafePointer(to: type.rawValue) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: defaultValue.content) { pArg2 in + withUnsafePointer(to: hint.rawValue) { pArg3 in + let hintString = GString(hintString) + withUnsafePointer(to: hintString.content) { pArg4 in + withUnsafePointer(to: usageFlags) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(EditorScenePostImportPlugin.method_add_import_option_advanced, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_import_options": + return _EditorScenePostImportPlugin_proxy_get_import_options + case "_get_internal_import_options": + return _EditorScenePostImportPlugin_proxy_get_internal_import_options + case "_get_internal_option_update_view_required": + return _EditorScenePostImportPlugin_proxy_get_internal_option_update_view_required + case "_get_internal_option_visibility": + return _EditorScenePostImportPlugin_proxy_get_internal_option_visibility + case "_get_option_visibility": + return _EditorScenePostImportPlugin_proxy_get_option_visibility + case "_internal_process": + return _EditorScenePostImportPlugin_proxy_internal_process + case "_post_process": + return _EditorScenePostImportPlugin_proxy_post_process + case "_pre_process": + return _EditorScenePostImportPlugin_proxy_pre_process + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorScenePostImportPlugin_proxy_get_import_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._getImportOptions (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorScenePostImportPlugin_proxy_get_internal_import_options (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._getInternalImportOptions (category: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _EditorScenePostImportPlugin_proxy_get_internal_option_update_view_required (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInternalOptionUpdateViewRequired (category: args [0]!.assumingMemoryBound (to: Int32.self).pointee, option: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorScenePostImportPlugin_proxy_get_internal_option_visibility (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInternalOptionVisibility (category: args [0]!.assumingMemoryBound (to: Int32.self).pointee, forAnimation: args [1]!.assumingMemoryBound (to: Bool.self).pointee, option: GString.stringFromGStringPtr (ptr: args [2]!) ?? "") + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorScenePostImportPlugin_proxy_get_option_visibility (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getOptionVisibility (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", forAnimation: args [1]!.assumingMemoryBound (to: Bool.self).pointee, option: GString.stringFromGStringPtr (ptr: args [2]!) ?? "") + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _EditorScenePostImportPlugin_proxy_internal_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + let resolved_3 = args [3]!.load (as: UnsafeRawPointer.self) + + swiftObject._internalProcess (category: args [0]!.assumingMemoryBound (to: Int32.self).pointee, baseNode: lookupLiveObject (handleAddress: resolved_1) as? Node ?? Node (nativeHandle: resolved_1), node: lookupLiveObject (handleAddress: resolved_2) as? Node ?? Node (nativeHandle: resolved_2), resource: lookupLiveObject (handleAddress: resolved_3) as? Resource ?? Resource (nativeHandle: resolved_3)) +} + +func _EditorScenePostImportPlugin_proxy_post_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._postProcess (scene: lookupLiveObject (handleAddress: resolved_0) as? Node ?? Node (nativeHandle: resolved_0)) +} + +func _EditorScenePostImportPlugin_proxy_pre_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._preProcess (scene: lookupLiveObject (handleAddress: resolved_0) as? Node ?? Node (nativeHandle: resolved_0)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorScript.swift b/Sources/SwiftGodot/Generated/Api/EditorScript.swift new file mode 100644 index 000000000..4788ba289 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorScript.swift @@ -0,0 +1,122 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base script that can be used to add extension functions to the editor. +/// +/// Scripts extending this class and implementing its ``_run()`` method can be executed from the Script Editor's **File > Run** menu option (or by pressing [kbd]Ctrl + Shift + X[/kbd]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using ``EditorPlugin``s instead. +/// +/// > Note: Extending scripts need to have `tool` mode enabled. +/// +/// **Example script:** +/// +/// > Note: The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot **Output** dock. +/// +/// > Note: EditorScript is ``RefCounted``, meaning it is destroyed when nothing references it. This can cause errors during asynchronous operations if there are no references to the script. +/// +open class EditorScript: RefCounted { + override open class var godotClassName: StringName { "EditorScript" } + /* Methods */ + /// This method is executed by the Editor when **File > Run** is used. + @_documentation(visibility: public) + open func _run() { + } + + fileprivate static var method_add_root_node: GDExtensionMethodBindPtr = { + let methodName = StringName("add_root_node") + return withUnsafePointer(to: &EditorScript.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Makes `node` root of the currently opened scene. Only works if the scene is empty. If the `node` is a scene instance, an inheriting scene will be created. + public final func addRootNode(_ node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorScript.method_add_root_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene") + return withUnsafePointer(to: &EditorScript.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + /// Returns the edited (current) scene's root ``Node``. Equivalent of ``EditorInterface/getEditedSceneRoot()``. + public final func getScene() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorScript.method_get_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_editor_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_interface") + return withUnsafePointer(to: &EditorScript.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1976662476)! + } + + } + + }() + + /// Returns the ``EditorInterface`` singleton instance. + public final func getEditorInterface() -> EditorInterface? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorScript.method_get_editor_interface, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_run": + return _EditorScript_proxy_run + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorScript_proxy_run (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._run () +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorScriptPicker.swift b/Sources/SwiftGodot/Generated/Api/EditorScriptPicker.swift new file mode 100644 index 000000000..ef7bfe271 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorScriptPicker.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's control for selecting the `script` property of a ``Node``. +/// +/// Similar to ``EditorResourcePicker`` this ``Control`` node is used in the editor's Inspector dock, but only to edit the `script` property of a ``Node``. Default options for creating new resources of all possible subtypes are replaced with dedicated buttons that open the "Attach Node Script" dialog. Can be used with ``EditorInspectorPlugin`` to recreate the same behavior. +/// +/// > Note: You must set the ``scriptOwner`` for the custom context menu items to work. +/// +open class EditorScriptPicker: EditorResourcePicker { + override open class var godotClassName: StringName { "EditorScriptPicker" } + + /* Properties */ + + /// The owner ``Node`` of the script property that holds the edited resource. + final public var scriptOwner: Node? { + get { + return get_script_owner () + } + + set { + set_script_owner (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_script_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("set_script_owner") + return withUnsafePointer(to: &EditorScriptPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_script_owner(_ ownerNode: Node?) { + withUnsafePointer(to: ownerNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorScriptPicker.method_set_script_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_script_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_owner") + return withUnsafePointer(to: &EditorScriptPicker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_script_owner() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(EditorScriptPicker.method_get_script_owner, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSelection.swift b/Sources/SwiftGodot/Generated/Api/EditorSelection.swift new file mode 100644 index 000000000..5166f65c9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSelection.swift @@ -0,0 +1,161 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Manages the SceneTree selection in the editor. +/// +/// This object manages the SceneTree selection in the editor. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getSelection()``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``selectionChanged`` +open class EditorSelection: Object { + override open class var godotClassName: StringName { "EditorSelection" } + /* Methods */ + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &EditorSelection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear the selection. + public final func clear() { + gi.object_method_bind_ptrcall(EditorSelection.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_node: GDExtensionMethodBindPtr = { + let methodName = StringName("add_node") + return withUnsafePointer(to: &EditorSelection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Adds a node to the selection. + /// + /// > Note: The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use ``EditorInterface/editNode(_:)``. + /// + public final func addNode(_ node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSelection.method_add_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_node: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_node") + return withUnsafePointer(to: &EditorSelection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Removes a node from the selection. + public final func removeNode(_ node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSelection.method_remove_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_selected_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_nodes") + return withUnsafePointer(to: &EditorSelection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of selected nodes. + public final func getSelectedNodes() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(EditorSelection.method_get_selected_nodes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_transformable_selected_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transformable_selected_nodes") + return withUnsafePointer(to: &EditorSelection.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild. + public final func getTransformableSelectedNodes() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(EditorSelection.method_get_transformable_selected_nodes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + // Signals + /// Emitted when the selection changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.selectionChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var selectionChanged: SimpleSignal { SimpleSignal (target: self, signalName: "selection_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSettings.swift b/Sources/SwiftGodot/Generated/Api/EditorSettings.swift new file mode 100644 index 000000000..5faed6666 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSettings.swift @@ -0,0 +1,500 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Object that holds the project-independent editor settings. +/// +/// Object that holds the project-independent editor settings. These settings are generally visible in the **Editor > Editor Settings** menu. +/// +/// Property names use slash delimiters to distinguish sections. Setting values can be of any ``Variant`` type. It's recommended to use `snake_case` for editor settings to be consistent with the Godot editor itself. +/// +/// Accessing the settings can be done using the following methods, such as: +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getEditorSettings()``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``settingsChanged`` +open class EditorSettings: Resource { + override open class var godotClassName: StringName { "EditorSettings" } + /* Constants */ + /// Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. + public static let notificationEditorSettingsChanged = 10000 + /* Methods */ + fileprivate static var method_has_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("has_setting") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the setting specified by `name` exists, `false` otherwise. + public final func hasSetting(name: String) -> Bool { + var _result: Bool = false + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_has_setting, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_setting") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402577236)! + } + + } + + }() + + /// Sets the `value` of the setting specified by `name`. This is equivalent to using ``Object/set(property:value:)`` on the EditorSettings instance. + public final func setSetting(name: String, value: Variant?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_setting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("get_setting") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1868160156)! + } + + } + + }() + + /// Returns the value of the setting specified by `name`. This is equivalent to using ``Object/get(property:)`` on the EditorSettings instance. + public final func getSetting(name: String) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_get_setting, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_erase: GDExtensionMethodBindPtr = { + let methodName = StringName("erase") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Erases the setting whose name is specified by `property`. + public final func erase(property: String) { + let property = GString(property) + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_erase, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_initial_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_initial_value") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1529169264)! + } + + } + + }() + + /// Sets the initial value of the setting specified by `name` to `value`. This is used to provide a value for the Revert button in the Editor Settings. If `updateCurrent` is true, the current value of the setting will be set to `value` as well. + public final func setInitialValue(name: StringName, value: Variant?, updateCurrent: Bool) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: updateCurrent) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_initial_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_property_info: GDExtensionMethodBindPtr = { + let methodName = StringName("add_property_info") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + /// Adds a custom property info to a property. The dictionary must contain: + /// + /// - `name`: ``String`` (the name of the property) + /// + /// - `type`: integer (see ``Variant.GType``) + /// + /// - optionally `hint`: integer (see ``PropertyHint``) and `hint_string`: ``String`` + /// + /// **Example:** + /// + public final func addPropertyInfo(_ info: GDictionary) { + withUnsafePointer(to: info.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_add_property_info, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_project_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("set_project_metadata") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2504492430)! + } + + } + + }() + + /// Sets project-specific metadata with the `section`, `key` and `data` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also ``getProjectMetadata(section:key:`default`:)``. + public final func setProjectMetadata(section: String, key: String, data: Variant?) { + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_project_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_project_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("get_project_metadata") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 89809366)! + } + + } + + }() + + /// Returns project-specific metadata for the `section` and `key` specified. If the metadata doesn't exist, `default` will be returned instead. See also ``setProjectMetadata(section:key:data:)``. + public final func getProjectMetadata(section: String, key: String, `default`: Variant?) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let section = GString(section) + withUnsafePointer(to: section.content) { pArg0 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: `default`.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_get_project_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_favorites: GDExtensionMethodBindPtr = { + let methodName = StringName("set_favorites") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + /// Sets the list of favorite files and directories for this project. + public final func setFavorites(dirs: PackedStringArray) { + withUnsafePointer(to: dirs.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_favorites, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_favorites: GDExtensionMethodBindPtr = { + let methodName = StringName("get_favorites") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of favorite files and directories for this project. + public final func getFavorites() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorSettings.method_get_favorites, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_recent_dirs: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recent_dirs") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + /// Sets the list of recently visited folders in the file dialog for this project. + public final func setRecentDirs(_ dirs: PackedStringArray) { + withUnsafePointer(to: dirs.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_recent_dirs, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_recent_dirs: GDExtensionMethodBindPtr = { + let methodName = StringName("get_recent_dirs") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of recently visited folders in the file dialog for this project. + public final func getRecentDirs() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorSettings.method_get_recent_dirs, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_builtin_action_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_builtin_action_override") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1209351045)! + } + + } + + }() + + /// Overrides the built-in editor action `name` with the input actions defined in `actionsList`. + public final func setBuiltinActionOverride(name: String, actionsList: ObjectCollection) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: actionsList.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_set_builtin_action_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_check_changed_settings_in_group: GDExtensionMethodBindPtr = { + let methodName = StringName("check_changed_settings_in_group") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Checks if any settings with the prefix `settingPrefix` exist in the set of changed settings. See also ``getChangedSettings()``. + public final func checkChangedSettingsInGroup(settingPrefix: String) -> Bool { + var _result: Bool = false + let settingPrefix = GString(settingPrefix) + withUnsafePointer(to: settingPrefix.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_check_changed_settings_in_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_changed_settings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_changed_settings") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Gets an array of the settings which have been changed since the last save. Note that internally `changed_settings` is cleared after a successful save, so generally the most appropriate place to use this method is when processing ``notificationEditorSettingsChanged``. + public final func getChangedSettings() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(EditorSettings.method_get_changed_settings, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_mark_setting_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("mark_setting_changed") + return withUnsafePointer(to: &EditorSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Marks the passed editor setting as being changed, see ``getChangedSettings()``. Only settings which exist (see ``hasSetting(name:)``) will be accepted. + public final func markSettingChanged(setting: String) { + let setting = GString(setting) + withUnsafePointer(to: setting.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSettings.method_mark_setting_changed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Emitted after any editor setting has changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.settingsChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var settingsChanged: SimpleSignal { SimpleSignal (target: self, signalName: "settings_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSpinSlider.swift b/Sources/SwiftGodot/Generated/Api/EditorSpinSlider.swift new file mode 100644 index 000000000..247f7b5b0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSpinSlider.swift @@ -0,0 +1,389 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's control for editing numeric values. +/// +/// This ``Control`` node is used in the editor's Inspector dock to allow editing of numeric values. Can be used with ``EditorInspectorPlugin`` to recreate the same behavior. +/// +/// If the ``Range/step`` value is `1`, the ``EditorSpinSlider`` will display up/down arrows, similar to ``SpinBox``. If the ``Range/step`` value is not `1`, a slider will be displayed instead. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``grabbed`` +/// - ``ungrabbed`` +/// - ``valueFocusEntered`` +/// - ``valueFocusExited`` +open class EditorSpinSlider: Range { + override open class var godotClassName: StringName { "EditorSpinSlider" } + + /* Properties */ + + /// The text that displays to the left of the value. + final public var label: String { + get { + return get_label () + } + + set { + set_label (newValue) + } + + } + + /// The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. + final public var suffix: String { + get { + return get_suffix () + } + + set { + set_suffix (newValue) + } + + } + + /// If `true`, the slider can't be interacted with. + final public var readOnly: Bool { + get { + return is_read_only () + } + + set { + set_read_only (newValue) + } + + } + + /// If `true`, the slider will not draw background. + final public var flat: Bool { + get { + return is_flat () + } + + set { + set_flat (newValue) + } + + } + + /// If `true`, the slider and up/down arrows are hidden. + final public var hideSlider: Bool { + get { + return is_hiding_slider () + } + + set { + set_hide_slider (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_label") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_label(_ label: String) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSpinSlider.method_set_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_label") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_label() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorSpinSlider.method_get_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_suffix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_suffix") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_suffix(_ suffix: String) { + let suffix = GString(suffix) + withUnsafePointer(to: suffix.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSpinSlider.method_set_suffix, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_suffix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_suffix") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_suffix() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(EditorSpinSlider.method_get_suffix, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_read_only: GDExtensionMethodBindPtr = { + let methodName = StringName("set_read_only") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_read_only(_ readOnly: Bool) { + withUnsafePointer(to: readOnly) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSpinSlider.method_set_read_only, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_read_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_read_only") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_read_only() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorSpinSlider.method_is_read_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flat") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flat(_ flat: Bool) { + withUnsafePointer(to: flat) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSpinSlider.method_set_flat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flat") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flat() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorSpinSlider.method_is_flat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hide_slider: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hide_slider") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hide_slider(_ hideSlider: Bool) { + withUnsafePointer(to: hideSlider) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorSpinSlider.method_set_hide_slider, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hiding_slider: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hiding_slider") + return withUnsafePointer(to: &EditorSpinSlider.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hiding_slider() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorSpinSlider.method_is_hiding_slider, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the spinner/slider is grabbed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.grabbed.connect { + /// print ("caught signal") + /// } + /// ``` + public var grabbed: SimpleSignal { SimpleSignal (target: self, signalName: "grabbed") } + + /// Emitted when the spinner/slider is ungrabbed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.ungrabbed.connect { + /// print ("caught signal") + /// } + /// ``` + public var ungrabbed: SimpleSignal { SimpleSignal (target: self, signalName: "ungrabbed") } + + /// Emitted when the value form gains focus. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.valueFocusEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var valueFocusEntered: SimpleSignal { SimpleSignal (target: self, signalName: "value_focus_entered") } + + /// Emitted when the value form loses focus. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.valueFocusExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var valueFocusExited: SimpleSignal { SimpleSignal (target: self, signalName: "value_focus_exited") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorSyntaxHighlighter.swift b/Sources/SwiftGodot/Generated/Api/EditorSyntaxHighlighter.swift new file mode 100644 index 000000000..91088a3e5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorSyntaxHighlighter.swift @@ -0,0 +1,73 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for ``SyntaxHighlighter`` used by the ``ScriptEditor``. +/// +/// Base class that all ``SyntaxHighlighter``s used by the ``ScriptEditor`` extend from. +/// +/// Add a syntax highlighter to an individual script by calling ``ScriptEditorBase/addSyntaxHighlighter(_:)``. To apply to all scripts on open, call ``ScriptEditor/registerSyntaxHighlighter(_:)``. +/// +open class EditorSyntaxHighlighter: SyntaxHighlighter { + override open class var godotClassName: StringName { "EditorSyntaxHighlighter" } + /* Methods */ + /// Virtual method which can be overridden to return the syntax highlighter name. + @_documentation(visibility: public) + open func _getName() -> String { + return String () + } + + /// Virtual method which can be overridden to return the supported language names. + @_documentation(visibility: public) + open func _getSupportedLanguages() -> PackedStringArray { + return PackedStringArray () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_name": + return _EditorSyntaxHighlighter_proxy_get_name + case "_get_supported_languages": + return _EditorSyntaxHighlighter_proxy_get_supported_languages + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorSyntaxHighlighter_proxy_get_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorSyntaxHighlighter_proxy_get_supported_languages (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSupportedLanguages () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorTranslationParserPlugin.swift b/Sources/SwiftGodot/Generated/Api/EditorTranslationParserPlugin.swift new file mode 100644 index 000000000..db7be8b6c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorTranslationParserPlugin.swift @@ -0,0 +1,85 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.). +/// +/// ``EditorTranslationParserPlugin`` is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the ``_parseFile(path:msgids:msgidsContextPlural:)`` method in script. +/// +/// Add the extracted strings to argument `msgids` or `msgids_context_plural` if context or plural is used. +/// +/// When adding to `msgids_context_plural`, you must add the data using the format `["A", "B", "C"]`, where `A` represents the extracted string, `B` represents the context, and `C` represents the plural version of the extracted string. If you want to add only context but not plural, put `""` for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples. +/// +/// The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu. +/// +/// Below shows an example of a custom parser that extracts strings from a CSV file to write into a POT. +/// +/// To add a translatable string associated with context or plural, add it to `msgids_context_plural`: +/// +/// > Note: If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the `path` argument using ``ResourceLoader/load(path:typeHint:cacheMode:)``. This is because built-in scripts are loaded as ``Resource`` type, not ``FileAccess`` type. +/// +/// For example: +/// +/// To use ``EditorTranslationParserPlugin``, register it using the ``EditorPlugin/addTranslationParserPlugin(parser:)`` method first. +/// +open class EditorTranslationParserPlugin: RefCounted { + override open class var godotClassName: StringName { "EditorTranslationParserPlugin" } + /* Methods */ + /// Override this method to define a custom parsing logic to extract the translatable strings. + @_documentation(visibility: public) + open func _parseFile(path: String, msgids: VariantCollection, msgidsContextPlural: VariantCollection) { + } + + /// Gets the list of file extensions to associate with this parser, e.g. `["csv"]`. + @_documentation(visibility: public) + open func _getRecognizedExtensions() -> PackedStringArray { + return PackedStringArray () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_recognized_extensions": + return _EditorTranslationParserPlugin_proxy_get_recognized_extensions + case "_parse_file": + return _EditorTranslationParserPlugin_proxy_parse_file + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorTranslationParserPlugin_proxy_get_recognized_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRecognizedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _EditorTranslationParserPlugin_proxy_parse_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._parseFile (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", msgids: args [1]!.assumingMemoryBound (to: VariantCollection.self).pointee, msgidsContextPlural: args [2]!.assumingMemoryBound (to: VariantCollection.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorUndoRedoManager.swift b/Sources/SwiftGodot/Generated/Api/EditorUndoRedoManager.swift new file mode 100644 index 000000000..3581febbc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorUndoRedoManager.swift @@ -0,0 +1,517 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Manages undo history of scenes opened in the editor. +/// +/// ``EditorUndoRedoManager`` is a manager for ``UndoRedo`` objects associated with edited scenes. Each scene has its own undo history and ``EditorUndoRedoManager`` ensures that each action performed in the editor gets associated with a proper scene. For actions not related to scenes (``ProjectSettings`` edits, external resources, etc.), a separate global history is used. +/// +/// The usage is mostly the same as ``UndoRedo``. You create and commit actions and the manager automatically decides under-the-hood what scenes it belongs to. The scene is deduced based on the first operation in an action, using the object from the operation. The rules are as follows: +/// +/// - If the object is a ``Node``, use the currently edited scene; +/// +/// - If the object is a built-in resource, use the scene from its path; +/// +/// - If the object is external resource or anything else, use global history. +/// +/// This guessing can sometimes yield false results, so you can provide a custom context object when creating an action. +/// +/// ``EditorUndoRedoManager`` is intended to be used by Godot editor plugins. You can obtain it using ``EditorPlugin/getUndoRedo()``. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use ``UndoRedo`` instead. +/// +/// The manager's API is mostly the same as in ``UndoRedo``, so you can refer to its documentation for more examples. The main difference is that ``EditorUndoRedoManager`` uses object + method name for actions, instead of ``Callable``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``historyChanged`` +/// - ``versionChanged`` +open class EditorUndoRedoManager: Object { + override open class var godotClassName: StringName { "EditorUndoRedoManager" } + public enum SpecialHistory: Int64, CaseIterable, CustomDebugStringConvertible { + /// Global history not associated with any scene, but with external resources etc. + case globalHistory = 0 // GLOBAL_HISTORY + /// History associated with remote inspector. Used when live editing a running project. + case remoteHistory = -9 // REMOTE_HISTORY + /// Invalid "null" history. It's a special value, not associated with any object. + case invalidHistory = -99 // INVALID_HISTORY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .globalHistory: return ".globalHistory" + case .remoteHistory: return ".remoteHistory" + case .invalidHistory: return ".invalidHistory" + } + + } + + } + + /* Methods */ + fileprivate static var method_create_action: GDExtensionMethodBindPtr = { + let methodName = StringName("create_action") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2107025470)! + } + + } + + }() + + /// Create a new action. After this is called, do all your calls to ``addDoMethod(object:method:)``, ``addUndoMethod(object:method:)``, ``addDoProperty(object:property:value:)``, and ``addUndoProperty(object:property:value:)``, then commit the action with ``commitAction(execute:)``. + /// + /// The way actions are merged is dictated by the `mergeMode` argument. See ``UndoRedo.MergeMode`` for details. + /// + /// If `customContext` object is provided, it will be used for deducing target history (instead of using the first operation). + /// + /// The way undo operation are ordered in actions is dictated by `backwardUndoOps`. When `backwardUndoOps` is `false` undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone. + /// + public final func createAction(name: String, mergeMode: UndoRedo.MergeMode = .disable, customContext: Object? = nil, backwardUndoOps: Bool = false) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: mergeMode.rawValue) { pArg1 in + withUnsafePointer(to: customContext?.handle) { pArg2 in + withUnsafePointer(to: backwardUndoOps) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_create_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_commit_action: GDExtensionMethodBindPtr = { + let methodName = StringName("commit_action") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3216645846)! + } + + } + + }() + + /// Commit the action. If `execute` is true (default), all "do" methods/properties are called/set when this function is called. + public final func commitAction(execute: Bool = true) { + withUnsafePointer(to: execute) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_commit_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_committing_action: GDExtensionMethodBindPtr = { + let methodName = StringName("is_committing_action") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the ``EditorUndoRedoManager`` is currently committing the action, i.e. running its "do" method or property change (see ``commitAction(execute:)``). + public final func isCommittingAction() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_is_committing_action, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_force_fixed_history: GDExtensionMethodBindPtr = { + let methodName = StringName("force_fixed_history") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces the next operation (e.g. ``addDoMethod(object:method:)``) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. + /// + /// This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the `custom_context` parameter of ``createAction(name:mergeMode:customContext:backwardUndoOps:)`` is sufficient. + /// + public final func forceFixedHistory() { + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_force_fixed_history, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_do_method: GDExtensionMethodBindPtr = { + let methodName = StringName("add_do_method") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1517810467)! + } + + } + + }() + + /// Register a method that will be called when the action is committed (i.e. the "do" action). + /// + /// If this is the first operation, the `object` will be used to deduce target undo history. + /// + public final func addDoMethod(object: Object?, method: StringName, _ arguments: Variant?...) { + var _result: Variant.ContentType = Variant.zero + let object = Variant(object) + withUnsafePointer(to: object.content) { pArg0 in + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg1 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_call(EditorUndoRedoManager.method_add_do_method, UnsafeMutableRawPointer(mutating: handle), pArgs, 2, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 2 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + pArgsBuffer.initializeElement(at: 1, to: pArg1) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_get_object_history_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_history_undo_redo: GDExtensionMethodBindPtr = { + let methodName = StringName("get_history_undo_redo") + return withUnsafePointer(to: &EditorUndoRedoManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2417974513)! + } + + } + + }() + + /// Returns the ``UndoRedo`` object associated with the given history `id`. + /// + /// `id` above `0` are mapped to the opened scene tabs (but it doesn't match their order). `id` of `0` or lower have special meaning (see ``EditorUndoRedoManager/SpecialHistory``). + /// + /// Best used with ``getObjectHistoryId(object:)``. This method is only provided in case you need some more advanced methods of ``UndoRedo`` (but keep in mind that directly operating on the ``UndoRedo`` object might affect editor's stability). + /// + public final func getHistoryUndoRedo(id: Int32) -> UndoRedo? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorUndoRedoManager.method_get_history_undo_redo, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.historyChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var historyChanged: SimpleSignal { SimpleSignal (target: self, signalName: "history_changed") } + + /// Emitted when the version of any history has changed as a result of undo or redo call. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.versionChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var versionChanged: SimpleSignal { SimpleSignal (target: self, signalName: "version_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EditorVCSInterface.swift b/Sources/SwiftGodot/Generated/Api/EditorVCSInterface.swift new file mode 100644 index 000000000..02f20da92 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EditorVCSInterface.swift @@ -0,0 +1,694 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Version Control System (VCS) interface, which reads and writes to the local VCS in use. +/// +/// Defines the API that the editor uses to extract information from the underlying VCS. The implementation of this API is included in VCS plugins, which are GDExtension plugins that inherit ``EditorVCSInterface`` and are attached (on demand) to the singleton instance of ``EditorVCSInterface``. Instead of performing the task themselves, all the virtual functions listed below are calling the internally overridden functions in the VCS plugins to provide a plug-n-play experience. A custom VCS plugin is supposed to inherit from ``EditorVCSInterface`` and override each of these virtual functions. +open class EditorVCSInterface: Object { + override open class var godotClassName: StringName { "EditorVCSInterface" } + public enum ChangeType: Int64, CaseIterable, CustomDebugStringConvertible { + /// A new file has been added. + case new = 0 // CHANGE_TYPE_NEW + /// An earlier added file has been modified. + case modified = 1 // CHANGE_TYPE_MODIFIED + /// An earlier added file has been renamed. + case renamed = 2 // CHANGE_TYPE_RENAMED + /// An earlier added file has been deleted. + case deleted = 3 // CHANGE_TYPE_DELETED + /// An earlier added file has been typechanged. + case typechange = 4 // CHANGE_TYPE_TYPECHANGE + /// A file is left unmerged. + case unmerged = 5 // CHANGE_TYPE_UNMERGED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .new: return ".new" + case .modified: return ".modified" + case .renamed: return ".renamed" + case .deleted: return ".deleted" + case .typechange: return ".typechange" + case .unmerged: return ".unmerged" + } + + } + + } + + public enum TreeArea: Int64, CaseIterable, CustomDebugStringConvertible { + /// A commit is encountered from the commit area. + case commit = 0 // TREE_AREA_COMMIT + /// A file is encountered from the staged area. + case staged = 1 // TREE_AREA_STAGED + /// A file is encountered from the unstaged area. + case unstaged = 2 // TREE_AREA_UNSTAGED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .commit: return ".commit" + case .staged: return ".staged" + case .unstaged: return ".unstaged" + } + + } + + } + + /* Methods */ + /// Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at `projectPath`. + @_documentation(visibility: public) + open func _initialize(projectPath: String) -> Bool { + return false + } + + /// Set user credentials in the underlying VCS. `username` and `password` are used only during HTTPS authentication unless not already mentioned in the remote URL. `sshPublicKeyPath`, `sshPrivateKeyPath`, and `sshPassphrase` are only used during SSH authentication. + @_documentation(visibility: public) + open func _setCredentials(username: String, password: String, sshPublicKeyPath: String, sshPrivateKeyPath: String, sshPassphrase: String) { + } + + /// Returns an ``GArray`` of ``GDictionary`` items (see ``createStatusFile(filePath:changeType:area:)``), each containing the status data of every modified file in the project folder. + @_documentation(visibility: public) + open func _getModifiedFilesData() -> VariantCollection { + return VariantCollection() + } + + /// Stages the file present at `filePath` to the staged area. + @_documentation(visibility: public) + open func _stageFile(filePath: String) { + } + + /// Unstages the file present at `filePath` from the staged area to the unstaged area. + @_documentation(visibility: public) + open func _unstageFile(filePath: String) { + } + + /// Discards the changes made in a file present at `filePath`. + @_documentation(visibility: public) + open func _discardFile(filePath: String) { + } + + /// Commits the currently staged changes and applies the commit `msg` to the resulting commit. + @_documentation(visibility: public) + open func _commit(msg: String) { + } + + /// Returns an array of ``GDictionary`` items (see ``createDiffFile(newFile:oldFile:)``, ``createDiffHunk(oldStart:newStart:oldLines:newLines:)``, ``createDiffLine(newLineNo:oldLineNo:content:status:)``, ``addLineDiffsIntoDiffHunk(_:lineDiffs:)`` and ``addDiffHunksIntoDiffFile(_:diffHunks:)``), each containing information about a diff. If `identifier` is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. + @_documentation(visibility: public) + open func _getDiff(identifier: String, area: Int32) -> VariantCollection { + return VariantCollection() + } + + /// Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. + @_documentation(visibility: public) + open func _shutDown() -> Bool { + return false + } + + /// Returns the name of the underlying VCS provider. + @_documentation(visibility: public) + open func _getVcsName() -> String { + return String () + } + + /// Returns an ``GArray`` of ``GDictionary`` items (see ``createCommit(msg:author:id:unixTimestamp:offsetMinutes:)``), each containing the data for a past commit. + @_documentation(visibility: public) + open func _getPreviousCommits(maxCommits: Int32) -> VariantCollection { + return VariantCollection() + } + + /// Gets an instance of an ``GArray`` of ``String``s containing available branch names in the VCS. + @_documentation(visibility: public) + open func _getBranchList() -> VariantCollection { + return VariantCollection() + } + + /// Returns an ``GArray`` of ``String``s, each containing the name of a remote configured in the VCS. + @_documentation(visibility: public) + open func _getRemotes() -> VariantCollection { + return VariantCollection() + } + + /// Creates a new branch named `branchName` in the VCS. + @_documentation(visibility: public) + open func _createBranch(branchName: String) { + } + + /// Remove a branch from the local VCS. + @_documentation(visibility: public) + open func _removeBranch(branchName: String) { + } + + /// Creates a new remote destination with name `remoteName` and points it to `remoteUrl`. This can be an HTTPS remote or an SSH remote. + @_documentation(visibility: public) + open func _createRemote(remoteName: String, remoteUrl: String) { + } + + /// Remove a remote from the local VCS. + @_documentation(visibility: public) + open func _removeRemote(remoteName: String) { + } + + /// Gets the current branch name defined in the VCS. + @_documentation(visibility: public) + open func _getCurrentBranchName() -> String { + return String () + } + + /// Checks out a `branchName` in the VCS. + @_documentation(visibility: public) + open func _checkoutBranch(branchName: String) -> Bool { + return false + } + + /// Pulls changes from the remote. This can give rise to merge conflicts. + @_documentation(visibility: public) + open func _pull(remote: String) { + } + + /// Pushes changes to the `remote`. If `force` is `true`, a force push will override the change history already present on the remote. + @_documentation(visibility: public) + open func _push(remote: String, force: Bool) { + } + + /// Fetches new changes from the `remote`, but doesn't write changes to the current working directory. Equivalent to `git fetch`. + @_documentation(visibility: public) + open func _fetch(remote: String) { + } + + /// Returns an ``GArray`` of ``GDictionary`` items (see ``createDiffHunk(oldStart:newStart:oldLines:newLines:)``), each containing a line diff between a file at `filePath` and the `text` which is passed in. + @_documentation(visibility: public) + open func _getLineDiff(filePath: String, text: String) -> VariantCollection { + return VariantCollection() + } + + fileprivate static var method_create_diff_line: GDExtensionMethodBindPtr = { + let methodName = StringName("create_diff_line") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2901184053)! + } + + } + + }() + + /// Helper function to create a ``GDictionary`` for storing a line diff. `newLineNo` is the line number in the new file (can be `-1` if the line is deleted). `oldLineNo` is the line number in the old file (can be `-1` if the line is added). `content` is the diff text. `status` is a single character string which stores the line origin. + public final func createDiffLine(newLineNo: Int32, oldLineNo: Int32, content: String, status: String) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: newLineNo) { pArg0 in + withUnsafePointer(to: oldLineNo) { pArg1 in + let content = GString(content) + withUnsafePointer(to: content.content) { pArg2 in + let status = GString(status) + withUnsafePointer(to: status.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_create_diff_line, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_diff_hunk: GDExtensionMethodBindPtr = { + let methodName = StringName("create_diff_hunk") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3784842090)! + } + + } + + }() + + /// Helper function to create a ``GDictionary`` for storing diff hunk data. `oldStart` is the starting line number in old file. `newStart` is the starting line number in new file. `oldLines` is the number of lines in the old file. `newLines` is the number of lines in the new file. + public final func createDiffHunk(oldStart: Int32, newStart: Int32, oldLines: Int32, newLines: Int32) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: oldStart) { pArg0 in + withUnsafePointer(to: newStart) { pArg1 in + withUnsafePointer(to: oldLines) { pArg2 in + withUnsafePointer(to: newLines) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_create_diff_hunk, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_diff_file: GDExtensionMethodBindPtr = { + let methodName = StringName("create_diff_file") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2723227684)! + } + + } + + }() + + /// Helper function to create a ``GDictionary`` for storing old and new diff file paths. + public final func createDiffFile(newFile: String, oldFile: String) -> GDictionary { + let _result: GDictionary = GDictionary () + let newFile = GString(newFile) + withUnsafePointer(to: newFile.content) { pArg0 in + let oldFile = GString(oldFile) + withUnsafePointer(to: oldFile.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_create_diff_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_commit: GDExtensionMethodBindPtr = { + let methodName = StringName("create_commit") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1075983584)! + } + + } + + }() + + /// Helper function to create a commit ``GDictionary`` item. `msg` is the commit message of the commit. `author` is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. `id` is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. `unixTimestamp` is the UTC Unix timestamp of when the commit was created. `offsetMinutes` is the timezone offset in minutes, recorded from the system timezone where the commit was created. + public final func createCommit(msg: String, author: String, id: String, unixTimestamp: Int, offsetMinutes: Int) -> GDictionary { + let _result: GDictionary = GDictionary () + let msg = GString(msg) + withUnsafePointer(to: msg.content) { pArg0 in + let author = GString(author) + withUnsafePointer(to: author.content) { pArg1 in + let id = GString(id) + withUnsafePointer(to: id.content) { pArg2 in + withUnsafePointer(to: unixTimestamp) { pArg3 in + withUnsafePointer(to: offsetMinutes) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_create_commit, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_status_file: GDExtensionMethodBindPtr = { + let methodName = StringName("create_status_file") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1083471673)! + } + + } + + }() + + /// Helper function to create a ``GDictionary`` used by editor to read the status of a file. + public final func createStatusFile(filePath: String, changeType: EditorVCSInterface.ChangeType, area: EditorVCSInterface.TreeArea) -> GDictionary { + let _result: GDictionary = GDictionary () + let filePath = GString(filePath) + withUnsafePointer(to: filePath.content) { pArg0 in + withUnsafePointer(to: changeType.rawValue) { pArg1 in + withUnsafePointer(to: area.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_create_status_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_diff_hunks_into_diff_file: GDExtensionMethodBindPtr = { + let methodName = StringName("add_diff_hunks_into_diff_file") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015243225)! + } + + } + + }() + + /// Helper function to add an array of `diffHunks` into a `diffFile`. + public final func addDiffHunksIntoDiffFile(_ diffFile: GDictionary, diffHunks: VariantCollection) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: diffFile.content) { pArg0 in + withUnsafePointer(to: diffHunks.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_add_diff_hunks_into_diff_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_line_diffs_into_diff_hunk: GDExtensionMethodBindPtr = { + let methodName = StringName("add_line_diffs_into_diff_hunk") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015243225)! + } + + } + + }() + + /// Helper function to add an array of `lineDiffs` into a `diffHunk`. + public final func addLineDiffsIntoDiffHunk(_ diffHunk: GDictionary, lineDiffs: VariantCollection) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: diffHunk.content) { pArg0 in + withUnsafePointer(to: lineDiffs.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_add_line_diffs_into_diff_hunk, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_popup_error: GDExtensionMethodBindPtr = { + let methodName = StringName("popup_error") + return withUnsafePointer(to: &EditorVCSInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. + public final func popupError(msg: String) { + let msg = GString(msg) + withUnsafePointer(to: msg.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EditorVCSInterface.method_popup_error, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_checkout_branch": + return _EditorVCSInterface_proxy_checkout_branch + case "_commit": + return _EditorVCSInterface_proxy_commit + case "_create_branch": + return _EditorVCSInterface_proxy_create_branch + case "_create_remote": + return _EditorVCSInterface_proxy_create_remote + case "_discard_file": + return _EditorVCSInterface_proxy_discard_file + case "_fetch": + return _EditorVCSInterface_proxy_fetch + case "_get_branch_list": + return _EditorVCSInterface_proxy_get_branch_list + case "_get_current_branch_name": + return _EditorVCSInterface_proxy_get_current_branch_name + case "_get_diff": + return _EditorVCSInterface_proxy_get_diff + case "_get_line_diff": + return _EditorVCSInterface_proxy_get_line_diff + case "_get_modified_files_data": + return _EditorVCSInterface_proxy_get_modified_files_data + case "_get_previous_commits": + return _EditorVCSInterface_proxy_get_previous_commits + case "_get_remotes": + return _EditorVCSInterface_proxy_get_remotes + case "_get_vcs_name": + return _EditorVCSInterface_proxy_get_vcs_name + case "_initialize": + return _EditorVCSInterface_proxy_initialize + case "_pull": + return _EditorVCSInterface_proxy_pull + case "_push": + return _EditorVCSInterface_proxy_push + case "_remove_branch": + return _EditorVCSInterface_proxy_remove_branch + case "_remove_remote": + return _EditorVCSInterface_proxy_remove_remote + case "_set_credentials": + return _EditorVCSInterface_proxy_set_credentials + case "_shut_down": + return _EditorVCSInterface_proxy_shut_down + case "_stage_file": + return _EditorVCSInterface_proxy_stage_file + case "_unstage_file": + return _EditorVCSInterface_proxy_unstage_file + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EditorVCSInterface_proxy_checkout_branch (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._checkoutBranch (branchName: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorVCSInterface_proxy_commit (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._commit (msg: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_create_branch (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._createBranch (branchName: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_create_remote (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._createRemote (remoteName: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", remoteUrl: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") +} + +func _EditorVCSInterface_proxy_discard_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._discardFile (filePath: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_fetch (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._fetch (remote: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_get_branch_list (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBranchList () + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::String +} + +func _EditorVCSInterface_proxy_get_current_branch_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getCurrentBranchName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorVCSInterface_proxy_get_diff (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getDiff (identifier: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", area: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorVCSInterface_proxy_get_line_diff (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getLineDiff (filePath: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", text: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorVCSInterface_proxy_get_modified_files_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getModifiedFilesData () + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorVCSInterface_proxy_get_previous_commits (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPreviousCommits (maxCommits: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _EditorVCSInterface_proxy_get_remotes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRemotes () + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::String +} + +func _EditorVCSInterface_proxy_get_vcs_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getVcsName ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _EditorVCSInterface_proxy_initialize (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._initialize (projectPath: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorVCSInterface_proxy_pull (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pull (remote: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_push (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._push (remote: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", force: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _EditorVCSInterface_proxy_remove_branch (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._removeBranch (branchName: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_remove_remote (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._removeRemote (remoteName: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_set_credentials (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setCredentials (username: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", password: GString.stringFromGStringPtr (ptr: args [1]!) ?? "", sshPublicKeyPath: GString.stringFromGStringPtr (ptr: args [2]!) ?? "", sshPrivateKeyPath: GString.stringFromGStringPtr (ptr: args [3]!) ?? "", sshPassphrase: GString.stringFromGStringPtr (ptr: args [4]!) ?? "") +} + +func _EditorVCSInterface_proxy_shut_down (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shutDown () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _EditorVCSInterface_proxy_stage_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._stageFile (filePath: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + +func _EditorVCSInterface_proxy_unstage_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._unstageFile (filePath: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") +} + diff --git a/Sources/SwiftGodot/Generated/Api/EncodedObjectAsID.swift b/Sources/SwiftGodot/Generated/Api/EncodedObjectAsID.swift new file mode 100644 index 000000000..1f92a7293 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EncodedObjectAsID.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds a reference to an ``Object``'s instance ID. +/// +/// Utility class which holds a reference to the internal identifier of an ``Object`` instance, as given by ``Object/getInstanceId()``. This ID can then be used to retrieve the object instance with ``@GlobalScope.instance_from_id``. +/// +/// This class is used internally by the editor inspector and script debugger, but can also be used in plugins to pass and display objects as their IDs. +/// +open class EncodedObjectAsID: RefCounted { + override open class var godotClassName: StringName { "EncodedObjectAsID" } + + /* Properties */ + + /// The ``Object`` identifier stored in this ``EncodedObjectAsID`` instance. The object instance can be retrieved with ``@GlobalScope.instance_from_id``. + final public var objectId: UInt { + get { + return get_object_id () + } + + set { + set_object_id (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_object_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_object_id") + return withUnsafePointer(to: &EncodedObjectAsID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_object_id(_ id: UInt) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(EncodedObjectAsID.method_set_object_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_object_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_object_id") + return withUnsafePointer(to: &EncodedObjectAsID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_object_id() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(EncodedObjectAsID.method_get_object_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Engine.swift b/Sources/SwiftGodot/Generated/Api/Engine.swift new file mode 100644 index 000000000..086c39645 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Engine.swift @@ -0,0 +1,1007 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to engine properties. +/// +/// The ``Engine`` singleton allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. It also stores information about the current build of Godot, such as the current version. +open class Engine: Object { + /// The shared instance of this class + public static var shared: Engine = { + return withUnsafePointer (to: &Engine.godotClassName.content) { ptr in + Engine (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Engine" } + + /* Properties */ + + /// If `false`, stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the ``ProjectSettings/application/run/disableStderr`` project setting. + /// + /// > Note: This property does not impact the editor's Errors tab when running a project from the editor. + /// + /// > Warning: If set to `false` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. In a `@tool` script, this will also impact the editor itself. Do _not_ report bugs before ensuring error messages are enabled (as they are by default). + /// + static public var printErrorMessages: Bool { + get { + return is_printing_error_messages () + } + + set { + set_print_error_messages (newValue) + } + + } + + /// The number of fixed iterations per second. This controls how often physics simulation and ``Node/_physicsProcess(delta:)`` methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also ``maxFps`` and ``ProjectSettings/physics/common/physicsTicksPerSecond``. + /// + /// > Note: Only ``maxPhysicsStepsPerFrame`` physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if `delta` is used consistently in physics calculations). Therefore, it is recommended to also increase ``maxPhysicsStepsPerFrame`` if increasing ``physicsTicksPerSecond`` significantly above its default value. + /// + static public var physicsTicksPerSecond: Int32 { + get { + return get_physics_ticks_per_second () + } + + set { + set_physics_ticks_per_second (newValue) + } + + } + + /// The maximum number of physics steps that can be simulated each rendered frame. + /// + /// > Note: The default value is tuned to prevent expensive physics simulations from triggering even more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than `1 / max_physics_steps_per_frame` of ``physicsTicksPerSecond``. This occurs even if `delta` is consistently used in physics calculations. To avoid this, increase ``maxPhysicsStepsPerFrame`` if you have increased ``physicsTicksPerSecond`` significantly above its default value. + /// + static public var maxPhysicsStepsPerFrame: Int32 { + get { + return get_max_physics_steps_per_frame () + } + + set { + set_max_physics_steps_per_frame (newValue) + } + + } + + /// The maximum number of frames that can be rendered every second (FPS). A value of `0` means the framerate is uncapped. + /// + /// Limiting the FPS can be useful to reduce the host machine's power consumption, which reduces heat, noise emissions, and improves battery life. + /// + /// If ``ProjectSettings/display/window/vsync/vsyncMode`` is **Enabled** or **Adaptive**, the setting takes precedence and the max FPS number cannot exceed the monitor's refresh rate. + /// + /// If ``ProjectSettings/display/window/vsync/vsyncMode`` is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will reduce input lag while avoiding tearing. + /// + /// See also ``physicsTicksPerSecond`` and ``ProjectSettings/application/run/maxFps``. + /// + /// > Note: The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project's logic and rendering. + /// + /// > Note: If ``ProjectSettings/display/window/vsync/vsyncMode`` is **Disabled**, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. + /// + static public var maxFps: Int32 { + get { + return get_max_fps () + } + + set { + set_max_fps (newValue) + } + + } + + /// The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to `2.0` the game runs twice as fast, and if set to `0.5` the game runs half as fast. + /// + /// This value affects ``Timer``, ``SceneTreeTimer``, and all other simulations that make use of `delta` time (such as ``Node/_process(delta:)`` and ``Node/_physicsProcess(delta:)``). + /// + /// > Note: It's recommended to keep this property above `0.0`, as the game may behave unexpectedly otherwise. + /// + /// > Note: This does not affect audio playback speed. Use ``AudioServer/playbackSpeedScale`` to adjust audio playback speed independently of ``Engine/timeScale``. + /// + /// > Note: This does not automatically adjust ``physicsTicksPerSecond``. With values above `1.0` physics simulation may become less precise, as each physics tick will stretch over a larger period of engine time. If you're modifying ``Engine/timeScale`` to speed up simulation by a large factor, consider also increasing ``physicsTicksPerSecond`` to make the simulation more reliable. + /// + static public var timeScale: Double { + get { + return get_time_scale () + } + + set { + set_time_scale (newValue) + } + + } + + /// How much physics ticks are synchronized with real time. If `0` or less, the ticks are fully synchronized. Higher values cause the in-game clock to deviate more from the real clock, but they smooth out framerate jitters. + /// + /// > Note: The default value of `0.5` should be good enough for most cases; values above `2` could cause the game to react to dropped frames with a noticeable delay and are not recommended. + /// + /// > Note: When using a custom physics interpolation solution, or within a network game, it's recommended to disable the physics jitter fix by setting this property to `0`. + /// + static public var physicsJitterFix: Double { + get { + return get_physics_jitter_fix () + } + + set { + set_physics_jitter_fix (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_physics_ticks_per_second: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_ticks_per_second") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_physics_ticks_per_second(_ physicsTicksPerSecond: Int32) { + withUnsafePointer(to: physicsTicksPerSecond) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_physics_ticks_per_second, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_ticks_per_second: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_ticks_per_second") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_physics_ticks_per_second() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_physics_ticks_per_second, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_physics_steps_per_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_physics_steps_per_frame") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_max_physics_steps_per_frame(_ maxPhysicsSteps: Int32) { + withUnsafePointer(to: maxPhysicsSteps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_max_physics_steps_per_frame, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_physics_steps_per_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_physics_steps_per_frame") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_max_physics_steps_per_frame() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_max_physics_steps_per_frame, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_jitter_fix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_jitter_fix") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_physics_jitter_fix(_ physicsJitterFix: Double) { + withUnsafePointer(to: physicsJitterFix) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_physics_jitter_fix, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_jitter_fix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_jitter_fix") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_physics_jitter_fix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_physics_jitter_fix, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_physics_interpolation_fraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_interpolation_fraction") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation. + public static func getPhysicsInterpolationFraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_physics_interpolation_fraction, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_fps") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_max_fps(_ maxFps: Int32) { + withUnsafePointer(to: maxFps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_max_fps, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_fps") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_max_fps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_max_fps, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_scale") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_time_scale(_ timeScale: Double) { + withUnsafePointer(to: timeScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_time_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_scale") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_time_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_time_scale, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_frames_drawn: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frames_drawn") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the total number of frames drawn since the engine started. + /// + /// > Note: On headless platforms, or if rendering is disabled with `--disable-render-loop` via command line, this method always returns `0`. See also ``getProcessFrames()``. + /// + public static func getFramesDrawn() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_frames_drawn, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_frames_per_second: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frames_per_second") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the average frames rendered every second (FPS), also known as the framerate. + public static func getFramesPerSecond() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_frames_per_second, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_physics_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_frames") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of frames passed since the engine started. This number is increased every **physics frame**. See also ``getProcessFrames()``. + /// + /// This method can be used to run expensive logic less often without relying on a ``Timer``: + /// + public static func getPhysicsFrames() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_physics_frames, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_process_frames: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_frames") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of frames passed since the engine started. This number is increased every **process frame**, regardless of whether the render loop is enabled. See also ``getFramesDrawn()`` and ``getPhysicsFrames()``. + /// + /// This method can be used to run expensive logic less often without relying on a ``Timer``: + /// + public static func getProcessFrames() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_process_frames, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_main_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("get_main_loop") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1016888095)! + } + + } + + }() + + /// Returns the instance of the ``MainLoop``. This is usually the main ``SceneTree`` and is the same as ``Node/getTree()``. + /// + /// > Note: The type instantiated as the main loop can changed with ``ProjectSettings/application/run/mainLoopType``. + /// + public static func getMainLoop() -> MainLoop? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_get_main_loop, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_version_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_version_info") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns the current engine version information as a ``GDictionary`` containing the following entries: + /// + /// - `major` - Major version number as an int; + /// + /// - `minor` - Minor version number as an int; + /// + /// - `patch` - Patch version number as an int; + /// + /// - `hex` - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below); + /// + /// - `status` - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String; + /// + /// - `build` - Build name (e.g. "custom_build") as a String; + /// + /// - `hash` - Full Git commit hash as a String; + /// + /// - `timestamp` - Holds the Git commit date UNIX timestamp in seconds as an int, or `0` if unavailable; + /// + /// - `string` - `major`, `minor`, `patch`, `status`, and `build` in a single String. + /// + /// The `hex` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be `0x03010C`. + /// + /// > Note: The `hex` value is still an integer internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code: + /// + public static func getVersionInfo() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_get_version_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_author_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_author_info") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns the engine author information as a ``GDictionary``, where each entry is an ``GArray`` of strings with the names of notable contributors to the Godot Engine: `lead_developers`, `founders`, `project_managers`, and `developers`. + public static func getAuthorInfo() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_get_author_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_copyright_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_copyright_info") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` of dictionaries with copyright information for every component of Godot's source code. + /// + /// Every ``GDictionary`` contains a `name` identifier, and a `parts` array of dictionaries. It describes the component in detail with the following entries: + /// + /// - `files` - ``GArray`` of file paths from the source code affected by this component; + /// + /// - `copyright` - ``GArray`` of owners of this component; + /// + /// - `license` - The license applied to this component (such as "Expat" or "CC-BY-4.0"). + /// + public static func getCopyrightInfo() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_copyright_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_donor_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_donor_info") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a ``GDictionary`` of categorized donor names. Each entry is an ``GArray`` of strings: + /// + /// {`platinum_sponsors`, `gold_sponsors`, `silver_sponsors`, `bronze_sponsors`, `mini_sponsors`, `gold_donors`, `silver_donors`, `bronze_donors`} + /// + public static func getDonorInfo() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_get_donor_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_license_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_license_info") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a ``GDictionary`` of licenses used by Godot and included third party components. Each entry is a license name (such as "Expat") and its associated text. + public static func getLicenseInfo() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_get_license_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_license_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_license_text") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the full Godot license text. + public static func getLicenseText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_license_text, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_architecture_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_architecture_name") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the CPU architecture the Godot binary was built for. Possible return values include `"x86_64"`, `"x86_32"`, `"arm64"`, `"arm32"`, `"rv64"`, `"riscv"`, `"ppc64"`, `"ppc"`, `"wasm64"`, and `"wasm32"`. + /// + /// To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain `64` in their name: + /// + /// > Note: This method does _not_ return the name of the system's CPU architecture (like ``OS/getProcessorName()``). For example, when running an `x86_32` Godot binary on an `x86_64` system, the returned value will still be `"x86_32"`. + /// + public static func getArchitectureName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_architecture_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_in_physics_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_physics_frame") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the engine is inside the fixed physics process step of the main loop. + /// + public static func isInPhysicsFrame() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_in_physics_frame, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_has_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("has_singleton") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if a singleton with the given `name` exists in the global scope. See also ``getSingleton(name:)``. + /// + /// > Note: Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. + /// + public static func hasSingleton(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_singleton, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_singleton") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1371597918)! + } + + } + + }() + + /// Returns the global singleton with the given `name`, or `null` if it does not exist. Often used for plugins. See also ``hasSingleton(name:)`` and ``getSingletonList()``. + /// + /// > Note: Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. + /// + public static func getSingleton(name: StringName) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_singleton, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_register_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("register_singleton") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 965313290)! + } + + } + + }() + + /// Registers the given ``Object`` `instance` as a singleton, available globally under `name`. Useful for plugins. + public static func registerSingleton(name: StringName, instance: Object?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: instance?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_singleton, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_unregister_singleton: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_singleton") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the singleton registered under `name`. The singleton object is _not_ freed. Only works with user-defined singletons registered with ``registerSingleton(name:instance:)``. + public static func unregisterSingleton(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unregister_singleton, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_singleton_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_singleton_list") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns a list of names of all available global singletons. See also ``getSingleton(name:)``. + public static func getSingletonList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_singleton_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_register_script_language: GDExtensionMethodBindPtr = { + let methodName = StringName("register_script_language") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1850254898)! + } + + } + + }() + + /// Registers a ``ScriptLanguage`` instance to be available with `ScriptServer`. + /// + /// Returns: + /// + /// - ``GodotError/ok`` on success; + /// + /// - ``GodotError/errUnavailable`` if `ScriptServer` has reached the limit and cannot register any new language; + /// + /// - ``GodotError/errAlreadyExists`` if `ScriptServer` already contains a language with similar extension/name/type. + /// + public static func registerScriptLanguage(_ language: ScriptLanguage?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: language?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_register_script_language, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_unregister_script_language: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_script_language") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1850254898)! + } + + } + + }() + + /// Unregisters the ``ScriptLanguage`` instance from `ScriptServer`. + /// + /// Returns: + /// + /// - ``GodotError/ok`` on success; + /// + /// - ``GodotError/errDoesNotExist`` if the language is not registered in `ScriptServer`. + /// + public static func unregisterScriptLanguage(_ language: ScriptLanguage?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: language?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unregister_script_language, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_script_language_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_language_count") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the number of available script languages. Use with ``getScriptLanguage(index:)``. + public static func getScriptLanguageCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_script_language_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_script_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_language") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2151255799)! + } + + } + + }() + + /// Returns an instance of a ``ScriptLanguage`` with the given `index`. + public static func getScriptLanguage(index: Int32) -> ScriptLanguage? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_script_language, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_editor_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editor_hint") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the script is currently running inside the editor, otherwise returns `false`. This is useful for `@tool` scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: + /// + /// See Running code in the editor in the documentation for more information. + /// + /// > Note: To detect whether the script is running on an editor _build_ (such as when pressing [kbd]F5[/kbd]), use ``OS/hasFeature(tagName:)`` with the `"editor"` argument instead. `OS.has_feature("editor")` evaluate to `true` both when the script is running in the editor and when running the project from the editor, but returns `false` when run from an exported project. + /// + public static func isEditorHint() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_editor_hint, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_write_movie_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_write_movie_path") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the path to the ``MovieWriter``'s output file, or an empty string if the engine wasn't started in Movie Maker mode. The default path can be changed in ``ProjectSettings/editor/movieWriter/movieFile``. + public static func getWriteMoviePath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_write_movie_path, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_print_error_messages: GDExtensionMethodBindPtr = { + let methodName = StringName("set_print_error_messages") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_print_error_messages(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_print_error_messages, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_printing_error_messages: GDExtensionMethodBindPtr = { + let methodName = StringName("is_printing_error_messages") + return withUnsafePointer(to: &Engine.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_printing_error_messages() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_printing_error_messages, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EngineDebugger.swift b/Sources/SwiftGodot/Generated/Api/EngineDebugger.swift new file mode 100644 index 000000000..f244adc06 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EngineDebugger.swift @@ -0,0 +1,628 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exposes the internal debugger. +/// +/// ``EngineDebugger`` handles the communication between the editor and the running game. It is active in the running game. Messages can be sent/received through it. It also manages the profilers. +open class EngineDebugger: Object { + /// The shared instance of this class + public static var shared: EngineDebugger = { + return withUnsafePointer (to: &EngineDebugger.godotClassName.content) { ptr in + EngineDebugger (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "EngineDebugger" } + /* Methods */ + fileprivate static var method_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_active") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the debugger is active otherwise `false`. + public static func isActive() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_active, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_register_profiler: GDExtensionMethodBindPtr = { + let methodName = StringName("register_profiler") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3651669560)! + } + + } + + }() + + /// Registers a profiler with the given `name`. See ``EngineProfiler`` for more information. + public static func registerProfiler(name: StringName, profiler: EngineProfiler?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: profiler?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_profiler, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_unregister_profiler: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_profiler") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Unregisters a profiler with given `name`. + public static func unregisterProfiler(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unregister_profiler, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_profiling: GDExtensionMethodBindPtr = { + let methodName = StringName("is_profiling") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2041966384)! + } + + } + + }() + + /// Returns `true` if a profiler with the given name is present and active otherwise `false`. + public static func isProfiling(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_profiling, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_profiler: GDExtensionMethodBindPtr = { + let methodName = StringName("has_profiler") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2041966384)! + } + + } + + }() + + /// Returns `true` if a profiler with the given name is present otherwise `false`. + public static func hasProfiler(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_profiler, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_profiler_add_frame_data: GDExtensionMethodBindPtr = { + let methodName = StringName("profiler_add_frame_data") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1895267858)! + } + + } + + }() + + /// Calls the `add` callable of the profiler with given `name` and `data`. + public static func profilerAddFrameData(name: StringName, data: GArray) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_profiler_add_frame_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_profiler_enable: GDExtensionMethodBindPtr = { + let methodName = StringName("profiler_enable") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3192561009)! + } + + } + + }() + + /// Calls the `toggle` callable of the profiler with given `name` and `arguments`. Enables/Disables the same profiler depending on `enable` argument. + public static func profilerEnable(name: StringName, enable: Bool, arguments: GArray = GArray ()) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: arguments.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_profiler_enable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_register_message_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("register_message_capture") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1874754934)! + } + + } + + }() + + /// Registers a message capture with given `name`. If `name` is "my_message" then messages starting with "my_message:" will be called with the given callable. + /// + /// Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return `true` otherwise `false`. + /// + public static func registerMessageCapture(name: StringName, callable: Callable) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_message_capture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_unregister_message_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_message_capture") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Unregisters the message capture with given `name`. + public static func unregisterMessageCapture(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unregister_message_capture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_capture: GDExtensionMethodBindPtr = { + let methodName = StringName("has_capture") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2041966384)! + } + + } + + }() + + /// Returns `true` if a capture with the given name is present otherwise `false`. + public static func hasCapture(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_capture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_line_poll: GDExtensionMethodBindPtr = { + let methodName = StringName("line_poll") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught + public static func linePoll() { + gi.object_method_bind_ptrcall(method_line_poll, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_send_message: GDExtensionMethodBindPtr = { + let methodName = StringName("send_message") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1209351045)! + } + + } + + }() + + /// Sends a message with given `message` and `data` array. + public static func sendMessage(_ message: String, data: GArray) { + let message = GString(message) + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_send_message, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_debug: GDExtensionMethodBindPtr = { + let methodName = StringName("debug") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2751962654)! + } + + } + + }() + + /// Starts a debug break in script execution, optionally specifying whether the program can continue based on `canContinue` and whether the break was due to a breakpoint. + public static func debug(canContinue: Bool = true, isErrorBreakpoint: Bool = false) { + withUnsafePointer(to: canContinue) { pArg0 in + withUnsafePointer(to: isErrorBreakpoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_debug, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_script_debug: GDExtensionMethodBindPtr = { + let methodName = StringName("script_debug") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2442343672)! + } + + } + + }() + + /// Starts a debug break in script execution, optionally specifying whether the program can continue based on `canContinue` and whether the break was due to a breakpoint. + public static func scriptDebug(language: ScriptLanguage?, canContinue: Bool = true, isErrorBreakpoint: Bool = false) { + withUnsafePointer(to: language?.handle) { pArg0 in + withUnsafePointer(to: canContinue) { pArg1 in + withUnsafePointer(to: isErrorBreakpoint) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_script_debug, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_lines_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lines_left") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the current debugging lines that remain. + public static func setLinesLeft(lines: Int32) { + withUnsafePointer(to: lines) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_lines_left, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lines_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lines_left") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of lines that remain. + public static func getLinesLeft() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_lines_left, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the current debugging depth. + public static func setDepth(_ depth: Int32) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_depth, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the current debug depth. + public static func getDepth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_depth, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_is_breakpoint: GDExtensionMethodBindPtr = { + let methodName = StringName("is_breakpoint") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 921227809)! + } + + } + + }() + + /// Returns `true` if the given `source` and `line` represent an existing breakpoint. + public static func isBreakpoint(line: Int32, source: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: source.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_breakpoint, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_skipping_breakpoints: GDExtensionMethodBindPtr = { + let methodName = StringName("is_skipping_breakpoints") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the debugger is skipping breakpoints otherwise `false`. + public static func isSkippingBreakpoints() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_skipping_breakpoints, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_insert_breakpoint: GDExtensionMethodBindPtr = { + let methodName = StringName("insert_breakpoint") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780747571)! + } + + } + + }() + + /// Inserts a new breakpoint with the given `source` and `line`. + public static func insertBreakpoint(line: Int32, source: StringName) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: source.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_insert_breakpoint, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_breakpoint: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_breakpoint") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3780747571)! + } + + } + + }() + + /// Removes a breakpoint with the given `source` and `line`. + public static func removeBreakpoint(line: Int32, source: StringName) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: source.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_remove_breakpoint, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear_breakpoints: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_breakpoints") + return withUnsafePointer(to: &EngineDebugger.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all breakpoints. + public static func clearBreakpoints() { + gi.object_method_bind_ptrcall(method_clear_breakpoints, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/EngineProfiler.swift b/Sources/SwiftGodot/Generated/Api/EngineProfiler.swift new file mode 100644 index 000000000..e683dbc3c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/EngineProfiler.swift @@ -0,0 +1,83 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for creating custom profilers. +/// +/// This class can be used to implement custom profilers that are able to interact with the engine and editor debugger. +/// +/// See ``EngineDebugger`` and ``EditorDebuggerPlugin`` for more information. +/// +open class EngineProfiler: RefCounted { + override open class var godotClassName: StringName { "EngineProfiler" } + /* Methods */ + /// Called when the profiler is enabled/disabled, along with a set of `options`. + @_documentation(visibility: public) + open func _toggle(enable: Bool, options: GArray) { + } + + /// Called when data is added to profiler using ``EngineDebugger/profilerAddFrameData(name:data:)``. + @_documentation(visibility: public) + open func _addFrame(data: GArray) { + } + + /// Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. + @_documentation(visibility: public) + open func _tick(frameTime: Double, processTime: Double, physicsTime: Double, physicsFrameTime: Double) { + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_add_frame": + return _EngineProfiler_proxy_add_frame + case "_tick": + return _EngineProfiler_proxy_tick + case "_toggle": + return _EngineProfiler_proxy_toggle + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _EngineProfiler_proxy_add_frame (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addFrame (data: GArray (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _EngineProfiler_proxy_tick (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._tick (frameTime: args [0]!.assumingMemoryBound (to: Double.self).pointee, processTime: args [1]!.assumingMemoryBound (to: Double.self).pointee, physicsTime: args [2]!.assumingMemoryBound (to: Double.self).pointee, physicsFrameTime: args [3]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _EngineProfiler_proxy_toggle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._toggle (enable: args [0]!.assumingMemoryBound (to: Bool.self).pointee, options: GArray (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/Environment.swift b/Sources/SwiftGodot/Generated/Api/Environment.swift new file mode 100644 index 000000000..0f2139fb2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Environment.swift @@ -0,0 +1,5434 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Resource for environment nodes (like ``WorldEnvironment``) that define multiple rendering options. +/// +/// Resource for environment nodes (like ``WorldEnvironment``) that define multiple environment operations (such as background ``Sky`` or ``Color``, ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: +/// +/// - Depth of Field Blur +/// +/// - Glow +/// +/// - Tonemap (Auto Exposure) +/// +/// - Adjustments +/// +open class Environment: Resource { + override open class var godotClassName: StringName { "Environment" } + public enum BGMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Clears the background using the clear color defined in ``ProjectSettings/rendering/environment/defaults/defaultClearColor``. + case clearColor = 0 // BG_CLEAR_COLOR + /// Clears the background using a custom clear color. + case color = 1 // BG_COLOR + /// Displays a user-defined sky in the background. + case sky = 2 // BG_SKY + /// Displays a ``CanvasLayer`` in the background. + case canvas = 3 // BG_CANVAS + /// Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. + case keep = 4 // BG_KEEP + /// Displays a camera feed in the background. + case cameraFeed = 5 // BG_CAMERA_FEED + /// Represents the size of the ``Environment/BGMode`` enum. + case max = 6 // BG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .clearColor: return ".clearColor" + case .color: return ".color" + case .sky: return ".sky" + case .canvas: return ".canvas" + case .keep: return ".keep" + case .cameraFeed: return ".cameraFeed" + case .max: return ".max" + } + + } + + } + + public enum AmbientSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Gather ambient light from whichever source is specified as the background. + case bg = 0 // AMBIENT_SOURCE_BG + /// Disable ambient light. This provides a slight performance boost over ``AmbientSource/sky``. + case disabled = 1 // AMBIENT_SOURCE_DISABLED + /// Specify a specific ``Color`` for ambient light. This provides a slight performance boost over ``AmbientSource/sky``. + case color = 2 // AMBIENT_SOURCE_COLOR + /// Gather ambient light from the ``Sky`` regardless of what the background is. + case sky = 3 // AMBIENT_SOURCE_SKY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bg: return ".bg" + case .disabled: return ".disabled" + case .color: return ".color" + case .sky: return ".sky" + } + + } + + } + + public enum ReflectionSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use the background for reflections. + case bg = 0 // REFLECTION_SOURCE_BG + /// Disable reflections. This provides a slight performance boost over other options. + case disabled = 1 // REFLECTION_SOURCE_DISABLED + /// Use the ``Sky`` for reflections regardless of what the background is. + case sky = 2 // REFLECTION_SOURCE_SKY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bg: return ".bg" + case .disabled: return ".disabled" + case .sky: return ".sky" + } + + } + + } + + public enum ToneMapper: Int64, CaseIterable, CustomDebugStringConvertible { + /// Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. + case linear = 0 // TONE_MAPPER_LINEAR + /// Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: `color = color / (1 + color)`. This avoids clipping bright highlights, but the resulting image can look a bit dull. + case reinhardt = 1 // TONE_MAPPER_REINHARDT + /// Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than ``ToneMapper/reinhardt``. + case filmic = 2 // TONE_MAPPER_FILMIC + /// Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to ``ToneMapper/reinhardt`` and ``ToneMapper/filmic``. + /// + /// > Note: This tonemapping operator is called "ACES Fitted" in Godot 3.x. + /// + case aces = 3 // TONE_MAPPER_ACES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linear: return ".linear" + case .reinhardt: return ".reinhardt" + case .filmic: return ".filmic" + case .aces: return ".aces" + } + + } + + } + + public enum GlowBlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. + case additive = 0 // GLOW_BLEND_MODE_ADDITIVE + /// Screen glow blending mode. Increases brightness, used frequently with bloom. + case screen = 1 // GLOW_BLEND_MODE_SCREEN + /// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). + case softlight = 2 // GLOW_BLEND_MODE_SOFTLIGHT + /// Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. + case replace = 3 // GLOW_BLEND_MODE_REPLACE + /// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. + case mix = 4 // GLOW_BLEND_MODE_MIX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .additive: return ".additive" + case .screen: return ".screen" + case .softlight: return ".softlight" + case .replace: return ".replace" + case .mix: return ".mix" + } + + } + + } + + public enum FogMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use a physically-based fog model defined primarily by fog density. + case exponential = 0 // FOG_MODE_EXPONENTIAL + /// Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. + case depth = 1 // FOG_MODE_DEPTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .exponential: return ".exponential" + case .depth: return ".depth" + } + + } + + } + + public enum SDFGIYScale: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. + case sdfgiYScale50Percent = 0 // SDFGI_Y_SCALE_50_PERCENT + /// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. + case sdfgiYScale75Percent = 1 // SDFGI_Y_SCALE_75_PERCENT + /// Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. + case sdfgiYScale100Percent = 2 // SDFGI_Y_SCALE_100_PERCENT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .sdfgiYScale50Percent: return ".sdfgiYScale50Percent" + case .sdfgiYScale75Percent: return ".sdfgiYScale75Percent" + case .sdfgiYScale100Percent: return ".sdfgiYScale100Percent" + } + + } + + } + + + /* Properties */ + + /// The background mode. See ``Environment/BGMode`` for possible values. + final public var backgroundMode: Environment.BGMode { + get { + return get_background () + } + + set { + set_background (newValue) + } + + } + + /// The ``Color`` displayed for clear areas of the scene. Only effective when using the ``BGMode/color`` background mode. + final public var backgroundColor: Color { + get { + return get_bg_color () + } + + set { + set_bg_color (newValue) + } + + } + + /// Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. + final public var backgroundEnergyMultiplier: Double { + get { + return get_bg_energy_multiplier () + } + + set { + set_bg_energy_multiplier (newValue) + } + + } + + /// Luminance of background measured in nits (candela per square meter). Only used when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is enabled. The default value is roughly equivalent to the sky at midday. + final public var backgroundIntensity: Double { + get { + return get_bg_intensity () + } + + set { + set_bg_intensity (newValue) + } + + } + + /// The maximum layer ID to display. Only effective when using the ``BGMode/canvas`` background mode. + final public var backgroundCanvasMaxLayer: Int32 { + get { + return get_canvas_max_layer () + } + + set { + set_canvas_max_layer (newValue) + } + + } + + /// The ID of the camera feed to show in the background. + final public var backgroundCameraFeedId: Int32 { + get { + return get_camera_feed_id () + } + + set { + set_camera_feed_id (newValue) + } + + } + + /// The ``Sky`` resource used for this ``Environment``. + final public var sky: Sky? { + get { + return get_sky () + } + + set { + set_sky (newValue) + } + + } + + /// If set to a value greater than `0.0`, overrides the field of view to use for sky rendering. If set to `0.0`, the same FOV as the current ``Camera3D`` is used for sky rendering. + final public var skyCustomFov: Double { + get { + return get_sky_custom_fov () + } + + set { + set_sky_custom_fov (newValue) + } + + } + + /// The rotation to use for sky rendering. + final public var skyRotation: Vector3 { + get { + return get_sky_rotation () + } + + set { + set_sky_rotation (newValue) + } + + } + + /// The ambient light source to use for rendering materials and global illumination. + final public var ambientLightSource: Environment.AmbientSource { + get { + return get_ambient_source () + } + + set { + set_ambient_source (newValue) + } + + } + + /// The ambient light's ``Color``. Only effective if ``ambientLightSkyContribution`` is lower than `1.0` (exclusive). + final public var ambientLightColor: Color { + get { + return get_ambient_light_color () + } + + set { + set_ambient_light_color (newValue) + } + + } + + /// Defines the amount of light that the sky brings on the scene. A value of `0.0` means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of `1.0` means that _all_ the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. + /// + /// > Note: ``ambientLightSkyContribution`` is internally clamped between `0.0` and `1.0` (inclusive). + /// + final public var ambientLightSkyContribution: Double { + get { + return get_ambient_light_sky_contribution () + } + + set { + set_ambient_light_sky_contribution (newValue) + } + + } + + /// The ambient light's energy. The higher the value, the stronger the light. Only effective if ``ambientLightSkyContribution`` is lower than `1.0` (exclusive). + final public var ambientLightEnergy: Double { + get { + return get_ambient_light_energy () + } + + set { + set_ambient_light_energy (newValue) + } + + } + + /// The reflected (specular) light source. + final public var reflectedLightSource: Environment.ReflectionSource { + get { + return get_reflection_source () + } + + set { + set_reflection_source (newValue) + } + + } + + /// The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.) + final public var tonemapMode: Environment.ToneMapper { + get { + return get_tonemapper () + } + + set { + set_tonemapper (newValue) + } + + } + + /// The default exposure used for tonemapping. Higher values result in a brighter image. See also ``tonemapWhite``. + final public var tonemapExposure: Double { + get { + return get_tonemap_exposure () + } + + set { + set_tonemap_exposure (newValue) + } + + } + + /// The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the ``tonemapMode`` isn't set to ``ToneMapper/linear``. See also ``tonemapExposure``. + final public var tonemapWhite: Double { + get { + return get_tonemap_white () + } + + set { + set_tonemap_white (newValue) + } + + } + + /// If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from ``VoxelGI``s or ``ReflectionProbe``s, but are slower and can't reflect surfaces occluded by others. + /// + /// > Note: SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + final public var ssrEnabled: Bool { + get { + return is_ssr_enabled () + } + + set { + set_ssr_enabled (newValue) + } + + } + + /// The maximum number of steps for screen-space reflections. Higher values are slower. + final public var ssrMaxSteps: Int32 { + get { + return get_ssr_max_steps () + } + + set { + set_ssr_max_steps (newValue) + } + + } + + /// The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to `0.0`). + final public var ssrFadeIn: Double { + get { + return get_ssr_fade_in () + } + + set { + set_ssr_fade_in (newValue) + } + + } + + /// The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to `0.0`). + final public var ssrFadeOut: Double { + get { + return get_ssr_fade_out () + } + + set { + set_ssr_fade_out (newValue) + } + + } + + /// The depth tolerance for screen-space reflections. + final public var ssrDepthTolerance: Double { + get { + return get_ssr_depth_tolerance () + } + + set { + set_ssr_depth_tolerance (newValue) + } + + } + + /// If `true`, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion. + /// + /// > Note: SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + final public var ssaoEnabled: Bool { + get { + return is_ssao_enabled () + } + + set { + set_ssao_enabled (newValue) + } + + } + + /// The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality. + final public var ssaoRadius: Double { + get { + return get_ssao_radius () + } + + set { + set_ssao_radius (newValue) + } + + } + + /// The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion. + final public var ssaoIntensity: Double { + get { + return get_ssao_intensity () + } + + set { + set_ssao_intensity (newValue) + } + + } + + /// The distribution of occlusion. A higher value results in darker occlusion, similar to ``ssaoIntensity``, but with a sharper falloff. + final public var ssaoPower: Double { + get { + return get_ssao_power () + } + + set { + set_ssao_power (newValue) + } + + } + + /// Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image. + final public var ssaoDetail: Double { + get { + return get_ssao_detail () + } + + set { + set_ssao_detail (newValue) + } + + } + + /// The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the `0.0-1.0` range. A value of `1.0` results in no occlusion. + final public var ssaoHorizon: Double { + get { + return get_ssao_horizon () + } + + set { + set_ssao_horizon (newValue) + } + + } + + /// The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. + final public var ssaoSharpness: Double { + get { + return get_ssao_sharpness () + } + + set { + set_ssao_sharpness (newValue) + } + + } + + /// The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than `0` will make the SSAO effect visible in direct light. + final public var ssaoLightAffect: Double { + get { + return get_ssao_direct_light_affect () + } + + set { + set_ssao_direct_light_affect (newValue) + } + + } + + /// The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than `0` will make the SSAO effect visible in areas darkened by AO textures. + final public var ssaoAoChannelAffect: Double { + get { + return get_ssao_ao_channel_affect () + } + + set { + set_ssao_ao_channel_affect (newValue) + } + + } + + /// If `true`, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or ``VoxelGI``. Screen-space indirect lighting is not affected by individual light's ``Light3D/lightIndirectEnergy``. + /// + /// > Note: SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + final public var ssilEnabled: Bool { + get { + return is_ssil_enabled () + } + + set { + set_ssil_enabled (newValue) + } + + } + + /// The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources. + final public var ssilRadius: Double { + get { + return get_ssil_radius () + } + + set { + set_ssil_radius (newValue) + } + + } + + /// The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light. + final public var ssilIntensity: Double { + get { + return get_ssil_intensity () + } + + set { + set_ssil_intensity (newValue) + } + + } + + /// The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. + final public var ssilSharpness: Double { + get { + return get_ssil_sharpness () + } + + set { + set_ssil_sharpness (newValue) + } + + } + + /// Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera. + final public var ssilNormalRejection: Double { + get { + return get_ssil_normal_rejection () + } + + set { + set_ssil_normal_rejection (newValue) + } + + } + + /// If `true`, enables signed distance field global illumination for meshes that have their ``GeometryInstance3D/giMode`` set to ``GeometryInstance3D/GIMode/`static```. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not. + /// + /// > Note: SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + /// **Performance:** SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider ``LightmapGI`` instead). To improve SDFGI performance, enable ``ProjectSettings/rendering/globalIllumination/gi/useHalfResolution`` in the Project Settings. + /// + /// > Note: Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. + /// + final public var sdfgiEnabled: Bool { + get { + return is_sdfgi_enabled () + } + + set { + set_sdfgi_enabled (newValue) + } + + } + + /// If `true`, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. ``sdfgiUseOcclusion`` has a performance impact and should only be enabled when needed. + final public var sdfgiUseOcclusion: Bool { + get { + return is_sdfgi_using_occlusion () + } + + set { + set_sdfgi_use_occlusion (newValue) + } + + } + + /// If `true`, SDFGI takes the environment lighting into account. This should be set to `false` for interior scenes. + final public var sdfgiReadSkyLight: Bool { + get { + return is_sdfgi_reading_sky_light () + } + + set { + set_sdfgi_read_sky_light (newValue) + } + + } + + /// The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than `0.0` will simulate multiple bounces, resulting in a more realistic appearance. Increasing ``sdfgiBounceFeedback`` generally has no performance impact. See also ``sdfgiEnergy``. + /// + /// > Note: Values greater than `0.5` can cause infinite feedback loops and should be avoided in scenes with bright materials. + /// + /// > Note: If ``sdfgiBounceFeedback`` is `0.0`, indirect lighting will not be represented in reflections as light will only bounce one time. + /// + final public var sdfgiBounceFeedback: Double { + get { + return get_sdfgi_bounce_feedback () + } + + set { + set_sdfgi_bounce_feedback (newValue) + } + + } + + /// The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, ``sdfgiCascades`` can often be decreased between `1` and `4` to improve performance. + final public var sdfgiCascades: Int32 { + get { + return get_sdfgi_cascades () + } + + set { + set_sdfgi_cascades (newValue) + } + + } + + /// The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. + /// + /// > Note: This property is linked to ``sdfgiMaxDistance`` and ``sdfgiCascade0Distance``. Changing its value will automatically change those properties as well. + /// + final public var sdfgiMinCellSize: Double { + get { + return get_sdfgi_min_cell_size () + } + + set { + set_sdfgi_min_cell_size (newValue) + } + + } + + /// > Note: This property is linked to ``sdfgiMinCellSize`` and ``sdfgiMaxDistance``. Changing its value will automatically change those properties as well. + final public var sdfgiCascade0Distance: Double { + get { + return get_sdfgi_cascade0_distance () + } + + set { + set_sdfgi_cascade0_distance (newValue) + } + + } + + /// The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as ``ReflectionProbe`` will be used as a fallback. + /// + /// > Note: This property is linked to ``sdfgiMinCellSize`` and ``sdfgiCascade0Distance``. Changing its value will automatically change those properties as well. + /// + final public var sdfgiMaxDistance: Double { + get { + return get_sdfgi_max_distance () + } + + set { + set_sdfgi_max_distance (newValue) + } + + } + + /// The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. ``sdfgiYScale`` should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). + final public var sdfgiYScale: Environment.SDFGIYScale { + get { + return get_sdfgi_y_scale () + } + + set { + set_sdfgi_y_scale (newValue) + } + + } + + /// The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also ``sdfgiBounceFeedback``. + final public var sdfgiEnergy: Double { + get { + return get_sdfgi_energy () + } + + set { + set_sdfgi_energy (newValue) + } + + } + + /// The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. + final public var sdfgiNormalBias: Double { + get { + return get_sdfgi_normal_bias () + } + + set { + set_sdfgi_normal_bias (newValue) + } + + } + + /// The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. + final public var sdfgiProbeBias: Double { + get { + return get_sdfgi_probe_bias () + } + + set { + set_sdfgi_probe_bias (newValue) + } + + } + + /// If `true`, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels. + /// + /// > Note: When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method. + /// + /// > Note: When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: `glow_levels/*`, ``glowNormalized``, ``glowStrength``, ``glowBlendMode``, ``glowMix``, ``glowMap``, and ``glowMapStrength``. This implementation is optimized to run on low-end devices and is less flexible as a result. + /// + final public var glowEnabled: Bool { + get { + return is_glow_enabled () + } + + set { + set_glow_enabled (newValue) + } + + } + + /// If `true`, glow levels will be normalized so that summed together their intensities equal `1.0`. + /// + /// > Note: ``glowNormalized`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowNormalized: Bool { + get { + return is_glow_normalized () + } + + set { + set_glow_normalized (newValue) + } + + } + + /// The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this should be increased to `1.5` to compensate. + final public var glowIntensity: Double { + get { + return get_glow_intensity () + } + + set { + set_glow_intensity (newValue) + } + + } + + /// The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range. + /// + /// > Note: ``glowStrength`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowStrength: Double { + get { + return get_glow_strength () + } + + set { + set_glow_strength (newValue) + } + + } + + /// When using the ``GlowBlendMode/mix`` ``glowBlendMode``, this controls how much the source image is blended with the glow layer. A value of `0.0` makes the glow rendering invisible, while a value of `1.0` is equivalent to ``GlowBlendMode/replace``. + /// + /// > Note: ``glowMix`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowMix: Double { + get { + return get_glow_mix () + } + + set { + set_glow_mix (newValue) + } + + } + + /// The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the ``glowHdrThreshold``. + final public var glowBloom: Double { + get { + return get_glow_bloom () + } + + set { + set_glow_bloom (newValue) + } + + } + + /// The glow blending mode. + /// + /// > Note: ``glowBlendMode`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowBlendMode: Environment.GlowBlendMode { + get { + return get_glow_blend_mode () + } + + set { + set_glow_blend_mode (newValue) + } + + } + + /// The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this may need to be below `1.0` for glow to be visible. A value of `0.9` works well in this case. This value also needs to be decreased below `1.0` when using glow in 2D, as 2D rendering is performed in SDR. + final public var glowHdrThreshold: Double { + get { + return get_glow_hdr_bleed_threshold () + } + + set { + set_glow_hdr_bleed_threshold (newValue) + } + + } + + /// The bleed scale of the HDR glow. + final public var glowHdrScale: Double { + get { + return get_glow_hdr_bleed_scale () + } + + set { + set_glow_hdr_bleed_scale (newValue) + } + + } + + /// The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. + final public var glowHdrLuminanceCap: Double { + get { + return get_glow_hdr_luminance_cap () + } + + set { + set_glow_hdr_luminance_cap (newValue) + } + + } + + /// How strong of an impact the ``glowMap`` should have on the overall glow effect. A strength of `0.0` means the glow map has no effect on the overall glow effect. A strength of `1.0` means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). + /// + /// > Note: ``glowMapStrength`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowMapStrength: Double { + get { + return get_glow_map_strength () + } + + set { + set_glow_map_strength (newValue) + } + + } + + /// The texture that should be used as a glow map to _multiply_ the resulting glow color according to ``glowMapStrength``. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored. + /// + /// > Note: The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9). + /// + /// > Note: ``glowMap`` has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + /// + final public var glowMap: Texture? { + get { + return get_glow_map () + } + + set { + set_glow_map (newValue) + } + + } + + /// If `true`, fog effects are enabled. + final public var fogEnabled: Bool { + get { + return is_fog_enabled () + } + + set { + set_fog_enabled (newValue) + } + + } + + /// The fog mode. See ``Environment/FogMode`` for possible values. + final public var fogMode: Environment.FogMode { + get { + return get_fog_mode () + } + + set { + set_fog_mode (newValue) + } + + } + + /// The fog's color. + final public var fogLightColor: Color { + get { + return get_fog_light_color () + } + + set { + set_fog_light_color (newValue) + } + + } + + /// The fog's brightness. Higher values result in brighter fog. + final public var fogLightEnergy: Double { + get { + return get_fog_light_energy () + } + + set { + set_fog_light_energy (newValue) + } + + } + + /// If set above `0.0`, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. + final public var fogSunScatter: Double { + get { + return get_fog_sun_scatter () + } + + set { + set_fog_sun_scatter (newValue) + } + + } + + /// The fog density to be used. This is demonstrated in different ways depending on the ``fogMode`` mode chosen: + /// + /// **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life. + /// + /// **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At `1.0` the fog will fully obscure the scene, at `0.0` the fog will not be visible. + /// + final public var fogDensity: Double { + get { + return get_fog_density () + } + + set { + set_fog_density (newValue) + } + + } + + /// If set above `0.0` (exclusive), blends between the fog's color and the color of the background ``Sky``. This has a small performance cost when set above `0.0`. Must have ``backgroundMode`` set to ``BGMode/sky``. + /// + /// This is useful to simulate aerial perspective in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to `1.0`, the fog color comes completely from the ``Sky``. If set to `0.0`, aerial perspective is disabled. + /// + final public var fogAerialPerspective: Double { + get { + return get_fog_aerial_perspective () + } + + set { + set_fog_aerial_perspective (newValue) + } + + } + + /// The factor to use when affecting the sky with non-volumetric fog. `1.0` means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with `0.0` not affecting sky rendering at all. + /// + /// > Note: ``fogSkyAffect`` has no visual effect if ``fogAerialPerspective`` is `1.0`. + /// + final public var fogSkyAffect: Double { + get { + return get_fog_sky_affect () + } + + set { + set_fog_sky_affect (newValue) + } + + } + + /// The height at which the height fog effect begins. + final public var fogHeight: Double { + get { + return get_fog_height () + } + + set { + set_fog_height (newValue) + } + + } + + /// The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. + final public var fogHeightDensity: Double { + get { + return get_fog_height_density () + } + + set { + set_fog_height_density (newValue) + } + + } + + /// The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when ``fogMode`` is set to ``FogMode/depth``. + final public var fogDepthCurve: Double { + get { + return get_fog_depth_curve () + } + + set { + set_fog_depth_curve (newValue) + } + + } + + /// The fog's depth starting distance from the camera. Only available when ``fogMode`` is set to ``FogMode/depth``. + final public var fogDepthBegin: Double { + get { + return get_fog_depth_begin () + } + + set { + set_fog_depth_begin (newValue) + } + + } + + /// The fog's depth end distance from the camera. If this value is set to `0`, it will be equal to the current camera's ``Camera3D/far`` value. Only available when ``fogMode`` is set to ``FogMode/depth``. + final public var fogDepthEnd: Double { + get { + return get_fog_depth_end () + } + + set { + set_fog_depth_end (newValue) + } + + } + + /// Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with ``FogVolume``s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission. + /// + /// > Note: Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + final public var volumetricFogEnabled: Bool { + get { + return is_volumetric_fog_enabled () + } + + set { + set_volumetric_fog_enabled (newValue) + } + + } + + /// The base _exponential_ density of the volumetric fog. Set this to the lowest density you want to have globally. ``FogVolume``s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life. + /// + /// A value of `0.0` disables global volumetric fog while allowing ``FogVolume``s to display volumetric fog in specific areas. + /// + /// To make volumetric fog work as a volumetric _lighting_ solution, set ``volumetricFogDensity`` to the lowest non-zero value (`0.0001`) then increase lights' ``Light3D/lightVolumetricFogEnergy`` to values between `10000` and `100000` to compensate for the very low density. + /// + final public var volumetricFogDensity: Double { + get { + return get_volumetric_fog_density () + } + + set { + set_volumetric_fog_density (newValue) + } + + } + + /// The ``Color`` of the volumetric fog when interacting with lights. Mist and fog have an albedo close to `Color(1, 1, 1, 1)` while smoke has a darker albedo. + final public var volumetricFogAlbedo: Color { + get { + return get_volumetric_fog_albedo () + } + + set { + set_volumetric_fog_albedo (newValue) + } + + } + + /// The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows. + final public var volumetricFogEmission: Color { + get { + return get_volumetric_fog_emission () + } + + set { + set_volumetric_fog_emission (newValue) + } + + } + + /// The brightness of the emitted light from the volumetric fog. + final public var volumetricFogEmissionEnergy: Double { + get { + return get_volumetric_fog_emission_energy () + } + + set { + set_volumetric_fog_emission_energy (newValue) + } + + } + + /// Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of `0.0` means that Global Illumination will not impact the volumetric fog. ``volumetricFogGiInject`` has a small performance cost when set above `0.0`. + /// + /// > Note: This has no visible effect if ``volumetricFogDensity`` is `0.0` or if ``volumetricFogAlbedo`` is a fully black color. + /// + /// > Note: Only ``VoxelGI`` and SDFGI (``Environment/sdfgiEnabled``) are taken into account when using ``volumetricFogGiInject``. Global illumination from ``LightmapGI``, ``ReflectionProbe`` and SSIL (see ``ssilEnabled``) will be ignored by volumetric fog. + /// + final public var volumetricFogGiInject: Double { + get { + return get_volumetric_fog_gi_inject () + } + + set { + set_volumetric_fog_gi_inject (newValue) + } + + } + + /// The direction of scattered light as it goes through the volumetric fog. A value close to `1.0` means almost all light is scattered forward. A value close to `0.0` means light is scattered equally in all directions. A value close to `-1.0` means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions. + final public var volumetricFogAnisotropy: Double { + get { + return get_volumetric_fog_anisotropy () + } + + set { + set_volumetric_fog_anisotropy (newValue) + } + + } + + /// The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also ``ProjectSettings/rendering/environment/volumetricFog/volumeDepth``. + final public var volumetricFogLength: Double { + get { + return get_volumetric_fog_length () + } + + set { + set_volumetric_fog_length (newValue) + } + + } + + /// The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera. + final public var volumetricFogDetailSpread: Double { + get { + return get_volumetric_fog_detail_spread () + } + + set { + set_volumetric_fog_detail_spread (newValue) + } + + } + + /// Scales the strength of ambient light used in the volumetric fog. A value of `0.0` means that ambient light will not impact the volumetric fog. ``volumetricFogAmbientInject`` has a small performance cost when set above `0.0`. + /// + /// > Note: This has no visible effect if ``volumetricFogDensity`` is `0.0` or if ``volumetricFogAlbedo`` is a fully black color. + /// + final public var volumetricFogAmbientInject: Double { + get { + return get_volumetric_fog_ambient_inject () + } + + set { + set_volumetric_fog_ambient_inject (newValue) + } + + } + + /// The factor to use when affecting the sky with volumetric fog. `1.0` means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with `0.0` not affecting sky rendering at all. + /// + /// > Note: ``volumetricFogSkyAffect`` also affects ``FogVolume``s, even if ``volumetricFogDensity`` is `0.0`. If you notice ``FogVolume``s are disappearing when looking towards the sky, set ``volumetricFogSkyAffect`` to `1.0`. + /// + final public var volumetricFogSkyAffect: Double { + get { + return get_volumetric_fog_sky_affect () + } + + set { + set_volumetric_fog_sky_affect (newValue) + } + + } + + /// Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving ``FogVolume``s and ``Light3D``s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving ``FogVolume``s or ``Light3D``s too fast. Short-lived dynamic lighting effects should have ``Light3D/lightVolumetricFogEnergy`` set to `0.0` to avoid ghosting. + final public var volumetricFogTemporalReprojectionEnabled: Bool { + get { + return is_volumetric_fog_temporal_reprojection_enabled () + } + + set { + set_volumetric_fog_temporal_reprojection_enabled (newValue) + } + + } + + /// The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible. + final public var volumetricFogTemporalReprojectionAmount: Double { + get { + return get_volumetric_fog_temporal_reprojection_amount () + } + + set { + set_volumetric_fog_temporal_reprojection_amount (newValue) + } + + } + + /// If `true`, enables the `adjustment_*` properties provided by this resource. If `false`, modifications to the `adjustment_*` properties will have no effect on the rendered scene. + final public var adjustmentEnabled: Bool { + get { + return is_adjustment_enabled () + } + + set { + set_adjustment_enabled (newValue) + } + + } + + /// The global brightness value of the rendered scene. Effective only if ``adjustmentEnabled`` is `true`. + final public var adjustmentBrightness: Double { + get { + return get_adjustment_brightness () + } + + set { + set_adjustment_brightness (newValue) + } + + } + + /// The global contrast value of the rendered scene (default value is 1). Effective only if ``adjustmentEnabled`` is `true`. + final public var adjustmentContrast: Double { + get { + return get_adjustment_contrast () + } + + set { + set_adjustment_contrast (newValue) + } + + } + + /// The global color saturation value of the rendered scene (default value is 1). Effective only if ``adjustmentEnabled`` is `true`. + final public var adjustmentSaturation: Double { + get { + return get_adjustment_saturation () + } + + set { + set_adjustment_saturation (newValue) + } + + } + + /// The ``Texture2D`` or ``Texture3D`` lookup table (LUT) to use for the built-in post-process color grading. Can use a ``GradientTexture1D`` for a 1-dimensional LUT, or a ``Texture3D`` for a more complex LUT. Effective only if ``adjustmentEnabled`` is `true`. + final public var adjustmentColorCorrection: Texture? { + get { + return get_adjustment_color_correction () + } + + set { + set_adjustment_color_correction (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_background: GDExtensionMethodBindPtr = { + let methodName = StringName("set_background") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4071623990)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_background(_ mode: Environment.BGMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_background, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_background: GDExtensionMethodBindPtr = { + let methodName = StringName("get_background") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1843210413)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_background() -> Environment.BGMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_background, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.BGMode (rawValue: _result)! + } + + fileprivate static var method_set_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3336722921)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky(_ sky: Sky?) { + withUnsafePointer(to: sky?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sky, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1177136966)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky() -> Sky? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Environment.method_get_sky, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_sky_custom_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_custom_fov") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_custom_fov(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sky_custom_fov, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_custom_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_custom_fov") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_custom_fov() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sky_custom_fov, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_rotation") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_rotation(_ eulerRadians: Vector3) { + withUnsafePointer(to: eulerRadians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sky_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_rotation") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_rotation() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Environment.method_get_sky_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bg_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bg_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_bg_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bg_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bg_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Environment.method_get_bg_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bg_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bg_energy_multiplier") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bg_energy_multiplier(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_bg_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bg_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bg_energy_multiplier") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bg_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_bg_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bg_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bg_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bg_intensity(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_bg_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bg_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bg_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bg_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_bg_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_canvas_max_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_canvas_max_layer") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_canvas_max_layer(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_canvas_max_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_canvas_max_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas_max_layer") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_canvas_max_layer() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Environment.method_get_canvas_max_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_camera_feed_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_camera_feed_id") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_camera_feed_id(_ id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_camera_feed_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_camera_feed_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_feed_id") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_camera_feed_id() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Environment.method_get_camera_feed_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ambient_light_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_light_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_light_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ambient_light_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_light_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_light_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_light_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Environment.method_get_ambient_light_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ambient_source: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_source") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2607780160)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_source(_ source: Environment.AmbientSource) { + withUnsafePointer(to: source.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ambient_source, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_source: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_source") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 67453933)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_source() -> Environment.AmbientSource { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_ambient_source, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.AmbientSource (rawValue: _result)! + } + + fileprivate static var method_set_ambient_light_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_light_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_light_energy(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ambient_light_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_light_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_light_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_light_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ambient_light_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ambient_light_sky_contribution: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_light_sky_contribution") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_light_sky_contribution(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ambient_light_sky_contribution, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_light_sky_contribution: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_light_sky_contribution") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_light_sky_contribution() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ambient_light_sky_contribution, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reflection_source: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reflection_source") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 299673197)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reflection_source(_ source: Environment.ReflectionSource) { + withUnsafePointer(to: source.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_reflection_source, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_reflection_source: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reflection_source") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 777700713)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_reflection_source() -> Environment.ReflectionSource { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_reflection_source, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.ReflectionSource (rawValue: _result)! + } + + fileprivate static var method_set_tonemapper: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tonemapper") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509116664)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tonemapper(_ mode: Environment.ToneMapper) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_tonemapper, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tonemapper: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tonemapper") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2908408137)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tonemapper() -> Environment.ToneMapper { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_tonemapper, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.ToneMapper (rawValue: _result)! + } + + fileprivate static var method_set_tonemap_exposure: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tonemap_exposure") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tonemap_exposure(_ exposure: Double) { + withUnsafePointer(to: exposure) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_tonemap_exposure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tonemap_exposure: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tonemap_exposure") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tonemap_exposure() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_tonemap_exposure, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tonemap_white: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tonemap_white") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tonemap_white(_ white: Double) { + withUnsafePointer(to: white) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_tonemap_white, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tonemap_white: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tonemap_white") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tonemap_white() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_tonemap_white, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssr_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssr_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssr_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssr_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ssr_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ssr_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ssr_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_ssr_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssr_max_steps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssr_max_steps") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssr_max_steps(_ maxSteps: Int32) { + withUnsafePointer(to: maxSteps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssr_max_steps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssr_max_steps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssr_max_steps") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssr_max_steps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Environment.method_get_ssr_max_steps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssr_fade_in: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssr_fade_in") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssr_fade_in(_ fadeIn: Double) { + withUnsafePointer(to: fadeIn) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssr_fade_in, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssr_fade_in: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssr_fade_in") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssr_fade_in() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssr_fade_in, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssr_fade_out: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssr_fade_out") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssr_fade_out(_ fadeOut: Double) { + withUnsafePointer(to: fadeOut) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssr_fade_out, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssr_fade_out: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssr_fade_out") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssr_fade_out() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssr_fade_out, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssr_depth_tolerance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssr_depth_tolerance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssr_depth_tolerance(_ depthTolerance: Double) { + withUnsafePointer(to: depthTolerance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssr_depth_tolerance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssr_depth_tolerance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssr_depth_tolerance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssr_depth_tolerance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssr_depth_tolerance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ssao_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ssao_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ssao_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_ssao_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_radius") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_radius") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_intensity(_ intensity: Double) { + withUnsafePointer(to: intensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_power: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_power") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_power(_ power: Double) { + withUnsafePointer(to: power) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_power, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_power: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_power") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_power() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_power, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_detail: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_detail") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_detail(_ detail: Double) { + withUnsafePointer(to: detail) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_detail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_detail: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_detail") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_detail() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_detail, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_horizon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_horizon") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_horizon(_ horizon: Double) { + withUnsafePointer(to: horizon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_horizon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_horizon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_horizon") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_horizon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_horizon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_sharpness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_sharpness(_ sharpness: Double) { + withUnsafePointer(to: sharpness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_sharpness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_sharpness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_sharpness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_sharpness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_direct_light_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_direct_light_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_direct_light_affect(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_direct_light_affect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_direct_light_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_direct_light_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_direct_light_affect() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_direct_light_affect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssao_ao_channel_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssao_ao_channel_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssao_ao_channel_affect(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssao_ao_channel_affect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssao_ao_channel_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssao_ao_channel_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssao_ao_channel_affect() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssao_ao_channel_affect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssil_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssil_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssil_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssil_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ssil_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ssil_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ssil_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_ssil_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssil_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssil_radius") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssil_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssil_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssil_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssil_radius") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssil_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssil_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssil_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssil_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssil_intensity(_ intensity: Double) { + withUnsafePointer(to: intensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssil_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssil_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssil_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssil_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssil_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssil_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssil_sharpness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssil_sharpness(_ sharpness: Double) { + withUnsafePointer(to: sharpness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssil_sharpness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssil_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssil_sharpness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssil_sharpness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssil_sharpness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ssil_normal_rejection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ssil_normal_rejection") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ssil_normal_rejection(_ normalRejection: Double) { + withUnsafePointer(to: normalRejection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_ssil_normal_rejection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ssil_normal_rejection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ssil_normal_rejection") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ssil_normal_rejection() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_ssil_normal_rejection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sdfgi_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sdfgi_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sdfgi_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_sdfgi_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_cascades: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_cascades") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_cascades(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_cascades, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_cascades: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_cascades") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_cascades() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_cascades, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_min_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_min_cell_size") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_min_cell_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_min_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_min_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_min_cell_size") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_min_cell_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_min_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_max_distance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_max_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_max_distance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_cascade0_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_cascade0_distance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_cascade0_distance(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_cascade0_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_cascade0_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_cascade0_distance") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_cascade0_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_cascade0_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_y_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_y_scale") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3608608372)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_y_scale(_ scale: Environment.SDFGIYScale) { + withUnsafePointer(to: scale.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_y_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_y_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_y_scale") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2568002245)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_y_scale() -> Environment.SDFGIYScale { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_y_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.SDFGIYScale (rawValue: _result)! + } + + fileprivate static var method_set_sdfgi_use_occlusion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_use_occlusion") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_use_occlusion(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_use_occlusion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sdfgi_using_occlusion: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sdfgi_using_occlusion") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sdfgi_using_occlusion() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_sdfgi_using_occlusion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_bounce_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_bounce_feedback") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_bounce_feedback(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_bounce_feedback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_bounce_feedback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_bounce_feedback") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_bounce_feedback() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_bounce_feedback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_read_sky_light: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_read_sky_light") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_read_sky_light(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_read_sky_light, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sdfgi_reading_sky_light: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sdfgi_reading_sky_light") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sdfgi_reading_sky_light() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_sdfgi_reading_sky_light, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_energy(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_normal_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_normal_bias") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_normal_bias(_ bias: Double) { + withUnsafePointer(to: bias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_normal_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_normal_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_normal_bias") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_normal_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_normal_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sdfgi_probe_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sdfgi_probe_bias") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sdfgi_probe_bias(_ bias: Double) { + withUnsafePointer(to: bias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_sdfgi_probe_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sdfgi_probe_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sdfgi_probe_bias") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sdfgi_probe_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_sdfgi_probe_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_glow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_glow_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_glow_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_glow_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_level: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_level") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the intensity of the glow level `idx`. A value above `0.0` enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. + public final func setGlowLevel(idx: Int32, intensity: Double) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: intensity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_level, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_glow_level: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_level") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the intensity of the glow level `idx`. + public final func getGlowLevel(idx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_get_glow_level, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_glow_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_normalized") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_normalized(_ normalize: Bool) { + withUnsafePointer(to: normalize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_normalized, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_glow_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("is_glow_normalized") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_glow_normalized() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_glow_normalized, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_intensity(_ intensity: Double) { + withUnsafePointer(to: intensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_intensity") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_strength") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_strength") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_mix") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_mix(_ mix: Double) { + withUnsafePointer(to: mix) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_mix, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_mix") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_mix() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_mix, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_bloom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_bloom") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_bloom(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_bloom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_bloom: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_bloom") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_bloom() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_bloom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_blend_mode") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2561587761)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_blend_mode(_ mode: Environment.GlowBlendMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_blend_mode") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1529667332)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_blend_mode() -> Environment.GlowBlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_glow_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.GlowBlendMode (rawValue: _result)! + } + + fileprivate static var method_set_glow_hdr_bleed_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_hdr_bleed_threshold") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_hdr_bleed_threshold(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_hdr_bleed_threshold, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_hdr_bleed_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_hdr_bleed_threshold") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_hdr_bleed_threshold() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_hdr_bleed_threshold, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_hdr_bleed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_hdr_bleed_scale") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_hdr_bleed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_hdr_bleed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_hdr_bleed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_hdr_bleed_scale") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_hdr_bleed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_hdr_bleed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_hdr_luminance_cap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_hdr_luminance_cap") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_hdr_luminance_cap(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_hdr_luminance_cap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_hdr_luminance_cap: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_hdr_luminance_cap") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_hdr_luminance_cap() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_hdr_luminance_cap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_map_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_map_strength") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_map_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_map_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_map_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_map_strength") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_map_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_glow_map_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_glow_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glow_map") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1790811099)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glow_map(_ mode: Texture?) { + withUnsafePointer(to: mode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_glow_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glow_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glow_map") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4037048985)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glow_map() -> Texture? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Environment.method_get_glow_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_fog_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_fog_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_fog_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_fog_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_fog_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_mode") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3059806579)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_mode(_ mode: Environment.FogMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_mode") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2456062483)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_mode() -> Environment.FogMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Environment.method_get_fog_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Environment.FogMode (rawValue: _result)! + } + + fileprivate static var method_set_fog_light_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_light_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_light_color(_ lightColor: Color) { + withUnsafePointer(to: lightColor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_light_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_light_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_light_color") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_light_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Environment.method_get_fog_light_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_light_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_light_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_light_energy(_ lightEnergy: Double) { + withUnsafePointer(to: lightEnergy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_light_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_light_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_light_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_light_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_light_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_sun_scatter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_sun_scatter") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_sun_scatter(_ sunScatter: Double) { + withUnsafePointer(to: sunScatter) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_sun_scatter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_sun_scatter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_sun_scatter") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_sun_scatter() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_sun_scatter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_density: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_density(_ density: Double) { + withUnsafePointer(to: density) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_density, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_density: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_density() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_density, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_height") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_height") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_height_density: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_height_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_height_density(_ heightDensity: Double) { + withUnsafePointer(to: heightDensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_height_density, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_height_density: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_height_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_height_density() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_height_density, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_aerial_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_aerial_perspective") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_aerial_perspective(_ aerialPerspective: Double) { + withUnsafePointer(to: aerialPerspective) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_aerial_perspective, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_aerial_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_aerial_perspective") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_aerial_perspective() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_aerial_perspective, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_sky_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_sky_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_sky_affect(_ skyAffect: Double) { + withUnsafePointer(to: skyAffect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_sky_affect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_sky_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_sky_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_sky_affect() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_sky_affect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_depth_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_depth_curve") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_depth_curve(_ curve: Double) { + withUnsafePointer(to: curve) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_depth_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_depth_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_depth_curve") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_depth_curve() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_depth_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_depth_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_depth_begin") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_depth_begin(_ begin: Double) { + withUnsafePointer(to: begin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_depth_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_depth_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_depth_begin") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_depth_begin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_depth_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fog_depth_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fog_depth_end") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fog_depth_end(_ end: Double) { + withUnsafePointer(to: end) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_fog_depth_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fog_depth_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fog_depth_end") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fog_depth_end() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_fog_depth_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_volumetric_fog_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_volumetric_fog_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_volumetric_fog_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_volumetric_fog_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_emission") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_emission(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_emission, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_emission") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_emission() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_emission, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_albedo") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_albedo(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_albedo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_albedo") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_albedo() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_albedo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_density: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_density(_ density: Double) { + withUnsafePointer(to: density) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_density, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_density: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_density") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_density() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_density, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_emission_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_emission_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_emission_energy(_ begin: Double) { + withUnsafePointer(to: begin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_emission_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_emission_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_emission_energy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_emission_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_emission_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_anisotropy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_anisotropy(_ anisotropy: Double) { + withUnsafePointer(to: anisotropy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_anisotropy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_anisotropy") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_anisotropy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_anisotropy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_length") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_length(_ length: Double) { + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_length") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_detail_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_detail_spread") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_detail_spread(_ detailSpread: Double) { + withUnsafePointer(to: detailSpread) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_detail_spread, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_detail_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_detail_spread") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_detail_spread() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_detail_spread, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_gi_inject: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_gi_inject") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_gi_inject(_ giInject: Double) { + withUnsafePointer(to: giInject) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_gi_inject, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_gi_inject: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_gi_inject") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_gi_inject() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_gi_inject, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_ambient_inject: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_ambient_inject") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_ambient_inject(_ enabled: Double) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_ambient_inject, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_ambient_inject: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_ambient_inject") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_ambient_inject() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_ambient_inject, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_sky_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_sky_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_sky_affect(_ skyAffect: Double) { + withUnsafePointer(to: skyAffect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_sky_affect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_sky_affect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_sky_affect") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_sky_affect() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_sky_affect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_temporal_reprojection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_temporal_reprojection_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_temporal_reprojection_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_temporal_reprojection_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_volumetric_fog_temporal_reprojection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_volumetric_fog_temporal_reprojection_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_volumetric_fog_temporal_reprojection_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_volumetric_fog_temporal_reprojection_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_volumetric_fog_temporal_reprojection_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_volumetric_fog_temporal_reprojection_amount") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_volumetric_fog_temporal_reprojection_amount(_ temporalReprojectionAmount: Double) { + withUnsafePointer(to: temporalReprojectionAmount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_volumetric_fog_temporal_reprojection_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_volumetric_fog_temporal_reprojection_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_volumetric_fog_temporal_reprojection_amount") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_volumetric_fog_temporal_reprojection_amount() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_volumetric_fog_temporal_reprojection_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_adjustment_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_adjustment_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_adjustment_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_adjustment_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_adjustment_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_adjustment_enabled") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_adjustment_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Environment.method_is_adjustment_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_adjustment_brightness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_adjustment_brightness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_adjustment_brightness(_ brightness: Double) { + withUnsafePointer(to: brightness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_adjustment_brightness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_adjustment_brightness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_adjustment_brightness") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_adjustment_brightness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_adjustment_brightness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_adjustment_contrast: GDExtensionMethodBindPtr = { + let methodName = StringName("set_adjustment_contrast") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_adjustment_contrast(_ contrast: Double) { + withUnsafePointer(to: contrast) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_adjustment_contrast, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_adjustment_contrast: GDExtensionMethodBindPtr = { + let methodName = StringName("get_adjustment_contrast") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_adjustment_contrast() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_adjustment_contrast, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_adjustment_saturation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_adjustment_saturation") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_adjustment_saturation(_ saturation: Double) { + withUnsafePointer(to: saturation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_adjustment_saturation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_adjustment_saturation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_adjustment_saturation") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_adjustment_saturation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Environment.method_get_adjustment_saturation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_adjustment_color_correction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_adjustment_color_correction") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1790811099)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_adjustment_color_correction(_ colorCorrection: Texture?) { + withUnsafePointer(to: colorCorrection?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Environment.method_set_adjustment_color_correction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_adjustment_color_correction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_adjustment_color_correction") + return withUnsafePointer(to: &Environment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4037048985)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_adjustment_color_correction() -> Texture? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Environment.method_get_adjustment_color_correction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Expression.swift b/Sources/SwiftGodot/Generated/Api/Expression.swift new file mode 100644 index 000000000..e5f611dfc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Expression.swift @@ -0,0 +1,142 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class that stores an expression you can execute. +/// +/// An expression can be made of any arithmetic operation, built-in math function call, method call of a passed instance, or built-in type construction call. +/// +/// An example expression text using the built-in math functions could be `sqrt(pow(3, 2) + pow(4, 2))`. +/// +/// In the following example we use a ``LineEdit`` node to write our expression and show the result. +/// +open class Expression: RefCounted { + override open class var godotClassName: StringName { "Expression" } + /* Methods */ + fileprivate static var method_parse: GDExtensionMethodBindPtr = { + let methodName = StringName("parse") + return withUnsafePointer(to: &Expression.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3069722906)! + } + + } + + }() + + /// Parses the expression and returns an ``GodotError`` code. + /// + /// You can optionally specify names of variables that may appear in the expression with `inputNames`, so that you can bind them when it gets executed. + /// + public final func parse(expression: String, inputNames: PackedStringArray = PackedStringArray()) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let expression = GString(expression) + withUnsafePointer(to: expression.content) { pArg0 in + withUnsafePointer(to: inputNames.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Expression.method_parse, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_execute: GDExtensionMethodBindPtr = { + let methodName = StringName("execute") + return withUnsafePointer(to: &Expression.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3712471238)! + } + + } + + }() + + /// Executes the expression that was previously parsed by ``parse(expression:inputNames:)`` and returns the result. Before you use the returned object, you should check if the method failed by calling ``hasExecuteFailed()``. + /// + /// If you defined input variables in ``parse(expression:inputNames:)``, you can specify their values in the inputs array, in the same order. + /// + public final func execute(inputs: GArray = GArray (), baseInstance: Object? = nil, showError: Bool = true, constCallsOnly: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: inputs.content) { pArg0 in + withUnsafePointer(to: baseInstance?.handle) { pArg1 in + withUnsafePointer(to: showError) { pArg2 in + withUnsafePointer(to: constCallsOnly) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Expression.method_execute, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_has_execute_failed: GDExtensionMethodBindPtr = { + let methodName = StringName("has_execute_failed") + return withUnsafePointer(to: &Expression.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if ``execute(inputs:baseInstance:showError:constCallsOnly:)`` has failed. + public final func hasExecuteFailed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Expression.method_has_execute_failed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_error_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_error_text") + return withUnsafePointer(to: &Expression.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the error text if ``parse(expression:inputNames:)`` or ``execute(inputs:baseInstance:showError:constCallsOnly:)`` has failed. + public final func getErrorText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Expression.method_get_error_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FBXDocument.swift b/Sources/SwiftGodot/Generated/Api/FBXDocument.swift new file mode 100644 index 000000000..cf6a36c2e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FBXDocument.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Handles FBX documents. +/// +/// The FBXDocument handles FBX documents. It provides methods to append data from buffers or files, generate scenes, and register/unregister document extensions. +/// +/// When exporting FBX from Blender, use the "FBX Units Scale" option. The "FBX Units Scale" option sets the correct scale factor and avoids manual adjustments when re-importing into Blender, such as through glTF export. +/// +open class FBXDocument: GLTFDocument { + override open class var godotClassName: StringName { "FBXDocument" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/FBXState.swift b/Sources/SwiftGodot/Generated/Api/FBXState.swift new file mode 100644 index 000000000..3b273b0a7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FBXState.swift @@ -0,0 +1,85 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// The FBXState handles the state data imported from FBX files. +open class FBXState: GLTFState { + override open class var godotClassName: StringName { "FBXState" } + + /* Properties */ + + /// If `true`, the import process used auxiliary nodes called geometry helper nodes. These nodes help preserve the pivots and transformations of the original 3D model during import. + final public var allowGeometryHelperNodes: Bool { + get { + return get_allow_geometry_helper_nodes () + } + + set { + set_allow_geometry_helper_nodes (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_allow_geometry_helper_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_geometry_helper_nodes") + return withUnsafePointer(to: &FBXState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_geometry_helper_nodes() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FBXState.method_get_allow_geometry_helper_nodes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_geometry_helper_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_geometry_helper_nodes") + return withUnsafePointer(to: &FBXState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_geometry_helper_nodes(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FBXState.method_set_allow_geometry_helper_nodes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FastNoiseLite.swift b/Sources/SwiftGodot/Generated/Api/FastNoiseLite.swift new file mode 100644 index 000000000..d68efebcf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FastNoiseLite.swift @@ -0,0 +1,1360 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Generates noise using the FastNoiseLite library. +/// +/// This class generates noise using the FastNoiseLite library, which is a collection of several noise algorithms including Cellular, Perlin, Value, and more. +/// +/// Most generated noise values are in the range of `[-1, 1]`, but not always. Some of the cellular noise algorithms return results above `1`. +/// +open class FastNoiseLite: Noise { + override open class var godotClassName: StringName { "FastNoiseLite" } + public enum NoiseType: Int64, CaseIterable, CustomDebugStringConvertible { + /// A lattice of points are assigned random values then interpolated based on neighboring values. + case value = 5 // TYPE_VALUE + /// Similar to Value noise, but slower. Has more variance in peaks and valleys. + /// + /// Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap. + /// + case valueCubic = 4 // TYPE_VALUE_CUBIC + /// A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. + case perlin = 3 // TYPE_PERLIN + /// Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. + case cellular = 2 // TYPE_CELLULAR + /// As opposed to ``NoiseType/perlin``, gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. + case simplex = 0 // TYPE_SIMPLEX + /// Modified, higher quality version of ``NoiseType/simplex``, but slower. + case simplexSmooth = 1 // TYPE_SIMPLEX_SMOOTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .value: return ".value" + case .valueCubic: return ".valueCubic" + case .perlin: return ".perlin" + case .cellular: return ".cellular" + case .simplex: return ".simplex" + case .simplexSmooth: return ".simplexSmooth" + } + + } + + } + + public enum FractalType: Int64, CaseIterable, CustomDebugStringConvertible { + /// No fractal noise. + case none = 0 // FRACTAL_NONE + /// Method using Fractional Brownian Motion to combine octaves into a fractal. + case fbm = 1 // FRACTAL_FBM + /// Method of combining octaves into a fractal resulting in a "ridged" look. + case ridged = 2 // FRACTAL_RIDGED + /// Method of combining octaves into a fractal with a ping pong effect. + case pingPong = 3 // FRACTAL_PING_PONG + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .fbm: return ".fbm" + case .ridged: return ".ridged" + case .pingPong: return ".pingPong" + } + + } + + } + + public enum CellularDistanceFunction: Int64, CaseIterable, CustomDebugStringConvertible { + /// Euclidean distance to the nearest point. + case euclidean = 0 // DISTANCE_EUCLIDEAN + /// Squared Euclidean distance to the nearest point. + case euclideanSquared = 1 // DISTANCE_EUCLIDEAN_SQUARED + /// Manhattan distance (taxicab metric) to the nearest point. + case manhattan = 2 // DISTANCE_MANHATTAN + /// Blend of ``CellularDistanceFunction/euclidean`` and ``CellularDistanceFunction/manhattan`` to give curved cell boundaries + case hybrid = 3 // DISTANCE_HYBRID + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .euclidean: return ".euclidean" + case .euclideanSquared: return ".euclideanSquared" + case .manhattan: return ".manhattan" + case .hybrid: return ".hybrid" + } + + } + + } + + public enum CellularReturnType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The cellular distance function will return the same value for all points within a cell. + case cellValue = 0 // RETURN_CELL_VALUE + /// The cellular distance function will return a value determined by the distance to the nearest point. + case distance = 1 // RETURN_DISTANCE + /// The cellular distance function returns the distance to the second-nearest point. + case distance2 = 2 // RETURN_DISTANCE2 + /// The distance to the nearest point is added to the distance to the second-nearest point. + case distance2Add = 3 // RETURN_DISTANCE2_ADD + /// The distance to the nearest point is subtracted from the distance to the second-nearest point. + case distance2Sub = 4 // RETURN_DISTANCE2_SUB + /// The distance to the nearest point is multiplied with the distance to the second-nearest point. + case distance2Mul = 5 // RETURN_DISTANCE2_MUL + /// The distance to the nearest point is divided by the distance to the second-nearest point. + case distance2Div = 6 // RETURN_DISTANCE2_DIV + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .cellValue: return ".cellValue" + case .distance: return ".distance" + case .distance2: return ".distance2" + case .distance2Add: return ".distance2Add" + case .distance2Sub: return ".distance2Sub" + case .distance2Mul: return ".distance2Mul" + case .distance2Div: return ".distance2Div" + } + + } + + } + + public enum DomainWarpType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The domain is warped using the simplex noise algorithm. + case simplex = 0 // DOMAIN_WARP_SIMPLEX + /// The domain is warped using a simplified version of the simplex noise algorithm. + case simplexReduced = 1 // DOMAIN_WARP_SIMPLEX_REDUCED + /// The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). + case basicGrid = 2 // DOMAIN_WARP_BASIC_GRID + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .simplex: return ".simplex" + case .simplexReduced: return ".simplexReduced" + case .basicGrid: return ".basicGrid" + } + + } + + } + + public enum DomainWarpFractalType: Int64, CaseIterable, CustomDebugStringConvertible { + /// No fractal noise for warping the space. + case none = 0 // DOMAIN_WARP_FRACTAL_NONE + /// Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. + case progressive = 1 // DOMAIN_WARP_FRACTAL_PROGRESSIVE + /// Warping the space independently for each octave, resulting in a more chaotic distortion. + case independent = 2 // DOMAIN_WARP_FRACTAL_INDEPENDENT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .progressive: return ".progressive" + case .independent: return ".independent" + } + + } + + } + + + /* Properties */ + + /// The noise algorithm used. See ``FastNoiseLite/NoiseType``. + final public var noiseType: FastNoiseLite.NoiseType { + get { + return get_noise_type () + } + + set { + set_noise_type (newValue) + } + + } + + /// The random number seed for all noise types. + final public var seed: Int32 { + get { + return get_seed () + } + + set { + set_seed (newValue) + } + + } + + /// The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. + final public var frequency: Double { + get { + return get_frequency () + } + + set { + set_frequency (newValue) + } + + } + + /// Translate the noise input coordinates by the given ``Vector3``. + final public var offset: Vector3 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The method for combining octaves into a fractal. See ``FastNoiseLite/FractalType``. + final public var fractalType: FastNoiseLite.FractalType { + get { + return get_fractal_type () + } + + set { + set_fractal_type (newValue) + } + + } + + /// The number of noise layers that are sampled to get the final value for fractal noise types. + final public var fractalOctaves: Int32 { + get { + return get_fractal_octaves () + } + + set { + set_fractal_octaves (newValue) + } + + } + + /// Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. + final public var fractalLacunarity: Double { + get { + return get_fractal_lacunarity () + } + + set { + set_fractal_lacunarity (newValue) + } + + } + + /// Determines the strength of each subsequent layer of noise in fractal noise. + /// + /// A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + /// + final public var fractalGain: Double { + get { + return get_fractal_gain () + } + + set { + set_fractal_gain (newValue) + } + + } + + /// Higher weighting means higher octaves have less impact if lower octaves have a large impact. + final public var fractalWeightedStrength: Double { + get { + return get_fractal_weighted_strength () + } + + set { + set_fractal_weighted_strength (newValue) + } + + } + + /// Sets the strength of the fractal ping pong type. + final public var fractalPingPongStrength: Double { + get { + return get_fractal_ping_pong_strength () + } + + set { + set_fractal_ping_pong_strength (newValue) + } + + } + + /// Determines how the distance to the nearest/second-nearest point is computed. See ``FastNoiseLite/CellularDistanceFunction`` for options. + final public var cellularDistanceFunction: FastNoiseLite.CellularDistanceFunction { + get { + return get_cellular_distance_function () + } + + set { + set_cellular_distance_function (newValue) + } + + } + + /// Maximum distance a point can move off of its grid position. Set to `0` for an even grid. + final public var cellularJitter: Double { + get { + return get_cellular_jitter () + } + + set { + set_cellular_jitter (newValue) + } + + } + + /// Return type from cellular noise calculations. See ``FastNoiseLite/CellularReturnType``. + final public var cellularReturnType: FastNoiseLite.CellularReturnType { + get { + return get_cellular_return_type () + } + + set { + set_cellular_return_type (newValue) + } + + } + + /// If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. + final public var domainWarpEnabled: Bool { + get { + return is_domain_warp_enabled () + } + + set { + set_domain_warp_enabled (newValue) + } + + } + + /// Sets the warp algorithm. See ``FastNoiseLite/DomainWarpType``. + final public var domainWarpType: FastNoiseLite.DomainWarpType { + get { + return get_domain_warp_type () + } + + set { + set_domain_warp_type (newValue) + } + + } + + /// Sets the maximum warp distance from the origin. + final public var domainWarpAmplitude: Double { + get { + return get_domain_warp_amplitude () + } + + set { + set_domain_warp_amplitude (newValue) + } + + } + + /// Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. + final public var domainWarpFrequency: Double { + get { + return get_domain_warp_frequency () + } + + set { + set_domain_warp_frequency (newValue) + } + + } + + /// The method for combining octaves into a fractal which is used to warp the space. See ``FastNoiseLite/DomainWarpFractalType``. + final public var domainWarpFractalType: FastNoiseLite.DomainWarpFractalType { + get { + return get_domain_warp_fractal_type () + } + + set { + set_domain_warp_fractal_type (newValue) + } + + } + + /// The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. + final public var domainWarpFractalOctaves: Int32 { + get { + return get_domain_warp_fractal_octaves () + } + + set { + set_domain_warp_fractal_octaves (newValue) + } + + } + + /// Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. + final public var domainWarpFractalLacunarity: Double { + get { + return get_domain_warp_fractal_lacunarity () + } + + set { + set_domain_warp_fractal_lacunarity (newValue) + } + + } + + /// Determines the strength of each subsequent layer of the noise which is used to warp the space. + /// + /// A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + /// + final public var domainWarpFractalGain: Double { + get { + return get_domain_warp_fractal_gain () + } + + set { + set_domain_warp_fractal_gain (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_noise_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_noise_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2624461392)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_noise_type(_ type: FastNoiseLite.NoiseType) { + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_noise_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_noise_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1458108610)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_noise_type() -> FastNoiseLite.NoiseType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_noise_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.NoiseType (rawValue: _result)! + } + + fileprivate static var method_set_seed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seed") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seed(_ seed: Int32) { + withUnsafePointer(to: seed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_seed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seed") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seed() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_seed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frequency") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frequency(_ freq: Double) { + withUnsafePointer(to: freq) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_frequency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frequency") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frequency() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_frequency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fractal_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4132731174)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_type(_ type: FastNoiseLite.FractalType) { + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1036889279)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_type() -> FastNoiseLite.FractalType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.FractalType (rawValue: _result)! + } + + fileprivate static var method_set_fractal_octaves: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_octaves") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_octaves(_ octaveCount: Int32) { + withUnsafePointer(to: octaveCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_octaves, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_octaves: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_octaves") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_octaves() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_octaves, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fractal_lacunarity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_lacunarity") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_lacunarity(_ lacunarity: Double) { + withUnsafePointer(to: lacunarity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_lacunarity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_lacunarity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_lacunarity") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_lacunarity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_lacunarity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fractal_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_gain") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_gain(_ gain: Double) { + withUnsafePointer(to: gain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_gain") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fractal_weighted_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_weighted_strength") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_weighted_strength(_ weightedStrength: Double) { + withUnsafePointer(to: weightedStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_weighted_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_weighted_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_weighted_strength") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_weighted_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_weighted_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fractal_ping_pong_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractal_ping_pong_strength") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractal_ping_pong_strength(_ pingPongStrength: Double) { + withUnsafePointer(to: pingPongStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_fractal_ping_pong_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fractal_ping_pong_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractal_ping_pong_strength") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractal_ping_pong_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_fractal_ping_pong_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cellular_distance_function: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cellular_distance_function") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1006013267)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cellular_distance_function(_ `func`: FastNoiseLite.CellularDistanceFunction) { + withUnsafePointer(to: `func`.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_cellular_distance_function, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cellular_distance_function: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cellular_distance_function") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2021274088)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cellular_distance_function() -> FastNoiseLite.CellularDistanceFunction { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_cellular_distance_function, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.CellularDistanceFunction (rawValue: _result)! + } + + fileprivate static var method_set_cellular_jitter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cellular_jitter") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cellular_jitter(_ jitter: Double) { + withUnsafePointer(to: jitter) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_cellular_jitter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cellular_jitter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cellular_jitter") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cellular_jitter() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_cellular_jitter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cellular_return_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cellular_return_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2654169698)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cellular_return_type(_ ret: FastNoiseLite.CellularReturnType) { + withUnsafePointer(to: ret.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_cellular_return_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cellular_return_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cellular_return_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3699796343)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cellular_return_type() -> FastNoiseLite.CellularReturnType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_cellular_return_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.CellularReturnType (rawValue: _result)! + } + + fileprivate static var method_set_domain_warp_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_enabled") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_enabled(_ domainWarpEnabled: Bool) { + withUnsafePointer(to: domainWarpEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_domain_warp_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_domain_warp_enabled") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_domain_warp_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FastNoiseLite.method_is_domain_warp_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_domain_warp_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3629692980)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_type(_ domainWarpType: FastNoiseLite.DomainWarpType) { + withUnsafePointer(to: domainWarpType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2980162020)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_type() -> FastNoiseLite.DomainWarpType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.DomainWarpType (rawValue: _result)! + } + + fileprivate static var method_set_domain_warp_amplitude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_amplitude") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_amplitude(_ domainWarpAmplitude: Double) { + withUnsafePointer(to: domainWarpAmplitude) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_amplitude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_amplitude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_amplitude") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_amplitude() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_amplitude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_domain_warp_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_frequency") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_frequency(_ domainWarpFrequency: Double) { + withUnsafePointer(to: domainWarpFrequency) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_frequency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_frequency") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_frequency() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_frequency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_domain_warp_fractal_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_fractal_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3999408287)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_fractal_type(_ domainWarpFractalType: FastNoiseLite.DomainWarpFractalType) { + withUnsafePointer(to: domainWarpFractalType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_fractal_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_fractal_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_fractal_type") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 407716934)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_fractal_type() -> FastNoiseLite.DomainWarpFractalType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_fractal_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FastNoiseLite.DomainWarpFractalType (rawValue: _result)! + } + + fileprivate static var method_set_domain_warp_fractal_octaves: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_fractal_octaves") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_fractal_octaves(_ domainWarpOctaveCount: Int32) { + withUnsafePointer(to: domainWarpOctaveCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_fractal_octaves, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_fractal_octaves: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_fractal_octaves") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_fractal_octaves() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_fractal_octaves, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_domain_warp_fractal_lacunarity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_fractal_lacunarity") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_fractal_lacunarity(_ domainWarpLacunarity: Double) { + withUnsafePointer(to: domainWarpLacunarity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_fractal_lacunarity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_fractal_lacunarity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_fractal_lacunarity") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_fractal_lacunarity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_fractal_lacunarity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_domain_warp_fractal_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("set_domain_warp_fractal_gain") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_domain_warp_fractal_gain(_ domainWarpGain: Double) { + withUnsafePointer(to: domainWarpGain) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FastNoiseLite.method_set_domain_warp_fractal_gain, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_domain_warp_fractal_gain: GDExtensionMethodBindPtr = { + let methodName = StringName("get_domain_warp_fractal_gain") + return withUnsafePointer(to: &FastNoiseLite.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_domain_warp_fractal_gain() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FastNoiseLite.method_get_domain_warp_fractal_gain, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FileAccess.swift b/Sources/SwiftGodot/Generated/Api/FileAccess.swift new file mode 100644 index 000000000..ad717a712 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FileAccess.swift @@ -0,0 +1,1672 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides methods for file reading and writing operations. +/// +/// This class can be used to permanently store data in the user device's file system and to read from it. This is useful for store game save data or player configuration files. +/// +/// Here's a sample on how to write and read from a file: +/// +/// In the example above, the file will be saved in the user data folder as specified in the Data paths documentation. +/// +/// ``FileAccess`` will close when it's freed, which happens when it goes out of scope or when it gets assigned with `null`. ``close()`` can be used to close it before then explicitly. In C# the reference must be disposed manually, which can be done with the `using` statement or by calling the `Dispose` method directly. +/// +/// > Note: To access project resources once exported, it is recommended to use ``ResourceLoader`` instead of ``FileAccess``, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. +/// +/// > Note: Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing **Alt + F4**). If you stop the project execution by pressing **F8** while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling ``flush()`` at regular intervals. +/// +open class FileAccess: RefCounted { + override open class var godotClassName: StringName { "FileAccess" } + public enum ModeFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Opens the file for read operations. The cursor is positioned at the beginning of the file. + case read = 1 // READ + /// Opens the file for write operations. The file is created if it does not exist, and truncated if it does. + /// + /// > Note: When creating a file it must be in an already existing directory. To recursively create directories for a file path, see ``DirAccess/makeDirRecursive(path:)``. + /// + case write = 2 // WRITE + /// Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. + case readWrite = 3 // READ_WRITE + /// Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. + /// + /// > Note: When creating a file it must be in an already existing directory. To recursively create directories for a file path, see ``DirAccess/makeDirRecursive(path:)``. + /// + case writeRead = 7 // WRITE_READ + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .read: return ".read" + case .write: return ".write" + case .readWrite: return ".readWrite" + case .writeRead: return ".writeRead" + } + + } + + } + + public enum CompressionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Uses the FastLZ compression method. + case fastlz = 0 // COMPRESSION_FASTLZ + /// Uses the DEFLATE compression method. + case deflate = 1 // COMPRESSION_DEFLATE + /// Uses the Zstandard compression method. + case zstd = 2 // COMPRESSION_ZSTD + /// Uses the gzip compression method. + case gzip = 3 // COMPRESSION_GZIP + /// Uses the brotli compression method (only decompression is supported). + case brotli = 4 // COMPRESSION_BROTLI + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .fastlz: return ".fastlz" + case .deflate: return ".deflate" + case .zstd: return ".zstd" + case .gzip: return ".gzip" + case .brotli: return ".brotli" + } + + } + + } + + public struct UnixPermissionFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Read for owner bit. + public static let readOwner = UnixPermissionFlags (rawValue: 256) + /// Write for owner bit. + public static let writeOwner = UnixPermissionFlags (rawValue: 128) + /// Execute for owner bit. + public static let executeOwner = UnixPermissionFlags (rawValue: 64) + /// Read for group bit. + public static let readGroup = UnixPermissionFlags (rawValue: 32) + /// Write for group bit. + public static let writeGroup = UnixPermissionFlags (rawValue: 16) + /// Execute for group bit. + public static let executeGroup = UnixPermissionFlags (rawValue: 8) + /// Read for other bit. + public static let readOther = UnixPermissionFlags (rawValue: 4) + /// Write for other bit. + public static let writeOther = UnixPermissionFlags (rawValue: 2) + /// Execute for other bit. + public static let executeOther = UnixPermissionFlags (rawValue: 1) + /// Set user id on execution bit. + public static let setUserId = UnixPermissionFlags (rawValue: 2048) + /// Set group id on execution bit. + public static let setGroupId = UnixPermissionFlags (rawValue: 1024) + /// Restricted deletion (sticky) bit. + public static let restrictedDelete = UnixPermissionFlags (rawValue: 512) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.readOwner) { result += "readOwner, " } + if self.contains (.writeOwner) { result += "writeOwner, " } + if self.contains (.executeOwner) { result += "executeOwner, " } + if self.contains (.readGroup) { result += "readGroup, " } + if self.contains (.writeGroup) { result += "writeGroup, " } + if self.contains (.executeGroup) { result += "executeGroup, " } + if self.contains (.readOther) { result += "readOther, " } + if self.contains (.writeOther) { result += "writeOther, " } + if self.contains (.executeOther) { result += "executeOther, " } + if self.contains (.setUserId) { result += "setUserId, " } + if self.contains (.setGroupId) { result += "setGroupId, " } + if self.contains (.restrictedDelete) { result += "restrictedDelete, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + + /* Properties */ + + /// If `true`, the file is read with big-endian endianness. If `false`, the file is read with little-endian endianness. If in doubt, leave this to `false` as most files are written with little-endian endianness. + /// + /// > Note: ``bigEndian`` is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written. + /// + /// > Note: This is always reset to `false` whenever you open the file. Therefore, you must set ``bigEndian`` _after_ opening the file, not before. + /// + final public var bigEndian: Bool { + get { + return is_big_endian () + } + + set { + set_big_endian (newValue) + } + + } + + /* Methods */ + fileprivate static var method_open: GDExtensionMethodBindPtr = { + let methodName = StringName("open") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1247358404)! + } + + } + + }() + + /// Creates a new ``FileAccess`` object and opens the file for writing or reading, depending on the flags. + /// + /// Returns `null` if opening the file failed. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func open(path: String, flags: FileAccess.ModeFlags) -> FileAccess? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: flags.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_open, nil, pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_open_encrypted: GDExtensionMethodBindPtr = { + let methodName = StringName("open_encrypted") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1482131466)! + } + + } + + }() + + /// Creates a new ``FileAccess`` object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. + /// + /// > Note: The provided key must be 32 bytes long. + /// + /// Returns `null` if opening the file failed. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func openEncrypted(path: String, modeFlags: FileAccess.ModeFlags, key: PackedByteArray) -> FileAccess? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: modeFlags.rawValue) { pArg1 in + withUnsafePointer(to: key.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_open_encrypted, nil, pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_open_encrypted_with_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("open_encrypted_with_pass") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 790283377)! + } + + } + + }() + + /// Creates a new ``FileAccess`` object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. + /// + /// Returns `null` if opening the file failed. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func openEncryptedWithPass(path: String, modeFlags: FileAccess.ModeFlags, pass: String) -> FileAccess? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: modeFlags.rawValue) { pArg1 in + let pass = GString(pass) + withUnsafePointer(to: pass.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_open_encrypted_with_pass, nil, pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_open_compressed: GDExtensionMethodBindPtr = { + let methodName = StringName("open_compressed") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3686439335)! + } + + } + + }() + + /// Creates a new ``FileAccess`` object and opens a compressed file for reading or writing. + /// + /// > Note: ``openCompressed(path:modeFlags:compressionMode:)`` can only read files that were saved by Godot, not third-party compression formats. See GitHub issue #28999 for a workaround. + /// + /// Returns `null` if opening the file failed. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func openCompressed(path: String, modeFlags: FileAccess.ModeFlags, compressionMode: FileAccess.CompressionMode = .fastlz) -> FileAccess? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: modeFlags.rawValue) { pArg1 in + withUnsafePointer(to: compressionMode.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_open_compressed, nil, pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_open_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_open_error") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Returns the result of the last ``open(path:flags:)`` call in the current thread. + public static func getOpenError() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_open_error, nil, nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_file_as_bytes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_as_bytes") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659035735)! + } + + } + + }() + + /// Returns the whole `path` file contents as a ``PackedByteArray`` without any decoding. + /// + /// Returns an empty ``PackedByteArray`` if an error occurred while opening the file. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func getFileAsBytes(path: String) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_file_as_bytes, nil, pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_file_as_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_as_string") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns the whole `path` file contents as a ``String``. Text is interpreted as being UTF-8 encoded. + /// + /// Returns an empty ``String`` if an error occurred while opening the file. You can use ``getOpenError()`` to check the error that occurred. + /// + public static func getFileAsString(path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_file_as_string, nil, pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_resize: GDExtensionMethodBindPtr = { + let methodName = StringName("resize") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844576869)! + } + + } + + }() + + /// Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost. + public final func resize(length: Int) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_resize, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_flush: GDExtensionMethodBindPtr = { + let methodName = StringName("flush") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call ``flush()`` manually before closing a file. Still, calling ``flush()`` can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. + /// + /// > Note: Only call ``flush()`` when you actually need it. Otherwise, it will decrease performance due to constant disk writes. + /// + public final func flush() { + gi.object_method_bind_ptrcall(FileAccess.method_flush, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the path as a ``String`` for the current open file. + public final func getPath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileAccess.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_path_absolute: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_absolute") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute path as a ``String`` for the current open file. + public final func getPathAbsolute() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileAccess.method_get_path_absolute, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_open: GDExtensionMethodBindPtr = { + let methodName = StringName("is_open") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the file is currently opened. + public final func isOpen() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileAccess.method_is_open, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_seek: GDExtensionMethodBindPtr = { + let methodName = StringName("seek") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). + public final func seek(position: UInt) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_seek, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_seek_end: GDExtensionMethodBindPtr = { + let methodName = StringName("seek_end") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). + /// + /// > Note: This is an offset, so you should use negative numbers or the cursor will be at the end of the file. + /// + public final func seekEnd(position: Int = 0) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_seek_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the file cursor's position. + public final func getPosition() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the size of the file in bytes. + public final func getLength() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_eof_reached: GDExtensionMethodBindPtr = { + let methodName = StringName("eof_reached") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the file cursor has already read past the end of the file. + /// + /// > Note: `eof_reached() == false` cannot be used to check whether there is more data available. To loop while there is more data available, use: + /// + public final func eofReached() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileAccess.method_eof_reached, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_8: GDExtensionMethodBindPtr = { + let methodName = StringName("get_8") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next 8 bits from the file as an integer. See ``store8(value:)`` for details on what values can be stored and retrieved this way. + public final func get8() -> UInt8 { + var _result: UInt8 = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_8, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_16: GDExtensionMethodBindPtr = { + let methodName = StringName("get_16") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next 16 bits from the file as an integer. See ``store16(value:)`` for details on what values can be stored and retrieved this way. + public final func get16() -> UInt16 { + var _result: UInt16 = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_16, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_32: GDExtensionMethodBindPtr = { + let methodName = StringName("get_32") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next 32 bits from the file as an integer. See ``store32(value:)`` for details on what values can be stored and retrieved this way. + public final func get32() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_32, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_64: GDExtensionMethodBindPtr = { + let methodName = StringName("get_64") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the next 64 bits from the file as an integer. See ``store64(value:)`` for details on what values can be stored and retrieved this way. + public final func get64() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(FileAccess.method_get_64, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_float: GDExtensionMethodBindPtr = { + let methodName = StringName("get_float") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the next 32 bits from the file as a floating-point number. + public final func getFloat() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FileAccess.method_get_float, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_double: GDExtensionMethodBindPtr = { + let methodName = StringName("get_double") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the next 64 bits from the file as a floating-point number. + public final func getDouble() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FileAccess.method_get_double, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_real: GDExtensionMethodBindPtr = { + let methodName = StringName("get_real") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the next bits from the file as a floating-point number. + public final func getReal() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FileAccess.method_get_real, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4131300905)! + } + + } + + }() + + /// Returns next `length` bytes of the file as a ``PackedByteArray``. + public final func getBuffer(length: Int) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_get_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_line: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the next line of the file as a ``String``. The returned string doesn't include newline (`\n`) or carriage return (`\r`) characters, but does include any other leading or trailing whitespace. + /// + /// Text is interpreted as being UTF-8 encoded. + /// + public final func getLine() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileAccess.method_get_line, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_csv_line: GDExtensionMethodBindPtr = { + let methodName = StringName("get_csv_line") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2358116058)! + } + + } + + }() + + /// Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter `delim` to use other than the default `","` (comma). This delimiter must be one-character long, and cannot be a double quotation mark. + /// + /// Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. + /// + /// For example, the following CSV lines are valid and will be properly parsed as two strings each: + /// + /// Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it _could_ very well use quotes, it was only written without for demonstration purposes. The third line must use `""` for each quotation mark that needs to be interpreted as such instead of the end of a text value. + /// + public final func getCsvLine(delim: String = ",") -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let delim = GString(delim) + withUnsafePointer(to: delim.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_get_csv_line, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_as_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_as_text") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1162154673)! + } + + } + + }() + + /// Returns the whole file as a ``String``. Text is interpreted as being UTF-8 encoded. + /// + /// If `skipCr` is `true`, carriage return characters (`\r`, CR) will be ignored when parsing the UTF-8, so that only line feed characters (`\n`, LF) represent a new line (Unix convention). + /// + public final func getAsText(skipCr: Bool = false) -> String { + let _result = GString () + withUnsafePointer(to: skipCr) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_get_as_text, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_md5: GDExtensionMethodBindPtr = { + let methodName = StringName("get_md5") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns an MD5 String representing the file at the given path or an empty ``String`` on failure. + public static func getMd5(path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_md5, nil, pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_sha256: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sha256") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns an SHA-256 ``String`` representing the file at the given path or an empty ``String`` on failure. + public static func getSha256(path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_sha256, nil, pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_big_endian: GDExtensionMethodBindPtr = { + let methodName = StringName("is_big_endian") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_big_endian() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileAccess.method_is_big_endian, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_big_endian: GDExtensionMethodBindPtr = { + let methodName = StringName("set_big_endian") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_big_endian(_ bigEndian: Bool) { + withUnsafePointer(to: bigEndian) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_set_big_endian, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_error") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3185525595)! + } + + } + + }() + + /// Returns the last error that happened when trying to perform operations. Compare with the `ERR_FILE_*` constants from ``GodotError``. + public final func getError() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FileAccess.method_get_error, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_var: GDExtensionMethodBindPtr = { + let methodName = StringName("get_var") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 189129690)! + } + + } + + }() + + /// Returns the next ``Variant`` value from the file. If `allowObjects` is `true`, decoding objects is allowed. + /// + /// Internally, this uses the same decoding mechanism as the ``@GlobalScope.bytes_to_var`` method. + /// + /// > Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + /// + public final func getVar(allowObjects: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: allowObjects) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_get_var, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_store_8: GDExtensionMethodBindPtr = { + let methodName = StringName("store_8") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stores an integer as 8 bits in the file. + /// + /// > Note: The `value` should lie in the interval `[0, 255]`. Any other value will overflow and wrap around. + /// + /// To store a signed integer, use ``store64(value:)``, or convert it manually (see ``store16(value:)`` for an example). + /// + public final func store8(value: UInt8) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_8, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_16: GDExtensionMethodBindPtr = { + let methodName = StringName("store_16") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stores an integer as 16 bits in the file. + /// + /// > Note: The `value` should lie in the interval `[0, 2^16 - 1]`. Any other value will overflow and wrap around. + /// + /// To store a signed integer, use ``store64(value:)`` or store a signed integer from the interval `[-2^15, 2^15 - 1]` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: + /// + public final func store16(value: UInt16) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_16, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_32: GDExtensionMethodBindPtr = { + let methodName = StringName("store_32") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stores an integer as 32 bits in the file. + /// + /// > Note: The `value` should lie in the interval `[0, 2^32 - 1]`. Any other value will overflow and wrap around. + /// + /// To store a signed integer, use ``store64(value:)``, or convert it manually (see ``store16(value:)`` for an example). + /// + public final func store32(value: UInt32) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_32, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_64: GDExtensionMethodBindPtr = { + let methodName = StringName("store_64") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stores an integer as 64 bits in the file. + /// + /// > Note: The `value` must lie in the interval `[-2^63, 2^63 - 1]` (i.e. be a valid integer value). + /// + public final func store64(value: UInt) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_64, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_float: GDExtensionMethodBindPtr = { + let methodName = StringName("store_float") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Stores a floating-point number as 32 bits in the file. + public final func storeFloat(value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_float, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_double: GDExtensionMethodBindPtr = { + let methodName = StringName("store_double") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Stores a floating-point number as 64 bits in the file. + public final func storeDouble(value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_double, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_real: GDExtensionMethodBindPtr = { + let methodName = StringName("store_real") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Stores a floating-point number in the file. + public final func storeReal(value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_real, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("store_buffer") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2971499966)! + } + + } + + }() + + /// Stores the given array of bytes in the file. + public final func storeBuffer(_ buffer: PackedByteArray) { + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_line: GDExtensionMethodBindPtr = { + let methodName = StringName("store_line") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Appends `line` to the file followed by a line return character (`\n`), encoding the text as UTF-8. + public final func storeLine(_ line: String) { + let line = GString(line) + withUnsafePointer(to: line.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_csv_line: GDExtensionMethodBindPtr = { + let methodName = StringName("store_csv_line") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2173791505)! + } + + } + + }() + + /// Store the given ``PackedStringArray`` in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter `delim` to use other than the default `","` (comma). This delimiter must be one-character long. + /// + /// Text will be encoded as UTF-8. + /// + public final func storeCsvLine(values: PackedStringArray, delim: String = ",") { + withUnsafePointer(to: values.content) { pArg0 in + let delim = GString(delim) + withUnsafePointer(to: delim.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_csv_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_store_string: GDExtensionMethodBindPtr = { + let methodName = StringName("store_string") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Appends `string` to the file without a line return, encoding the text as UTF-8. + /// + /// > Note: This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using ``storePascalString(_:)`` instead. For retrieving strings from a text file, you can use `get_buffer(length).get_string_from_utf8()` (if you know the length) or ``getAsText(skipCr:)``. + /// + public final func storeString(_ string: String) { + let string = GString(string) + withUnsafePointer(to: string.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_store_var: GDExtensionMethodBindPtr = { + let methodName = StringName("store_var") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 738511890)! + } + + } + + }() + + /// Stores any Variant value in the file. If `fullObjects` is `true`, encoding objects is allowed (and can potentially include code). + /// + /// Internally, this uses the same encoding mechanism as the ``@GlobalScope.var_to_bytes`` method. + /// + /// > Note: Not all properties are included. Only properties that are configured with the ``PropertyUsageFlags/propertyUsageStorage`` flag set will be serialized. You can add a new usage flag to a property by overriding the ``Object/_getPropertyList()`` method in your class. You can also check how property usage is configured by calling ``Object/_getPropertyList()``. See ``PropertyUsageFlags`` for the possible usage flags. + /// + public final func storeVar(value: Variant?, fullObjects: Bool = false) { + withUnsafePointer(to: value.content) { pArg0 in + withUnsafePointer(to: fullObjects) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_var, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_store_pascal_string: GDExtensionMethodBindPtr = { + let methodName = StringName("store_pascal_string") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Stores the given ``String`` as a line in the file in Pascal format (i.e. also store the length of the string). + /// + /// Text will be encoded as UTF-8. + /// + public final func storePascalString(_ string: String) { + let string = GString(string) + withUnsafePointer(to: string.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileAccess.method_store_pascal_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pascal_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pascal_string") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns a ``String`` saved in Pascal format from the file. + /// + /// Text is interpreted as being UTF-8 encoded. + /// + public final func getPascalString() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileAccess.method_get_pascal_string, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_close: GDExtensionMethodBindPtr = { + let methodName = StringName("close") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Closes the currently opened file and prevents subsequent read/write operations. Use ``flush()`` to persist the data to disk without closing the file. + /// + /// > Note: ``FileAccess`` will automatically close when it's freed, which happens when it goes out of scope or when it gets assigned with `null`. In C# the reference must be disposed after we are done using it, this can be done with the `using` statement or calling the `Dispose` method directly. + /// + public final func close() { + gi.object_method_bind_ptrcall(FileAccess.method_close, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_file_exists: GDExtensionMethodBindPtr = { + let methodName = StringName("file_exists") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns `true` if the file exists in the given path. + /// + /// > Note: Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See ``ResourceLoader/exists(path:typeHint:)`` for an alternative approach that takes resource remapping into account. + /// + /// For a non-static, relative equivalent, use ``DirAccess/fileExists(path:)``. + /// + public static func fileExists(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_file_exists, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_modified_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_modified_time") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1597066294)! + } + + } + + }() + + /// Returns the last time the `file` was modified in Unix timestamp format, or `0` on error. This Unix timestamp can be converted to another format using the ``Time`` singleton. + public static func getModifiedTime(file: String) -> UInt { + var _result: UInt = 0 + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_modified_time, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_unix_permissions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unix_permissions") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 524341837)! + } + + } + + }() + + /// Returns file UNIX permissions. + /// + /// > Note: This method is implemented on iOS, Linux/BSD, and macOS. + /// + public static func getUnixPermissions(file: String) -> FileAccess.UnixPermissionFlags { + var _result: FileAccess.UnixPermissionFlags = FileAccess.UnixPermissionFlags () + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_unix_permissions, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_unix_permissions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unix_permissions") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 846038644)! + } + + } + + }() + + /// Sets file UNIX permissions. + /// + /// > Note: This method is implemented on iOS, Linux/BSD, and macOS. + /// + public static func setUnixPermissions(file: String, permissions: FileAccess.UnixPermissionFlags) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: permissions.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_unix_permissions, nil, pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_hidden_attribute: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hidden_attribute") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns `true`, if file `hidden` attribute is set. + /// + /// > Note: This method is implemented on iOS, BSD, macOS, and Windows. + /// + public static func getHiddenAttribute(file: String) -> Bool { + var _result: Bool = false + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_hidden_attribute, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_hidden_attribute: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hidden_attribute") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2892558115)! + } + + } + + }() + + /// Sets file **hidden** attribute. + /// + /// > Note: This method is implemented on iOS, BSD, macOS, and Windows. + /// + public static func setHiddenAttribute(file: String, hidden: Bool) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: hidden) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_hidden_attribute, nil, pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_read_only_attribute: GDExtensionMethodBindPtr = { + let methodName = StringName("set_read_only_attribute") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2892558115)! + } + + } + + }() + + /// Sets file **read only** attribute. + /// + /// > Note: This method is implemented on iOS, BSD, macOS, and Windows. + /// + public static func setReadOnlyAttribute(file: String, ro: Bool) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: ro) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_read_only_attribute, nil, pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_read_only_attribute: GDExtensionMethodBindPtr = { + let methodName = StringName("get_read_only_attribute") + return withUnsafePointer(to: &FileAccess.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns `true`, if file `read only` attribute is set. + /// + /// > Note: This method is implemented on iOS, BSD, macOS, and Windows. + /// + public static func getReadOnlyAttribute(file: String) -> Bool { + var _result: Bool = false + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_read_only_attribute, nil, pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FileDialog.swift b/Sources/SwiftGodot/Generated/Api/FileDialog.swift new file mode 100644 index 000000000..c0ecd22d7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FileDialog.swift @@ -0,0 +1,1304 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A dialog for selecting files or directories in the filesystem. +/// +/// ``FileDialog`` is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. ``FileDialog`` automatically sets its window title according to the ``fileMode``. If you want to use a custom title, disable this by setting ``modeOverridesTitle`` to `false`. +/// +/// +/// This object emits the following signals: +/// +/// - ``fileSelected`` +/// - ``filesSelected`` +/// - ``dirSelected`` +open class FileDialog: ConfirmationDialog { + override open class var godotClassName: StringName { "FileDialog" } + public enum FileMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The dialog allows selecting one, and only one file. + case openFile = 0 // FILE_MODE_OPEN_FILE + /// The dialog allows selecting multiple files. + case openFiles = 1 // FILE_MODE_OPEN_FILES + /// The dialog only allows selecting a directory, disallowing the selection of any file. + case openDir = 2 // FILE_MODE_OPEN_DIR + /// The dialog allows selecting one file or directory. + case openAny = 3 // FILE_MODE_OPEN_ANY + /// The dialog will warn when a file exists. + case saveFile = 4 // FILE_MODE_SAVE_FILE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .openFile: return ".openFile" + case .openFiles: return ".openFiles" + case .openDir: return ".openDir" + case .openAny: return ".openAny" + case .saveFile: return ".saveFile" + } + + } + + } + + public enum Access: Int64, CaseIterable, CustomDebugStringConvertible { + /// The dialog only allows accessing files under the ``Resource`` path (`res://`). + case resources = 0 // ACCESS_RESOURCES + /// The dialog only allows accessing files under user data path (`user://`). + case userdata = 1 // ACCESS_USERDATA + /// The dialog allows accessing files on the whole file system. + case filesystem = 2 // ACCESS_FILESYSTEM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .resources: return ".resources" + case .userdata: return ".userdata" + case .filesystem: return ".filesystem" + } + + } + + } + + + /* Properties */ + + /// If `true`, changing the ``fileMode`` property will set the window title accordingly (e.g. setting ``fileMode`` to ``FileMode/openFile`` will change the window title to "Open a File"). + final public var modeOverridesTitle: Bool { + get { + return is_mode_overriding_title () + } + + set { + set_mode_overrides_title (newValue) + } + + } + + /// The dialog's open or save mode, which affects the selection behavior. See ``FileDialog/FileMode``. + final public var fileMode: FileDialog.FileMode { + get { + return get_file_mode () + } + + set { + set_file_mode (newValue) + } + + } + + /// The file system access scope. See ``FileDialog/Access`` constants. + /// + /// > Warning: Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See godot-proposals#1123. + /// + final public var access: FileDialog.Access { + get { + return get_access () + } + + set { + set_access (newValue) + } + + } + + /// If non-empty, the given sub-folder will be "root" of this ``FileDialog``, i.e. user won't be able to go to its parent directory. + final public var rootSubfolder: String { + get { + return get_root_subfolder () + } + + set { + set_root_subfolder (newValue) + } + + } + + /// The available file type filters. Each filter string in the array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. + final public var filters: PackedStringArray { + get { + return get_filters () + } + + set { + set_filters (newValue) + } + + } + + /// The number of additional ``OptionButton``s and ``CheckBox``es in the dialog. + final public var optionCount: Int32 { + get { + return get_option_count () + } + + set { + set_option_count (newValue) + } + + } + + /// If `true`, the dialog will show hidden files. + final public var showHiddenFiles: Bool { + get { + return is_showing_hidden_files () + } + + set { + set_show_hidden_files (newValue) + } + + } + + /// If `true`, ``access`` is set to ``Access/filesystem``, and it is supported by the current ``DisplayServer``, OS native dialog will be used instead of custom one. + /// + /// > Note: On macOS, sandboxed apps always use native dialogs to access host filesystem. + /// + final public var useNativeDialog: Bool { + get { + return get_use_native_dialog () + } + + set { + set_use_native_dialog (newValue) + } + + } + + /// The current working directory of the file dialog. + final public var currentDir: String { + get { + return get_current_dir () + } + + set { + set_current_dir (newValue) + } + + } + + /// The currently selected file of the file dialog. + final public var currentFile: String { + get { + return get_current_file () + } + + set { + set_current_file (newValue) + } + + } + + /// The currently selected file path of the file dialog. + final public var currentPath: String { + get { + return get_current_path () + } + + set { + set_current_path (newValue) + } + + } + + /* Methods */ + fileprivate static var method_clear_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_filters") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all the added filters in the dialog. + public final func clearFilters() { + gi.object_method_bind_ptrcall(FileDialog.method_clear_filters, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("add_filter") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3388804757)! + } + + } + + }() + + /// Adds a comma-delimited file name `filter` option to the ``FileDialog`` with an optional `description`, which restricts what files can be picked. + /// + /// A `filter` should be of the form `"filename.extension"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed. + /// + /// For example, a `filter` of `"*.png, *.jpg"` and a `description` of `"Images"` results in filter text "Images (*.png, *.jpg)". + /// + public final func addFilter(_ filter: String, description: String = "") { + let filter = GString(filter) + withUnsafePointer(to: filter.content) { pArg0 in + let description = GString(description) + withUnsafePointer(to: description.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_add_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filters") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filters(_ filters: PackedStringArray) { + withUnsafePointer(to: filters.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_filters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filters") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filters() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(FileDialog.method_get_filters, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_option_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_name") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func getOptionName(option: Int32) -> String { + let _result = GString () + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_get_option_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_option_values: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_values") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 647634434)! + } + + } + + }() + + /// Returns an array of values of the ``OptionButton`` with index `option`. + public final func getOptionValues(option: Int32) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_get_option_values, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_option_default: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_default") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the default value index of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func getOptionDefault(option: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_get_option_default, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_option_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_name") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the name of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func setOptionName(option: Int32, name: String) { + withUnsafePointer(to: option) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_option_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_values: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_values") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3353661094)! + } + + } + + }() + + /// Sets the option values of the ``OptionButton`` with index `option`. + public final func setOptionValues(option: Int32, values: PackedStringArray) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: values.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_option_values, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_default: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_default") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the default value index of the ``OptionButton`` or ``CheckBox`` with index `option`. + public final func setOptionDefault(option: Int32, defaultValueIndex: Int32) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: defaultValueIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_option_default, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_option_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_option_count") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_option_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_option_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_option_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_option_count") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_option_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FileDialog.method_get_option_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_option: GDExtensionMethodBindPtr = { + let methodName = StringName("add_option") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 149592325)! + } + + } + + }() + + /// Adds an additional ``OptionButton`` to the file dialog. If `values` is empty, a ``CheckBox`` is added instead. + /// + /// `defaultValueIndex` should be an index of the value in the `values`. If `values` is empty it should be either `1` (checked), or `0` (unchecked). + /// + public final func addOption(name: String, values: PackedStringArray, defaultValueIndex: Int32) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: values.content) { pArg1 in + withUnsafePointer(to: defaultValueIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_add_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_selected_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_options") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a ``GDictionary`` with the selected values of the additional ``OptionButton``s and/or ``CheckBox``es. ``GDictionary`` keys are names and values are selected value indices. + public final func getSelectedOptions() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(FileDialog.method_get_selected_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_dir") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_dir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileDialog.method_get_current_dir, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_current_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_file") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_file() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileDialog.method_get_current_file, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_current_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_path") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileDialog.method_get_current_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_current_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_dir") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_dir(_ dir: String) { + let dir = GString(dir) + withUnsafePointer(to: dir.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_current_dir, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_current_file: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_file") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_file(_ file: String) { + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_current_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_current_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_path") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_path(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_current_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_mode_overrides_title: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mode_overrides_title") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mode_overrides_title(_ override: Bool) { + withUnsafePointer(to: override) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_mode_overrides_title, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_mode_overriding_title: GDExtensionMethodBindPtr = { + let methodName = StringName("is_mode_overriding_title") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_mode_overriding_title() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileDialog.method_is_mode_overriding_title, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_file_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_file_mode") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3654936397)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_file_mode(_ mode: FileDialog.FileMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_file_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_file_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_file_mode") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4074825319)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_file_mode() -> FileDialog.FileMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FileDialog.method_get_file_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FileDialog.FileMode (rawValue: _result)! + } + + fileprivate static var method_get_vbox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vbox") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 915758477)! + } + + } + + }() + + /// Returns the vertical box container of the dialog, custom controls can be added to it. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getVbox() -> VBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(FileDialog.method_get_vbox, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_line_edit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_edit") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4071694264)! + } + + } + + }() + + /// Returns the LineEdit for the selected file. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getLineEdit() -> LineEdit? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(FileDialog.method_get_line_edit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_access: GDExtensionMethodBindPtr = { + let methodName = StringName("set_access") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4104413466)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_access(_ access: FileDialog.Access) { + withUnsafePointer(to: access.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_access, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_access: GDExtensionMethodBindPtr = { + let methodName = StringName("get_access") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3344081076)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_access() -> FileDialog.Access { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FileDialog.method_get_access, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FileDialog.Access (rawValue: _result)! + } + + fileprivate static var method_set_root_subfolder: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_subfolder") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_subfolder(_ dir: String) { + let dir = GString(dir) + withUnsafePointer(to: dir.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_root_subfolder, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_subfolder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_subfolder") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_subfolder() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(FileDialog.method_get_root_subfolder, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_show_hidden_files: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_hidden_files") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_hidden_files(_ show: Bool) { + withUnsafePointer(to: show) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_show_hidden_files, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_hidden_files: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_hidden_files") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_hidden_files() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileDialog.method_is_showing_hidden_files, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_native_dialog: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_native_dialog") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_native_dialog(_ native: Bool) { + withUnsafePointer(to: native) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileDialog.method_set_use_native_dialog, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_native_dialog: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_native_dialog") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_native_dialog() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FileDialog.method_get_use_native_dialog, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_deselect_all: GDExtensionMethodBindPtr = { + let methodName = StringName("deselect_all") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all currently selected items in the dialog. + public final func deselectAll() { + gi.object_method_bind_ptrcall(FileDialog.method_deselect_all, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_invalidate: GDExtensionMethodBindPtr = { + let methodName = StringName("invalidate") + return withUnsafePointer(to: &FileDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Invalidate and update the current dialog content list. + public final func invalidate() { + gi.object_method_bind_ptrcall(FileDialog.method_invalidate, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ path: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user selects a file by double-clicking it or pressing the **OK** button. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.fileSelected.connect { path in + /// print ("caught signal") + /// } + /// ``` + public var fileSelected: Signal1 { Signal1 (target: self, signalName: "file_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ paths: PackedStringArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user selects multiple files. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.filesSelected.connect { paths in + /// print ("caught signal") + /// } + /// ``` + public var filesSelected: Signal2 { Signal2 (target: self, signalName: "files_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ dir: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user selects a directory. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.dirSelected.connect { dir in + /// print ("caught signal") + /// } + /// ``` + public var dirSelected: Signal3 { Signal3 (target: self, signalName: "dir_selected") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FileSystemDock.swift b/Sources/SwiftGodot/Generated/Api/FileSystemDock.swift new file mode 100644 index 000000000..9834462a8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FileSystemDock.swift @@ -0,0 +1,727 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's dock for managing files in the project. +/// +/// This class is available only in ``EditorPlugin``s and can't be instantiated. You can access it using ``EditorInterface/getFileSystemDock()``. +/// +/// While ``FileSystemDock`` doesn't expose any methods for file manipulation, it can listen for various file-related signals. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``inherit`` +/// - ``instantiate`` +/// - ``resourceRemoved`` +/// - ``fileRemoved`` +/// - ``folderRemoved`` +/// - ``filesMoved`` +/// - ``folderMoved`` +/// - ``folderColorChanged`` +/// - ``displayModeChanged`` +open class FileSystemDock: VBoxContainer { + override open class var godotClassName: StringName { "FileSystemDock" } + /* Methods */ + fileprivate static var method_navigate_to_path: GDExtensionMethodBindPtr = { + let methodName = StringName("navigate_to_path") + return withUnsafePointer(to: &FileSystemDock.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the given `path` as currently selected, ensuring that the selected file/directory is visible. + public final func navigateToPath(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileSystemDock.method_navigate_to_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_resource_tooltip_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("add_resource_tooltip_plugin") + return withUnsafePointer(to: &FileSystemDock.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2258356838)! + } + + } + + }() + + /// Registers a new ``EditorResourceTooltipPlugin``. + public final func addResourceTooltipPlugin(_ plugin: EditorResourceTooltipPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileSystemDock.method_add_resource_tooltip_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_resource_tooltip_plugin: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_resource_tooltip_plugin") + return withUnsafePointer(to: &FileSystemDock.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2258356838)! + } + + } + + }() + + /// Removes an ``EditorResourceTooltipPlugin``. Fails if the plugin wasn't previously added. + public final func removeResourceTooltipPlugin(_ plugin: EditorResourceTooltipPlugin?) { + withUnsafePointer(to: plugin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FileSystemDock.method_remove_resource_tooltip_plugin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ file: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a new scene is created that inherits the scene at `file` path. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.inherit.connect { file in + /// print ("caught signal") + /// } + /// ``` + public var inherit: Signal1 { Signal1 (target: self, signalName: "inherit") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ files: PackedStringArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = PackedStringArray (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given scenes are being instantiated in the editor. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.instantiate.connect { files in + /// print ("caught signal") + /// } + /// ``` + public var instantiate: Signal2 { Signal2 (target: self, signalName: "instantiate") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ resource: Resource) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Resource ?? Resource (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an external `resource` had its file removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resourceRemoved.connect { resource in + /// print ("caught signal") + /// } + /// ``` + public var resourceRemoved: Signal3 { Signal3 (target: self, signalName: "resource_removed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ file: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given `file` was removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.fileRemoved.connect { file in + /// print ("caught signal") + /// } + /// ``` + public var fileRemoved: Signal4 { Signal4 (target: self, signalName: "file_removed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ folder: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given `folder` was removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.folderRemoved.connect { folder in + /// print ("caught signal") + /// } + /// ``` + public var folderRemoved: Signal5 { Signal5 (target: self, signalName: "folder_removed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ oldFile: String, _ newFile: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = GString (args [1]!)!.description + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a file is moved from `oldFile` path to `newFile` path. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.filesMoved.connect { oldFile, newFile in + /// print ("caught signal") + /// } + /// ``` + public var filesMoved: Signal6 { Signal6 (target: self, signalName: "files_moved") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ oldFolder: String, _ newFolder: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = GString (args [1]!)!.description + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a folder is moved from `oldFolder` path to `newFolder` path. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.folderMoved.connect { oldFolder, newFolder in + /// print ("caught signal") + /// } + /// ``` + public var folderMoved: Signal7 { Signal7 (target: self, signalName: "folder_moved") } + + /// Emitted when folders change color. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.folderColorChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var folderColorChanged: SimpleSignal { SimpleSignal (target: self, signalName: "folder_color_changed") } + + /// Emitted when the user switches file display mode or split mode. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.displayModeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var displayModeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "display_mode_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FlowContainer.swift b/Sources/SwiftGodot/Generated/Api/FlowContainer.swift new file mode 100644 index 000000000..3f8adcd45 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FlowContainer.swift @@ -0,0 +1,320 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that arranges its child controls horizontally or vertically and wraps them around at the borders. +/// +/// A container that arranges its child controls horizontally or vertically and wraps them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line. +open class FlowContainer: Container { + override open class var godotClassName: StringName { "FlowContainer" } + public enum AlignmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). + case begin = 0 // ALIGNMENT_BEGIN + /// The child controls will be centered in the container. + case center = 1 // ALIGNMENT_CENTER + /// The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). + case end = 2 // ALIGNMENT_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .begin: return ".begin" + case .center: return ".center" + case .end: return ".end" + } + + } + + } + + public enum LastWrapAlignmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The last partially filled row or column will wrap aligned to the previous row or column in accordance with ``alignment``. + case inherit = 0 // LAST_WRAP_ALIGNMENT_INHERIT + /// The last partially filled row or column will wrap aligned to the beginning of the previous row or column. + case begin = 1 // LAST_WRAP_ALIGNMENT_BEGIN + /// The last partially filled row or column will wrap aligned to the center of the previous row or column. + case center = 2 // LAST_WRAP_ALIGNMENT_CENTER + /// The last partially filled row or column will wrap aligned to the end of the previous row or column. + case end = 3 // LAST_WRAP_ALIGNMENT_END + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherit: return ".inherit" + case .begin: return ".begin" + case .center: return ".center" + case .end: return ".end" + } + + } + + } + + + /* Properties */ + + /// The alignment of the container's children (must be one of ``AlignmentMode/begin``, ``AlignmentMode/center``, or ``AlignmentMode/end``). + final public var alignment: FlowContainer.AlignmentMode { + get { + return get_alignment () + } + + set { + set_alignment (newValue) + } + + } + + /// The wrap behavior of the last, partially filled row or column (must be one of ``LastWrapAlignmentMode/inherit``, ``LastWrapAlignmentMode/begin``, ``LastWrapAlignmentMode/center``, or ``LastWrapAlignmentMode/end``). + final public var lastWrapAlignment: FlowContainer.LastWrapAlignmentMode { + get { + return get_last_wrap_alignment () + } + + set { + set_last_wrap_alignment (newValue) + } + + } + + /// If `true`, the ``FlowContainer`` will arrange its children vertically, rather than horizontally. + /// + /// Can't be changed when using ``HFlowContainer`` and ``VFlowContainer``. + /// + final public var vertical: Bool { + get { + return is_vertical () + } + + set { + set_vertical (newValue) + } + + } + + /// If `true`, reverses fill direction. Horizontal ``FlowContainer``s will fill rows bottom to top, vertical ``FlowContainer``s will fill columns right to left. + /// + /// When using a vertical ``FlowContainer`` with a right to left ``Control/layoutDirection``, columns will fill left to right instead. + /// + final public var reverseFill: Bool { + get { + return is_reverse_fill () + } + + set { + set_reverse_fill (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_line_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_count") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the current line count. + public final func getLineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FlowContainer.method_get_line_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alignment") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 575250951)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alignment(_ alignment: FlowContainer.AlignmentMode) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FlowContainer.method_set_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alignment") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3749743559)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alignment() -> FlowContainer.AlignmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FlowContainer.method_get_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FlowContainer.AlignmentMode (rawValue: _result)! + } + + fileprivate static var method_set_last_wrap_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_last_wrap_alignment") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899697495)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_last_wrap_alignment(_ lastWrapAlignment: FlowContainer.LastWrapAlignmentMode) { + withUnsafePointer(to: lastWrapAlignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FlowContainer.method_set_last_wrap_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_last_wrap_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_wrap_alignment") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3743456014)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_last_wrap_alignment() -> FlowContainer.LastWrapAlignmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FlowContainer.method_get_last_wrap_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return FlowContainer.LastWrapAlignmentMode (rawValue: _result)! + } + + fileprivate static var method_set_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertical") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertical(_ vertical: Bool) { + withUnsafePointer(to: vertical) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FlowContainer.method_set_vertical, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_vertical: GDExtensionMethodBindPtr = { + let methodName = StringName("is_vertical") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_vertical() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FlowContainer.method_is_vertical, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reverse_fill: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reverse_fill") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reverse_fill(_ reverseFill: Bool) { + withUnsafePointer(to: reverseFill) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FlowContainer.method_set_reverse_fill, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_reverse_fill: GDExtensionMethodBindPtr = { + let methodName = StringName("is_reverse_fill") + return withUnsafePointer(to: &FlowContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_reverse_fill() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FlowContainer.method_is_reverse_fill, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FogMaterial.swift b/Sources/SwiftGodot/Generated/Api/FogMaterial.swift new file mode 100644 index 000000000..b874a3326 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FogMaterial.swift @@ -0,0 +1,373 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A material that controls how volumetric fog is rendered, to be assigned to a ``FogVolume``. +/// +/// A ``Material`` resource that can be used by ``FogVolume``s to draw volumetric effects. +/// +/// If you need more advanced effects, use a custom fog shader. +/// +open class FogMaterial: Material { + override open class var godotClassName: StringName { "FogMaterial" } + + /* Properties */ + + /// The density of the ``FogVolume``. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other ``FogVolume``s or global volumetric fog. + /// + /// > Note: Due to limited precision, ``density`` values between `-0.001` and `0.001` (exclusive) act like `0.0`. This does not apply to ``Environment/volumetricFogDensity``. + /// + final public var density: Double { + get { + return get_density () + } + + set { + set_density (newValue) + } + + } + + /// The single-scattering ``Color`` of the ``FogVolume``. Internally, ``albedo`` is converted into single-scattering, which is additively blended with other ``FogVolume``s and the ``Environment/volumetricFogAlbedo``. + final public var albedo: Color { + get { + return get_albedo () + } + + set { + set_albedo (newValue) + } + + } + + /// The ``Color`` of the light emitted by the ``FogVolume``. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the ``Color`` of the ``FogVolume`` independently from light sources. + final public var emission: Color { + get { + return get_emission () + } + + set { + set_emission (newValue) + } + + } + + /// The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of `0.0` results in uniform-density fog. The height threshold is determined by the height of the associated ``FogVolume``. + final public var heightFalloff: Double { + get { + return get_height_falloff () + } + + set { + set_height_falloff (newValue) + } + + } + + /// The hardness of the edges of the ``FogVolume``. A higher value will result in softer edges, while a lower value will result in harder edges. + final public var edgeFade: Double { + get { + return get_edge_fade () + } + + set { + set_edge_fade (newValue) + } + + } + + /// The 3D texture that is used to scale the ``density`` of the ``FogVolume``. This can be used to vary fog density within the ``FogVolume`` with any kind of static pattern. For animated effects, consider using a custom fog shader. + final public var densityTexture: Texture3D? { + get { + return get_density_texture () + } + + set { + set_density_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_density: GDExtensionMethodBindPtr = { + let methodName = StringName("set_density") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_density(_ density: Double) { + withUnsafePointer(to: density) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_density, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_density: GDExtensionMethodBindPtr = { + let methodName = StringName("get_density") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_density() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FogMaterial.method_get_density, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_albedo") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_albedo(_ albedo: Color) { + withUnsafePointer(to: albedo) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_albedo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_albedo: GDExtensionMethodBindPtr = { + let methodName = StringName("get_albedo") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_albedo() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(FogMaterial.method_get_albedo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission(_ emission: Color) { + withUnsafePointer(to: emission) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_emission, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(FogMaterial.method_get_emission, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height_falloff: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height_falloff") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height_falloff(_ heightFalloff: Double) { + withUnsafePointer(to: heightFalloff) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_height_falloff, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height_falloff: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height_falloff") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height_falloff() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FogMaterial.method_get_height_falloff, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_edge_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edge_fade") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edge_fade(_ edgeFade: Double) { + withUnsafePointer(to: edgeFade) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_edge_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_edge_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_fade") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_edge_fade() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FogMaterial.method_get_edge_fade, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_density_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_density_texture") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1188404210)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_density_texture(_ densityTexture: Texture3D?) { + withUnsafePointer(to: densityTexture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogMaterial.method_set_density_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_density_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_density_texture") + return withUnsafePointer(to: &FogMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373985333)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_density_texture() -> Texture3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(FogMaterial.method_get_density_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FogVolume.swift b/Sources/SwiftGodot/Generated/Api/FogVolume.swift new file mode 100644 index 000000000..0f13fbc4a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FogVolume.swift @@ -0,0 +1,209 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A region that contributes to the default volumetric fog from the world environment. +/// +/// ``FogVolume``s are used to add localized fog into the global volumetric fog effect. ``FogVolume``s can also remove volumetric fog from specific areas if using a ``FogMaterial`` with a negative ``FogMaterial/density``. +/// +/// Performance of ``FogVolume``s is directly related to their relative size on the screen and the complexity of their attached ``FogMaterial``. It is best to keep ``FogVolume``s relatively small and simple where possible. +/// +/// > Note: ``FogVolume``s only have a visible effect if ``Environment/volumetricFogEnabled`` is `true`. If you don't want fog to be globally visible (but only within ``FogVolume`` nodes), set ``Environment/volumetricFogDensity`` to `0.0`. +/// +open class FogVolume: VisualInstance3D { + override open class var godotClassName: StringName { "FogVolume" } + + /* Properties */ + + /// The size of the ``FogVolume`` when ``shape`` is ``RenderingServer/FogVolumeShape/ellipsoid``, ``RenderingServer/FogVolumeShape/cone``, ``RenderingServer/FogVolumeShape/cylinder`` or ``RenderingServer/FogVolumeShape/box``. + /// + /// > Note: Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing ``ProjectSettings/rendering/environment/volumetricFog/volumeDepth`` (at a performance cost) or by decreasing ``Environment/volumetricFogLength`` (at no performance cost, but at the cost of lower fog range). Alternatively, the ``FogVolume`` can be made thicker and use a lower density in the ``material``. + /// + /// > Note: If ``shape`` is ``RenderingServer/FogVolumeShape/cone`` or ``RenderingServer/FogVolumeShape/cylinder``, the cone/cylinder will be adjusted to fit within the size. Non-uniform scaling of cone/cylinder shapes via the ``size`` property is not supported, but you can scale the ``FogVolume`` node instead. + /// + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The shape of the ``FogVolume``. This can be set to either ``RenderingServer/FogVolumeShape/ellipsoid``, ``RenderingServer/FogVolumeShape/cone``, ``RenderingServer/FogVolumeShape/cylinder``, ``RenderingServer/FogVolumeShape/box`` or ``RenderingServer/FogVolumeShape/world``. + final public var shape: RenderingServer.FogVolumeShape { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// The ``Material`` used by the ``FogVolume``. Can be either a built-in ``FogMaterial`` or a custom ``ShaderMaterial``. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogVolume.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(FogVolume.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1416323362)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: RenderingServer.FogVolumeShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogVolume.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3920334604)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> RenderingServer.FogVolumeShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FogVolume.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingServer.FogVolumeShape (rawValue: _result)! + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FogVolume.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &FogVolume.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(FogVolume.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Font.swift b/Sources/SwiftGodot/Generated/Api/Font.swift new file mode 100644 index 000000000..6c572f73b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Font.swift @@ -0,0 +1,1130 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for fonts and font variations. +/// +/// Abstract base class for different font types. It has methods for drawing text and font character introspection. +open class Font: Resource { + override open class var godotClassName: StringName { "Font" } + + /* Properties */ + + /// Array of fallback ``Font``s to use as a substitute if a glyph is not found in this current ``Font``. + /// + /// If this array is empty in a ``FontVariation``, the ``FontVariation/baseFont``'s fallbacks are used instead. + /// + final public var fallbacks: ObjectCollection { + get { + return get_fallbacks () + } + + set { + set_fallbacks (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_fallbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fallbacks") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fallbacks(_ fallbacks: ObjectCollection) { + withUnsafePointer(to: fallbacks.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_set_fallbacks, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fallbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fallbacks") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fallbacks() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Font.method_get_fallbacks, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_find_variation: GDExtensionMethodBindPtr = { + let methodName = StringName("find_variation") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2553855095)! + } + + } + + }() + + /// Returns ``TextServer`` RID of the font cache for specific variation. + public final func findVariation(variationCoordinates: GDictionary, faceIndex: Int32 = 0, strength: Double = 0.0, transform: Transform2D = Transform2D (xAxis: Vector2 (x: 1, y: 0), yAxis: Vector2 (x: 0, y: 1), origin: Vector2 (x: 0, y: 0)), spacingTop: Int32 = 0, spacingBottom: Int32 = 0, spacingSpace: Int32 = 0, spacingGlyph: Int32 = 0, baselineOffset: Double = 0.0) -> RID { + let _result: RID = RID () + withUnsafePointer(to: variationCoordinates.content) { pArg0 in + withUnsafePointer(to: faceIndex) { pArg1 in + withUnsafePointer(to: strength) { pArg2 in + withUnsafePointer(to: transform) { pArg3 in + withUnsafePointer(to: spacingTop) { pArg4 in + withUnsafePointer(to: spacingBottom) { pArg5 in + withUnsafePointer(to: spacingSpace) { pArg6 in + withUnsafePointer(to: spacingGlyph) { pArg7 in + withUnsafePointer(to: baselineOffset) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(Font.method_find_variation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_rids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rids") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns ``GArray`` of valid ``Font`` ``RID``s, which can be passed to the ``TextServer`` methods. + public final func getRids() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Font.method_get_rids, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 378113874)! + } + + } + + }() + + /// Returns the total average font height (ascent plus descent) in pixels. + /// + /// > Note: Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line). + /// + public final func getHeight(fontSize: Int32 = 16) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_height, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_ascent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ascent") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 378113874)! + } + + } + + }() + + /// Returns the average font ascent (number of pixels above the baseline). + /// + /// > Note: Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line). + /// + public final func getAscent(fontSize: Int32 = 16) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_ascent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_descent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_descent") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 378113874)! + } + + } + + }() + + /// Returns the average font descent (number of pixels below the baseline). + /// + /// > Note: Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). + /// + public final func getDescent(fontSize: Int32 = 16) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_descent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_underline_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_underline_position") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 378113874)! + } + + } + + }() + + /// Returns average pixel offset of the underline below the baseline. + /// + /// > Note: Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. + /// + public final func getUnderlinePosition(fontSize: Int32 = 16) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_underline_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_underline_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_underline_thickness") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 378113874)! + } + + } + + }() + + /// Returns average thickness of the underline. + /// + /// > Note: Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. + /// + public final func getUnderlineThickness(fontSize: Int32 = 16) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_underline_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_font_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_name") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns font family name. + public final func getFontName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Font.method_get_font_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_font_style_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_style_name") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns font style name. + public final func getFontStyleName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Font.method_get_font_style_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_ot_name_strings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ot_name_strings") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns ``GDictionary`` with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). + public final func getOtNameStrings() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(Font.method_get_ot_name_strings, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_font_style: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_style") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2520224254)! + } + + } + + }() + + /// Returns font style flags, see ``TextServer.FontStyle``. + public final func getFontStyle() -> TextServer.FontStyle { + var _result: TextServer.FontStyle = TextServer.FontStyle () + gi.object_method_bind_ptrcall(Font.method_get_font_style, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_font_weight: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_weight") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns weight (boldness) of the font. A value in the `100...999` range, normal font weight is `400`, bold font weight is `700`. + public final func getFontWeight() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Font.method_get_font_weight, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_font_stretch: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_stretch") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns font stretch amount, compared to a normal width. A percentage value between `50%` and `200%`. + public final func getFontStretch() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Font.method_get_font_stretch, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spacing") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1310880908)! + } + + } + + }() + + /// Returns the spacing for the given `type` (see ``TextServer.SpacingType``). + public final func getSpacing(_ spacing: TextServer.SpacingType) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: spacing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_opentype_features: GDExtensionMethodBindPtr = { + let methodName = StringName("get_opentype_features") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a set of OpenType feature tags. More info: OpenType feature tags. + public final func getOpentypeFeatures() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(Font.method_get_opentype_features, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_cache_capacity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_capacity") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets LRU cache capacity for `draw_*` methods. + public final func setCacheCapacity(singleLine: Int32, multiLine: Int32) { + withUnsafePointer(to: singleLine) { pArg0 in + withUnsafePointer(to: multiLine) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Font.method_set_cache_capacity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_string_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_string_size") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1868866121)! + } + + } + + }() + + /// Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also ``getMultilineStringSize(text:alignment:width:fontSize:maxLines:brkFlags:justificationFlags:direction:orientation:)`` and ``drawString(canvasItem:pos:text:alignment:width:fontSize:modulate:justificationFlags:direction:orientation:)``. + /// + /// For example, to get the string size as displayed by a single-line Label, use: + /// + /// > Note: Since kerning, advance and subpixel positioning are taken into account by ``getStringSize(text:alignment:width:fontSize:justificationFlags:direction:orientation:)``, using separate ``getStringSize(text:alignment:width:fontSize:justificationFlags:direction:orientation:)`` calls on substrings of a string then adding the results together will return a different result compared to using a single ``getStringSize(text:alignment:width:fontSize:justificationFlags:direction:orientation:)`` call on the full string. + /// + /// > Note: Real height of the string is context-dependent and can be significantly different from the value returned by ``getHeight(fontSize:)``. + /// + public final func getStringSize(text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) -> Vector2 { + var _result: Vector2 = Vector2 () + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: alignment.rawValue) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg4 in + withUnsafePointer(to: direction.rawValue) { pArg5 in + withUnsafePointer(to: orientation.rawValue) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_string_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_multiline_string_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multiline_string_size") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 519636710)! + } + + } + + }() + + /// Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. + /// + /// See also ``drawMultilineString(canvasItem:pos:text:alignment:width:fontSize:maxLines:modulate:brkFlags:justificationFlags:direction:orientation:)``. + /// + public final func getMultilineStringSize(text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, maxLines: Int32 = -1, brkFlags: TextServer.LineBreakFlag = [.mandatory, .wordBound], justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) -> Vector2 { + var _result: Vector2 = Vector2 () + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: alignment.rawValue) { pArg1 in + withUnsafePointer(to: width) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: maxLines) { pArg4 in + withUnsafePointer(to: brkFlags.rawValue) { pArg5 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg6 in + withUnsafePointer(to: direction.rawValue) { pArg7 in + withUnsafePointer(to: orientation.rawValue) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_multiline_string_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_string: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_string") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1983721962)! + } + + } + + }() + + /// Draw `text` into a canvas item using the font, at a given position, with `modulate` color, optionally clipping the width and aligning horizontally. `pos` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// See also ``CanvasItem/drawString(font:pos:text:alignment:width:fontSize:modulate:justificationFlags:direction:orientation:)``. + /// + public final func drawString(canvasItem: RID, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: modulate) { pArg6 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg7 in + withUnsafePointer(to: direction.rawValue) { pArg8 in + withUnsafePointer(to: orientation.rawValue) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline_string: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline_string") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1171506176)! + } + + } + + }() + + /// Breaks `text` into lines using rules specified by `brkFlags` and draws it into a canvas item using the font, at a given position, with `modulate` color, optionally clipping the width and aligning horizontally. `pos` specifies the baseline of the first line, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// See also ``CanvasItem/drawMultilineString(font:pos:text:alignment:width:fontSize:maxLines:modulate:brkFlags:justificationFlags:direction:orientation:)``. + /// + public final func drawMultilineString(canvasItem: RID, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, maxLines: Int32 = -1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), brkFlags: TextServer.LineBreakFlag = [.mandatory, .wordBound], justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: maxLines) { pArg6 in + withUnsafePointer(to: modulate) { pArg7 in + withUnsafePointer(to: brkFlags.rawValue) { pArg8 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg9 in + withUnsafePointer(to: direction.rawValue) { pArg10 in + withUnsafePointer(to: orientation.rawValue) { pArg11 in + withUnsafePointer(to: UnsafeRawPointersN12(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 12) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_multiline_string, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_string_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_string_outline") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 623754045)! + } + + } + + }() + + /// Draw `text` outline into a canvas item using the font, at a given position, with `modulate` color and `size` outline size, optionally clipping the width and aligning horizontally. `pos` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// See also ``CanvasItem/drawStringOutline(font:pos:text:alignment:width:fontSize:size:modulate:justificationFlags:direction:orientation:)``. + /// + public final func drawStringOutline(canvasItem: RID, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, size: Int32 = 1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: size) { pArg6 in + withUnsafePointer(to: modulate) { pArg7 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg8 in + withUnsafePointer(to: direction.rawValue) { pArg9 in + withUnsafePointer(to: orientation.rawValue) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_string_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_multiline_string_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_multiline_string_outline") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3206388178)! + } + + } + + }() + + /// Breaks `text` to the lines using rules specified by `brkFlags` and draws text outline into a canvas item using the font, at a given position, with `modulate` color and `size` outline size, optionally clipping the width and aligning horizontally. `pos` specifies the baseline of the first line, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// See also ``CanvasItem/drawMultilineStringOutline(font:pos:text:alignment:width:fontSize:maxLines:size:modulate:brkFlags:justificationFlags:direction:orientation:)``. + /// + public final func drawMultilineStringOutline(canvasItem: RID, pos: Vector2, text: String, alignment: HorizontalAlignment = .left, width: Double = -1, fontSize: Int32 = 16, maxLines: Int32 = -1, size: Int32 = 1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), brkFlags: TextServer.LineBreakFlag = [.mandatory, .wordBound], justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound], direction: TextServer.Direction = .auto, orientation: TextServer.Orientation = .horizontal) { + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: alignment.rawValue) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: fontSize) { pArg5 in + withUnsafePointer(to: maxLines) { pArg6 in + withUnsafePointer(to: size) { pArg7 in + withUnsafePointer(to: modulate) { pArg8 in + withUnsafePointer(to: brkFlags.rawValue) { pArg9 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg10 in + withUnsafePointer(to: direction.rawValue) { pArg11 in + withUnsafePointer(to: orientation.rawValue) { pArg12 in + withUnsafePointer(to: UnsafeRawPointersN13(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11, pArg12)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 13) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_multiline_string_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_char_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_char_size") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3016396712)! + } + + } + + }() + + /// Returns the size of a character. Does not take kerning into account. + /// + /// > Note: Do not use this function to calculate width of the string character by character, use ``getStringSize(text:alignment:width:fontSize:justificationFlags:direction:orientation:)`` or ``TextLine`` instead. The height returned is the font height (see also ``getHeight(fontSize:)``) and has no relation to the glyph height. + /// + public final func getCharSize(char: Int64, fontSize: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: char) { pArg0 in + withUnsafePointer(to: fontSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Font.method_get_char_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_char: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_char") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3815617597)! + } + + } + + }() + + /// Draw a single Unicode character `char` into a canvas item using the font, at a given position, with `modulate` color. `pos` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// > Note: Do not use this function to draw strings character by character, use ``drawString(canvasItem:pos:text:alignment:width:fontSize:modulate:justificationFlags:direction:orientation:)`` or ``TextLine`` instead. + /// + public final func drawChar(canvasItem: RID, pos: Vector2, char: Int64, fontSize: Int32, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: char) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_char, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_char_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_char_outline") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 209525354)! + } + + } + + }() + + /// Draw a single Unicode character `char` outline into a canvas item using the font, at a given position, with `modulate` color and `size` outline size. `pos` specifies the baseline, not the top. To draw from the top, _ascent_ must be added to the Y axis. + /// + /// > Note: Do not use this function to draw strings character by character, use ``drawString(canvasItem:pos:text:alignment:width:fontSize:modulate:justificationFlags:direction:orientation:)`` or ``TextLine`` instead. + /// + public final func drawCharOutline(canvasItem: RID, pos: Vector2, char: Int64, fontSize: Int32, size: Int32 = -1, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: canvasItem.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: char) { pArg2 in + withUnsafePointer(to: fontSize) { pArg3 in + withUnsafePointer(to: size) { pArg4 in + withUnsafePointer(to: modulate) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(Font.method_draw_char_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_has_char: GDExtensionMethodBindPtr = { + let methodName = StringName("has_char") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if a Unicode `char` is available in the font. + public final func hasChar(_ char: Int64) -> Bool { + var _result: Bool = false + withUnsafePointer(to: char) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_has_char, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_supported_chars: GDExtensionMethodBindPtr = { + let methodName = StringName("get_supported_chars") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a string containing all the characters available in the font. + /// + /// If a given character is included in more than one font data source, it appears only once in the returned string. + /// + public final func getSupportedChars() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Font.method_get_supported_chars, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_language_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_language_supported") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true`, if font supports given language (ISO 639 code). + public final func isLanguageSupported(language: String) -> Bool { + var _result: Bool = false + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_is_language_supported, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_script_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_script_supported") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true`, if font supports given script (ISO 15924 code). + public final func isScriptSupported(script: String) -> Bool { + var _result: Bool = false + let script = GString(script) + withUnsafePointer(to: script.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Font.method_is_script_supported, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_supported_feature_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_supported_feature_list") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns list of OpenType features supported by font. + public final func getSupportedFeatureList() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(Font.method_get_supported_feature_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_supported_variation_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_supported_variation_list") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns list of supported variation coordinates, each coordinate is returned as `tag: Vector3i(min_value,max_value,default_value)`. + /// + /// Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + /// + /// To print available variation axes of a variable font: + /// + /// > Note: To set and get variation coordinates of a ``FontVariation``, use ``FontVariation/variationOpentype``. + /// + public final func getSupportedVariationList() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(Font.method_get_supported_variation_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_face_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_count") + return withUnsafePointer(to: &Font.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns number of faces in the TrueType / OpenType collection. + public final func getFaceCount() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(Font.method_get_face_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FontFile.swift b/Sources/SwiftGodot/Generated/Api/FontFile.swift new file mode 100644 index 000000000..1d73ce140 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FontFile.swift @@ -0,0 +1,3115 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font. +/// +/// ``FontFile`` contains a set of glyphs to represent Unicode characters imported from a font file, as well as a cache of rasterized glyphs, and a set of fallback ``Font``s to use. +/// +/// Use ``FontVariation`` to access specific OpenType variation of the font, create simulated bold / slanted version, and draw lines of text. +/// +/// For more complex text processing, use ``FontVariation`` in conjunction with ``TextLine`` or ``TextParagraph``. +/// +/// Supported font formats: +/// +/// - Dynamic font importer: TrueType (.ttf), TrueType collection (.ttc), OpenType (.otf), OpenType collection (.otc), WOFF (.woff), WOFF2 (.woff2), Type 1 (.pfb, .pfm). +/// +/// - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants. +/// +/// - Monospace image font importer: All supported image formats. +/// +/// > Note: A character is a symbol that represents an item (letter, digit etc.) in an abstract way. +/// +/// > Note: A glyph is a bitmap or a shape used to draw one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. +/// +/// > Note: If none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. +/// +open class FontFile: Font { + override open class var godotClassName: StringName { "FontFile" } + + /* Properties */ + + /// Contents of the dynamic font source file. + final public var data: PackedByteArray { + get { + return get_data () + } + + set { + set_data (newValue) + } + + } + + /// If set to `true`, generate mipmaps for the font textures. + final public var generateMipmaps: Bool { + get { + return get_generate_mipmaps () + } + + set { + set_generate_mipmaps (newValue) + } + + } + + /// If set to `true`, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + final public var disableEmbeddedBitmaps: Bool { + get { + return get_disable_embedded_bitmaps () + } + + set { + set_disable_embedded_bitmaps (newValue) + } + + } + + /// Font anti-aliasing mode. + final public var antialiasing: TextServer.FontAntialiasing { + get { + return get_antialiasing () + } + + set { + set_antialiasing (newValue) + } + + } + + /// Font family name. + final public var fontName: String { + get { + return getFontName () + } + + set { + set_font_name (newValue) + } + + } + + /// Font style name. + final public var styleName: String { + get { + return getFontStyleName () + } + + set { + set_font_style_name (newValue) + } + + } + + /// Font style flags, see ``TextServer.FontStyle``. + final public var fontStyle: TextServer.FontStyle { + get { + return getFontStyle () + } + + set { + set_font_style (newValue) + } + + } + + /// Weight (boldness) of the font. A value in the `100...999` range, normal font weight is `400`, bold font weight is `700`. + final public var fontWeight: Int32 { + get { + return getFontWeight () + } + + set { + set_font_weight (newValue) + } + + } + + /// Font stretch amount, compared to a normal width. A percentage value between `50%` and `200%`. + final public var fontStretch: Int32 { + get { + return getFontStretch () + } + + set { + set_font_stretch (newValue) + } + + } + + /// Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use ``TextServer/SubpixelPositioning/auto`` to automatically enable it based on the font size. + final public var subpixelPositioning: TextServer.SubpixelPositioning { + get { + return get_subpixel_positioning () + } + + set { + set_subpixel_positioning (newValue) + } + + } + + /// If set to `true`, glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for ``Control``s that are scaled down (or for ``Label3D``s viewed from a long distance). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. + /// + /// > Note: If using font outlines, ``msdfPixelRange`` must be set to at least _twice_ the size of the largest font outline. + /// + /// > Note: MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. + /// + final public var multichannelSignedDistanceField: Bool { + get { + return is_multichannel_signed_distance_field () + } + + set { + set_multichannel_signed_distance_field (newValue) + } + + } + + /// The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, ``msdfPixelRange`` must be set to at least _twice_ the size of the largest font outline. The default ``msdfPixelRange`` value of `16` allows outline sizes up to `8` to look correct. + final public var msdfPixelRange: Int32 { + get { + return get_msdf_pixel_range () + } + + set { + set_msdf_pixel_range (newValue) + } + + } + + /// Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. + final public var msdfSize: Int32 { + get { + return get_msdf_size () + } + + set { + set_msdf_size (newValue) + } + + } + + /// If set to `true`, system fonts can be automatically used as fallbacks. + final public var allowSystemFallback: Bool { + get { + return is_allow_system_fallback () + } + + set { + set_allow_system_fallback (newValue) + } + + } + + /// If set to `true`, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting). + final public var forceAutohinter: Bool { + get { + return is_force_autohinter () + } + + set { + set_force_autohinter (newValue) + } + + } + + /// Font hinting mode. Used by dynamic fonts only. + final public var hinting: TextServer.Hinting { + get { + return get_hinting () + } + + set { + set_hinting (newValue) + } + + } + + /// Font oversampling factor. If set to `0.0`, the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling). + final public var oversampling: Double { + get { + return get_oversampling () + } + + set { + set_oversampling (newValue) + } + + } + + /// Font size, used only for the bitmap fonts. + final public var fixedSize: Int32 { + get { + return get_fixed_size () + } + + set { + set_fixed_size (newValue) + } + + } + + /// Scaling mode, used only for the bitmap fonts with ``fixedSize`` greater than zero. + final public var fixedSizeScaleMode: TextServer.FixedSizeScaleMode { + get { + return get_fixed_size_scale_mode () + } + + set { + set_fixed_size_scale_mode (newValue) + } + + } + + /// Font OpenType feature set override. + final public var opentypeFeatureOverrides: GDictionary { + get { + return get_opentype_feature_overrides () + } + + set { + set_opentype_feature_overrides (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load_bitmap_font: GDExtensionMethodBindPtr = { + let methodName = StringName("load_bitmap_font") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Loads an AngelCode BMFont (.fnt, .font) bitmap font from file `path`. + /// + /// > Warning: This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the `user://` directory. + /// + public final func loadBitmapFont(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_load_bitmap_font, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_dynamic_font: GDExtensionMethodBindPtr = { + let methodName = StringName("load_dynamic_font") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file `path`. + /// + /// > Warning: This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the `user://` directory. + /// + public final func loadDynamicFont(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_load_dynamic_font, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_data") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2971499966)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_data(_ data: PackedByteArray) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2362200018)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_data() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(FontFile.method_get_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_font_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_name") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_name(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_font_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_font_style_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_style_name") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_style_name(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_font_style_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_font_style: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_style") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 918070724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_style(_ style: TextServer.FontStyle) { + withUnsafePointer(to: style.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_font_style, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_font_weight: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_weight") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_weight(_ weight: Int32) { + withUnsafePointer(to: weight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_font_weight, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_font_stretch: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_stretch") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_stretch(_ stretch: Int32) { + withUnsafePointer(to: stretch) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_font_stretch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_antialiasing") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1669900)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_antialiasing(_ antialiasing: TextServer.FontAntialiasing) { + withUnsafePointer(to: antialiasing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_antialiasing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_antialiasing") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4262718649)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_antialiasing() -> TextServer.FontAntialiasing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FontFile.method_get_antialiasing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.FontAntialiasing (rawValue: _result)! + } + + fileprivate static var method_set_disable_embedded_bitmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_embedded_bitmaps") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_disable_embedded_bitmaps(_ disableEmbeddedBitmaps: Bool) { + withUnsafePointer(to: disableEmbeddedBitmaps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_disable_embedded_bitmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_disable_embedded_bitmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_disable_embedded_bitmaps") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_disable_embedded_bitmaps() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FontFile.method_get_disable_embedded_bitmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_generate_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_generate_mipmaps") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_generate_mipmaps(_ generateMipmaps: Bool) { + withUnsafePointer(to: generateMipmaps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_generate_mipmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_generate_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_generate_mipmaps") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_generate_mipmaps() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FontFile.method_get_generate_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_multichannel_signed_distance_field: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multichannel_signed_distance_field") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_multichannel_signed_distance_field(_ msdf: Bool) { + withUnsafePointer(to: msdf) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_multichannel_signed_distance_field, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_multichannel_signed_distance_field: GDExtensionMethodBindPtr = { + let methodName = StringName("is_multichannel_signed_distance_field") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_multichannel_signed_distance_field() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FontFile.method_is_multichannel_signed_distance_field, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_msdf_pixel_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_msdf_pixel_range") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_msdf_pixel_range(_ msdfPixelRange: Int32) { + withUnsafePointer(to: msdfPixelRange) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_msdf_pixel_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_msdf_pixel_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msdf_pixel_range") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_msdf_pixel_range() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FontFile.method_get_msdf_pixel_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_msdf_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_msdf_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_msdf_size(_ msdfSize: Int32) { + withUnsafePointer(to: msdfSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_msdf_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_msdf_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msdf_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_msdf_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FontFile.method_get_msdf_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fixed_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_size(_ fixedSize: Int32) { + withUnsafePointer(to: fixedSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_fixed_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fixed_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FontFile.method_get_fixed_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fixed_size_scale_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_size_scale_mode") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1660989956)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_size_scale_mode(_ fixedSizeScaleMode: TextServer.FixedSizeScaleMode) { + withUnsafePointer(to: fixedSizeScaleMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_fixed_size_scale_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fixed_size_scale_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_size_scale_mode") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 753873478)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_size_scale_mode() -> TextServer.FixedSizeScaleMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FontFile.method_get_fixed_size_scale_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.FixedSizeScaleMode (rawValue: _result)! + } + + fileprivate static var method_set_allow_system_fallback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_system_fallback") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_system_fallback(_ allowSystemFallback: Bool) { + withUnsafePointer(to: allowSystemFallback) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_allow_system_fallback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_allow_system_fallback: GDExtensionMethodBindPtr = { + let methodName = StringName("is_allow_system_fallback") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_allow_system_fallback() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FontFile.method_is_allow_system_fallback, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_force_autohinter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_force_autohinter") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_force_autohinter(_ forceAutohinter: Bool) { + withUnsafePointer(to: forceAutohinter) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_force_autohinter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_force_autohinter: GDExtensionMethodBindPtr = { + let methodName = StringName("is_force_autohinter") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_force_autohinter() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(FontFile.method_is_force_autohinter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hinting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hinting") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1827459492)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hinting(_ hinting: TextServer.Hinting) { + withUnsafePointer(to: hinting.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_hinting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_hinting: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hinting") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3683214614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_hinting() -> TextServer.Hinting { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FontFile.method_get_hinting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.Hinting (rawValue: _result)! + } + + fileprivate static var method_set_subpixel_positioning: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subpixel_positioning") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4225742182)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subpixel_positioning(_ subpixelPositioning: TextServer.SubpixelPositioning) { + withUnsafePointer(to: subpixelPositioning.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_subpixel_positioning, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subpixel_positioning: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subpixel_positioning") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1069238588)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subpixel_positioning() -> TextServer.SubpixelPositioning { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(FontFile.method_get_subpixel_positioning, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.SubpixelPositioning (rawValue: _result)! + } + + fileprivate static var method_set_oversampling: GDExtensionMethodBindPtr = { + let methodName = StringName("set_oversampling") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_oversampling(_ oversampling: Double) { + withUnsafePointer(to: oversampling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_oversampling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_oversampling: GDExtensionMethodBindPtr = { + let methodName = StringName("get_oversampling") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_oversampling() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FontFile.method_get_oversampling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_cache_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_count") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns number of the font cache entries. + public final func getCacheCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FontFile.method_get_cache_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_cache") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all font cache entries. + public final func clearCache() { + gi.object_method_bind_ptrcall(FontFile.method_clear_cache, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_remove_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_cache") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes specified font cache entry. + public final func removeCache(cacheIndex: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_cache, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size_cache_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size_cache_list") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns list of the font sizes in the cache. Each size is ``Vector2i`` with font size and outline size. + public final func getSizeCacheList(cacheIndex: Int32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_size_cache_list, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_clear_size_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_size_cache") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes all font sizes from the cache entry + public final func clearSizeCache(cacheIndex: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_clear_size_cache, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_size_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_size_cache") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311374912)! + } + + } + + }() + + /// Removes specified font size from the cache entry. + public final func removeSizeCache(cacheIndex: Int32, size: Vector2i) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_size_cache, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_variation_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_variation_coordinates") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 64545446)! + } + + } + + }() + + /// Sets variation coordinates for the specified font cache entry. See ``Font/getSupportedVariationList()`` for more info. + public final func setVariationCoordinates(cacheIndex: Int32, variationCoordinates: GDictionary) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: variationCoordinates.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_variation_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_variation_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_variation_coordinates") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3485342025)! + } + + } + + }() + + /// Returns variation coordinates for the specified font cache entry. See ``Font/getSupportedVariationList()`` for more info. + public final func getVariationCoordinates(cacheIndex: Int32) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_variation_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_embolden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_embolden") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + public final func setEmbolden(cacheIndex: Int32, strength: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: strength) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_embolden, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_embolden: GDExtensionMethodBindPtr = { + let methodName = StringName("get_embolden") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + public final func getEmbolden(cacheIndex: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_embolden, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 30160968)! + } + + } + + }() + + /// Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. + public final func setTransform(cacheIndex: Int32, transform: Transform2D) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3836996910)! + } + + } + + }() + + /// Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + public final func getTransform(cacheIndex: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_extra_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_extra_spacing") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 62942285)! + } + + } + + }() + + /// Sets the spacing for `spacing` (see ``TextServer.SpacingType``) to `value` in pixels (not relative to the font size). + public final func setExtraSpacing(cacheIndex: Int32, spacing: TextServer.SpacingType, value: Int) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: spacing.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_extra_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_extra_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_extra_spacing") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1924257185)! + } + + } + + }() + + /// Returns spacing for `spacing` (see ``TextServer.SpacingType``) in pixels (not relative to the font size). + public final func getExtraSpacing(cacheIndex: Int32, spacing: TextServer.SpacingType) -> Int { + var _result: Int = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: spacing.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_extra_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_extra_baseline_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_extra_baseline_offset") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets extra baseline offset (as a fraction of font height). + public final func setExtraBaselineOffset(cacheIndex: Int32, baselineOffset: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: baselineOffset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_extra_baseline_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_extra_baseline_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_extra_baseline_offset") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns extra baseline offset (as a fraction of font height). + public final func getExtraBaselineOffset(cacheIndex: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_extra_baseline_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_face_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_face_index") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets an active face index in the TrueType / OpenType collection. + public final func setFaceIndex(cacheIndex: Int32, faceIndex: Int) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: faceIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_face_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_face_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_index") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns an active face index in the TrueType / OpenType collection. + public final func getFaceIndex(cacheIndex: Int32) -> Int { + var _result: Int = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_face_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_cache_ascent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_ascent") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the font ascent (number of pixels above the baseline). + public final func setCacheAscent(cacheIndex: Int32, size: Int32, ascent: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: ascent) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_cache_ascent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cache_ascent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_ascent") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the font ascent (number of pixels above the baseline). + public final func getCacheAscent(cacheIndex: Int32, size: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_cache_ascent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_cache_descent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_descent") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets the font descent (number of pixels below the baseline). + public final func setCacheDescent(cacheIndex: Int32, size: Int32, descent: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: descent) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_cache_descent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cache_descent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_descent") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the font descent (number of pixels below the baseline). + public final func getCacheDescent(cacheIndex: Int32, size: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_cache_descent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_cache_underline_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_underline_position") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets pixel offset of the underline below the baseline. + public final func setCacheUnderlinePosition(cacheIndex: Int32, size: Int32, underlinePosition: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: underlinePosition) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_cache_underline_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cache_underline_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_underline_position") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns pixel offset of the underline below the baseline. + public final func getCacheUnderlinePosition(cacheIndex: Int32, size: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_cache_underline_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_cache_underline_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_underline_thickness") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets thickness of the underline in pixels. + public final func setCacheUnderlineThickness(cacheIndex: Int32, size: Int32, underlineThickness: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: underlineThickness) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_cache_underline_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cache_underline_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_underline_thickness") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns thickness of the underline in pixels. + public final func getCacheUnderlineThickness(cacheIndex: Int32, size: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_cache_underline_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_cache_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cache_scale") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3506521499)! + } + + } + + }() + + /// Sets scaling factor of the color bitmap font. + public final func setCacheScale(cacheIndex: Int32, size: Int32, scale: Double) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: scale) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_cache_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cache_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_scale") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns scaling factor of the color bitmap font. + public final func getCacheScale(cacheIndex: Int32, size: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_cache_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_texture_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_count") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1987661582)! + } + + } + + }() + + /// Returns number of textures used by font cache entry. + public final func getTextureCount(cacheIndex: Int32, size: Vector2i) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_texture_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_clear_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_textures") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311374912)! + } + + } + + }() + + /// Removes all textures from font cache entry. + /// + /// > Note: This function will not remove glyphs associated with the texture, use ``removeGlyph(cacheIndex:size:glyph:)`` to remove them manually. + /// + public final func clearTextures(cacheIndex: Int32, size: Vector2i) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_clear_textures, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_texture") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2328951467)! + } + + } + + }() + + /// Removes specified texture from the cache entry. + /// + /// > Note: This function will not remove glyphs associated with the texture. Remove them manually using ``removeGlyph(cacheIndex:size:glyph:)``. + /// + public final func removeTexture(cacheIndex: Int32, size: Vector2i, textureIndex: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: textureIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_texture_image: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_image") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4157974066)! + } + + } + + }() + + /// Sets font cache texture image. + public final func setTextureImage(cacheIndex: Int32, size: Vector2i, textureIndex: Int32, image: Image?) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: textureIndex) { pArg2 in + withUnsafePointer(to: image?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_texture_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_texture_image: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_image") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3878418953)! + } + + } + + }() + + /// Returns a copy of the font cache texture image. + public final func getTextureImage(cacheIndex: Int32, size: Vector2i, textureIndex: Int32) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: textureIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_texture_image, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture_offsets: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_offsets") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2849993437)! + } + + } + + }() + + /// Sets array containing glyph packing data. + public final func setTextureOffsets(cacheIndex: Int32, size: Vector2i, textureIndex: Int32, offset: PackedInt32Array) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: textureIndex) { pArg2 in + withUnsafePointer(to: offset.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_texture_offsets, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_texture_offsets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_offsets") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3703444828)! + } + + } + + }() + + /// Returns a copy of the array containing glyph packing data. + public final func getTextureOffsets(cacheIndex: Int32, size: Vector2i, textureIndex: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: textureIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_texture_offsets, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_glyph_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_list") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 681709689)! + } + + } + + }() + + /// Returns list of rendered glyphs in the cache entry. + public final func getGlyphList(cacheIndex: Int32, size: Vector2i) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_list, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_clear_glyphs: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_glyphs") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2311374912)! + } + + } + + }() + + /// Removes all rendered glyph information from the cache entry. + /// + /// > Note: This function will not remove textures associated with the glyphs, use ``removeTexture(cacheIndex:size:textureIndex:)`` to remove them manually. + /// + public final func clearGlyphs(cacheIndex: Int32, size: Vector2i) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_clear_glyphs, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_glyph: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_glyph") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2328951467)! + } + + } + + }() + + /// Removes specified rendered glyph information from the cache entry. + /// + /// > Note: This function will not remove textures associated with the glyphs, use ``removeTexture(cacheIndex:size:textureIndex:)`` to remove them manually. + /// + public final func removeGlyph(cacheIndex: Int32, size: Vector2i, glyph: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_glyph, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_glyph_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_advance") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 947991729)! + } + + } + + }() + + /// Sets glyph advance (offset of the next glyph). + /// + /// > Note: Advance for glyphs outlines is the same as the base glyph advance and is not saved. + /// + public final func setGlyphAdvance(cacheIndex: Int32, size: Int32, glyph: Int32, advance: Vector2) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: advance) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_glyph_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_glyph_advance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_advance") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1601573536)! + } + + } + + }() + + /// Returns glyph advance (offset of the next glyph). + /// + /// > Note: Advance for glyphs outlines is the same as the base glyph advance and is not saved. + /// + public final func getGlyphAdvance(cacheIndex: Int32, size: Int32, glyph: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_advance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_glyph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_offset") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 921719850)! + } + + } + + }() + + /// Sets glyph offset from the baseline. + public final func setGlyphOffset(cacheIndex: Int32, size: Vector2i, glyph: Int32, offset: Vector2) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: offset) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_glyph_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_glyph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_offset") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3205412300)! + } + + } + + }() + + /// Returns glyph offset from the baseline. + public final func getGlyphOffset(cacheIndex: Int32, size: Vector2i, glyph: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_glyph_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 921719850)! + } + + } + + }() + + /// Sets glyph size. + public final func setGlyphSize(cacheIndex: Int32, size: Vector2i, glyph: Int32, glSize: Vector2) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: glSize) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_glyph_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_glyph_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_size") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3205412300)! + } + + } + + }() + + /// Returns glyph size. + public final func getGlyphSize(cacheIndex: Int32, size: Vector2i, glyph: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_glyph_uv_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_uv_rect") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3821620992)! + } + + } + + }() + + /// Sets rectangle in the cache texture containing the glyph. + public final func setGlyphUvRect(cacheIndex: Int32, size: Vector2i, glyph: Int32, uvRect: Rect2) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: uvRect) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_glyph_uv_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_glyph_uv_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_uv_rect") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927917900)! + } + + } + + }() + + /// Returns rectangle in the cache texture containing the glyph. + public final func getGlyphUvRect(cacheIndex: Int32, size: Vector2i, glyph: Int32) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_uv_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_glyph_texture_idx: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glyph_texture_idx") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 355564111)! + } + + } + + }() + + /// Sets index of the cache texture containing the glyph. + public final func setGlyphTextureIdx(cacheIndex: Int32, size: Vector2i, glyph: Int32, textureIdx: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: textureIdx) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_glyph_texture_idx, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_glyph_texture_idx: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_texture_idx") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1629411054)! + } + + } + + }() + + /// Returns index of the cache texture containing the glyph. + public final func getGlyphTextureIdx(cacheIndex: Int32, size: Vector2i, glyph: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyph) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_texture_idx, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_kerning_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_kerning_list") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2345056839)! + } + + } + + }() + + /// Returns list of the kerning overrides. + public final func getKerningList(cacheIndex: Int32, size: Int32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_kerning_list, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_clear_kerning_map: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_kerning_map") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Removes all kerning overrides. + public final func clearKerningMap(cacheIndex: Int32, size: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_clear_kerning_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_kerning: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_kerning") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3930204747)! + } + + } + + }() + + /// Removes kerning override for the pair of glyphs. + public final func removeKerning(cacheIndex: Int32, size: Int32, glyphPair: Vector2i) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyphPair) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_kerning, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_kerning: GDExtensionMethodBindPtr = { + let methodName = StringName("set_kerning") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3182200918)! + } + + } + + }() + + /// Sets kerning for the pair of glyphs. + public final func setKerning(cacheIndex: Int32, size: Int32, glyphPair: Vector2i, kerning: Vector2) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyphPair) { pArg2 in + withUnsafePointer(to: kerning) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_kerning, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_kerning: GDExtensionMethodBindPtr = { + let methodName = StringName("get_kerning") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611912865)! + } + + } + + }() + + /// Returns kerning for the pair of glyphs. + public final func getKerning(cacheIndex: Int32, size: Int32, glyphPair: Vector2i) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: glyphPair) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_kerning, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_render_range: GDExtensionMethodBindPtr = { + let methodName = StringName("render_range") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 355564111)! + } + + } + + }() + + /// Renders the range of characters to the font cache texture. + public final func renderRange(cacheIndex: Int32, size: Vector2i, start: Int64, end: Int64) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: start) { pArg2 in + withUnsafePointer(to: end) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_render_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_render_glyph: GDExtensionMethodBindPtr = { + let methodName = StringName("render_glyph") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2328951467)! + } + + } + + }() + + /// Renders specified glyph to the font cache texture. + public final func renderGlyph(cacheIndex: Int32, size: Vector2i, index: Int32) { + withUnsafePointer(to: cacheIndex) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: index) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_render_glyph, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_language_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Adds override for ``Font/isLanguageSupported(language:)``. + public final func setLanguageSupportOverride(language: String, supported: Bool) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: supported) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_language_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_language_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if support override is enabled for the `language`. + public final func getLanguageSupportOverride(language: String) -> Bool { + var _result: Bool = false + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_language_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_language_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_language_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Remove language support override. + public final func removeLanguageSupportOverride(language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_language_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language_support_overrides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language_support_overrides") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns list of language support overrides. + public final func getLanguageSupportOverrides() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(FontFile.method_get_language_support_overrides, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_script_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_script_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Adds override for ``Font/isScriptSupported(script:)``. + public final func setScriptSupportOverride(script: String, supported: Bool) { + let script = GString(script) + withUnsafePointer(to: script.content) { pArg0 in + withUnsafePointer(to: supported) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_script_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_script_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if support override is enabled for the `script`. + public final func getScriptSupportOverride(script: String) -> Bool { + var _result: Bool = false + let script = GString(script) + withUnsafePointer(to: script.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_script_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_script_support_override: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_script_support_override") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes script support override. + public final func removeScriptSupportOverride(script: String) { + let script = GString(script) + withUnsafePointer(to: script.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_remove_script_support_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_script_support_overrides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_support_overrides") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns list of script support overrides. + public final func getScriptSupportOverrides() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(FontFile.method_get_script_support_overrides, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_opentype_feature_overrides: GDExtensionMethodBindPtr = { + let methodName = StringName("set_opentype_feature_overrides") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_opentype_feature_overrides(_ overrides: GDictionary) { + withUnsafePointer(to: overrides.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_set_opentype_feature_overrides, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_opentype_feature_overrides: GDExtensionMethodBindPtr = { + let methodName = StringName("get_opentype_feature_overrides") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_opentype_feature_overrides() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(FontFile.method_get_opentype_feature_overrides, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_glyph_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glyph_index") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 864943070)! + } + + } + + }() + + /// Returns the glyph index of a `char`, optionally modified by the `variationSelector`. + public final func getGlyphIndex(size: Int32, char: Int64, variationSelector: Int64) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: char) { pArg1 in + withUnsafePointer(to: variationSelector) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_glyph_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_char_from_glyph_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_char_from_glyph_index") + return withUnsafePointer(to: &FontFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns character code associated with `glyphIndex`, or `0` if `glyphIndex` is invalid. See ``getGlyphIndex(size:char:variationSelector:)``. + public final func getCharFromGlyphIndex(size: Int32, glyphIndex: Int32) -> Int64 { + var _result: Int64 = 0 + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: glyphIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontFile.method_get_char_from_glyph_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FontVariation.swift b/Sources/SwiftGodot/Generated/Api/FontVariation.swift new file mode 100644 index 000000000..7bcc55e5e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FontVariation.swift @@ -0,0 +1,499 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A variation of a font with additional settings. +/// +/// Provides OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing. +/// +/// To use simulated bold font variant: +/// +/// To set the coordinate of multiple variation axes: +/// +open class FontVariation: Font { + override open class var godotClassName: StringName { "FontVariation" } + + /* Properties */ + + /// Base font used to create a variation. If not set, default ``Theme`` font is used. + final public var baseFont: Font? { + get { + return get_base_font () + } + + set { + set_base_font (newValue) + } + + } + + /// Font OpenType variation coordinates. More info: OpenType variation tags. + /// + /// > Note: This ``GDictionary`` uses OpenType tags as keys. Variation axes can be identified both by tags (integer, e.g. `0x77678674`) and names (``String``, e.g. `wght`). Some axes might be accessible by multiple names. For example, `wght` refers to the same axis as `weight`. Tags on the other hand are unique. To convert between names and tags, use ``TextServer/nameToTag(name:)`` and ``TextServer/tagToName(tag:)``. + /// + /// > Note: To get available variation axes of a font, use ``Font/getSupportedVariationList()``. + /// + final public var variationOpentype: GDictionary { + get { + return get_variation_opentype () + } + + set { + set_variation_opentype (newValue) + } + + } + + /// Active face index in the TrueType / OpenType collection file. + final public var variationFaceIndex: Int32 { + get { + return get_variation_face_index () + } + + set { + set_variation_face_index (newValue) + } + + } + + /// If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + /// + /// > Note: Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and ``TextMesh`` from working correctly. + /// + final public var variationEmbolden: Double { + get { + return get_variation_embolden () + } + + set { + set_variation_embolden (newValue) + } + + } + + /// 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + /// + /// For example, to simulate italic typeface by slanting, apply the following transform `Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)`. + /// + final public var variationTransform: Transform2D { + get { + return get_variation_transform () + } + + set { + set_variation_transform (newValue) + } + + } + + /// A set of OpenType feature tags. More info: OpenType feature tags. + final public var opentypeFeatures: GDictionary { + get { + return getOpentypeFeatures () + } + + set { + set_opentype_features (newValue) + } + + } + + /// Extra spacing between graphical glyphs. + final public var spacingGlyph: Int32 { + get { + return getSpacing (TextServer.SpacingType (rawValue: 0)!) + } + + set { + set_spacing (TextServer.SpacingType (rawValue: 0)!, newValue) + } + + } + + /// Extra width of the space glyphs. + final public var spacingSpace: Int32 { + get { + return getSpacing (TextServer.SpacingType (rawValue: 1)!) + } + + set { + set_spacing (TextServer.SpacingType (rawValue: 1)!, newValue) + } + + } + + /// Extra spacing at the top of the line in pixels. + final public var spacingTop: Int32 { + get { + return getSpacing (TextServer.SpacingType (rawValue: 2)!) + } + + set { + set_spacing (TextServer.SpacingType (rawValue: 2)!, newValue) + } + + } + + /// Extra spacing at the bottom of the line in pixels. + final public var spacingBottom: Int32 { + get { + return getSpacing (TextServer.SpacingType (rawValue: 3)!) + } + + set { + set_spacing (TextServer.SpacingType (rawValue: 3)!, newValue) + } + + } + + /// Extra baseline offset (as a fraction of font height). + final public var baselineOffset: Double { + get { + return get_baseline_offset () + } + + set { + set_baseline_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_base_font: GDExtensionMethodBindPtr = { + let methodName = StringName("set_base_font") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1262170328)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_base_font(_ font: Font?) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_base_font, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_base_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_font") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229501585)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_base_font() -> Font? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(FontVariation.method_get_base_font, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_variation_opentype: GDExtensionMethodBindPtr = { + let methodName = StringName("set_variation_opentype") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_variation_opentype(_ coords: GDictionary) { + withUnsafePointer(to: coords.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_variation_opentype, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_variation_opentype: GDExtensionMethodBindPtr = { + let methodName = StringName("get_variation_opentype") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_variation_opentype() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(FontVariation.method_get_variation_opentype, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_variation_embolden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_variation_embolden") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_variation_embolden(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_variation_embolden, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_variation_embolden: GDExtensionMethodBindPtr = { + let methodName = StringName("get_variation_embolden") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_variation_embolden() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FontVariation.method_get_variation_embolden, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_variation_face_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_variation_face_index") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_variation_face_index(_ faceIndex: Int32) { + withUnsafePointer(to: faceIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_variation_face_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_variation_face_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_variation_face_index") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_variation_face_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(FontVariation.method_get_variation_face_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_variation_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_variation_transform") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_variation_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_variation_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_variation_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_variation_transform") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_variation_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(FontVariation.method_get_variation_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_opentype_features: GDExtensionMethodBindPtr = { + let methodName = StringName("set_opentype_features") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_opentype_features(_ features: GDictionary) { + withUnsafePointer(to: features.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_opentype_features, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spacing") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3122339690)! + } + + } + + }() + + @inline(__always) + /// Sets the spacing for `spacing` (see ``TextServer.SpacingType``) to `value` in pixels (not relative to the font size). + fileprivate final func set_spacing(_ spacing: TextServer.SpacingType, _ value: Int32) { + withUnsafePointer(to: spacing.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_baseline_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_baseline_offset") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_baseline_offset(_ baselineOffset: Double) { + withUnsafePointer(to: baselineOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(FontVariation.method_set_baseline_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_baseline_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baseline_offset") + return withUnsafePointer(to: &FontVariation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_baseline_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(FontVariation.method_get_baseline_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/FramebufferCacheRD.swift b/Sources/SwiftGodot/Generated/Api/FramebufferCacheRD.swift new file mode 100644 index 000000000..f8e4fb2e1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/FramebufferCacheRD.swift @@ -0,0 +1,61 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Framebuffer cache manager for Rendering Device based renderers. +/// +/// Framebuffer cache manager for Rendering Device based renderers. Provides a way to create a framebuffer and reuse it in subsequent calls for as long as the used textures exists. Framebuffers will automatically be cleaned up when dependent objects are freed. +open class FramebufferCacheRD: Object { + override open class var godotClassName: StringName { "FramebufferCacheRD" } + /* Methods */ + fileprivate static var method_get_cache_multipass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_multipass") + return withUnsafePointer(to: &FramebufferCacheRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3437881813)! + } + + } + + }() + + /// Creates, or obtains a cached, framebuffer. `textures` lists textures accessed. `passes` defines the subpasses and texture allocation, if left empty a single pass is created and textures are allocated depending on their usage flags. `views` defines the number of views used when rendering. + public static func getCacheMultipass(textures: VariantCollection, passes: ObjectCollection, views: UInt32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: textures.array.content) { pArg0 in + withUnsafePointer(to: passes.array.content) { pArg1 in + withUnsafePointer(to: views) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_cache_multipass, nil, pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GDExtension.swift b/Sources/SwiftGodot/Generated/Api/GDExtension.swift new file mode 100644 index 000000000..c4ff62d52 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GDExtension.swift @@ -0,0 +1,89 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A native library for GDExtension. +/// +/// The ``GDExtension`` resource type represents a shared library which can expand the functionality of the engine. The ``GDExtensionManager`` singleton is responsible for loading, reloading, and unloading ``GDExtension`` resources. +/// +/// > Note: GDExtension itself is not a scripting language and has no relation to ``GDScript`` resources. +/// +open class GDExtension: Resource { + override open class var godotClassName: StringName { "GDExtension" } + public enum InitializationLevel: Int64, CaseIterable, CustomDebugStringConvertible { + /// The library is initialized at the same time as the core features of the engine. + case core = 0 // INITIALIZATION_LEVEL_CORE + /// The library is initialized at the same time as the engine's servers (such as ``RenderingServer`` or ``PhysicsServer3D``). + case servers = 1 // INITIALIZATION_LEVEL_SERVERS + /// The library is initialized at the same time as the engine's scene-related classes. + case scene = 2 // INITIALIZATION_LEVEL_SCENE + /// The library is initialized at the same time as the engine's editor classes. Only happens when loading the GDExtension in the editor. + case editor = 3 // INITIALIZATION_LEVEL_EDITOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .core: return ".core" + case .servers: return ".servers" + case .scene: return ".scene" + case .editor: return ".editor" + } + + } + + } + + /* Methods */ + fileprivate static var method_is_library_open: GDExtensionMethodBindPtr = { + let methodName = StringName("is_library_open") + return withUnsafePointer(to: &GDExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this extension's library has been opened. + public final func isLibraryOpen() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GDExtension.method_is_library_open, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_minimum_library_initialization_level: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minimum_library_initialization_level") + return withUnsafePointer(to: &GDExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 964858755)! + } + + } + + }() + + /// Returns the lowest level required for this extension to be properly initialized (see the ``GDExtension/InitializationLevel`` enum). + public final func getMinimumLibraryInitializationLevel() -> GDExtension.InitializationLevel { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GDExtension.method_get_minimum_library_initialization_level, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GDExtension.InitializationLevel (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GDExtensionManager.swift b/Sources/SwiftGodot/Generated/Api/GDExtensionManager.swift new file mode 100644 index 000000000..05e6f2781 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GDExtensionManager.swift @@ -0,0 +1,247 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to GDExtension functionality. +/// +/// The GDExtensionManager loads, initializes, and keeps track of all available ``GDExtension`` libraries in the project. +/// +/// > Note: Do not worry about GDExtension unless you know what you are doing. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``extensionsReloaded`` +open class GDExtensionManager: Object { + /// The shared instance of this class + public static var shared: GDExtensionManager = { + return withUnsafePointer (to: &GDExtensionManager.godotClassName.content) { ptr in + GDExtensionManager (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "GDExtensionManager" } + public enum LoadStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// The extension has loaded successfully. + case ok = 0 // LOAD_STATUS_OK + /// The extension has failed to load, possibly because it does not exist or has missing dependencies. + case failed = 1 // LOAD_STATUS_FAILED + /// The extension has already been loaded. + case alreadyLoaded = 2 // LOAD_STATUS_ALREADY_LOADED + /// The extension has not been loaded. + case notLoaded = 3 // LOAD_STATUS_NOT_LOADED + /// The extension requires the application to restart to fully load. + case needsRestart = 4 // LOAD_STATUS_NEEDS_RESTART + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ok: return ".ok" + case .failed: return ".failed" + case .alreadyLoaded: return ".alreadyLoaded" + case .notLoaded: return ".notLoaded" + case .needsRestart: return ".needsRestart" + } + + } + + } + + /* Methods */ + fileprivate static var method_load_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("load_extension") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4024158731)! + } + + } + + }() + + /// Loads an extension by absolute file path. The `path` needs to point to a valid ``GDExtension``. Returns ``LoadStatus/ok`` if successful. + public static func loadExtension(path: String) -> GDExtensionManager.LoadStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_extension, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GDExtensionManager.LoadStatus (rawValue: _result)! + } + + fileprivate static var method_reload_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("reload_extension") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4024158731)! + } + + } + + }() + + /// Reloads the extension at the given file path. The `path` needs to point to a valid ``GDExtension``, otherwise this method may return either ``LoadStatus/notLoaded`` or ``LoadStatus/failed``. + /// + /// > Note: You can only reload extensions in the editor. In release builds, this method always fails and returns ``LoadStatus/failed``. + /// + public static func reloadExtension(path: String) -> GDExtensionManager.LoadStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_reload_extension, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GDExtensionManager.LoadStatus (rawValue: _result)! + } + + fileprivate static var method_unload_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("unload_extension") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4024158731)! + } + + } + + }() + + /// Unloads an extension by file path. The `path` needs to point to an already loaded ``GDExtension``, otherwise this method returns ``LoadStatus/notLoaded``. + public static func unloadExtension(path: String) -> GDExtensionManager.LoadStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unload_extension, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GDExtensionManager.LoadStatus (rawValue: _result)! + } + + fileprivate static var method_is_extension_loaded: GDExtensionMethodBindPtr = { + let methodName = StringName("is_extension_loaded") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the extension at the given file `path` has already been loaded successfully. See also ``getLoadedExtensions()``. + public static func isExtensionLoaded(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_extension_loaded, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_loaded_extensions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loaded_extensions") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the file paths of all currently loaded extensions. + public static func getLoadedExtensions() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_loaded_extensions, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("get_extension") + return withUnsafePointer(to: &GDExtensionManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 49743343)! + } + + } + + }() + + /// Returns the ``GDExtension`` at the given file `path`, or `null` if it has not been loaded or does not exist. + public static func getExtension(path: String) -> GDExtension? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_extension, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Emitted after the editor has finished reloading one or more extensions. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.extensionsReloaded.connect { + /// print ("caught signal") + /// } + /// ``` + public var extensionsReloaded: SimpleSignal { SimpleSignal (target: self, signalName: "extensions_reloaded") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GDScript.swift b/Sources/SwiftGodot/Generated/Api/GDScript.swift new file mode 100644 index 000000000..a6d2ef62f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GDScript.swift @@ -0,0 +1,83 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A script implemented in the GDScript programming language. +/// +/// A script implemented in the GDScript programming language, saved with the `.gd` extension. The script extends the functionality of all objects that instantiate it. +/// +/// Calling ``new()`` creates a new instance of the script. ``Object/setScript(_:)`` extends an existing object, if that object's class matches one of the script's base classes. +/// +/// If you are looking for GDScript's built-in functions, see [@GDScript] instead. +/// +open class GDScript: Script { + override open class var godotClassName: StringName { "GDScript" } + /* Methods */ + fileprivate static var method_new: GDExtensionMethodBindPtr = { + let methodName = StringName("new") + return withUnsafePointer(to: &GDScript.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1545262638)! + } + + } + + }() + + /// Returns a new instance of the script. + /// + /// For example: + /// + public final func new(_ arguments: Variant?...) -> Variant? { + var _result: Variant.ContentType = Variant.zero + if arguments.isEmpty { + gi.object_method_bind_call(GDScript.method_new, UnsafeMutableRawPointer(mutating: handle), nil, 0, &_result, nil) // no arguments + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: arguments.count) { pArgsBuffer in + // We use entire buffer so can initialize every element in the end. It's not + // necessary for UnsafeRawPointer and other POD types (which Variant.ContentType also is) + // but we'll do it for the sake of correctness + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pargsBuffer.baseAddress is nil") + } + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_buffer_view, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_buffer_view: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer_view") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer_view(_ bufferView: Int32) { + withUnsafePointer(to: bufferView) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_buffer_view, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_byte_offset() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_byte_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_byte_offset(_ byteOffset: Int32) { + withUnsafePointer(to: byteOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_byte_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_component_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_component_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_component_type() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_component_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_component_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_component_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_component_type(_ componentType: Int32) { + withUnsafePointer(to: componentType) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_component_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normalized") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_normalized() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_normalized, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normalized") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normalized(_ normalized: Bool) { + withUnsafePointer(to: normalized) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_normalized, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_count") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_count") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_accessor_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_accessor_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_accessor_type() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_accessor_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_accessor_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_accessor_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_accessor_type(_ accessorType: Int32) { + withUnsafePointer(to: accessorType) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_accessor_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_type() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_type(_ type: Int32) { + withUnsafePointer(to: type) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 148677866)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min() -> PackedFloat64Array { + let _result: PackedFloat64Array = PackedFloat64Array () + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2576592201)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min(_ min: PackedFloat64Array) { + withUnsafePointer(to: min.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 148677866)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max() -> PackedFloat64Array { + let _result: PackedFloat64Array = PackedFloat64Array () + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2576592201)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max(_ max: PackedFloat64Array) { + withUnsafePointer(to: max.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_count") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_count") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_count(_ sparseCount: Int32) { + withUnsafePointer(to: sparseCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_indices_buffer_view: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_indices_buffer_view") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_indices_buffer_view() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_indices_buffer_view, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_indices_buffer_view: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_indices_buffer_view") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_indices_buffer_view(_ sparseIndicesBufferView: Int32) { + withUnsafePointer(to: sparseIndicesBufferView) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_indices_buffer_view, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_indices_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_indices_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_indices_byte_offset() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_indices_byte_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_indices_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_indices_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_indices_byte_offset(_ sparseIndicesByteOffset: Int32) { + withUnsafePointer(to: sparseIndicesByteOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_indices_byte_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_indices_component_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_indices_component_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_indices_component_type() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_indices_component_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_indices_component_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_indices_component_type") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_indices_component_type(_ sparseIndicesComponentType: Int32) { + withUnsafePointer(to: sparseIndicesComponentType) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_indices_component_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_values_buffer_view: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_values_buffer_view") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_values_buffer_view() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_values_buffer_view, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_values_buffer_view: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_values_buffer_view") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_values_buffer_view(_ sparseValuesBufferView: Int32) { + withUnsafePointer(to: sparseValuesBufferView) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_values_buffer_view, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sparse_values_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sparse_values_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sparse_values_byte_offset() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFAccessor.method_get_sparse_values_byte_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sparse_values_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sparse_values_byte_offset") + return withUnsafePointer(to: &GLTFAccessor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sparse_values_byte_offset(_ sparseValuesByteOffset: Int32) { + withUnsafePointer(to: sparseValuesByteOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAccessor.method_set_sparse_values_byte_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFAnimation.swift b/Sources/SwiftGodot/Generated/Api/GLTFAnimation.swift new file mode 100644 index 000000000..c306cef09 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFAnimation.swift @@ -0,0 +1,202 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class GLTFAnimation: Resource { + override open class var godotClassName: StringName { "GLTFAnimation" } + + /* Properties */ + + /// The original name of the animation. + final public var originalName: String { + get { + return get_original_name () + } + + set { + set_original_name (newValue) + } + + } + + final public var loop: Bool { + get { + return get_loop () + } + + set { + set_loop (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_name") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFAnimation.method_get_original_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_name") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_name(_ originalName: String) { + let originalName = GString(originalName) + withUnsafePointer(to: originalName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAnimation.method_set_original_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("get_loop") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFAnimation.method_get_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAnimation.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_additional_data") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Gets additional arbitrary data in this ``GLTFAnimation`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + /// + public final func getAdditionalData(extensionName: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFAnimation.method_get_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_additional_data") + return withUnsafePointer(to: &GLTFAnimation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets additional arbitrary data in this ``GLTFAnimation`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The first argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + /// + public final func setAdditionalData(extensionName: StringName, additionalData: Variant?) { + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: additionalData.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFAnimation.method_set_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFBufferView.swift b/Sources/SwiftGodot/Generated/Api/GLTFBufferView.swift new file mode 100644 index 000000000..9e8a4a3c2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFBufferView.swift @@ -0,0 +1,397 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF buffer view. +/// +/// GLTFBufferView is a data structure representing GLTF a `bufferView` that would be found in the `"bufferViews"` array. A buffer is a blob of binary data. A buffer view is a slice of a buffer that can be used to identify and extract data from the buffer. +/// +/// Most custom uses of buffers only need to use the ``buffer``, ``byteLength``, and ``byteOffset``. The ``byteStride`` and ``indices`` properties are for more advanced use cases such as interleaved mesh data encoded for the GPU. +/// +open class GLTFBufferView: Resource { + override open class var godotClassName: StringName { "GLTFBufferView" } + + /* Properties */ + + /// The index of the buffer this buffer view is referencing. If `-1`, this buffer view is not referencing any buffer. + final public var buffer: Int32 { + get { + return get_buffer () + } + + set { + set_buffer (newValue) + } + + } + + /// The offset, in bytes, from the start of the buffer to the start of this buffer view. + final public var byteOffset: Int32 { + get { + return get_byte_offset () + } + + set { + set_byte_offset (newValue) + } + + } + + /// The length, in bytes, of this buffer view. If `0`, this buffer view is empty. + final public var byteLength: Int32 { + get { + return get_byte_length () + } + + set { + set_byte_length (newValue) + } + + } + + /// The stride, in bytes, between interleaved data. If `-1`, this buffer view is not interleaved. + final public var byteStride: Int32 { + get { + return get_byte_stride () + } + + set { + set_byte_stride (newValue) + } + + } + + /// True if the GLTFBufferView's OpenGL GPU buffer type is an `ELEMENT_ARRAY_BUFFER` used for vertex indices (integer constant `34963`). False if the buffer type is any other value. See Buffers, BufferViews, and Accessors for possible values. This property is set on import and used on export. + final public var indices: Bool { + get { + return get_indices () + } + + set { + set_indices (newValue) + } + + } + + /// True if the GLTFBufferView's OpenGL GPU buffer type is an `ARRAY_BUFFER` used for vertex attributes (integer constant `34962`). False if the buffer type is any other value. See Buffers, BufferViews, and Accessors for possible values. This property is set on import and used on export. + final public var vertexAttributes: Bool { + get { + return get_vertex_attributes () + } + + set { + set_vertex_attributes (newValue) + } + + } + + /* Methods */ + fileprivate static var method_load_buffer_view_data: GDExtensionMethodBindPtr = { + let methodName = StringName("load_buffer_view_data") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3945446907)! + } + + } + + }() + + /// Loads the buffer view data from the buffer referenced by this buffer view in the given ``GLTFState``. Interleaved data with a byte stride is not yet supported by this method. The data is returned as a ``PackedByteArray``. + public final func loadBufferViewData(state: GLTFState?) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: state?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_load_buffer_view_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffer() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_buffer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer(_ buffer: Int32) { + withUnsafePointer(to: buffer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_byte_offset") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_byte_offset() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_byte_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_byte_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_byte_offset") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_byte_offset(_ byteOffset: Int32) { + withUnsafePointer(to: byteOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_byte_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_byte_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_byte_length") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_byte_length() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_byte_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_byte_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_byte_length") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_byte_length(_ byteLength: Int32) { + withUnsafePointer(to: byteLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_byte_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_byte_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("get_byte_stride") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_byte_stride() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_byte_stride, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_byte_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("set_byte_stride") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_byte_stride(_ byteStride: Int32) { + withUnsafePointer(to: byteStride) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_byte_stride, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_indices") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_indices() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_indices, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indices") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_indices(_ indices: Bool) { + withUnsafePointer(to: indices) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_indices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertex_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_attributes") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertex_attributes() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFBufferView.method_get_vertex_attributes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertex_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_attributes") + return withUnsafePointer(to: &GLTFBufferView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertex_attributes(_ isAttributes: Bool) { + withUnsafePointer(to: isAttributes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFBufferView.method_set_vertex_attributes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFCamera.swift b/Sources/SwiftGodot/Generated/Api/GLTFCamera.swift new file mode 100644 index 000000000..aad9239bb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFCamera.swift @@ -0,0 +1,401 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF camera. +/// +/// Represents a camera as defined by the base GLTF spec. +open class GLTFCamera: Resource { + override open class var godotClassName: StringName { "GLTFCamera" } + + /* Properties */ + + /// Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera `type` property. See ``Camera3D/projection`` and the GLTF spec for more information. + final public var perspective: Bool { + get { + return get_perspective () + } + + set { + set_perspective (newValue) + } + + } + + /// The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's `yfov` property. This value is only used for perspective cameras, when ``perspective`` is true. + final public var fov: Double { + get { + return get_fov () + } + + set { + set_fov (newValue) + } + + } + + /// The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's `ymag` property. This value is only used for orthographic/orthogonal cameras, when ``perspective`` is false. + final public var sizeMag: Double { + get { + return get_size_mag () + } + + set { + set_size_mag (newValue) + } + + } + + /// The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's `zfar` property. + final public var depthFar: Double { + get { + return get_depth_far () + } + + set { + set_depth_far (newValue) + } + + } + + /// The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's `znear` property. + final public var depthNear: Double { + get { + return get_depth_near () + } + + set { + set_depth_near (newValue) + } + + } + + /* Methods */ + fileprivate static var method_from_node: GDExtensionMethodBindPtr = { + let methodName = StringName("from_node") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 237784)! + } + + } + + }() + + /// Create a new GLTFCamera instance from the given Godot ``Camera3D`` node. + public static func fromNode(cameraNode: Camera3D?) -> GLTFCamera? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: cameraNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_node, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_node: GDExtensionMethodBindPtr = { + let methodName = StringName("to_node") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2285090890)! + } + + } + + }() + + /// Converts this GLTFCamera instance into a Godot ``Camera3D`` node. + public final func toNode() -> Camera3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFCamera.method_to_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("from_dictionary") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2495512509)! + } + + } + + }() + + /// Creates a new GLTFCamera instance by parsing the given ``GDictionary``. + public static func fromDictionary(_ dictionary: GDictionary) -> GLTFCamera? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: dictionary.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_dictionary, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("to_dictionary") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Serializes this GLTFCamera instance into a ``GDictionary``. + public final func toDictionary() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFCamera.method_to_dictionary, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("get_perspective") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_perspective() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFCamera.method_get_perspective, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("set_perspective") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_perspective(_ perspective: Bool) { + withUnsafePointer(to: perspective) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFCamera.method_set_perspective, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fov") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fov() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFCamera.method_get_fov, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fov") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fov(_ fov: Double) { + withUnsafePointer(to: fov) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFCamera.method_set_fov, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size_mag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size_mag") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size_mag() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFCamera.method_get_size_mag, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_size_mag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size_mag") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size_mag(_ sizeMag: Double) { + withUnsafePointer(to: sizeMag) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFCamera.method_set_size_mag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_far: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_far") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_far() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFCamera.method_get_depth_far, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_far: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_far") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_far(_ zdepthFar: Double) { + withUnsafePointer(to: zdepthFar) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFCamera.method_set_depth_far, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_near: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_near") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_near() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFCamera.method_get_depth_near, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_near: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_near") + return withUnsafePointer(to: &GLTFCamera.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_near(_ zdepthNear: Double) { + withUnsafePointer(to: zdepthNear) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFCamera.method_set_depth_near, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFDocument.swift b/Sources/SwiftGodot/Generated/Api/GLTFDocument.swift new file mode 100644 index 000000000..2b7f1c144 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFDocument.swift @@ -0,0 +1,502 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class for importing and exporting glTF files in and out of Godot. +/// +/// GLTFDocument supports reading data from a glTF file, buffer, or Godot scene. This data can then be written to the filesystem, buffer, or used to create a Godot scene. +/// +/// All of the data in a GLTF scene is stored in the ``GLTFState`` class. GLTFDocument processes state objects, but does not contain any scene data itself. GLTFDocument has member variables to store export configuration settings such as the image format, but is otherwise stateless. Multiple scenes can be processed with the same settings using the same GLTFDocument object and different ``GLTFState`` objects. +/// +/// GLTFDocument can be extended with arbitrary functionality by extending the ``GLTFDocumentExtension`` class and registering it with GLTFDocument via ``registerGltfDocumentExtension(_:firstPriority:)``. This allows for custom data to be imported and exported. +/// +open class GLTFDocument: Resource { + override open class var godotClassName: StringName { "GLTFDocument" } + public enum RootNodeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the `GODOT_single_root` glTF extension. This will be parsed the same as ``RootNodeMode/keepRoot`` if the implementation does not support `GODOT_single_root`. + case singleRoot = 0 // ROOT_NODE_MODE_SINGLE_ROOT + /// Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier. + case keepRoot = 1 // ROOT_NODE_MODE_KEEP_ROOT + /// Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node. + case multiRoot = 2 // ROOT_NODE_MODE_MULTI_ROOT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .singleRoot: return ".singleRoot" + case .keepRoot: return ".keepRoot" + case .multiRoot: return ".multiRoot" + } + + } + + } + + + /* Properties */ + + /// The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. + /// + /// By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in ``GLTFDocumentExtension`` classes. + /// + final public var imageFormat: String { + get { + return get_image_format () + } + + set { + set_image_format (newValue) + } + + } + + /// If ``imageFormat`` is a lossy image format, this determines the lossy quality of the image. On a range of `0.0` to `1.0`, where `0.0` is the lowest quality and `1.0` is the highest quality. A lossy quality of `1.0` is not the same as lossless. + final public var lossyQuality: Double { + get { + return get_lossy_quality () + } + + set { + set_lossy_quality (newValue) + } + + } + + /// How to process the root node during export. See ``GLTFDocument/RootNodeMode`` for details. The default and recommended value is ``RootNodeMode/singleRoot``. + /// + /// > Note: Regardless of how the glTF file is exported, when importing, the root node type and name can be overridden in the scene import settings tab. + /// + final public var rootNodeMode: GLTFDocument.RootNodeMode { + get { + return get_root_node_mode () + } + + set { + set_root_node_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_image_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_image_format") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_image_format(_ imageFormat: String) { + let imageFormat = GString(imageFormat) + withUnsafePointer(to: imageFormat.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_set_image_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_image_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_image_format") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_image_format() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFDocument.method_get_image_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_lossy_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lossy_quality") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lossy_quality(_ lossyQuality: Double) { + withUnsafePointer(to: lossyQuality) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_set_lossy_quality, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lossy_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lossy_quality") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lossy_quality() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFDocument.method_get_lossy_quality, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_root_node_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_node_mode") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 463633402)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_node_mode(_ rootNodeMode: GLTFDocument.RootNodeMode) { + withUnsafePointer(to: rootNodeMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_set_root_node_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_node_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_node_mode") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 948057992)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_node_mode() -> GLTFDocument.RootNodeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GLTFDocument.method_get_root_node_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GLTFDocument.RootNodeMode (rawValue: _result)! + } + + fileprivate static var method_append_from_file: GDExtensionMethodBindPtr = { + let methodName = StringName("append_from_file") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866380864)! + } + + } + + }() + + /// Takes a path to a GLTF file and imports the data at that file path to the given ``GLTFState`` object through the `state` parameter. + /// + /// > Note: The `basePath` tells ``appendFromFile(path:state:flags:basePath:)`` where to find dependencies and can be empty. + /// + public final func appendFromFile(path: String, state: GLTFState?, flags: UInt32 = 0, basePath: String = "") -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: state?.handle) { pArg1 in + withUnsafePointer(to: flags) { pArg2 in + let basePath = GString(basePath) + withUnsafePointer(to: basePath.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_append_from_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_append_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("append_from_buffer") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1616081266)! + } + + } + + }() + + /// Takes a ``PackedByteArray`` defining a GLTF and imports the data to the given ``GLTFState`` object through the `state` parameter. + /// + /// > Note: The `basePath` tells ``appendFromBuffer(bytes:basePath:state:flags:)`` where to find dependencies and can be empty. + /// + public final func appendFromBuffer(bytes: PackedByteArray, basePath: String, state: GLTFState?, flags: UInt32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: bytes.content) { pArg0 in + let basePath = GString(basePath) + withUnsafePointer(to: basePath.content) { pArg1 in + withUnsafePointer(to: state?.handle) { pArg2 in + withUnsafePointer(to: flags) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_append_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_append_from_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("append_from_scene") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1622574258)! + } + + } + + }() + + /// Takes a Godot Engine scene node and exports it and its descendants to the given ``GLTFState`` object through the `state` parameter. + public final func appendFromScene(node: Node?, state: GLTFState?, flags: UInt32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: state?.handle) { pArg1 in + withUnsafePointer(to: flags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_append_from_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_generate_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_scene") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 596118388)! + } + + } + + }() + + /// Takes a ``GLTFState`` object through the `state` parameter and returns a Godot Engine scene node. + /// + /// The `bakeFps` parameter overrides the bake_fps in `state`. + /// + public final func generateScene(state: GLTFState?, bakeFps: Double = 30, trimming: Bool = false, removeImmutableTracks: Bool = true) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: state?.handle) { pArg0 in + withUnsafePointer(to: bakeFps) { pArg1 in + withUnsafePointer(to: trimming) { pArg2 in + withUnsafePointer(to: removeImmutableTracks) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_generate_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_generate_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_buffer") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 741783455)! + } + + } + + }() + + /// Takes a ``GLTFState`` object through the `state` parameter and returns a GLTF ``PackedByteArray``. + public final func generateBuffer(state: GLTFState?) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: state?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_generate_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_write_to_filesystem: GDExtensionMethodBindPtr = { + let methodName = StringName("write_to_filesystem") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1784551478)! + } + + } + + }() + + /// Takes a ``GLTFState`` object through the `state` parameter and writes a glTF file to the filesystem. + /// + /// > Note: The extension of the glTF file determines if it is a .glb binary file or a .gltf text file. + /// + public final func writeToFilesystem(state: GLTFState?, path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: state?.handle) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFDocument.method_write_to_filesystem, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_register_gltf_document_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("register_gltf_document_extension") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3752678331)! + } + + } + + }() + + /// Registers the given ``GLTFDocumentExtension`` instance with GLTFDocument. If `firstPriority` is true, this extension will be run first. Otherwise, it will be run last. + /// + /// > Note: Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the `set_additional_data` and `get_additional_data` methods in ``GLTFState`` or ``GLTFNode``. + /// + public static func registerGltfDocumentExtension(_ `extension`: GLTFDocumentExtension?, firstPriority: Bool = false) { + withUnsafePointer(to: `extension`?.handle) { pArg0 in + withUnsafePointer(to: firstPriority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_gltf_document_extension, nil, pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_unregister_gltf_document_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_gltf_document_extension") + return withUnsafePointer(to: &GLTFDocument.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684415758)! + } + + } + + }() + + /// Unregisters the given ``GLTFDocumentExtension`` instance. + public static func unregisterGltfDocumentExtension(_ `extension`: GLTFDocumentExtension?) { + withUnsafePointer(to: `extension`?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unregister_gltf_document_extension, nil, pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtension.swift b/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtension.swift new file mode 100644 index 000000000..36a6ddf20 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtension.swift @@ -0,0 +1,452 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// ``GLTFDocument`` extension class. +/// +/// Extends the functionality of the ``GLTFDocument`` class by allowing you to run arbitrary code at various stages of GLTF import or export. +/// +/// To use, make a new class extending GLTFDocumentExtension, override any methods you need, make an instance of your class, and register it using ``GLTFDocument/registerGltfDocumentExtension(_:firstPriority:)``. +/// +/// > Note: Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the `set_additional_data` and `get_additional_data` methods in ``GLTFState`` or ``GLTFNode``. +/// +open class GLTFDocumentExtension: Resource { + override open class var godotClassName: StringName { "GLTFDocumentExtension" } + /* Methods */ + /// Part of the import process. This method is run first, before all other parts of the import process. + /// + /// The return value is used to determine if this ``GLTFDocumentExtension`` instance should be used for importing a given GLTF file. If ``GodotError/ok``, the import will use this ``GLTFDocumentExtension`` instance. If not overridden, ``GodotError/ok`` is returned. + /// + @_documentation(visibility: public) + open func _importPreflight(state: GLTFState?, extensions: PackedStringArray) -> GodotError { + return .ok + } + + /// Part of the import process. This method is run after ``_importPreflight(state:extensions:)`` and before ``_parseNodeExtensions(state:gltfNode:extensions:)``. + /// + /// Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded. + /// + @_documentation(visibility: public) + open func _getSupportedExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// Part of the import process. This method is run after ``_getSupportedExtensions()`` and before ``_importPostParse(state:)``. + /// + /// Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by ``_generateSceneNode(state:gltfNode:sceneParent:)``. The return value should be a member of the ``GodotError`` enum. + /// + @_documentation(visibility: public) + open func _parseNodeExtensions(state: GLTFState?, gltfNode: GLTFNode?, extensions: GDictionary) -> GodotError { + return .ok + } + + /// Part of the import process. This method is run after ``_parseNodeExtensions(state:gltfNode:extensions:)`` and before ``_parseTextureJson(state:textureJson:retGltfTexture:)``. + /// + /// Runs when parsing image data from a GLTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. + /// + @_documentation(visibility: public) + open func _parseImageData(state: GLTFState?, imageData: PackedByteArray, mimeType: String, retImage: Image?) -> GodotError { + return .ok + } + + /// Returns the file extension to use for saving image data into, for example, `".png"`. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a ``ResourceImporter`` class able to import the file. If not defined or empty, Godot will save the image into a PNG file. + @_documentation(visibility: public) + open func _getImageFileExtension() -> String { + return String () + } + + /// Part of the import process. This method is run after ``_parseImageData(state:imageData:mimeType:retImage:)`` and before ``_generateSceneNode(state:gltfNode:sceneParent:)``. + /// + /// Runs when parsing the texture JSON from the GLTF textures array. This can be used to set the source image index to use as the texture. + /// + @_documentation(visibility: public) + open func _parseTextureJson(state: GLTFState?, textureJson: GDictionary, retGltfTexture: GLTFTexture?) -> GodotError { + return .ok + } + + /// Part of the import process. This method is run after ``_importPostParse(state:)`` and before ``_importNode(state:gltfNode:json:node:)``. + /// + /// Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. + /// + /// > Note: The `sceneParent` parameter may be null if this is the single root node. + /// + @_documentation(visibility: public) + open func _generateSceneNode(state: GLTFState?, gltfNode: GLTFNode?, sceneParent: Node?) -> Node3D? { + return Node3D () + } + + /// Part of the import process. This method is run after ``_parseNodeExtensions(state:gltfNode:extensions:)`` and before ``_generateSceneNode(state:gltfNode:sceneParent:)``. + /// + /// This method can be used to modify any of the data imported so far after parsing, before generating the nodes and then running the final per-node import step. + /// + @_documentation(visibility: public) + open func _importPostParse(state: GLTFState?) -> GodotError { + return .ok + } + + /// Part of the import process. This method is run after ``_generateSceneNode(state:gltfNode:sceneParent:)`` and before ``_importPost(state:root:)``. + /// + /// This method can be used to make modifications to each of the generated Godot scene nodes. + /// + @_documentation(visibility: public) + open func _importNode(state: GLTFState?, gltfNode: GLTFNode?, json: GDictionary, node: Node?) -> GodotError { + return .ok + } + + /// Part of the import process. This method is run last, after all other parts of the import process. + /// + /// This method can be used to modify the final Godot scene generated by the import process. + /// + @_documentation(visibility: public) + open func _importPost(state: GLTFState?, root: Node?) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run first, before all other parts of the export process. + /// + /// The return value is used to determine if this ``GLTFDocumentExtension`` instance should be used for exporting a given GLTF file. If ``GodotError/ok``, the export will use this ``GLTFDocumentExtension`` instance. If not overridden, ``GodotError/ok`` is returned. + /// + @_documentation(visibility: public) + open func _exportPreflight(state: GLTFState?, root: Node?) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run after ``_exportPreflight(state:root:)`` and before ``_exportPreserialize(state:)``. + /// + /// Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by ``_exportNode(state:gltfNode:json:node:)``. + /// + @_documentation(visibility: public) + open func _convertSceneNode(state: GLTFState?, gltfNode: GLTFNode?, sceneNode: Node?) { + } + + /// Part of the export process. This method is run after ``_convertSceneNode(state:gltfNode:sceneNode:)`` and before ``_getSaveableImageFormats()``. + /// + /// This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with ``GLTFDocument/generateBuffer(state:)`` or writing to the file system with ``GLTFDocument/writeToFilesystem(state:path:)``. + /// + @_documentation(visibility: public) + open func _exportPreserialize(state: GLTFState?) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run after ``_convertSceneNode(state:gltfNode:sceneNode:)`` and before ``_exportNode(state:gltfNode:json:node:)``. + /// + /// Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the ``GLTFDocument``'s ``GLTFDocument/imageFormat`` is in this array. If this ``GLTFDocumentExtension`` is selected as the image exporter, one of the ``_saveImageAtPath(state:image:filePath:imageFormat:lossyQuality:)`` or ``_serializeImageToBytes(state:image:imageDict:imageFormat:lossyQuality:)`` methods will run next, otherwise ``_exportNode(state:gltfNode:json:node:)`` will run next. If the format name contains `"Lossy"`, the lossy quality slider will be displayed. + /// + @_documentation(visibility: public) + open func _getSaveableImageFormats() -> PackedStringArray { + return PackedStringArray () + } + + /// Part of the export process. This method is run after ``_getSaveableImageFormats()`` and before ``_serializeTextureJson(state:textureJson:gltfTexture:imageFormat:)``. + /// + /// This method is run when embedding images in the GLTF file. When images are saved separately, ``_saveImageAtPath(state:image:filePath:imageFormat:lossyQuality:)`` runs instead. Note that these methods only run when this ``GLTFDocumentExtension`` is selected as the image exporter. + /// + /// This method must set the image MIME type in the `imageDict` with the `"mimeType"` key. For example, for a PNG image, it would be set to `"image/png"`. The return value must be a ``PackedByteArray`` containing the image data. + /// + @_documentation(visibility: public) + open func _serializeImageToBytes(state: GLTFState?, image: Image?, imageDict: GDictionary, imageFormat: String, lossyQuality: Double) -> PackedByteArray { + return PackedByteArray () + } + + /// Part of the export process. This method is run after ``_getSaveableImageFormats()`` and before ``_serializeTextureJson(state:textureJson:gltfTexture:imageFormat:)``. + /// + /// This method is run when saving images separately from the GLTF file. When images are embedded, ``_serializeImageToBytes(state:image:imageDict:imageFormat:lossyQuality:)`` runs instead. Note that these methods only run when this ``GLTFDocumentExtension`` is selected as the image exporter. + /// + @_documentation(visibility: public) + open func _saveImageAtPath(state: GLTFState?, image: Image?, filePath: String, imageFormat: String, lossyQuality: Double) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run after ``_saveImageAtPath(state:image:filePath:imageFormat:lossyQuality:)`` or ``_serializeImageToBytes(state:image:imageDict:imageFormat:lossyQuality:)``, and before ``_exportNode(state:gltfNode:json:node:)``. Note that this method only runs when this ``GLTFDocumentExtension`` is selected as the image exporter. + /// + /// This method can be used to set up the extensions for the texture JSON by editing `textureJson`. The extension must also be added as used extension with ``GLTFState/addUsedExtension(extensionName:required:)``, be sure to set `required` to `true` if you are not providing a fallback. + /// + @_documentation(visibility: public) + open func _serializeTextureJson(state: GLTFState?, textureJson: GDictionary, gltfTexture: GLTFTexture?, imageFormat: String) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run after ``_getSaveableImageFormats()`` and before ``_exportPost(state:)``. If this ``GLTFDocumentExtension`` is used for exporting images, this runs after ``_serializeTextureJson(state:textureJson:gltfTexture:imageFormat:)``. + /// + /// This method can be used to modify the final JSON of each node. Data should be primarily stored in `gltfNode` prior to serializing the JSON, but the original Godot `node` is also provided if available. The node may be null if not available, such as when exporting GLTF data not generated from a Godot scene. + /// + @_documentation(visibility: public) + open func _exportNode(state: GLTFState?, gltfNode: GLTFNode?, json: GDictionary, node: Node?) -> GodotError { + return .ok + } + + /// Part of the export process. This method is run last, after all other parts of the export process. + /// + /// This method can be used to modify the final JSON of the generated GLTF file. + /// + @_documentation(visibility: public) + open func _exportPost(state: GLTFState?) -> GodotError { + return .ok + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_convert_scene_node": + return _GLTFDocumentExtension_proxy_convert_scene_node + case "_export_node": + return _GLTFDocumentExtension_proxy_export_node + case "_export_post": + return _GLTFDocumentExtension_proxy_export_post + case "_export_preflight": + return _GLTFDocumentExtension_proxy_export_preflight + case "_export_preserialize": + return _GLTFDocumentExtension_proxy_export_preserialize + case "_generate_scene_node": + return _GLTFDocumentExtension_proxy_generate_scene_node + case "_get_image_file_extension": + return _GLTFDocumentExtension_proxy_get_image_file_extension + case "_get_saveable_image_formats": + return _GLTFDocumentExtension_proxy_get_saveable_image_formats + case "_get_supported_extensions": + return _GLTFDocumentExtension_proxy_get_supported_extensions + case "_import_node": + return _GLTFDocumentExtension_proxy_import_node + case "_import_post": + return _GLTFDocumentExtension_proxy_import_post + case "_import_post_parse": + return _GLTFDocumentExtension_proxy_import_post_parse + case "_import_preflight": + return _GLTFDocumentExtension_proxy_import_preflight + case "_parse_image_data": + return _GLTFDocumentExtension_proxy_parse_image_data + case "_parse_node_extensions": + return _GLTFDocumentExtension_proxy_parse_node_extensions + case "_parse_texture_json": + return _GLTFDocumentExtension_proxy_parse_texture_json + case "_save_image_at_path": + return _GLTFDocumentExtension_proxy_save_image_at_path + case "_serialize_image_to_bytes": + return _GLTFDocumentExtension_proxy_serialize_image_to_bytes + case "_serialize_texture_json": + return _GLTFDocumentExtension_proxy_serialize_texture_json + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _GLTFDocumentExtension_proxy_convert_scene_node (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + swiftObject._convertSceneNode (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, gltfNode: lookupLiveObject (handleAddress: resolved_1) as? GLTFNode ?? lookupObject (nativeHandle: resolved_1)!, sceneNode: lookupLiveObject (handleAddress: resolved_2) as? Node ?? lookupObject (nativeHandle: resolved_2)!) +} + +func _GLTFDocumentExtension_proxy_export_node (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + let resolved_3 = args [3]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._exportNode (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, gltfNode: lookupLiveObject (handleAddress: resolved_1) as? GLTFNode ?? lookupObject (nativeHandle: resolved_1)!, json: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), node: lookupLiveObject (handleAddress: resolved_3) as? Node ?? lookupObject (nativeHandle: resolved_3)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_export_post (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._exportPost (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_export_preflight (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._exportPreflight (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, root: lookupLiveObject (handleAddress: resolved_1) as? Node ?? lookupObject (nativeHandle: resolved_1)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_export_preserialize (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._exportPreserialize (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_generate_scene_node (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._generateSceneNode (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, gltfNode: lookupLiveObject (handleAddress: resolved_1) as? GLTFNode ?? lookupObject (nativeHandle: resolved_1)!, sceneParent: lookupLiveObject (handleAddress: resolved_2) as? Node ?? lookupObject (nativeHandle: resolved_2)!) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Node3D +} + +func _GLTFDocumentExtension_proxy_get_image_file_extension (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getImageFileExtension ()) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _GLTFDocumentExtension_proxy_get_saveable_image_formats (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSaveableImageFormats () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _GLTFDocumentExtension_proxy_get_supported_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSupportedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _GLTFDocumentExtension_proxy_import_node (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + let resolved_3 = args [3]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._importNode (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, gltfNode: lookupLiveObject (handleAddress: resolved_1) as? GLTFNode ?? lookupObject (nativeHandle: resolved_1)!, json: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), node: lookupLiveObject (handleAddress: resolved_3) as? Node ?? lookupObject (nativeHandle: resolved_3)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_import_post (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._importPost (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, root: lookupLiveObject (handleAddress: resolved_1) as? Node ?? lookupObject (nativeHandle: resolved_1)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_import_post_parse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._importPostParse (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_import_preflight (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._importPreflight (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, extensions: PackedStringArray (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_parse_image_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_3 = args [3]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._parseImageData (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, imageData: PackedByteArray (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), mimeType: GString.stringFromGStringPtr (ptr: args [2]!) ?? "", retImage: lookupLiveObject (handleAddress: resolved_3) as? Image ?? lookupObject (nativeHandle: resolved_3)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_parse_node_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._parseNodeExtensions (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, gltfNode: lookupLiveObject (handleAddress: resolved_1) as? GLTFNode ?? lookupObject (nativeHandle: resolved_1)!, extensions: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_parse_texture_json (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._parseTextureJson (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, textureJson: GDictionary (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), retGltfTexture: lookupLiveObject (handleAddress: resolved_2) as? GLTFTexture ?? lookupObject (nativeHandle: resolved_2)!) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_save_image_at_path (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._saveImageAtPath (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, image: lookupLiveObject (handleAddress: resolved_1) as? Image ?? lookupObject (nativeHandle: resolved_1)!, filePath: GString.stringFromGStringPtr (ptr: args [2]!) ?? "", imageFormat: GString.stringFromGStringPtr (ptr: args [3]!) ?? "", lossyQuality: args [4]!.assumingMemoryBound (to: Double.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _GLTFDocumentExtension_proxy_serialize_image_to_bytes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._serializeImageToBytes (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, image: lookupLiveObject (handleAddress: resolved_1) as? Image ?? lookupObject (nativeHandle: resolved_1)!, imageDict: GDictionary (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), imageFormat: GString.stringFromGStringPtr (ptr: args [3]!) ?? "", lossyQuality: args [4]!.assumingMemoryBound (to: Double.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedByteArray + ret.content = PackedByteArray.zero +} + +func _GLTFDocumentExtension_proxy_serialize_texture_json (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_2 = args [2]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._serializeTextureJson (state: lookupLiveObject (handleAddress: resolved_0) as? GLTFState ?? lookupObject (nativeHandle: resolved_0)!, textureJson: GDictionary (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), gltfTexture: lookupLiveObject (handleAddress: resolved_2) as? GLTFTexture ?? lookupObject (nativeHandle: resolved_2)!, imageFormat: GString.stringFromGStringPtr (ptr: args [3]!) ?? "") + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtensionConvertImporterMesh.swift b/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtensionConvertImporterMesh.swift new file mode 100644 index 000000000..97433b2de --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFDocumentExtensionConvertImporterMesh.swift @@ -0,0 +1,24 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class GLTFDocumentExtensionConvertImporterMesh: GLTFDocumentExtension { + override open class var godotClassName: StringName { "GLTFDocumentExtensionConvertImporterMesh" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFLight.swift b/Sources/SwiftGodot/Generated/Api/GLTFLight.swift new file mode 100644 index 000000000..1827d3880 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFLight.swift @@ -0,0 +1,520 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF light. +/// +/// Represents a light as defined by the `KHR_lights_punctual` GLTF extension. +open class GLTFLight: Resource { + override open class var godotClassName: StringName { "GLTFLight" } + + /* Properties */ + + /// The ``Color`` of the light. Defaults to white. A black color causes the light to have no effect. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier. + final public var intensity: Double { + get { + return get_intensity () + } + + set { + set_intensity (newValue) + } + + } + + /// The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's ``OmniLight3D``, ``SpotLight3D``, and ``DirectionalLight3D`` respectively. + final public var lightType: String { + get { + return get_light_type () + } + + set { + set_light_type (newValue) + } + + } + + /// The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. + final public var range: Double { + get { + return get_range () + } + + set { + set_range (newValue) + } + + } + + /// The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle. + /// + /// Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot ``SpotLight3D``, the ratio between the inner and outer cone angles is used to calculate the attenuation of the light. + /// + final public var innerConeAngle: Double { + get { + return get_inner_cone_angle () + } + + set { + set_inner_cone_angle (newValue) + } + + } + + /// The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle. + /// + /// At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot ``SpotLight3D``, the outer cone angle is used as the angle of the spotlight. + /// + final public var outerConeAngle: Double { + get { + return get_outer_cone_angle () + } + + set { + set_outer_cone_angle (newValue) + } + + } + + /* Methods */ + fileprivate static var method_from_node: GDExtensionMethodBindPtr = { + let methodName = StringName("from_node") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3907677874)! + } + + } + + }() + + /// Create a new GLTFLight instance from the given Godot ``Light3D`` node. + public static func fromNode(lightNode: Light3D?) -> GLTFLight? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: lightNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_node, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_node: GDExtensionMethodBindPtr = { + let methodName = StringName("to_node") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2040811672)! + } + + } + + }() + + /// Converts this GLTFLight instance into a Godot ``Light3D`` node. + public final func toNode() -> Light3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFLight.method_to_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("from_dictionary") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4057087208)! + } + + } + + }() + + /// Creates a new GLTFLight instance by parsing the given ``GDictionary``. + public static func fromDictionary(_ dictionary: GDictionary) -> GLTFLight? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: dictionary.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_dictionary, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("to_dictionary") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Serializes this GLTFLight instance into a ``GDictionary``. + public final func toDictionary() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFLight.method_to_dictionary, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200896285)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(GLTFLight.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_intensity") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFLight.method_get_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_intensity") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_intensity(_ intensity: Double) { + withUnsafePointer(to: intensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light_type") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light_type() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFLight.method_get_light_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_light_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light_type") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light_type(_ lightType: String) { + let lightType = GString(lightType) + withUnsafePointer(to: lightType.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_light_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_range") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_range() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFLight.method_get_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_range") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_range(_ range: Double) { + withUnsafePointer(to: range) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inner_cone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inner_cone_angle") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inner_cone_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFLight.method_get_inner_cone_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inner_cone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inner_cone_angle") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inner_cone_angle(_ innerConeAngle: Double) { + withUnsafePointer(to: innerConeAngle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_inner_cone_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outer_cone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outer_cone_angle") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outer_cone_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFLight.method_get_outer_cone_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outer_cone_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outer_cone_angle") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outer_cone_angle(_ outerConeAngle: Double) { + withUnsafePointer(to: outerConeAngle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_outer_cone_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_additional_data") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// + public final func getAdditionalData(extensionName: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_get_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_additional_data") + return withUnsafePointer(to: &GLTFLight.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// + public final func setAdditionalData(extensionName: StringName, additionalData: Variant?) { + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: additionalData.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFLight.method_set_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFMesh.swift b/Sources/SwiftGodot/Generated/Api/GLTFMesh.swift new file mode 100644 index 000000000..d3ff23aa7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFMesh.swift @@ -0,0 +1,318 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// GLTFMesh represents a GLTF mesh. +/// +/// GLTFMesh handles 3D mesh data imported from GLTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself. +open class GLTFMesh: Resource { + override open class var godotClassName: StringName { "GLTFMesh" } + + /* Properties */ + + /// The original name of the mesh. + final public var originalName: String { + get { + return get_original_name () + } + + set { + set_original_name (newValue) + } + + } + + /// The ``ImporterMesh`` object representing the mesh itself. + final public var mesh: ImporterMesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// An array of floats representing the blend weights of the mesh. + final public var blendWeights: PackedFloat32Array { + get { + return get_blend_weights () + } + + set { + set_blend_weights (newValue) + } + + } + + /// An array of Material objects representing the materials used in the mesh. + final public var instanceMaterials: ObjectCollection { + get { + return get_instance_materials () + } + + set { + set_instance_materials (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_name") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFMesh.method_get_original_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_name") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_name(_ originalName: String) { + let originalName = GString(originalName) + withUnsafePointer(to: originalName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_set_original_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3754628756)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> ImporterMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFMesh.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2255166972)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: ImporterMesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_weights") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2445143706)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_weights() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(GLTFMesh.method_get_blend_weights, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_blend_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_weights") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_weights(_ blendWeights: PackedFloat32Array) { + withUnsafePointer(to: blendWeights.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_set_blend_weights, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_instance_materials: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_materials") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_instance_materials() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFMesh.method_get_instance_materials, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_instance_materials: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_materials") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_instance_materials(_ instanceMaterials: ObjectCollection) { + withUnsafePointer(to: instanceMaterials.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_set_instance_materials, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_additional_data") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Gets additional arbitrary data in this ``GLTFMesh`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + /// + public final func getAdditionalData(extensionName: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_get_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_additional_data") + return withUnsafePointer(to: &GLTFMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets additional arbitrary data in this ``GLTFMesh`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The first argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + /// + public final func setAdditionalData(extensionName: StringName, additionalData: Variant?) { + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: additionalData.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFMesh.method_set_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFNode.swift b/Sources/SwiftGodot/Generated/Api/GLTFNode.swift new file mode 100644 index 000000000..098d1bd16 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFNode.swift @@ -0,0 +1,825 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// GLTF node class. +/// +/// Represents a GLTF node. GLTF nodes may have names, transforms, children (other GLTF nodes), and more specialized properties (represented by their own classes). +/// +/// GLTF nodes generally exist inside of ``GLTFState`` which represents all data of a GLTF file. Most of GLTFNode's properties are indices of other data in the GLTF file. You can extend a GLTF node with additional properties by using ``getAdditionalData(extensionName:)`` and ``setAdditionalData(extensionName:additionalData:)``. +/// +open class GLTFNode: Resource { + override open class var godotClassName: StringName { "GLTFNode" } + + /* Properties */ + + /// The original name of the node. + final public var originalName: String { + get { + return get_original_name () + } + + set { + set_original_name (newValue) + } + + } + + /// The index of the parent node in the ``GLTFState``. If -1, this node is a root node. + final public var parent: Int32 { + get { + return get_parent () + } + + set { + set_parent (newValue) + } + + } + + /// How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated. + final public var height: Int32 { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. + final public var xform: Transform3D { + get { + return get_xform () + } + + set { + set_xform (newValue) + } + + } + + /// If this GLTF node is a mesh, the index of the ``GLTFMesh`` in the ``GLTFState`` that describes the mesh's properties. If -1, this node is not a mesh. + final public var mesh: Int32 { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// If this GLTF node is a camera, the index of the ``GLTFCamera`` in the ``GLTFState`` that describes the camera's properties. If -1, this node is not a camera. + final public var camera: Int32 { + get { + return get_camera () + } + + set { + set_camera (newValue) + } + + } + + /// If this GLTF node has a skin, the index of the ``GLTFSkin`` in the ``GLTFState`` that describes the skin's properties. If -1, this node does not have a skin. + final public var skin: Int32 { + get { + return get_skin () + } + + set { + set_skin (newValue) + } + + } + + /// If this GLTF node has a skeleton, the index of the ``GLTFSkeleton`` in the ``GLTFState`` that describes the skeleton's properties. If -1, this node does not have a skeleton. + final public var skeleton: Int32 { + get { + return get_skeleton () + } + + set { + set_skeleton (newValue) + } + + } + + /// The position of the GLTF node relative to its parent. + final public var position: Vector3 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// The rotation of the GLTF node relative to its parent. + final public var rotation: Quaternion { + get { + return get_rotation () + } + + set { + set_rotation (newValue) + } + + } + + /// The scale of the GLTF node relative to its parent. + final public var scale: Vector3 { + get { + return get_scale () + } + + set { + set_scale (newValue) + } + + } + + /// The indices of the child nodes in the ``GLTFState``. If this GLTF node has no children, this will be an empty array. + final public var children: PackedInt32Array { + get { + return get_children () + } + + set { + set_children (newValue) + } + + } + + /// If this GLTF node is a light, the index of the ``GLTFLight`` in the ``GLTFState`` that describes the light's properties. If -1, this node is not a light. + final public var light: Int32 { + get { + return get_light () + } + + set { + set_light (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_name") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFNode.method_get_original_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_original_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_name") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_name(_ originalName: String) { + let originalName = GString(originalName) + withUnsafePointer(to: originalName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_original_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_parent() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_parent, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parent") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_parent(_ parent: Int32) { + withUnsafePointer(to: parent) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_parent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Int32) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_xform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_xform") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4183770049)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_xform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(GLTFNode.method_get_xform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_xform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_xform") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_xform(_ xform: Transform3D) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_xform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Int32) { + withUnsafePointer(to: mesh) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_camera: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_camera() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_camera, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_camera: GDExtensionMethodBindPtr = { + let methodName = StringName("set_camera") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_camera(_ camera: Int32) { + withUnsafePointer(to: camera) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_camera, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skin() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_skin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skin") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skin(_ skin: Int32) { + withUnsafePointer(to: skin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_skin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton(_ skeleton: Int32) { + withUnsafePointer(to: skeleton) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFNode.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2916281908)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation() -> Quaternion { + var _result: Quaternion = Quaternion () + gi.object_method_bind_ptrcall(GLTFNode.method_get_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1727505552)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation(_ rotation: Quaternion) { + withUnsafePointer(to: rotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFNode.method_get_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale(_ scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_children: GDExtensionMethodBindPtr = { + let methodName = StringName("get_children") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_children() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFNode.method_get_children, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_children: GDExtensionMethodBindPtr = { + let methodName = StringName("set_children") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_children(_ children: PackedInt32Array) { + withUnsafePointer(to: children.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_children, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFNode.method_get_light, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_light: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light(_ light: Int32) { + withUnsafePointer(to: light) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_light, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_additional_data") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Gets additional arbitrary data in this ``GLTFNode`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + /// + public final func getAdditionalData(extensionName: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_get_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_additional_data") + return withUnsafePointer(to: &GLTFNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets additional arbitrary data in this ``GLTFNode`` instance. This can be used to keep per-node state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The first argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + /// + public final func setAdditionalData(extensionName: StringName, additionalData: Variant?) { + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: additionalData.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFNode.method_set_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFPhysicsBody.swift b/Sources/SwiftGodot/Generated/Api/GLTFPhysicsBody.swift new file mode 100644 index 000000000..992236983 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFPhysicsBody.swift @@ -0,0 +1,576 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF physics body. +/// +/// Represents a physics body as an intermediary between the `OMI_physics_body` GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +open class GLTFPhysicsBody: Resource { + override open class var godotClassName: StringName { "GLTFPhysicsBody" } + + /* Properties */ + + /// The type of the body. When importing, this controls what type of ``CollisionObject3D`` node Godot should generate. Valid values are "static", "animatable", "character", "rigid", "vehicle", and "trigger". When exporting, this will be squashed down to one of "static", "kinematic", or "dynamic" motion types, or the "trigger" property. + final public var bodyType: String { + get { + return get_body_type () + } + + set { + set_body_type (newValue) + } + + } + + /// The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle". + final public var mass: Double { + get { + return get_mass () + } + + set { + set_mass (newValue) + } + + } + + /// The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle". + final public var linearVelocity: Vector3 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle". + final public var angularVelocity: Vector3 { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// The center of mass of the body, in meters. This is in local space relative to the body. By default, the center of the mass is the body's origin. + final public var centerOfMass: Vector3 { + get { + return get_center_of_mass () + } + + set { + set_center_of_mass (newValue) + } + + } + + /// The inertia strength of the physics body, in kilogram meter squared (kg⋅m²). This represents the inertia around the principle axes, the diagonal of the inertia tensor matrix. This is only used when the body type is "rigid" or "vehicle". + /// + /// When converted to a Godot ``RigidBody3D`` node, if this value is zero, then the inertia will be calculated automatically. + /// + final public var inertiaDiagonal: Vector3 { + get { + return get_inertia_diagonal () + } + + set { + set_inertia_diagonal (newValue) + } + + } + + /// The inertia orientation of the physics body. This defines the rotation of the inertia's principle axes relative to the object's local axes. This is only used when the body type is "rigid" or "vehicle" and ``inertiaDiagonal`` is set to a non-zero value. + final public var inertiaOrientation: Quaternion { + get { + return get_inertia_orientation () + } + + set { + set_inertia_orientation (newValue) + } + + } + + /// The inertia tensor of the physics body, in kilogram meter squared (kg⋅m²). This is only used when the body type is "rigid" or "vehicle". + /// + /// When converted to a Godot ``RigidBody3D`` node, if this value is zero, then the inertia will be calculated automatically. + /// + final public var inertiaTensor: Basis { + get { + return get_inertia_tensor () + } + + set { + set_inertia_tensor (newValue) + } + + } + + /* Methods */ + fileprivate static var method_from_node: GDExtensionMethodBindPtr = { + let methodName = StringName("from_node") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 420544174)! + } + + } + + }() + + /// Creates a new GLTFPhysicsBody instance from the given Godot ``CollisionObject3D`` node. + public static func fromNode(bodyNode: CollisionObject3D?) -> GLTFPhysicsBody? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: bodyNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_node, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_node: GDExtensionMethodBindPtr = { + let methodName = StringName("to_node") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3224013656)! + } + + } + + }() + + /// Converts this GLTFPhysicsBody instance into a Godot ``CollisionObject3D`` node. + public final func toNode() -> CollisionObject3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_to_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("from_dictionary") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1177544336)! + } + + } + + }() + + /// Creates a new GLTFPhysicsBody instance by parsing the given ``GDictionary`` in the `OMI_physics_body` GLTF extension format. + public static func fromDictionary(_ dictionary: GDictionary) -> GLTFPhysicsBody? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: dictionary.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_dictionary, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("to_dictionary") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Serializes this GLTFPhysicsBody instance into a ``GDictionary``. It will be in the format expected by the `OMI_physics_body` GLTF extension. + public final func toDictionary() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_to_dictionary, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_body_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_body_type") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_body_type() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_body_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_body_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_body_type") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_body_type(_ bodyType: String) { + let bodyType = GString(bodyType) + withUnsafePointer(to: bodyType.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_body_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mass") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mass") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mass(_ mass: Double) { + withUnsafePointer(to: mass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ linearVelocity: Vector3) { + withUnsafePointer(to: linearVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ angularVelocity: Vector3) { + withUnsafePointer(to: angularVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_center_of_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_of_mass") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_of_mass(_ centerOfMass: Vector3) { + withUnsafePointer(to: centerOfMass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_center_of_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inertia_diagonal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inertia_diagonal") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inertia_diagonal() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_inertia_diagonal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inertia_diagonal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inertia_diagonal") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inertia_diagonal(_ inertiaDiagonal: Vector3) { + withUnsafePointer(to: inertiaDiagonal) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_inertia_diagonal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inertia_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inertia_orientation") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1222331677)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inertia_orientation() -> Quaternion { + var _result: Quaternion = Quaternion () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_inertia_orientation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inertia_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inertia_orientation") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1727505552)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inertia_orientation(_ inertiaOrientation: Quaternion) { + withUnsafePointer(to: inertiaOrientation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_inertia_orientation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inertia_tensor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inertia_tensor") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inertia_tensor() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_get_inertia_tensor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inertia_tensor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inertia_tensor") + return withUnsafePointer(to: &GLTFPhysicsBody.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1055510324)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inertia_tensor(_ inertiaTensor: Basis) { + withUnsafePointer(to: inertiaTensor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsBody.method_set_inertia_tensor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFPhysicsShape.swift b/Sources/SwiftGodot/Generated/Api/GLTFPhysicsShape.swift new file mode 100644 index 000000000..c264b8d41 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFPhysicsShape.swift @@ -0,0 +1,580 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF physics shape. +/// +/// Represents a physics shape as defined by the `OMI_physics_shape` or `OMI_collider` GLTF extensions. This class is an intermediary between the GLTF data and Godot's nodes, and it's abstracted in a way that allows adding support for different GLTF physics extensions in the future. +open class GLTFPhysicsShape: Resource { + override open class var godotClassName: StringName { "GLTFPhysicsShape" } + + /* Properties */ + + /// The type of shape this shape represents. Valid values are "box", "capsule", "cylinder", "sphere", "hull", and "trimesh". + final public var shapeType: String { + get { + return get_shape_type () + } + + set { + set_shape_type (newValue) + } + + } + + /// The size of the shape, in meters. This is only used when the shape type is "box", and it represents the "diameter" of the box. This value should not be negative. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The radius of the shape, in meters. This is only used when the shape type is "capsule", "cylinder", or "sphere". This value should not be negative. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The height of the shape, in meters. This is only used when the shape type is "capsule" or "cylinder". This value should not be negative, and for "capsule" it should be at least twice the radius. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// If `true`, indicates that this shape is a trigger. For Godot, this means that the shape should be a child of an Area3D node. + /// + /// This is the only variable not used in the ``toNode(cacheShapes:)`` method, it's intended to be used alongside when deciding where to add the generated node as a child. + /// + final public var isTrigger: Bool { + get { + return get_is_trigger () + } + + set { + set_is_trigger (newValue) + } + + } + + /// The index of the shape's mesh in the GLTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). + final public var meshIndex: Int32 { + get { + return get_mesh_index () + } + + set { + set_mesh_index (newValue) + } + + } + + /// The ``ImporterMesh`` resource of the shape. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). + final public var importerMesh: ImporterMesh? { + get { + return get_importer_mesh () + } + + set { + set_importer_mesh (newValue) + } + + } + + /* Methods */ + fileprivate static var method_from_node: GDExtensionMethodBindPtr = { + let methodName = StringName("from_node") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3613751275)! + } + + } + + }() + + /// Creates a new GLTFPhysicsShape instance from the given Godot ``CollisionShape3D`` node. + public static func fromNode(shapeNode: CollisionShape3D?) -> GLTFPhysicsShape? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: shapeNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_node, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_node: GDExtensionMethodBindPtr = { + let methodName = StringName("to_node") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 563689933)! + } + + } + + }() + + /// Converts this GLTFPhysicsShape instance into a Godot ``CollisionShape3D`` node. + public final func toNode(cacheShapes: Bool = false) -> CollisionShape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: cacheShapes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_to_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("from_resource") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3845569786)! + } + + } + + }() + + /// Creates a new GLTFPhysicsShape instance from the given Godot ``Shape3D`` resource. + public static func fromResource(shapeResource: Shape3D?) -> GLTFPhysicsShape? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: shapeResource?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_resource, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("to_resource") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1913542110)! + } + + } + + }() + + /// Converts this GLTFPhysicsShape instance into a Godot ``Shape3D`` resource. + public final func toResource(cacheShapes: Bool = false) -> Shape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: cacheShapes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_to_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("from_dictionary") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2390691823)! + } + + } + + }() + + /// Creates a new GLTFPhysicsShape instance by parsing the given ``GDictionary``. + public static func fromDictionary(_ dictionary: GDictionary) -> GLTFPhysicsShape? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: dictionary.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_from_dictionary, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_to_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("to_dictionary") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Serializes this GLTFPhysicsShape instance into a ``GDictionary`` in the format defined by `OMI_physics_shape`. + public final func toDictionary() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_to_dictionary, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_shape_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_type") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape_type() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_shape_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_shape_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape_type") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape_type(_ shapeType: String) { + let shapeType = GString(shapeType) + withUnsafePointer(to: shapeType.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_shape_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_is_trigger: GDExtensionMethodBindPtr = { + let methodName = StringName("get_is_trigger") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_is_trigger() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_is_trigger, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_is_trigger: GDExtensionMethodBindPtr = { + let methodName = StringName("set_is_trigger") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_is_trigger(_ isTrigger: Bool) { + withUnsafePointer(to: isTrigger) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_is_trigger, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh_index") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_mesh_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mesh_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh_index") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh_index(_ meshIndex: Int32) { + withUnsafePointer(to: meshIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_mesh_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_importer_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_importer_mesh") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3161779525)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_importer_mesh() -> ImporterMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_get_importer_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_importer_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_importer_mesh") + return withUnsafePointer(to: &GLTFPhysicsShape.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2255166972)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_importer_mesh(_ importerMesh: ImporterMesh?) { + withUnsafePointer(to: importerMesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFPhysicsShape.method_set_importer_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFSkeleton.swift b/Sources/SwiftGodot/Generated/Api/GLTFSkeleton.swift new file mode 100644 index 000000000..cea77933c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFSkeleton.swift @@ -0,0 +1,315 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class GLTFSkeleton: Resource { + override open class var godotClassName: StringName { "GLTFSkeleton" } + + /* Properties */ + + final public var joints: PackedInt32Array { + get { + return get_joints () + } + + set { + set_joints (newValue) + } + + } + + final public var roots: PackedInt32Array { + get { + return get_roots () + } + + set { + set_roots (newValue) + } + + } + + final public var uniqueNames: VariantCollection { + get { + return get_unique_names () + } + + set { + set_unique_names (newValue) + } + + } + + final public var godotBoneNode: GDictionary { + get { + return get_godot_bone_node () + } + + set { + set_godot_bone_node (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joints") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joints() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_joints, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joints") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joints(_ joints: PackedInt32Array) { + withUnsafePointer(to: joints.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkeleton.method_set_joints, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_roots: GDExtensionMethodBindPtr = { + let methodName = StringName("get_roots") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_roots() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_roots, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_roots: GDExtensionMethodBindPtr = { + let methodName = StringName("set_roots") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_roots(_ roots: PackedInt32Array) { + withUnsafePointer(to: roots.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkeleton.method_set_roots, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_godot_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_godot_skeleton") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1814733083)! + } + + } + + }() + + /// + public final func getGodotSkeleton() -> Skeleton3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_godot_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_unique_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_names") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_unique_names() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_unique_names, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_unique_names: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unique_names") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_unique_names(_ uniqueNames: VariantCollection) { + withUnsafePointer(to: uniqueNames.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkeleton.method_set_unique_names, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_godot_bone_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_godot_bone_node") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + @inline(__always) + /// Returns a ``GDictionary`` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. + fileprivate final func get_godot_bone_node() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_godot_bone_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_godot_bone_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_godot_bone_node") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + /// Sets a ``GDictionary`` that maps skeleton bone indices to the indices of GLTF nodes. This property is unused during import, and only set during export. In a GLTF file, a bone is a node, so Godot converts skeleton bones to GLTF nodes. + fileprivate final func set_godot_bone_node(_ godotBoneNode: GDictionary) { + withUnsafePointer(to: godotBoneNode.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkeleton.method_set_godot_bone_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone_attachment_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_attachment_count") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// + public final func getBoneAttachmentCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_bone_attachment_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_bone_attachment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_attachment") + return withUnsafePointer(to: &GLTFSkeleton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 945440495)! + } + + } + + }() + + /// + public final func getBoneAttachment(idx: Int32) -> BoneAttachment3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkeleton.method_get_bone_attachment, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFSkin.swift b/Sources/SwiftGodot/Generated/Api/GLTFSkin.swift new file mode 100644 index 000000000..5d8f2497e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFSkin.swift @@ -0,0 +1,584 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class GLTFSkin: Resource { + override open class var godotClassName: StringName { "GLTFSkin" } + + /* Properties */ + + final public var skinRoot: Int32 { + get { + return get_skin_root () + } + + set { + set_skin_root (newValue) + } + + } + + final public var jointsOriginal: PackedInt32Array { + get { + return get_joints_original () + } + + set { + set_joints_original (newValue) + } + + } + + final public var inverseBinds: VariantCollection { + get { + return get_inverse_binds () + } + + set { + set_inverse_binds (newValue) + } + + } + + final public var joints: PackedInt32Array { + get { + return get_joints () + } + + set { + set_joints (newValue) + } + + } + + final public var nonJoints: PackedInt32Array { + get { + return get_non_joints () + } + + set { + set_non_joints (newValue) + } + + } + + final public var roots: PackedInt32Array { + get { + return get_roots () + } + + set { + set_roots (newValue) + } + + } + + final public var skeleton: Int32 { + get { + return get_skeleton () + } + + set { + set_skeleton (newValue) + } + + } + + final public var jointIToBoneI: GDictionary { + get { + return get_joint_i_to_bone_i () + } + + set { + set_joint_i_to_bone_i (newValue) + } + + } + + final public var jointIToName: GDictionary { + get { + return get_joint_i_to_name () + } + + set { + set_joint_i_to_name (newValue) + } + + } + + final public var godotSkin: Skin? { + get { + return get_godot_skin () + } + + set { + set_godot_skin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_skin_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin_root") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skin_root() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFSkin.method_get_skin_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_skin_root: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skin_root") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skin_root(_ skinRoot: Int32) { + withUnsafePointer(to: skinRoot) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_skin_root, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joints_original: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joints_original") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joints_original() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_joints_original, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_joints_original: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joints_original") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joints_original(_ jointsOriginal: PackedInt32Array) { + withUnsafePointer(to: jointsOriginal.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_joints_original, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inverse_binds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_binds") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_inverse_binds() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFSkin.method_get_inverse_binds, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_inverse_binds: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inverse_binds") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_inverse_binds(_ inverseBinds: VariantCollection) { + withUnsafePointer(to: inverseBinds.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_inverse_binds, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joints") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joints() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_joints, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joints") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joints(_ joints: PackedInt32Array) { + withUnsafePointer(to: joints.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_joints, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_non_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("get_non_joints") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_non_joints() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_non_joints, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_non_joints: GDExtensionMethodBindPtr = { + let methodName = StringName("set_non_joints") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_non_joints(_ nonJoints: PackedInt32Array) { + withUnsafePointer(to: nonJoints.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_non_joints, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_roots: GDExtensionMethodBindPtr = { + let methodName = StringName("get_roots") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_roots() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_roots, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_roots: GDExtensionMethodBindPtr = { + let methodName = StringName("set_roots") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_roots(_ roots: PackedInt32Array) { + withUnsafePointer(to: roots.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_roots, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFSkin.method_get_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton(_ skeleton: Int32) { + withUnsafePointer(to: skeleton) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_i_to_bone_i: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_i_to_bone_i") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_joint_i_to_bone_i() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_joint_i_to_bone_i, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_joint_i_to_bone_i: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_i_to_bone_i") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_joint_i_to_bone_i(_ jointIToBoneI: GDictionary) { + withUnsafePointer(to: jointIToBoneI.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_joint_i_to_bone_i, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_i_to_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_i_to_name") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_joint_i_to_name() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFSkin.method_get_joint_i_to_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_joint_i_to_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_i_to_name") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_joint_i_to_name(_ jointIToName: GDictionary) { + withUnsafePointer(to: jointIToName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_joint_i_to_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_godot_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_godot_skin") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1032037385)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_godot_skin() -> Skin? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFSkin.method_get_godot_skin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_godot_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_godot_skin") + return withUnsafePointer(to: &GLTFSkin.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3971435618)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_godot_skin(_ godotSkin: Skin?) { + withUnsafePointer(to: godotSkin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSkin.method_set_godot_skin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFSpecGloss.swift b/Sources/SwiftGodot/Generated/Api/GLTFSpecGloss.swift new file mode 100644 index 000000000..0e8bd84bc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFSpecGloss.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Archived GLTF extension for specular/glossy materials. +/// +/// KHR_materials_pbrSpecularGlossiness is an archived GLTF extension. This means that it is deprecated and not recommended for new files. However, it is still supported for loading old files. +open class GLTFSpecGloss: Resource { + override open class var godotClassName: StringName { "GLTFSpecGloss" } + + /* Properties */ + + /// The diffuse texture. + final public var diffuseImg: Image? { + get { + return get_diffuse_img () + } + + set { + set_diffuse_img (newValue) + } + + } + + /// The reflected diffuse factor of the material. + final public var diffuseFactor: Color { + get { + return get_diffuse_factor () + } + + set { + set_diffuse_factor (newValue) + } + + } + + /// The glossiness or smoothness of the material. + final public var glossFactor: Double { + get { + return get_gloss_factor () + } + + set { + set_gloss_factor (newValue) + } + + } + + /// The specular RGB color of the material. The alpha channel is unused. + final public var specularFactor: Color { + get { + return get_specular_factor () + } + + set { + set_specular_factor (newValue) + } + + } + + /// The specular-glossiness texture. + final public var specGlossImg: Image? { + get { + return get_spec_gloss_img () + } + + set { + set_spec_gloss_img (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_diffuse_img: GDExtensionMethodBindPtr = { + let methodName = StringName("get_diffuse_img") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 564927088)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_diffuse_img() -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_get_diffuse_img, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_diffuse_img: GDExtensionMethodBindPtr = { + let methodName = StringName("set_diffuse_img") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_diffuse_img(_ diffuseImg: Image?) { + withUnsafePointer(to: diffuseImg?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_set_diffuse_img, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_diffuse_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_diffuse_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200896285)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_diffuse_factor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_get_diffuse_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_diffuse_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_diffuse_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_diffuse_factor(_ diffuseFactor: Color) { + withUnsafePointer(to: diffuseFactor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_set_diffuse_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gloss_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gloss_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gloss_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_get_gloss_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gloss_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gloss_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gloss_factor(_ glossFactor: Double) { + withUnsafePointer(to: glossFactor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_set_gloss_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_specular_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_specular_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200896285)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_specular_factor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_get_specular_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_specular_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_specular_factor") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_specular_factor(_ specularFactor: Color) { + withUnsafePointer(to: specularFactor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_set_specular_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spec_gloss_img: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spec_gloss_img") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 564927088)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spec_gloss_img() -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_get_spec_gloss_img, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_spec_gloss_img: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spec_gloss_img") + return withUnsafePointer(to: &GLTFSpecGloss.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spec_gloss_img(_ specGlossImg: Image?) { + withUnsafePointer(to: specGlossImg?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFSpecGloss.method_set_spec_gloss_img, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFState.swift b/Sources/SwiftGodot/Generated/Api/GLTFState.swift new file mode 100644 index 000000000..c431e0d86 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFState.swift @@ -0,0 +1,1974 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents all data of a GLTF file. +/// +/// Contains all nodes and resources of a GLTF file. This is used by ``GLTFDocument`` as data storage, which allows ``GLTFDocument`` and all ``GLTFDocumentExtension`` classes to remain stateless. +/// +/// GLTFState can be populated by ``GLTFDocument`` reading a file or by converting a Godot scene. Then the data can either be used to create a Godot scene or save to a GLTF file. The code that converts to/from a Godot scene can be intercepted at arbitrary points by ``GLTFDocumentExtension`` classes. This allows for custom data to be stored in the GLTF file or for custom data to be converted to/from Godot nodes. +/// +open class GLTFState: Resource { + override open class var godotClassName: StringName { "GLTFState" } + /* Constants */ + /// Discards all embedded textures and uses untextured materials. + public static let handleBinaryDiscardTextures = 0 + /// Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime. + public static let handleBinaryExtractTextures = 1 + /// Embeds textures VRAM compressed with Basis Universal into the generated scene. + public static let handleBinaryEmbedAsBasisu = 2 + /// Embeds textures compressed losslessly into the generated scene, matching old behavior. + public static let handleBinaryEmbedAsUncompressed = 3 + + /* Properties */ + + /// The original raw JSON document corresponding to this GLTFState. + final public var json: GDictionary { + get { + return get_json () + } + + set { + set_json (newValue) + } + + } + + final public var majorVersion: Int32 { + get { + return get_major_version () + } + + set { + set_major_version (newValue) + } + + } + + final public var minorVersion: Int32 { + get { + return get_minor_version () + } + + set { + set_minor_version (newValue) + } + + } + + /// The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. + final public var copyright: String { + get { + return get_copyright () + } + + set { + set_copyright (newValue) + } + + } + + /// The binary buffer attached to a .glb file. + final public var glbData: PackedByteArray { + get { + return get_glb_data () + } + + set { + set_glb_data (newValue) + } + + } + + final public var useNamedSkinBinds: Bool { + get { + return get_use_named_skin_binds () + } + + set { + set_use_named_skin_binds (newValue) + } + + } + + final public var nodes: ObjectCollection { + get { + return get_nodes () + } + + set { + set_nodes (newValue) + } + + } + + final public var buffers: VariantCollection { + get { + return get_buffers () + } + + set { + set_buffers (newValue) + } + + } + + final public var bufferViews: ObjectCollection { + get { + return get_buffer_views () + } + + set { + set_buffer_views (newValue) + } + + } + + final public var accessors: ObjectCollection { + get { + return get_accessors () + } + + set { + set_accessors (newValue) + } + + } + + final public var meshes: ObjectCollection { + get { + return get_meshes () + } + + set { + set_meshes (newValue) + } + + } + + final public var materials: ObjectCollection { + get { + return get_materials () + } + + set { + set_materials (newValue) + } + + } + + /// The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. + final public var sceneName: String { + get { + return get_scene_name () + } + + set { + set_scene_name (newValue) + } + + } + + /// The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. + final public var basePath: String { + get { + return get_base_path () + } + + set { + set_base_path (newValue) + } + + } + + /// The file name associated with this GLTF data. If it ends with `.gltf`, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. + final public var filename: String { + get { + return get_filename () + } + + set { + set_filename (newValue) + } + + } + + /// The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. + final public var rootNodes: PackedInt32Array { + get { + return get_root_nodes () + } + + set { + set_root_nodes (newValue) + } + + } + + final public var textures: ObjectCollection { + get { + return get_textures () + } + + set { + set_textures (newValue) + } + + } + + final public var textureSamplers: ObjectCollection { + get { + return get_texture_samplers () + } + + set { + set_texture_samplers (newValue) + } + + } + + final public var images: ObjectCollection { + get { + return get_images () + } + + set { + set_images (newValue) + } + + } + + final public var skins: ObjectCollection { + get { + return get_skins () + } + + set { + set_skins (newValue) + } + + } + + final public var cameras: ObjectCollection { + get { + return get_cameras () + } + + set { + set_cameras (newValue) + } + + } + + final public var lights: ObjectCollection { + get { + return get_lights () + } + + set { + set_lights (newValue) + } + + } + + final public var uniqueNames: VariantCollection { + get { + return get_unique_names () + } + + set { + set_unique_names (newValue) + } + + } + + final public var uniqueAnimationNames: VariantCollection { + get { + return get_unique_animation_names () + } + + set { + set_unique_animation_names (newValue) + } + + } + + final public var skeletons: ObjectCollection { + get { + return get_skeletons () + } + + set { + set_skeletons (newValue) + } + + } + + final public var createAnimations: Bool { + get { + return get_create_animations () + } + + set { + set_create_animations (newValue) + } + + } + + /// True to force all GLTFNodes in the document to be bones of a single Skeleton3D godot node. + final public var importAsSkeletonBones: Bool { + get { + return get_import_as_skeleton_bones () + } + + set { + set_import_as_skeleton_bones (newValue) + } + + } + + final public var animations: ObjectCollection { + get { + return get_animations () + } + + set { + set_animations (newValue) + } + + } + + final public var handleBinaryImage: Int32 { + get { + return get_handle_binary_image () + } + + set { + set_handle_binary_image (newValue) + } + + } + + /// The baking fps of the animation for either import or export. + final public var bakeFps: Double { + get { + return get_bake_fps () + } + + set { + set_bake_fps (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_used_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("add_used_extension") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Appends an extension to the list of extensions used by this GLTF file during serialization. If `required` is true, the extension will also be added to the list of required extensions. Do not run this in ``GLTFDocumentExtension/_exportPost(state:)``, as that stage is too late to add extensions. The final list is sorted alphabetically. + public final func addUsedExtension(extensionName: String, required: Bool) { + let extensionName = GString(extensionName) + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: required) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_add_used_extension, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_append_data_to_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("append_data_to_buffers") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1460416665)! + } + + } + + }() + + /// Appends the given byte array data to the buffers and creates a ``GLTFBufferView`` for it. The index of the destination ``GLTFBufferView`` is returned. If `deduplication` is true, the buffers will first be searched for duplicate data, otherwise new bytes will always be appended. + public final func appendDataToBuffers(data: PackedByteArray, deduplication: Bool) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: deduplication) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_append_data_to_buffers, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_json: GDExtensionMethodBindPtr = { + let methodName = StringName("get_json") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_json() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(GLTFState.method_get_json, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_json: GDExtensionMethodBindPtr = { + let methodName = StringName("set_json") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_json(_ json: GDictionary) { + withUnsafePointer(to: json.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_json, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_major_version: GDExtensionMethodBindPtr = { + let methodName = StringName("get_major_version") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_major_version() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_major_version, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_major_version: GDExtensionMethodBindPtr = { + let methodName = StringName("set_major_version") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_major_version(_ majorVersion: Int32) { + withUnsafePointer(to: majorVersion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_major_version, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_minor_version: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minor_version") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_minor_version() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_minor_version, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_minor_version: GDExtensionMethodBindPtr = { + let methodName = StringName("set_minor_version") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_minor_version(_ minorVersion: Int32) { + withUnsafePointer(to: minorVersion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_minor_version, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_copyright: GDExtensionMethodBindPtr = { + let methodName = StringName("get_copyright") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_copyright() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFState.method_get_copyright, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_copyright: GDExtensionMethodBindPtr = { + let methodName = StringName("set_copyright") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_copyright(_ copyright: String) { + let copyright = GString(copyright) + withUnsafePointer(to: copyright.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_copyright, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_glb_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_glb_data") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_glb_data() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(GLTFState.method_get_glb_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_glb_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_glb_data") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2971499966)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_glb_data(_ glbData: PackedByteArray) { + withUnsafePointer(to: glbData.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_glb_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_named_skin_binds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_named_skin_binds") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_named_skin_binds() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFState.method_get_use_named_skin_binds, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_named_skin_binds: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_named_skin_binds") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_named_skin_binds(_ useNamedSkinBinds: Bool) { + withUnsafePointer(to: useNamedSkinBinds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_use_named_skin_binds, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_nodes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFNode``s in the GLTF file. These are the nodes that ``GLTFNode/children`` and ``rootNodes`` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes. + fileprivate final func get_nodes() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_nodes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_nodes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFNode``s in the state. These are the nodes that ``GLTFNode/children`` and ``rootNodes`` refer to. Some of the nodes set here may not be generated in the Godot scene, or may generate multiple Godot scene nodes. + fileprivate final func set_nodes(_ nodes: ObjectCollection) { + withUnsafePointer(to: nodes.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_nodes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffers") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffers() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_buffers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffers") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffers(_ buffers: VariantCollection) { + withUnsafePointer(to: buffers.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_buffers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_buffer_views: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer_views") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_buffer_views() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_buffer_views, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_buffer_views: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer_views") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_buffer_views(_ bufferViews: ObjectCollection) { + withUnsafePointer(to: bufferViews.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_buffer_views, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_accessors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_accessors") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_accessors() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_accessors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_accessors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_accessors") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_accessors(_ accessors: ObjectCollection) { + withUnsafePointer(to: accessors.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_accessors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_meshes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFMesh``es in the GLTF file. These are the meshes that the ``GLTFNode/mesh`` index refers to. + fileprivate final func get_meshes() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_meshes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_meshes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFMesh``es in the state. These are the meshes that the ``GLTFNode/mesh`` index refers to. + fileprivate final func set_meshes(_ meshes: ObjectCollection) { + withUnsafePointer(to: meshes.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_meshes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation_players_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_players_count") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the number of ``AnimationPlayer`` nodes in this ``GLTFState``. These nodes are only used during the export process when converting Godot ``AnimationPlayer`` nodes to GLTF animations. + public final func getAnimationPlayersCount(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_get_animation_players_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_animation_player: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_player") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 925043400)! + } + + } + + }() + + /// Returns the ``AnimationPlayer`` node with the given index. These nodes are only used during the export process when converting Godot ``AnimationPlayer`` nodes to GLTF animations. + public final func getAnimationPlayer(idx: Int32) -> AnimationPlayer? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_get_animation_player, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_materials: GDExtensionMethodBindPtr = { + let methodName = StringName("get_materials") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_materials() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_materials, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_materials: GDExtensionMethodBindPtr = { + let methodName = StringName("set_materials") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_materials(_ materials: ObjectCollection) { + withUnsafePointer(to: materials.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_materials, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene_name") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scene_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFState.method_get_scene_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_scene_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scene_name") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scene_name(_ sceneName: String) { + let sceneName = GString(sceneName) + withUnsafePointer(to: sceneName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_scene_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_base_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_path") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_base_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFState.method_get_base_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_base_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_base_path") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_base_path(_ basePath: String) { + let basePath = GString(basePath) + withUnsafePointer(to: basePath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_base_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filename: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filename") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filename() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GLTFState.method_get_filename, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_filename: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filename") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filename(_ filename: String) { + let filename = GString(filename) + withUnsafePointer(to: filename.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_filename, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_nodes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_nodes() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(GLTFState.method_get_root_nodes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_root_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_nodes") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_nodes(_ rootNodes: PackedInt32Array) { + withUnsafePointer(to: rootNodes.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_root_nodes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("get_textures") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_textures() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_textures, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("set_textures") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_textures(_ textures: ObjectCollection) { + withUnsafePointer(to: textures.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_textures, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_samplers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_samplers") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Retrieves the array of texture samplers that are used by the textures contained in the GLTF. + fileprivate final func get_texture_samplers() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_texture_samplers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_texture_samplers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_samplers") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the array of texture samplers that are used by the textures contained in the GLTF. + fileprivate final func set_texture_samplers(_ textureSamplers: ObjectCollection) { + withUnsafePointer(to: textureSamplers.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_texture_samplers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_images: GDExtensionMethodBindPtr = { + let methodName = StringName("get_images") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Gets the images of the GLTF file as an array of ``Texture2D``s. These are the images that the ``GLTFTexture/srcImage`` index refers to. + fileprivate final func get_images() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_images, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_images: GDExtensionMethodBindPtr = { + let methodName = StringName("set_images") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the images in the state stored as an array of ``Texture2D``s. This can be used during export. These are the images that the ``GLTFTexture/srcImage`` index refers to. + fileprivate final func set_images(_ images: ObjectCollection) { + withUnsafePointer(to: images.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_images, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skins: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skins") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFSkin``s in the GLTF file. These are the skins that the ``GLTFNode/skin`` index refers to. + fileprivate final func get_skins() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_skins, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_skins: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skins") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFSkin``s in the state. These are the skins that the ``GLTFNode/skin`` index refers to. + fileprivate final func set_skins(_ skins: ObjectCollection) { + withUnsafePointer(to: skins.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_skins, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cameras: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cameras") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFCamera``s in the GLTF file. These are the cameras that the ``GLTFNode/camera`` index refers to. + fileprivate final func get_cameras() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_cameras, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_cameras: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cameras") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFCamera``s in the state. These are the cameras that the ``GLTFNode/camera`` index refers to. + fileprivate final func set_cameras(_ cameras: ObjectCollection) { + withUnsafePointer(to: cameras.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_cameras, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lights: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lights") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFLight``s in the GLTF file. These are the lights that the ``GLTFNode/light`` index refers to. + fileprivate final func get_lights() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_lights, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_lights: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lights") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFLight``s in the state. These are the lights that the ``GLTFNode/light`` index refers to. + fileprivate final func set_lights(_ lights: ObjectCollection) { + withUnsafePointer(to: lights.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_lights, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unique_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_names") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of unique node names. This is used in both the import process and export process. + fileprivate final func get_unique_names() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_unique_names, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_unique_names: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unique_names") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the unique node names in the state. This is used in both the import process and export process. + fileprivate final func set_unique_names(_ uniqueNames: VariantCollection) { + withUnsafePointer(to: uniqueNames.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_unique_names, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unique_animation_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_animation_names") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of unique animation names. This is only used during the import process. + fileprivate final func get_unique_animation_names() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_unique_animation_names, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_unique_animation_names: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unique_animation_names") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the unique animation names in the state. This is only used during the import process. + fileprivate final func set_unique_animation_names(_ uniqueAnimationNames: VariantCollection) { + withUnsafePointer(to: uniqueAnimationNames.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_unique_animation_names, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeletons: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeletons") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFSkeleton``s in the GLTF file. These are the skeletons that the ``GLTFNode/skeleton`` index refers to. + fileprivate final func get_skeletons() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_skeletons, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_skeletons: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeletons") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFSkeleton``s in the state. These are the skeletons that the ``GLTFNode/skeleton`` index refers to. + fileprivate final func set_skeletons(_ skeletons: ObjectCollection) { + withUnsafePointer(to: skeletons.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_skeletons, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_create_animations: GDExtensionMethodBindPtr = { + let methodName = StringName("get_create_animations") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_create_animations() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFState.method_get_create_animations, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_create_animations: GDExtensionMethodBindPtr = { + let methodName = StringName("set_create_animations") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_create_animations(_ createAnimations: Bool) { + withUnsafePointer(to: createAnimations) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_create_animations, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_import_as_skeleton_bones: GDExtensionMethodBindPtr = { + let methodName = StringName("get_import_as_skeleton_bones") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_import_as_skeleton_bones() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GLTFState.method_get_import_as_skeleton_bones, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_import_as_skeleton_bones: GDExtensionMethodBindPtr = { + let methodName = StringName("set_import_as_skeleton_bones") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_import_as_skeleton_bones(_ importAsSkeletonBones: Bool) { + withUnsafePointer(to: importAsSkeletonBones) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_import_as_skeleton_bones, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animations: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animations") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + /// Returns an array of all ``GLTFAnimation``s in the GLTF file. When importing, these will be generated as animations in an ``AnimationPlayer`` node. When exporting, these will be generated from Godot ``AnimationPlayer`` nodes. + fileprivate final func get_animations() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_animations, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_animations: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animations") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the ``GLTFAnimation``s in the state. When importing, these will be generated as animations in an ``AnimationPlayer`` node. When exporting, these will be generated from Godot ``AnimationPlayer`` nodes. + fileprivate final func set_animations(_ animations: ObjectCollection) { + withUnsafePointer(to: animations.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_animations, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene_node") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4253421667)! + } + + } + + }() + + /// Returns the Godot scene node that corresponds to the same index as the ``GLTFNode`` it was generated from. This is the inverse of ``getNodeIndex(sceneNode:)``. Useful during the import process. + /// + /// > Note: Not every ``GLTFNode`` will have a scene node generated, and not every generated scene node will have a corresponding ``GLTFNode``. If there is no scene node for this ``GLTFNode`` index, `null` is returned. + /// + public final func getSceneNode(idx: Int32) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_get_scene_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_node_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_index") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1205807060)! + } + + } + + }() + + /// Returns the index of the ``GLTFNode`` corresponding to this Godot scene node. This is the inverse of ``getSceneNode(idx:)``. Useful during the export process. + /// + /// > Note: Not every Godot scene node will have a corresponding ``GLTFNode``, and not every ``GLTFNode`` will have a scene node generated. If there is no ``GLTFNode`` index for this scene node, `-1` is returned. + /// + public final func getNodeIndex(sceneNode: Node?) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: sceneNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_get_node_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_additional_data") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Gets additional arbitrary data in this ``GLTFState`` instance. This can be used to keep per-file state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + /// + public final func getAdditionalData(extensionName: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_get_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_additional_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_additional_data") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets additional arbitrary data in this ``GLTFState`` instance. This can be used to keep per-file state data in ``GLTFDocumentExtension`` classes, which is important because they are stateless. + /// + /// The first argument should be the ``GLTFDocumentExtension`` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + /// + public final func setAdditionalData(extensionName: StringName, additionalData: Variant?) { + withUnsafePointer(to: extensionName.content) { pArg0 in + withUnsafePointer(to: additionalData.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_additional_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_handle_binary_image: GDExtensionMethodBindPtr = { + let methodName = StringName("get_handle_binary_image") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func get_handle_binary_image() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFState.method_get_handle_binary_image, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_handle_binary_image: GDExtensionMethodBindPtr = { + let methodName = StringName("set_handle_binary_image") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + /// + fileprivate final func set_handle_binary_image(_ method: Int32) { + withUnsafePointer(to: method) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_handle_binary_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_bake_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_fps") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_fps(_ value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFState.method_set_bake_fps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_fps") + return withUnsafePointer(to: &GLTFState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_fps() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GLTFState.method_get_bake_fps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFTexture.swift b/Sources/SwiftGodot/Generated/Api/GLTFTexture.swift new file mode 100644 index 000000000..8178953e3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFTexture.swift @@ -0,0 +1,141 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// GLTFTexture represents a texture in a GLTF file. +open class GLTFTexture: Resource { + override open class var godotClassName: StringName { "GLTFTexture" } + + /* Properties */ + + /// The index of the image associated with this texture, see ``GLTFState/getImages()``. If -1, then this texture does not have an image assigned. + final public var srcImage: Int32 { + get { + return get_src_image () + } + + set { + set_src_image (newValue) + } + + } + + /// ID of the texture sampler to use when sampling the image. If -1, then the default texture sampler is used (linear filtering, and repeat wrapping in both axes). + final public var sampler: Int32 { + get { + return get_sampler () + } + + set { + set_sampler (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_src_image: GDExtensionMethodBindPtr = { + let methodName = StringName("get_src_image") + return withUnsafePointer(to: &GLTFTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_src_image() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTexture.method_get_src_image, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_src_image: GDExtensionMethodBindPtr = { + let methodName = StringName("set_src_image") + return withUnsafePointer(to: &GLTFTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_src_image(_ srcImage: Int32) { + withUnsafePointer(to: srcImage) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTexture.method_set_src_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sampler: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sampler") + return withUnsafePointer(to: &GLTFTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sampler() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTexture.method_get_sampler, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sampler: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sampler") + return withUnsafePointer(to: &GLTFTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sampler(_ sampler: Int32) { + withUnsafePointer(to: sampler) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTexture.method_set_sampler, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GLTFTextureSampler.swift b/Sources/SwiftGodot/Generated/Api/GLTFTextureSampler.swift new file mode 100644 index 000000000..7856d69e6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GLTFTextureSampler.swift @@ -0,0 +1,255 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a GLTF texture sampler +/// +/// Represents a texture sampler as defined by the base GLTF spec. Texture samplers in GLTF specify how to sample data from the texture's base image, when rendering the texture on an object. +open class GLTFTextureSampler: Resource { + override open class var godotClassName: StringName { "GLTFTextureSampler" } + + /* Properties */ + + /// Texture's magnification filter, used when texture appears larger on screen than the source image. + final public var magFilter: Int32 { + get { + return get_mag_filter () + } + + set { + set_mag_filter (newValue) + } + + } + + /// Texture's minification filter, used when the texture appears smaller on screen than the source image. + final public var minFilter: Int32 { + get { + return get_min_filter () + } + + set { + set_min_filter (newValue) + } + + } + + /// Wrapping mode to use for S-axis (horizontal) texture coordinates. + final public var wrapS: Int32 { + get { + return get_wrap_s () + } + + set { + set_wrap_s (newValue) + } + + } + + /// Wrapping mode to use for T-axis (vertical) texture coordinates. + final public var wrapT: Int32 { + get { + return get_wrap_t () + } + + set { + set_wrap_t (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_mag_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mag_filter") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mag_filter() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_get_mag_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mag_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mag_filter") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mag_filter(_ filterMode: Int32) { + withUnsafePointer(to: filterMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_set_mag_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_filter") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_filter() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_get_min_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_filter") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_filter(_ filterMode: Int32) { + withUnsafePointer(to: filterMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_set_min_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wrap_s: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wrap_s") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wrap_s() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_get_wrap_s, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wrap_s: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wrap_s") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wrap_s(_ wrapMode: Int32) { + withUnsafePointer(to: wrapMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_set_wrap_s, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wrap_t: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wrap_t") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wrap_t() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_get_wrap_t, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wrap_t: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wrap_t") + return withUnsafePointer(to: &GLTFTextureSampler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wrap_t(_ wrapMode: Int32) { + withUnsafePointer(to: wrapMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GLTFTextureSampler.method_set_wrap_t, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticles2D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticles2D.swift new file mode 100644 index 000000000..657d37cfc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticles2D.swift @@ -0,0 +1,1588 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D particle emitter. +/// +/// 2D particle node used to create a variety of particle systems and effects. ``GPUParticles2D`` features an emitter that generates some number of particles at a given rate. +/// +/// Use the ``processMaterial`` property to add a ``ParticleProcessMaterial`` to configure particle appearance and behavior. Alternatively, you can add a ``ShaderMaterial`` which will be applied to all particles. +/// +/// 2D particles can optionally collide with ``LightOccluder2D``, but they don't collide with ``PhysicsBody2D`` nodes. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class GPUParticles2D: Node2D { + override open class var godotClassName: StringName { "GPUParticles2D" } + public enum DrawOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particles are drawn in the order emitted. + case index = 0 // DRAW_ORDER_INDEX + /// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. + case lifetime = 1 // DRAW_ORDER_LIFETIME + /// Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. + case reverseLifetime = 2 // DRAW_ORDER_REVERSE_LIFETIME + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .index: return ".index" + case .lifetime: return ".lifetime" + case .reverseLifetime: return ".reverseLifetime" + } + + } + + } + + public enum EmitFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particle starts at the specified position. + case position = 1 // EMIT_FLAG_POSITION + /// Particle starts with specified rotation and scale. + case rotationScale = 2 // EMIT_FLAG_ROTATION_SCALE + /// Particle starts with the specified velocity vector, which defines the emission direction and speed. + case velocity = 4 // EMIT_FLAG_VELOCITY + /// Particle starts with specified color. + case color = 8 // EMIT_FLAG_COLOR + /// Particle starts with specified `CUSTOM` data. + case custom = 16 // EMIT_FLAG_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .position: return ".position" + case .rotationScale: return ".rotationScale" + case .velocity: return ".velocity" + case .color: return ".color" + case .custom: return ".custom" + } + + } + + } + + + /* Properties */ + + /// If `true`, particles are being emitted. ``emitting`` can be used to start and stop particles from emitting. However, if ``oneShot`` is `true` setting ``emitting`` to `true` will not restart the emission cycle unless all active particles have finished processing. Use the [signal finished] signal to be notified once all active particles finish processing. + /// + /// > Note: For ``oneShot`` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the [signal finished] signal during which setting this to `true` will not restart the emission cycle. + /// + /// **Tip:** If your ``oneShot`` emitter needs to immediately restart emitting particles once [signal finished] signal is received, consider calling ``restart()`` instead of setting ``emitting``. + /// + final public var emitting: Bool { + get { + return is_emitting () + } + + set { + set_emitting (newValue) + } + + } + + /// The number of particles to emit in one emission cycle. The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if ``amountRatio`` is decreased. + /// + /// > Note: Changing this value will cause the particle system to restart. To avoid this, change ``amountRatio`` instead. + /// + final public var amount: Int32 { + get { + return get_amount () + } + + set { + set_amount (newValue) + } + + } + + /// The ratio of particles that should actually be emitted. If set to a value lower than `1.0`, this will set the amount of emitted particles throughout the lifetime to `amount * amount_ratio`. Unlike changing ``amount``, changing ``amountRatio`` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. ``amountRatio`` can be used to create effects that make the number of emitted particles vary over time. + /// + /// > Note: Reducing the ``amountRatio`` has no performance benefit, since resources need to be allocated and processed for the total ``amount`` of particles regardless of the ``amountRatio``. If you don't intend to change the number of particles emitted while the particles are emitting, make sure ``amountRatio`` is set to `1` and change ``amount`` to your liking instead. + /// + final public var amountRatio: Double { + get { + return get_amount_ratio () + } + + set { + set_amount_ratio (newValue) + } + + } + + /// Path to another ``GPUParticles2D`` node that will be used as a subemitter (see ``ParticleProcessMaterial/subEmitterMode``). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. + /// + /// > Note: When ``subEmitter`` is set, the target ``GPUParticles2D`` node will no longer emit particles on its own. + /// + final public var subEmitter: NodePath { + get { + return get_sub_emitter () + } + + set { + set_sub_emitter (newValue) + } + + } + + /// ``Material`` for processing particles. Can be a ``ParticleProcessMaterial`` or a ``ShaderMaterial``. + final public var processMaterial: Material? { + get { + return get_process_material () + } + + set { + set_process_material (newValue) + } + + } + + /// Particle texture. If `null`, particles will be squares with a size of 1×1 pixels. + /// + /// > Note: To use a flipbook texture, assign a new ``CanvasItemMaterial`` to the ``GPUParticles2D``'s ``CanvasItem/material`` property, then enable ``CanvasItemMaterial/particlesAnimation`` and set ``CanvasItemMaterial/particlesAnimHFrames``, ``CanvasItemMaterial/particlesAnimVFrames``, and ``CanvasItemMaterial/particlesAnimLoop`` to match the flipbook texture. + /// + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// The amount of time each particle will exist (in seconds). The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. + final public var lifetime: Double { + get { + return get_lifetime () + } + + set { + set_lifetime (newValue) + } + + } + + /// If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. + final public var oneShot: Bool { + get { + return get_one_shot () + } + + set { + set_one_shot (newValue) + } + + } + + /// Particle system starts as if it had already run for this many seconds. + final public var preprocess: Double { + get { + return get_pre_process_time () + } + + set { + set_pre_process_time (newValue) + } + + } + + /// Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// How rapidly particles in an emission cycle are emitted. If greater than `0`, there will be a gap in emissions before the next cycle begins. + final public var explosiveness: Double { + get { + return get_explosiveness_ratio () + } + + set { + set_explosiveness_ratio (newValue) + } + + } + + /// Emission lifetime randomness ratio. + final public var randomness: Double { + get { + return get_randomness_ratio () + } + + set { + set_randomness_ratio (newValue) + } + + } + + /// The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. + final public var fixedFps: Int32 { + get { + return get_fixed_fps () + } + + set { + set_fixed_fps (newValue) + } + + } + + /// Enables particle interpolation, which makes the particle movement smoother when their ``fixedFps`` is lower than the screen refresh rate. + final public var interpolate: Bool { + get { + return get_interpolate () + } + + set { + set_interpolate (newValue) + } + + } + + /// If `true`, results in fractional delta calculation which has a smoother particles display effect. + final public var fractDelta: Bool { + get { + return get_fractional_delta () + } + + set { + set_fractional_delta (newValue) + } + + } + + /// Causes all the particles in this node to interpolate towards the end of their lifetime. + /// + /// > Note: This only works when used with a ``ParticleProcessMaterial``. It needs to be manually implemented for custom process shaders. + /// + final public var interpToEnd: Double { + get { + return get_interp_to_end () + } + + set { + set_interp_to_end (newValue) + } + + } + + /// Multiplier for particle's collision radius. `1.0` corresponds to the size of the sprite. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if ``ParticleProcessMaterial/collisionMode`` is ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact``. + /// + /// > Note: Particles always have a spherical collision shape. + /// + final public var collisionBaseSize: Double { + get { + return get_collision_base_size () + } + + set { + set_collision_base_size (newValue) + } + + } + + /// The ``Rect2`` that determines the node's region which needs to be visible on screen for the particle system to be active. + /// + /// Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The ``Rect2`` can be grown via code or with the **Particles → Generate Visibility Rect** editor tool. + /// + final public var visibilityRect: Rect2 { + get { + return get_visibility_rect () + } + + set { + set_visibility_rect (newValue) + } + + } + + /// If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``GPUParticles2D`` node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the ``GPUParticles2D`` node (and its parents) when it is moved or rotated. + final public var localCoords: Bool { + get { + return get_use_local_coordinates () + } + + set { + set_use_local_coordinates (newValue) + } + + } + + /// Particle draw order. Uses ``GPUParticles2D/DrawOrder`` values. + final public var drawOrder: GPUParticles2D.DrawOrder { + get { + return get_draw_order () + } + + set { + set_draw_order (newValue) + } + + } + + /// If `true`, enables particle trails using a mesh skinning system. + /// + /// > Note: Unlike ``GPUParticles3D``, the number of trail sections and subdivisions is set with the ``trailSections`` and ``trailSectionSubdivisions`` properties. + /// + final public var trailEnabled: Bool { + get { + return is_trail_enabled () + } + + set { + set_trail_enabled (newValue) + } + + } + + /// The amount of time the particle's trail should represent (in seconds). Only effective if ``trailEnabled`` is `true`. + final public var trailLifetime: Double { + get { + return get_trail_lifetime () + } + + set { + set_trail_lifetime (newValue) + } + + } + + /// The number of sections to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also ``trailSectionSubdivisions``. Only effective if ``trailEnabled`` is `true`. + final public var trailSections: Int32 { + get { + return get_trail_sections () + } + + set { + set_trail_sections (newValue) + } + + } + + /// The number of subdivisions to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also ``trailSections``. Only effective if ``trailEnabled`` is `true`. + final public var trailSectionSubdivisions: Int32 { + get { + return get_trail_section_subdivisions () + } + + set { + set_trail_section_subdivisions (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emitting") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emitting(_ emitting: Bool) { + withUnsafePointer(to: emitting) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_emitting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_shot") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_shot(_ secs: Bool) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_one_shot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_process_time") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_process_time(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_pre_process_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_explosiveness_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_explosiveness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_randomness_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_randomness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visibility_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_rect") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_rect(_ visibilityRect: Rect2) { + withUnsafePointer(to: visibilityRect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_visibility_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_local_coordinates") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_local_coordinates(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_fps") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_fps(_ fps: Int32) { + withUnsafePointer(to: fps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_fixed_fps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractional_delta") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractional_delta(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_fractional_delta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interpolate") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interpolate(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_process_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_material") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_process_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_collision_base_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_base_size") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_base_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_collision_base_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_interp_to_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interp_to_end") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interp_to_end(_ interp: Double) { + withUnsafePointer(to: interp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_interp_to_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emitting") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_emitting() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_is_emitting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_shot") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_shot() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_one_shot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_process_time") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_process_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_pre_process_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_explosiveness_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_explosiveness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_randomness_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_randomness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visibility_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_rect") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_rect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_visibility_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_local_coordinates") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_local_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_fps") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_fps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_fixed_fps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractional_delta") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractional_delta() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_fractional_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interpolate") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interpolate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_interpolate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_process_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_material") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_process_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_base_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_base_size") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_base_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_collision_base_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_interp_to_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interp_to_end") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interp_to_end() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_interp_to_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_order") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1939677959)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_order(_ order: GPUParticles2D.DrawOrder) { + withUnsafePointer(to: order.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_draw_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_order") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 941479095)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_order() -> GPUParticles2D.DrawOrder { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_draw_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticles2D.DrawOrder (rawValue: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_capture_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("capture_rect") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + /// Returns a rectangle containing the positions of all existing particles. + /// + /// > Note: When using threaded rendering this method synchronizes the rendering thread. Calling it often may have a negative impact on performance. + /// + public final func captureRect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(GPUParticles2D.method_capture_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_restart: GDExtensionMethodBindPtr = { + let methodName = StringName("restart") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. + /// + /// > Note: The [signal finished] signal is only emitted by ``oneShot`` emitters. + /// + public final func restart() { + gi.object_method_bind_ptrcall(GPUParticles2D.method_restart, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_sub_emitter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_sub_emitter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_sub_emitter, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_emit_particle: GDExtensionMethodBindPtr = { + let methodName = StringName("emit_particle") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2179202058)! + } + + } + + }() + + /// Emits a single particle. Whether `xform`, `velocity`, `color` and `custom` are applied depends on the value of `flags`. See ``GPUParticles2D/EmitFlags``. + /// + /// The default ParticleProcessMaterial will overwrite `color` and use the contents of `custom` as `(rotation, age, animation, lifetime)`. + /// + public final func emitParticle(xform: Transform2D, velocity: Vector2, color: Color, custom: Color, flags: UInt32) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: custom) { pArg3 in + withUnsafePointer(to: flags) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_emit_particle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_trail_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_enabled") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_trail_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_trail_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_lifetime") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_trail_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_trail_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_trail_enabled") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_trail_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles2D.method_is_trail_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_trail_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_trail_lifetime") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_trail_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_trail_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_trail_sections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_sections") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_sections(_ sections: Int32) { + withUnsafePointer(to: sections) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_trail_sections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_trail_sections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_trail_sections") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_trail_sections() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_trail_sections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_trail_section_subdivisions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_section_subdivisions") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_section_subdivisions(_ subdivisions: Int32) { + withUnsafePointer(to: subdivisions) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_trail_section_subdivisions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_trail_section_subdivisions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_trail_section_subdivisions") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_trail_section_subdivisions() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_trail_section_subdivisions, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_convert_from_particles: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_from_particles") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets this node's properties to match a given ``CPUParticles2D`` node. + public final func convertFromParticles(_ particles: Node?) { + withUnsafePointer(to: particles?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_convert_from_particles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles2D.method_set_amount_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_amount_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount_ratio") + return withUnsafePointer(to: &GPUParticles2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles2D.method_get_amount_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when all active particles have finished processing. To immediately restart the emission cycle, call ``restart()``. + /// + /// Never emitted when ``oneShot`` is disabled, as particles will be emitted and processed continuously. + /// + /// > Note: For ``oneShot`` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting ``emitting`` to `true` will not restart the emission cycle. This delay is avoided by instead calling ``restart()``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticles3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticles3D.swift new file mode 100644 index 000000000..849d6d6db --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticles3D.swift @@ -0,0 +1,1719 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D particle emitter. +/// +/// 3D particle node used to create a variety of particle systems and effects. ``GPUParticles3D`` features an emitter that generates some number of particles at a given rate. +/// +/// Use ``processMaterial`` to add a ``ParticleProcessMaterial`` to configure particle appearance and behavior. Alternatively, you can add a ``ShaderMaterial`` which will be applied to all particles. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``finished`` +open class GPUParticles3D: GeometryInstance3D { + override open class var godotClassName: StringName { "GPUParticles3D" } + public enum DrawOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particles are drawn in the order emitted. + case index = 0 // DRAW_ORDER_INDEX + /// Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. + case lifetime = 1 // DRAW_ORDER_LIFETIME + /// Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. + case reverseLifetime = 2 // DRAW_ORDER_REVERSE_LIFETIME + /// Particles are drawn in order of depth. + case viewDepth = 3 // DRAW_ORDER_VIEW_DEPTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .index: return ".index" + case .lifetime: return ".lifetime" + case .reverseLifetime: return ".reverseLifetime" + case .viewDepth: return ".viewDepth" + } + + } + + } + + public enum EmitFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Particle starts at the specified position. + case position = 1 // EMIT_FLAG_POSITION + /// Particle starts with specified rotation and scale. + case rotationScale = 2 // EMIT_FLAG_ROTATION_SCALE + /// Particle starts with the specified velocity vector, which defines the emission direction and speed. + case velocity = 4 // EMIT_FLAG_VELOCITY + /// Particle starts with specified color. + case color = 8 // EMIT_FLAG_COLOR + /// Particle starts with specified `CUSTOM` data. + case custom = 16 // EMIT_FLAG_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .position: return ".position" + case .rotationScale: return ".rotationScale" + case .velocity: return ".velocity" + case .color: return ".color" + case .custom: return ".custom" + } + + } + + } + + public enum TransformAlign: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case disabled = 0 // TRANSFORM_ALIGN_DISABLED + /// + case zBillboard = 1 // TRANSFORM_ALIGN_Z_BILLBOARD + /// + case yToVelocity = 2 // TRANSFORM_ALIGN_Y_TO_VELOCITY + /// + case zBillboardYToVelocity = 3 // TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .zBillboard: return ".zBillboard" + case .yToVelocity: return ".yToVelocity" + case .zBillboardYToVelocity: return ".zBillboardYToVelocity" + } + + } + + } + + /* Constants */ + /// Maximum number of draw passes supported. + public static let maxDrawPasses = 4 + + /* Properties */ + + /// If `true`, particles are being emitted. ``emitting`` can be used to start and stop particles from emitting. However, if ``oneShot`` is `true` setting ``emitting`` to `true` will not restart the emission cycle unless all active particles have finished processing. Use the [signal finished] signal to be notified once all active particles finish processing. + /// + /// > Note: For ``oneShot`` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the [signal finished] signal during which setting this to `true` will not restart the emission cycle. + /// + /// **Tip:** If your ``oneShot`` emitter needs to immediately restart emitting particles once [signal finished] signal is received, consider calling ``restart()`` instead of setting ``emitting``. + /// + final public var emitting: Bool { + get { + return is_emitting () + } + + set { + set_emitting (newValue) + } + + } + + /// The number of particles to emit in one emission cycle. The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if ``amountRatio`` is decreased. + /// + /// > Note: Changing this value will cause the particle system to restart. To avoid this, change ``amountRatio`` instead. + /// + final public var amount: Int32 { + get { + return get_amount () + } + + set { + set_amount (newValue) + } + + } + + /// The ratio of particles that should actually be emitted. If set to a value lower than `1.0`, this will set the amount of emitted particles throughout the lifetime to `amount * amount_ratio`. Unlike changing ``amount``, changing ``amountRatio`` while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. ``amountRatio`` can be used to create effects that make the number of emitted particles vary over time. + /// + /// > Note: Reducing the ``amountRatio`` has no performance benefit, since resources need to be allocated and processed for the total ``amount`` of particles regardless of the ``amountRatio``. If you don't intend to change the number of particles emitted while the particles are emitting, make sure ``amountRatio`` is set to `1` and change ``amount`` to your liking instead. + /// + final public var amountRatio: Double { + get { + return get_amount_ratio () + } + + set { + set_amount_ratio (newValue) + } + + } + + /// Path to another ``GPUParticles3D`` node that will be used as a subemitter (see ``ParticleProcessMaterial/subEmitterMode``). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. + /// + /// > Note: When ``subEmitter`` is set, the target ``GPUParticles3D`` node will no longer emit particles on its own. + /// + final public var subEmitter: NodePath { + get { + return get_sub_emitter () + } + + set { + set_sub_emitter (newValue) + } + + } + + /// The amount of time each particle will exist (in seconds). The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. + final public var lifetime: Double { + get { + return get_lifetime () + } + + set { + set_lifetime (newValue) + } + + } + + /// Causes all the particles in this node to interpolate towards the end of their lifetime. + /// + /// > Note: This only works when used with a ``ParticleProcessMaterial``. It needs to be manually implemented for custom process shaders. + /// + final public var interpToEnd: Double { + get { + return get_interp_to_end () + } + + set { + set_interp_to_end (newValue) + } + + } + + /// If `true`, only the number of particles equal to ``amount`` will be emitted. + final public var oneShot: Bool { + get { + return get_one_shot () + } + + set { + set_one_shot (newValue) + } + + } + + /// Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. + final public var preprocess: Double { + get { + return get_pre_process_time () + } + + set { + set_pre_process_time (newValue) + } + + } + + /// Speed scaling ratio. A value of `0` can be used to pause the particles. + final public var speedScale: Double { + get { + return get_speed_scale () + } + + set { + set_speed_scale (newValue) + } + + } + + /// Time ratio between each emission. If `0`, particles are emitted continuously. If `1`, all particles are emitted simultaneously. + final public var explosiveness: Double { + get { + return get_explosiveness_ratio () + } + + set { + set_explosiveness_ratio (newValue) + } + + } + + /// Emission randomness ratio. + final public var randomness: Double { + get { + return get_randomness_ratio () + } + + set { + set_randomness_ratio (newValue) + } + + } + + /// The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. + final public var fixedFps: Int32 { + get { + return get_fixed_fps () + } + + set { + set_fixed_fps (newValue) + } + + } + + /// Enables particle interpolation, which makes the particle movement smoother when their ``fixedFps`` is lower than the screen refresh rate. + final public var interpolate: Bool { + get { + return get_interpolate () + } + + set { + set_interpolate (newValue) + } + + } + + /// If `true`, results in fractional delta calculation which has a smoother particles display effect. + final public var fractDelta: Bool { + get { + return get_fractional_delta () + } + + set { + set_fractional_delta (newValue) + } + + } + + /// The base diameter for particle collision in meters. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if ``ParticleProcessMaterial/collisionMode`` is ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact``. + /// + /// > Note: Particles always have a spherical collision shape. + /// + final public var collisionBaseSize: Double { + get { + return get_collision_base_size () + } + + set { + set_collision_base_size (newValue) + } + + } + + /// The ``AABB`` that determines the node's region which needs to be visible on screen for the particle system to be active. ``GeometryInstance3D/extraCullMargin`` is added on each of the AABB's axes. Particle collisions and attraction will only occur within this area. + /// + /// Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The ``AABB`` can be grown via code or with the **Particles → Generate AABB** editor tool. + /// + /// > Note: ``visibilityAabb`` is overridden by ``GeometryInstance3D/customAabb`` if that property is set to a non-default value. + /// + final public var visibilityAabb: AABB { + get { + return get_visibility_aabb () + } + + set { + set_visibility_aabb (newValue) + } + + } + + /// If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the ``GPUParticles3D`` node (and its parents) when it is moved or rotated. + final public var localCoords: Bool { + get { + return get_use_local_coordinates () + } + + set { + set_use_local_coordinates (newValue) + } + + } + + /// Particle draw order. Uses ``GPUParticles3D/DrawOrder`` values. + /// + /// > Note: ``DrawOrder/index`` is the only option that supports motion vectors for effects like TAA. It is suggested to use this draw order if the particles are opaque to fix ghosting artifacts. + /// + final public var drawOrder: GPUParticles3D.DrawOrder { + get { + return get_draw_order () + } + + set { + set_draw_order (newValue) + } + + } + + final public var transformAlign: GPUParticles3D.TransformAlign { + get { + return get_transform_align () + } + + set { + set_transform_align (newValue) + } + + } + + /// If `true`, enables particle trails using a mesh skinning system. Designed to work with ``RibbonTrailMesh`` and ``TubeTrailMesh``. + /// + /// > Note: ``BaseMaterial3D/useParticleTrails`` must also be enabled on the particle mesh's material. Otherwise, setting ``trailEnabled`` to `true` will have no effect. + /// + /// > Note: Unlike ``GPUParticles2D``, the number of trail sections and subdivisions is set in the ``RibbonTrailMesh`` or the ``TubeTrailMesh``'s properties. + /// + final public var trailEnabled: Bool { + get { + return is_trail_enabled () + } + + set { + set_trail_enabled (newValue) + } + + } + + /// The amount of time the particle's trail should represent (in seconds). Only effective if ``trailEnabled`` is `true`. + final public var trailLifetime: Double { + get { + return get_trail_lifetime () + } + + set { + set_trail_lifetime (newValue) + } + + } + + /// ``Material`` for processing particles. Can be a ``ParticleProcessMaterial`` or a ``ShaderMaterial``. + final public var processMaterial: Material? { + get { + return get_process_material () + } + + set { + set_process_material (newValue) + } + + } + + /// The number of draw passes when rendering particles. + final public var drawPasses: Int32 { + get { + return get_draw_passes () + } + + set { + set_draw_passes (newValue) + } + + } + + /// ``Mesh`` that is drawn for the first draw pass. + final public var drawPass1: Mesh? { + get { + return get_draw_pass_mesh (0) + } + + set { + set_draw_pass_mesh (0, newValue) + } + + } + + /// ``Mesh`` that is drawn for the second draw pass. + final public var drawPass2: Mesh? { + get { + return get_draw_pass_mesh (1) + } + + set { + set_draw_pass_mesh (1, newValue) + } + + } + + /// ``Mesh`` that is drawn for the third draw pass. + final public var drawPass3: Mesh? { + get { + return get_draw_pass_mesh (2) + } + + set { + set_draw_pass_mesh (2, newValue) + } + + } + + /// ``Mesh`` that is drawn for the fourth draw pass. + final public var drawPass4: Mesh? { + get { + return get_draw_pass_mesh (3) + } + + set { + set_draw_pass_mesh (3, newValue) + } + + } + + final public var drawSkin: Skin? { + get { + return get_skin () + } + + set { + set_skin (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emitting") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emitting(_ emitting: Bool) { + withUnsafePointer(to: emitting) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_emitting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_amount, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_one_shot") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_one_shot(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_one_shot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pre_process_time") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pre_process_time(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_pre_process_time, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_explosiveness_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_explosiveness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_randomness_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_randomness_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visibility_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_aabb") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_visibility_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_local_coordinates") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_local_coordinates(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_fps") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_fps(_ fps: Int32) { + withUnsafePointer(to: fps) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_fixed_fps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fractional_delta") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fractional_delta(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_fractional_delta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interpolate") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interpolate(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_interpolate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_process_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_material") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_process_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_speed_scale") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_speed_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_speed_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_collision_base_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_base_size") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_base_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_collision_base_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_interp_to_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interp_to_end") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interp_to_end(_ interp: Double) { + withUnsafePointer(to: interp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_interp_to_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emitting") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_emitting() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_is_emitting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_amount, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_one_shot") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_one_shot() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_one_shot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pre_process_time") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pre_process_time() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_pre_process_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_explosiveness_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_explosiveness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_explosiveness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_randomness_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_randomness_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_randomness_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visibility_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_aabb") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_visibility_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_local_coordinates") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_local_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_use_local_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_fps") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_fps() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_fixed_fps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fractional_delta") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fractional_delta() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_fractional_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interpolate") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interpolate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_interpolate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_process_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_material") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_process_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_speed_scale") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_speed_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_speed_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_base_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_base_size") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_base_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_collision_base_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_interp_to_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interp_to_end") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interp_to_end() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_interp_to_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_order") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1208074815)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_order(_ order: GPUParticles3D.DrawOrder) { + withUnsafePointer(to: order.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_draw_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_order") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3770381780)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_order() -> GPUParticles3D.DrawOrder { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_draw_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticles3D.DrawOrder (rawValue: _result)! + } + + fileprivate static var method_set_draw_passes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_passes") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_passes(_ passes: Int32) { + withUnsafePointer(to: passes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_draw_passes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_draw_pass_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_pass_mesh") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969122797)! + } + + } + + }() + + @inline(__always) + /// Sets the ``Mesh`` that is drawn at index `pass`. + fileprivate final func set_draw_pass_mesh(_ pass: Int32, _ mesh: Mesh?) { + withUnsafePointer(to: pass) { pArg0 in + withUnsafePointer(to: mesh?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_draw_pass_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_draw_passes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_passes") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_passes() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_draw_passes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_draw_pass_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_pass_mesh") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1576363275)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Mesh`` that is drawn at index `pass`. + fileprivate final func get_draw_pass_mesh(_ pass: Int32) -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: pass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_draw_pass_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skin") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3971435618)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skin(_ skin: Skin?) { + withUnsafePointer(to: skin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_skin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074563878)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skin() -> Skin? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_skin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_restart: GDExtensionMethodBindPtr = { + let methodName = StringName("restart") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. + /// + /// > Note: The [signal finished] signal is only emitted by ``oneShot`` emitters. + /// + public final func restart() { + gi.object_method_bind_ptrcall(GPUParticles3D.method_restart, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_capture_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("capture_aabb") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + /// Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. + public final func captureAabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(GPUParticles3D.method_capture_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sub_emitter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_sub_emitter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_sub_emitter, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_emit_particle: GDExtensionMethodBindPtr = { + let methodName = StringName("emit_particle") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 992173727)! + } + + } + + }() + + /// Emits a single particle. Whether `xform`, `velocity`, `color` and `custom` are applied depends on the value of `flags`. See ``GPUParticles3D/EmitFlags``. + /// + /// The default ParticleProcessMaterial will overwrite `color` and use the contents of `custom` as `(rotation, age, animation, lifetime)`. + /// + public final func emitParticle(xform: Transform3D, velocity: Vector3, color: Color, custom: Color, flags: UInt32) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: custom) { pArg3 in + withUnsafePointer(to: flags) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_emit_particle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_trail_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_enabled") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_trail_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_trail_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trail_lifetime") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_trail_lifetime(_ secs: Double) { + withUnsafePointer(to: secs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_trail_lifetime, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_trail_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_trail_enabled") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_trail_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticles3D.method_is_trail_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_trail_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("get_trail_lifetime") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_trail_lifetime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_trail_lifetime, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform_align: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform_align") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3892425954)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform_align(_ align: GPUParticles3D.TransformAlign) { + withUnsafePointer(to: align.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_transform_align, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform_align: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform_align") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2100992166)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform_align() -> GPUParticles3D.TransformAlign { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_transform_align, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticles3D.TransformAlign (rawValue: _result)! + } + + fileprivate static var method_convert_from_particles: GDExtensionMethodBindPtr = { + let methodName = StringName("convert_from_particles") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets this node's properties to match a given ``CPUParticles3D`` node. + public final func convertFromParticles(_ particles: Node?) { + withUnsafePointer(to: particles?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_convert_from_particles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_amount_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_amount_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_amount_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticles3D.method_set_amount_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_amount_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_amount_ratio") + return withUnsafePointer(to: &GPUParticles3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_amount_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticles3D.method_get_amount_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when all active particles have finished processing. To immediately emit new particles, call ``restart()``. + /// + /// Never emitted when ``oneShot`` is disabled, as particles will be emitted and processed continuously. + /// + /// > Note: For ``oneShot`` emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting ``emitting`` to `true` will not restart the emission cycle. This delay is avoided by instead calling ``restart()``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractor3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractor3D.swift new file mode 100644 index 000000000..40e7eb38b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractor3D.swift @@ -0,0 +1,270 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 3D particle attractors. +/// +/// Particle attractors can be used to attract particles towards the attractor's origin, or to push them away from the attractor's origin. +/// +/// Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +/// +/// Attractors can be temporarily disabled by hiding them, or by setting their ``strength`` to `0.0`. +/// +/// > Note: Particle attractors only affect ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesAttractor3D: VisualInstance3D { + override open class var godotClassName: StringName { "GPUParticlesAttractor3D" } + + /* Properties */ + + /// Adjusts the strength of the attractor. If ``strength`` is negative, particles will be pushed in the opposite direction. Particles will be pushed _away_ from the attractor's origin if ``directionality`` is `0.0`, or towards local +Z if ``directionality`` is greater than `0.0`. + final public var strength: Double { + get { + return get_strength () + } + + set { + set_strength (newValue) + } + + } + + /// The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. + final public var attenuation: Double { + get { + return get_attenuation () + } + + set { + set_attenuation (newValue) + } + + } + + /// Adjusts how directional the attractor is. At `0.0`, the attractor is not directional at all: it will attract particles towards its center. At `1.0`, the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if ``strength`` is negative). + /// + /// > Note: If ``directionality`` is greater than `0.0`, the direction in which particles are pushed can be changed by rotating the ``GPUParticlesAttractor3D`` node. + /// + final public var directionality: Double { + get { + return get_directionality () + } + + set { + set_directionality (newValue) + } + + } + + /// The particle rendering layers (``VisualInstance3D/layers``) that will be affected by the attractor. By default, all particles are affected by an attractor. + /// + /// After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + /// + /// Particle attraction can also be disabled on a per-process material basis by setting ``ParticleProcessMaterial/attractorInteractionEnabled`` on the ``GPUParticles3D`` node. + /// + final public var cullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_strength") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_set_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_strength") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_get_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attenuation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attenuation") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attenuation(_ attenuation: Double) { + withUnsafePointer(to: attenuation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_set_attenuation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attenuation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attenuation") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attenuation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_get_attenuation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_directionality: GDExtensionMethodBindPtr = { + let methodName = StringName("set_directionality") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_directionality(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_set_directionality, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_directionality: GDExtensionMethodBindPtr = { + let methodName = StringName("get_directionality") + return withUnsafePointer(to: &GPUParticlesAttractor3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_directionality() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesAttractor3D.method_get_directionality, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorBox3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorBox3D.swift new file mode 100644 index 000000000..a480f8399 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorBox3D.swift @@ -0,0 +1,92 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A box-shaped attractor that influences particles from ``GPUParticles3D`` nodes. +/// +/// A box-shaped attractor that influences particles from ``GPUParticles3D`` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. +/// +/// Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +/// +/// > Note: Particle attractors only affect ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesAttractorBox3D: GPUParticlesAttractor3D { + override open class var godotClassName: StringName { "GPUParticlesAttractorBox3D" } + + /* Properties */ + + /// The attractor box's size in 3D units. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GPUParticlesAttractorBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractorBox3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GPUParticlesAttractorBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GPUParticlesAttractorBox3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorSphere3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorSphere3D.swift new file mode 100644 index 000000000..590161627 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorSphere3D.swift @@ -0,0 +1,95 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A spheroid-shaped attractor that influences particles from ``GPUParticles3D`` nodes. +/// +/// A spheroid-shaped attractor that influences particles from ``GPUParticles3D`` nodes. Can be used to attract particles towards its origin, or to push them away from its origin. +/// +/// Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +/// +/// > Note: Particle attractors only affect ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesAttractorSphere3D: GPUParticlesAttractor3D { + override open class var godotClassName: StringName { "GPUParticlesAttractorSphere3D" } + + /* Properties */ + + /// The attractor sphere's radius in 3D units. + /// + /// > Note: Stretched ellipses can be obtained by using non-uniform scaling on the ``GPUParticlesAttractorSphere3D`` node. + /// + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &GPUParticlesAttractorSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractorSphere3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &GPUParticlesAttractorSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesAttractorSphere3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorVectorField3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorVectorField3D.swift new file mode 100644 index 000000000..aa08c5d2b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesAttractorVectorField3D.swift @@ -0,0 +1,153 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A box-shaped attractor with varying directions and strengths defined in it that influences particles from ``GPUParticles3D`` nodes. +/// +/// A box-shaped attractor with varying directions and strengths defined in it that influences particles from ``GPUParticles3D`` nodes. +/// +/// Unlike ``GPUParticlesAttractorBox3D``, ``GPUParticlesAttractorVectorField3D`` uses a ``texture`` to affect attraction strength within the box. This can be used to create complex attraction scenarios where particles travel in different directions depending on their location. This can be useful for weather effects such as sandstorms. +/// +/// Particle attractors work in real-time and can be moved, rotated and scaled during gameplay. Unlike collision shapes, non-uniform scaling of attractors is also supported. +/// +/// > Note: Particle attractors only affect ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesAttractorVectorField3D: GPUParticlesAttractor3D { + override open class var godotClassName: StringName { "GPUParticlesAttractorVectorField3D" } + + /* Properties */ + + /// The size of the vector field box in 3D units. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + /// + /// > Note: To get better performance, the 3D texture's resolution should reflect the ``size`` of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. + /// + final public var texture: Texture3D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GPUParticlesAttractorVectorField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractorVectorField3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GPUParticlesAttractorVectorField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GPUParticlesAttractorVectorField3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &GPUParticlesAttractorVectorField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1188404210)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture3D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesAttractorVectorField3D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &GPUParticlesAttractorVectorField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373985333)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticlesAttractorVectorField3D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesCollision3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollision3D.swift new file mode 100644 index 000000000..851356f0e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollision3D.swift @@ -0,0 +1,103 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 3D particle collision shapes affecting ``GPUParticles3D`` nodes. +/// +/// Particle collision shapes can be used to make particles stop or bounce against them. +/// +/// Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is _not_ supported. +/// +/// Particle collision shapes can be temporarily disabled by hiding them. +/// +/// > Note: ``ParticleProcessMaterial/collisionMode`` must be ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact`` on the ``GPUParticles3D``'s process material for collision to work. +/// +/// > Note: Particle collision only affects ``GPUParticles3D``, not ``CPUParticles3D``. +/// +/// > Note: Particles pushed by a collider that is being moved will not be interpolated, which can result in visible stuttering. This can be alleviated by setting ``GPUParticles3D/fixedFps`` to `0` or a value that matches or exceeds the target framerate. +/// +open class GPUParticlesCollision3D: VisualInstance3D { + override open class var godotClassName: StringName { "GPUParticlesCollision3D" } + + /* Properties */ + + /// The particle rendering layers (``VisualInstance3D/layers``) that will be affected by the collision shape. By default, all particles that have ``ParticleProcessMaterial/collisionMode`` set to ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact`` will be affected by a collision shape. + /// + /// After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + /// + /// Particle attraction can also be disabled on a per-process material basis by setting ``ParticleProcessMaterial/attractorInteractionEnabled`` on the ``GPUParticles3D`` node. + /// + final public var cullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &GPUParticlesCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollision3D.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &GPUParticlesCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(GPUParticlesCollision3D.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionBox3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionBox3D.swift new file mode 100644 index 000000000..d29203227 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionBox3D.swift @@ -0,0 +1,94 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A box-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// A box-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is _not_ supported. +/// +/// > Note: ``ParticleProcessMaterial/collisionMode`` must be ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact`` on the ``GPUParticles3D``'s process material for collision to work. +/// +/// > Note: Particle collision only affects ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesCollisionBox3D: GPUParticlesCollision3D { + override open class var godotClassName: StringName { "GPUParticlesCollisionBox3D" } + + /* Properties */ + + /// The collision box's size in 3D units. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GPUParticlesCollisionBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionBox3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GPUParticlesCollisionBox3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GPUParticlesCollisionBox3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionHeightField3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionHeightField3D.swift new file mode 100644 index 000000000..fc96cfcbe --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionHeightField3D.swift @@ -0,0 +1,314 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A real-time heightmap-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// A real-time heightmap-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// Heightmap shapes allow for efficiently representing collisions for convex and concave objects with a single "floor" (such as terrain). This is less flexible than ``GPUParticlesCollisionSDF3D``, but it doesn't require a baking step. +/// +/// ``GPUParticlesCollisionHeightField3D`` can also be regenerated in real-time when it is moved, when the camera moves, or even continuously. This makes ``GPUParticlesCollisionHeightField3D`` a good choice for weather effects such as rain and snow and games with highly dynamic geometry. However, this class is limited since heightmaps cannot represent overhangs (e.g. indoors or caves). +/// +/// > Note: ``ParticleProcessMaterial/collisionMode`` must be `true` on the ``GPUParticles3D``'s process material for collision to work. +/// +/// > Note: Particle collision only affects ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesCollisionHeightField3D: GPUParticlesCollision3D { + override open class var godotClassName: StringName { "GPUParticlesCollisionHeightField3D" } + public enum Resolution: Int64, CaseIterable, CustomDebugStringConvertible { + /// Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. + case resolution256 = 0 // RESOLUTION_256 + /// Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. + case resolution512 = 1 // RESOLUTION_512 + /// Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. + case resolution1024 = 2 // RESOLUTION_1024 + /// Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. + case resolution2048 = 3 // RESOLUTION_2048 + /// Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. + case resolution4096 = 4 // RESOLUTION_4096 + /// Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. + case resolution8192 = 5 // RESOLUTION_8192 + /// Represents the size of the ``GPUParticlesCollisionHeightField3D/Resolution`` enum. + case max = 6 // RESOLUTION_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .resolution256: return ".resolution256" + case .resolution512: return ".resolution512" + case .resolution1024: return ".resolution1024" + case .resolution2048: return ".resolution2048" + case .resolution4096: return ".resolution4096" + case .resolution8192: return ".resolution8192" + case .max: return ".max" + } + + } + + } + + public enum UpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Only update the heightmap when the ``GPUParticlesCollisionHeightField3D`` node is moved, or when the camera moves if ``followCameraEnabled`` is `true`. An update can be forced by slightly moving the ``GPUParticlesCollisionHeightField3D`` in any direction, or by calling ``RenderingServer/particlesCollisionHeightFieldUpdate(particlesCollision:)``. + case whenMoved = 0 // UPDATE_MODE_WHEN_MOVED + /// Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. + case always = 1 // UPDATE_MODE_ALWAYS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .whenMoved: return ".whenMoved" + case .always: return ".always" + } + + } + + } + + + /* Properties */ + + /// The collision heightmap's size in 3D units. To improve heightmap quality, ``size`` should be set as small as possible while covering the parts of the scene you need. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If ``updateMode`` is ``UpdateMode/always``, consider using the lowest resolution possible. + final public var resolution: GPUParticlesCollisionHeightField3D.Resolution { + get { + return get_resolution () + } + + set { + set_resolution (newValue) + } + + } + + /// The update policy to use for the generated heightmap. + final public var updateMode: GPUParticlesCollisionHeightField3D.UpdateMode { + get { + return get_update_mode () + } + + set { + set_update_mode (newValue) + } + + } + + /// If `true`, the ``GPUParticlesCollisionHeightField3D`` will follow the current camera in global space. The ``GPUParticlesCollisionHeightField3D`` does not need to be a child of the ``Camera3D`` node for this to work. + /// + /// Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering ``resolution`` to improve performance if ``followCameraEnabled`` is `true`. + /// + final public var followCameraEnabled: Bool { + get { + return is_follow_camera_enabled () + } + + set { + set_follow_camera_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resolution") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1009996517)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resolution(_ resolution: GPUParticlesCollisionHeightField3D.Resolution) { + withUnsafePointer(to: resolution.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_set_resolution, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolution") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1156065644)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_resolution() -> GPUParticlesCollisionHeightField3D.Resolution { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_get_resolution, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticlesCollisionHeightField3D.Resolution (rawValue: _result)! + } + + fileprivate static var method_set_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_mode") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 673680859)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_mode(_ updateMode: GPUParticlesCollisionHeightField3D.UpdateMode) { + withUnsafePointer(to: updateMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_set_update_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_mode") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1998141380)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_mode() -> GPUParticlesCollisionHeightField3D.UpdateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_get_update_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticlesCollisionHeightField3D.UpdateMode (rawValue: _result)! + } + + fileprivate static var method_set_follow_camera_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_follow_camera_enabled") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_follow_camera_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_set_follow_camera_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_follow_camera_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_follow_camera_enabled") + return withUnsafePointer(to: &GPUParticlesCollisionHeightField3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_follow_camera_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GPUParticlesCollisionHeightField3D.method_is_follow_camera_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSDF3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSDF3D.swift new file mode 100644 index 000000000..ea21090d7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSDF3D.swift @@ -0,0 +1,409 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A baked signed distance field 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// A baked signed distance field 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// Signed distance fields (SDF) allow for efficiently representing approximate collision shapes for convex and concave objects of any shape. This is more flexible than ``GPUParticlesCollisionHeightField3D``, but it requires a baking step. +/// +/// **Baking:** The signed distance field texture can be baked by selecting the ``GPUParticlesCollisionSDF3D`` node in the editor, then clicking **Bake SDF** at the top of the 3D viewport. Any _visible_ ``MeshInstance3D``s within the ``size`` will be taken into account for baking, regardless of their ``GeometryInstance3D/giMode``. +/// +/// > Note: Baking a ``GPUParticlesCollisionSDF3D``'s ``texture`` is only possible within the editor, as there is no bake method exposed for use in exported projects. However, it's still possible to load pre-baked ``Texture3D``s into its ``texture`` property in an exported project. +/// +/// > Note: ``ParticleProcessMaterial/collisionMode`` must be ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact`` on the ``GPUParticles3D``'s process material for collision to work. +/// +/// > Note: Particle collision only affects ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesCollisionSDF3D: GPUParticlesCollision3D { + override open class var godotClassName: StringName { "GPUParticlesCollisionSDF3D" } + public enum Resolution: Int64, CaseIterable, CustomDebugStringConvertible { + /// Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. + case resolution16 = 0 // RESOLUTION_16 + /// Bake a 32×32×32 signed distance field. + case resolution32 = 1 // RESOLUTION_32 + /// Bake a 64×64×64 signed distance field. + case resolution64 = 2 // RESOLUTION_64 + /// Bake a 128×128×128 signed distance field. + case resolution128 = 3 // RESOLUTION_128 + /// Bake a 256×256×256 signed distance field. + case resolution256 = 4 // RESOLUTION_256 + /// Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. + case resolution512 = 5 // RESOLUTION_512 + /// Represents the size of the ``GPUParticlesCollisionSDF3D/Resolution`` enum. + case max = 6 // RESOLUTION_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .resolution16: return ".resolution16" + case .resolution32: return ".resolution32" + case .resolution64: return ".resolution64" + case .resolution128: return ".resolution128" + case .resolution256: return ".resolution256" + case .resolution512: return ".resolution512" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// The collision SDF's size in 3D units. To improve SDF quality, the ``size`` should be set as small as possible while covering the parts of the scene you need. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The bake resolution to use for the signed distance field ``texture``. The texture must be baked again for changes to the ``resolution`` property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. + final public var resolution: GPUParticlesCollisionSDF3D.Resolution { + get { + return get_resolution () + } + + set { + set_resolution (newValue) + } + + } + + /// The collision shape's thickness. Unlike other particle colliders, ``GPUParticlesCollisionSDF3D`` is actually hollow on the inside. ``thickness`` can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the ``GPUParticlesCollisionSDF3D`` is moved. + final public var thickness: Double { + get { + return get_thickness () + } + + set { + set_thickness (newValue) + } + + } + + /// The visual layers to account for when baking the particle collision SDF. Only ``MeshInstance3D``s whose ``VisualInstance3D/layers`` match with this ``bakeMask`` will be included in the generated particle collision SDF. By default, all objects are taken into account for the particle collision SDF baking. + final public var bakeMask: UInt32 { + get { + return get_bake_mask () + } + + set { + set_bake_mask (newValue) + } + + } + + /// The 3D texture representing the signed distance field. + final public var texture: Texture3D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resolution") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1155629297)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resolution(_ resolution: GPUParticlesCollisionSDF3D.Resolution) { + withUnsafePointer(to: resolution.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_resolution, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolution") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2919555867)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_resolution() -> GPUParticlesCollisionSDF3D.Resolution { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_resolution, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GPUParticlesCollisionSDF3D.Resolution (rawValue: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1188404210)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture3D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373985333)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_thickness") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_thickness(_ thickness: Double) { + withUnsafePointer(to: thickness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_thickness") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_thickness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_thickness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bake_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_mask") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_bake_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mask") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_bake_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bake_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_mask_value") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``bakeMask``, given a `layerNumber` between 1 and 32. + public final func setBakeMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_set_bake_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bake_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mask_value") + return withUnsafePointer(to: &GPUParticlesCollisionSDF3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``bakeMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getBakeMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSDF3D.method_get_bake_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSphere3D.swift b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSphere3D.swift new file mode 100644 index 000000000..8536cfe97 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GPUParticlesCollisionSphere3D.swift @@ -0,0 +1,94 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A sphere-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// A sphere-shaped 3D particle collision shape affecting ``GPUParticles3D`` nodes. +/// +/// Particle collision shapes work in real-time and can be moved, rotated and scaled during gameplay. Unlike attractors, non-uniform scaling of collision shapes is _not_ supported. +/// +/// > Note: ``ParticleProcessMaterial/collisionMode`` must be ``ParticleProcessMaterial/CollisionMode/rigid`` or ``ParticleProcessMaterial/CollisionMode/hideOnContact`` on the ``GPUParticles3D``'s process material for collision to work. +/// +/// > Note: Particle collision only affects ``GPUParticles3D``, not ``CPUParticles3D``. +/// +open class GPUParticlesCollisionSphere3D: GPUParticlesCollision3D { + override open class var godotClassName: StringName { "GPUParticlesCollisionSphere3D" } + + /* Properties */ + + /// The collision sphere's radius in 3D units. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &GPUParticlesCollisionSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GPUParticlesCollisionSphere3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &GPUParticlesCollisionSphere3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GPUParticlesCollisionSphere3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Generic6DOFJoint3D.swift b/Sources/SwiftGodot/Generated/Api/Generic6DOFJoint3D.swift new file mode 100644 index 000000000..3b723c9c2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Generic6DOFJoint3D.swift @@ -0,0 +1,477 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that allows for complex movement and rotation between two 3D physics bodies. +/// +/// The ``Generic6DOFJoint3D`` (6 Degrees Of Freedom) joint allows for implementing custom types of joints by locking the rotation and translation of certain axes. +/// +/// The first 3 DOF represent the linear motion of the physics bodies and the last 3 DOF represent the angular motion of the physics bodies. Each axis can be either locked, or limited. +/// +open class Generic6DOFJoint3D: Joint3D { + override open class var godotClassName: StringName { "Generic6DOFJoint3D" } + public enum Param: Int64, CaseIterable, CustomDebugStringConvertible { + /// The minimum difference between the pivot points' axes. + case linearLowerLimit = 0 // PARAM_LINEAR_LOWER_LIMIT + /// The maximum difference between the pivot points' axes. + case linearUpperLimit = 1 // PARAM_LINEAR_UPPER_LIMIT + /// A factor applied to the movement across the axes. The lower, the slower the movement. + case linearLimitSoftness = 2 // PARAM_LINEAR_LIMIT_SOFTNESS + /// The amount of restitution on the axes' movement. The lower, the more momentum gets lost. + case linearRestitution = 3 // PARAM_LINEAR_RESTITUTION + /// The amount of damping that happens at the linear motion across the axes. + case linearDamping = 4 // PARAM_LINEAR_DAMPING + /// The velocity the linear motor will try to reach. + case linearMotorTargetVelocity = 5 // PARAM_LINEAR_MOTOR_TARGET_VELOCITY + /// The maximum force the linear motor will apply while trying to reach the velocity target. + case linearMotorForceLimit = 6 // PARAM_LINEAR_MOTOR_FORCE_LIMIT + /// + case linearSpringStiffness = 7 // PARAM_LINEAR_SPRING_STIFFNESS + /// + case linearSpringDamping = 8 // PARAM_LINEAR_SPRING_DAMPING + /// + case linearSpringEquilibriumPoint = 9 // PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT + /// The minimum rotation in negative direction to break loose and rotate around the axes. + case angularLowerLimit = 10 // PARAM_ANGULAR_LOWER_LIMIT + /// The minimum rotation in positive direction to break loose and rotate around the axes. + case angularUpperLimit = 11 // PARAM_ANGULAR_UPPER_LIMIT + /// The speed of all rotations across the axes. + case angularLimitSoftness = 12 // PARAM_ANGULAR_LIMIT_SOFTNESS + /// The amount of rotational damping across the axes. The lower, the more damping occurs. + case angularDamping = 13 // PARAM_ANGULAR_DAMPING + /// The amount of rotational restitution across the axes. The lower, the more restitution occurs. + case angularRestitution = 14 // PARAM_ANGULAR_RESTITUTION + /// The maximum amount of force that can occur, when rotating around the axes. + case angularForceLimit = 15 // PARAM_ANGULAR_FORCE_LIMIT + /// When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + case angularErp = 16 // PARAM_ANGULAR_ERP + /// Target speed for the motor at the axes. + case angularMotorTargetVelocity = 17 // PARAM_ANGULAR_MOTOR_TARGET_VELOCITY + /// Maximum acceleration for the motor at the axes. + case angularMotorForceLimit = 18 // PARAM_ANGULAR_MOTOR_FORCE_LIMIT + /// + case angularSpringStiffness = 19 // PARAM_ANGULAR_SPRING_STIFFNESS + /// + case angularSpringDamping = 20 // PARAM_ANGULAR_SPRING_DAMPING + /// + case angularSpringEquilibriumPoint = 21 // PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT + /// Represents the size of the ``Generic6DOFJoint3D/Param`` enum. + case max = 22 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linearLowerLimit: return ".linearLowerLimit" + case .linearUpperLimit: return ".linearUpperLimit" + case .linearLimitSoftness: return ".linearLimitSoftness" + case .linearRestitution: return ".linearRestitution" + case .linearDamping: return ".linearDamping" + case .linearMotorTargetVelocity: return ".linearMotorTargetVelocity" + case .linearMotorForceLimit: return ".linearMotorForceLimit" + case .linearSpringStiffness: return ".linearSpringStiffness" + case .linearSpringDamping: return ".linearSpringDamping" + case .linearSpringEquilibriumPoint: return ".linearSpringEquilibriumPoint" + case .angularLowerLimit: return ".angularLowerLimit" + case .angularUpperLimit: return ".angularUpperLimit" + case .angularLimitSoftness: return ".angularLimitSoftness" + case .angularDamping: return ".angularDamping" + case .angularRestitution: return ".angularRestitution" + case .angularForceLimit: return ".angularForceLimit" + case .angularErp: return ".angularErp" + case .angularMotorTargetVelocity: return ".angularMotorTargetVelocity" + case .angularMotorForceLimit: return ".angularMotorForceLimit" + case .angularSpringStiffness: return ".angularSpringStiffness" + case .angularSpringDamping: return ".angularSpringDamping" + case .angularSpringEquilibriumPoint: return ".angularSpringEquilibriumPoint" + case .max: return ".max" + } + + } + + } + + public enum Flag: Int64, CaseIterable, CustomDebugStringConvertible { + /// If enabled, linear motion is possible within the given limits. + case enableLinearLimit = 0 // FLAG_ENABLE_LINEAR_LIMIT + /// If enabled, rotational motion is possible within the given limits. + case enableAngularLimit = 1 // FLAG_ENABLE_ANGULAR_LIMIT + /// + case enableLinearSpring = 3 // FLAG_ENABLE_LINEAR_SPRING + /// + case enableAngularSpring = 2 // FLAG_ENABLE_ANGULAR_SPRING + /// If enabled, there is a rotational motor across these axes. + case enableMotor = 4 // FLAG_ENABLE_MOTOR + /// If enabled, there is a linear motor across these axes. + case enableLinearMotor = 5 // FLAG_ENABLE_LINEAR_MOTOR + /// Represents the size of the ``Generic6DOFJoint3D/Flag`` enum. + case max = 6 // FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .enableLinearLimit: return ".enableLinearLimit" + case .enableAngularLimit: return ".enableAngularLimit" + case .enableLinearSpring: return ".enableLinearSpring" + case .enableAngularSpring: return ".enableAngularSpring" + case .enableMotor: return ".enableMotor" + case .enableLinearMotor: return ".enableLinearMotor" + case .max: return ".max" + } + + } + + } + + /* Methods */ + fileprivate static var method_set_param_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_x") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2018184242)! + } + + } + + }() + + /// + public final func setParamX(param: Generic6DOFJoint3D.Param, value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_param_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_x") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2599835054)! + } + + } + + }() + + /// + public final func getParamX(param: Generic6DOFJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_param_x, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_y") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2018184242)! + } + + } + + }() + + /// + public final func setParamY(param: Generic6DOFJoint3D.Param, value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_param_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_y") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2599835054)! + } + + } + + }() + + /// + public final func getParamY(param: Generic6DOFJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_param_y, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_z: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_z") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2018184242)! + } + + } + + }() + + /// + public final func setParamZ(param: Generic6DOFJoint3D.Param, value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_param_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_z: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_z") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2599835054)! + } + + } + + }() + + /// + public final func getParamZ(param: Generic6DOFJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_param_z, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_flag_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flag_x") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2451594564)! + } + + } + + }() + + /// + public final func setFlagX(flag: Generic6DOFJoint3D.Flag, value: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_flag_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_flag_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flag_x") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2122427807)! + } + + } + + }() + + /// + public final func getFlagX(flag: Generic6DOFJoint3D.Flag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_flag_x, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_flag_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flag_y") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2451594564)! + } + + } + + }() + + /// + public final func setFlagY(flag: Generic6DOFJoint3D.Flag, value: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_flag_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_flag_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flag_y") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2122427807)! + } + + } + + }() + + /// + public final func getFlagY(flag: Generic6DOFJoint3D.Flag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_flag_y, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_flag_z: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flag_z") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2451594564)! + } + + } + + }() + + /// + public final func setFlagZ(flag: Generic6DOFJoint3D.Flag, value: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_set_flag_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_flag_z: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flag_z") + return withUnsafePointer(to: &Generic6DOFJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2122427807)! + } + + } + + }() + + /// + public final func getFlagZ(flag: Generic6DOFJoint3D.Flag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Generic6DOFJoint3D.method_get_flag_z, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Geometry2D.swift b/Sources/SwiftGodot/Generated/Api/Geometry2D.swift new file mode 100644 index 000000000..232eac7bf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Geometry2D.swift @@ -0,0 +1,854 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides methods for some common 2D geometric operations. +/// +/// Provides a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations in 2D. +open class Geometry2D: Object { + /// The shared instance of this class + public static var shared: Geometry2D = { + return withUnsafePointer (to: &Geometry2D.godotClassName.content) { ptr in + Geometry2D (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Geometry2D" } + public enum PolyBooleanOperation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Create regions where either subject or clip polygons (or both) are filled. + case union = 0 // OPERATION_UNION + /// Create regions where subject polygons are filled except where clip polygons are filled. + case difference = 1 // OPERATION_DIFFERENCE + /// Create regions where both subject and clip polygons are filled. + case intersection = 2 // OPERATION_INTERSECTION + /// Create regions where either subject or clip polygons are filled but not where both are filled. + case xor = 3 // OPERATION_XOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .union: return ".union" + case .difference: return ".difference" + case .intersection: return ".intersection" + case .xor: return ".xor" + } + + } + + } + + public enum PolyJoinType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Squaring is applied uniformally at all convex edge joins at `1 * delta`. + case square = 0 // JOIN_SQUARE + /// While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. + case round = 1 // JOIN_ROUND + /// There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. + case miter = 2 // JOIN_MITER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .square: return ".square" + case .round: return ".round" + case .miter: return ".miter" + } + + } + + } + + public enum PolyEndType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Endpoints are joined using the ``Geometry2D/PolyJoinType`` value and the path filled as a polygon. + case polygon = 0 // END_POLYGON + /// Endpoints are joined using the ``Geometry2D/PolyJoinType`` value and the path filled as a polyline. + case joined = 1 // END_JOINED + /// Endpoints are squared off with no extension. + case butt = 2 // END_BUTT + /// Endpoints are squared off and extended by `delta` units. + case square = 3 // END_SQUARE + /// Endpoints are rounded off and extended by `delta` units. + case round = 4 // END_ROUND + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .polygon: return ".polygon" + case .joined: return ".joined" + case .butt: return ".butt" + case .square: return ".square" + case .round: return ".round" + } + + } + + } + + /* Methods */ + fileprivate static var method_is_point_in_circle: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_in_circle") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2929491703)! + } + + } + + }() + + /// Returns `true` if `point` is inside the circle or if it's located exactly _on_ the circle's boundary, otherwise returns `false`. + public static func isPointInCircle(point: Vector2, circlePosition: Vector2, circleRadius: Double) -> Bool { + var _result: Bool = false + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: circlePosition) { pArg1 in + withUnsafePointer(to: circleRadius) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_is_point_in_circle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_segment_intersects_circle: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_circle") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1356928167)! + } + + } + + }() + + /// Given the 2D segment (`segmentFrom`, `segmentTo`), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position `circlePosition` and has radius `circleRadius`. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). + public static func segmentIntersectsCircle(segmentFrom: Vector2, segmentTo: Vector2, circlePosition: Vector2, circleRadius: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: segmentFrom) { pArg0 in + withUnsafePointer(to: segmentTo) { pArg1 in + withUnsafePointer(to: circlePosition) { pArg2 in + withUnsafePointer(to: circleRadius) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_circle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_segment_intersects_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_segment") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2058025344)! + } + + } + + }() + + /// Checks if the two segments (`fromA`, `toA`) and (`fromB`, `toB`) intersect. If yes, return the point of intersection as ``Vector2``. If no intersection takes place, returns `null`. + public static func segmentIntersectsSegment(fromA: Vector2, toA: Vector2, fromB: Vector2, toB: Vector2) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: fromA) { pArg0 in + withUnsafePointer(to: toA) { pArg1 in + withUnsafePointer(to: fromB) { pArg2 in + withUnsafePointer(to: toB) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_segment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_line_intersects_line: GDExtensionMethodBindPtr = { + let methodName = StringName("line_intersects_line") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2058025344)! + } + + } + + }() + + /// Checks if the two lines (`fromA`, `dirA`) and (`fromB`, `dirB`) intersect. If yes, return the point of intersection as ``Vector2``. If no intersection takes place, returns `null`. + /// + /// > Note: The lines are specified using direction vectors, not end points. + /// + public static func lineIntersectsLine(fromA: Vector2, dirA: Vector2, fromB: Vector2, dirB: Vector2) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: fromA) { pArg0 in + withUnsafePointer(to: dirA) { pArg1 in + withUnsafePointer(to: fromB) { pArg2 in + withUnsafePointer(to: dirB) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_line_intersects_line, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_closest_points_between_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_points_between_segments") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3344690961)! + } + + } + + }() + + /// Given the two 2D segments (`p1`, `q1`) and (`p2`, `q2`), finds those two points on the two segments that are closest to each other. Returns a ``PackedVector2Array`` that contains this point on (`p1`, `q1`) as well the accompanying point on (`p2`, `q2`). + public static func getClosestPointsBetweenSegments(p1: Vector2, q1: Vector2, p2: Vector2, q2: Vector2) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: p1) { pArg0 in + withUnsafePointer(to: q1) { pArg1 in + withUnsafePointer(to: p2) { pArg2 in + withUnsafePointer(to: q2) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_points_between_segments, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_point_to_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point_to_segment") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4172901909)! + } + + } + + }() + + /// Returns the 2D point on the 2D segment (`s1`, `s2`) that is closest to `point`. The returned point will always be inside the specified segment. + public static func getClosestPointToSegment(point: Vector2, s1: Vector2, s2: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: s1) { pArg1 in + withUnsafePointer(to: s2) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_point_to_segment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_point_to_segment_uncapped: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point_to_segment_uncapped") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4172901909)! + } + + } + + }() + + /// Returns the 2D point on the 2D line defined by (`s1`, `s2`) that is closest to `point`. The returned point can be inside the segment (`s1`, `s2`) or outside of it, i.e. somewhere on the line extending from the segment. + public static func getClosestPointToSegmentUncapped(point: Vector2, s1: Vector2, s2: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: s1) { pArg1 in + withUnsafePointer(to: s2) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_point_to_segment_uncapped, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_point_is_inside_triangle: GDExtensionMethodBindPtr = { + let methodName = StringName("point_is_inside_triangle") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1025948137)! + } + + } + + }() + + /// Returns if `point` is inside the triangle specified by `a`, `b` and `c`. + public static func pointIsInsideTriangle(point: Vector2, a: Vector2, b: Vector2, c: Vector2) -> Bool { + var _result: Bool = false + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: a) { pArg1 in + withUnsafePointer(to: b) { pArg2 in + withUnsafePointer(to: c) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_point_is_inside_triangle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_polygon_clockwise: GDExtensionMethodBindPtr = { + let methodName = StringName("is_polygon_clockwise") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1361156557)! + } + + } + + }() + + /// Returns `true` if `polygon`'s vertices are ordered in clockwise order, otherwise returns `false`. + /// + /// > Note: Assumes a Cartesian coordinate system where `+x` is right and `+y` is up. If using screen coordinates (`+y` is down), the result will need to be flipped (i.e. a `true` result will indicate counter-clockwise). + /// + public static func isPolygonClockwise(polygon: PackedVector2Array) -> Bool { + var _result: Bool = false + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_polygon_clockwise, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_point_in_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_in_polygon") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 738277916)! + } + + } + + }() + + /// Returns `true` if `point` is inside `polygon` or if it's located exactly _on_ polygon's boundary, otherwise returns `false`. + public static func isPointInPolygon(point: Vector2, polygon: PackedVector2Array) -> Bool { + var _result: Bool = false + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: polygon.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_point_in_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_triangulate_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("triangulate_polygon") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1389921771)! + } + + } + + }() + + /// Triangulates the polygon specified by the points in `polygon`. Returns a ``PackedInt32Array`` where each triangle consists of three consecutive point indices into `polygon` (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty ``PackedInt32Array`` is returned. + public static func triangulatePolygon(_ polygon: PackedVector2Array) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_triangulate_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_triangulate_delaunay: GDExtensionMethodBindPtr = { + let methodName = StringName("triangulate_delaunay") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1389921771)! + } + + } + + }() + + /// Triangulates the area specified by discrete set of `points` such that no point is inside the circumcircle of any resulting triangle. Returns a ``PackedInt32Array`` where each triangle consists of three consecutive point indices into `points` (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). If the triangulation did not succeed, an empty ``PackedInt32Array`` is returned. + public static func triangulateDelaunay(points: PackedVector2Array) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_triangulate_delaunay, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_convex_hull: GDExtensionMethodBindPtr = { + let methodName = StringName("convex_hull") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2004331998)! + } + + } + + }() + + /// Given an array of ``Vector2``s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. + public static func convexHull(points: PackedVector2Array) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_convex_hull, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_decompose_polygon_in_convex: GDExtensionMethodBindPtr = { + let methodName = StringName("decompose_polygon_in_convex") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3982393695)! + } + + } + + }() + + /// Decomposes the `polygon` into multiple convex hulls and returns an array of ``PackedVector2Array``. + public static func decomposePolygonInConvex(polygon: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_decompose_polygon_in_convex, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_merge_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("merge_polygons") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Merges (combines) `polygonA` and `polygonB` and returns an array of merged polygons. This performs ``PolyBooleanOperation/union`` between polygons. + /// + /// The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + public static func mergePolygons(polygonA: PackedVector2Array, polygonB: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygonA.content) { pArg0 in + withUnsafePointer(to: polygonB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_merge_polygons, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_clip_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("clip_polygons") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Clips `polygonA` against `polygonB` and returns an array of clipped polygons. This performs ``PolyBooleanOperation/difference`` between polygons. Returns an empty array if `polygonB` completely overlaps `polygonA`. + /// + /// If `polygonB` is enclosed by `polygonA`, returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + public static func clipPolygons(polygonA: PackedVector2Array, polygonB: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygonA.content) { pArg0 in + withUnsafePointer(to: polygonB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_clip_polygons, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_intersect_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_polygons") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Intersects `polygonA` with `polygonB` and returns an array of intersected polygons. This performs ``PolyBooleanOperation/intersection`` between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. + /// + /// The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + public static func intersectPolygons(polygonA: PackedVector2Array, polygonB: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygonA.content) { pArg0 in + withUnsafePointer(to: polygonB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_intersect_polygons, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_exclude_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("exclude_polygons") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Mutually excludes common area defined by intersection of `polygonA` and `polygonB` (see ``intersectPolygons(polygonA:polygonB:)``) and returns an array of excluded polygons. This performs ``PolyBooleanOperation/xor`` between polygons. In other words, returns all but common area between polygons. + /// + /// The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + public static func excludePolygons(polygonA: PackedVector2Array, polygonB: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygonA.content) { pArg0 in + withUnsafePointer(to: polygonB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_exclude_polygons, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_clip_polyline_with_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("clip_polyline_with_polygon") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Clips `polyline` against `polygon` and returns an array of clipped polylines. This performs ``PolyBooleanOperation/difference`` between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. + public static func clipPolylineWithPolygon(polyline: PackedVector2Array, polygon: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polyline.content) { pArg0 in + withUnsafePointer(to: polygon.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_clip_polyline_with_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_intersect_polyline_with_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_polyline_with_polygon") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3637387053)! + } + + } + + }() + + /// Intersects `polyline` with `polygon` and returns an array of intersected polylines. This performs ``PolyBooleanOperation/intersection`` between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. + public static func intersectPolylineWithPolygon(polyline: PackedVector2Array, polygon: PackedVector2Array) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polyline.content) { pArg0 in + withUnsafePointer(to: polygon.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_intersect_polyline_with_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_offset_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("offset_polygon") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1275354010)! + } + + } + + }() + + /// Inflates or deflates `polygon` by `delta` units (pixels). If `delta` is positive, makes the polygon grow outward. If `delta` is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if `delta` is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. + /// + /// Each polygon's vertices will be rounded as determined by `joinType`, see ``Geometry2D/PolyJoinType``. + /// + /// The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + /// > Note: To translate the polygon's vertices specifically, multiply them to a ``Transform2D``: + /// + public static func offsetPolygon(_ polygon: PackedVector2Array, delta: Double, joinType: Geometry2D.PolyJoinType = .square) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: delta) { pArg1 in + withUnsafePointer(to: joinType.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_offset_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_offset_polyline: GDExtensionMethodBindPtr = { + let methodName = StringName("offset_polyline") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2328231778)! + } + + } + + }() + + /// Inflates or deflates `polyline` by `delta` units (pixels), producing polygons. If `delta` is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If `delta` is negative, returns an empty array. + /// + /// Each polygon's vertices will be rounded as determined by `joinType`, see ``Geometry2D/PolyJoinType``. + /// + /// Each polygon's endpoints will be rounded as determined by `endType`, see ``Geometry2D/PolyEndType``. + /// + /// The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling ``isPolygonClockwise(polygon:)``. + /// + public static func offsetPolyline(_ polyline: PackedVector2Array, delta: Double, joinType: Geometry2D.PolyJoinType = .square, endType: Geometry2D.PolyEndType = .square) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: polyline.content) { pArg0 in + withUnsafePointer(to: delta) { pArg1 in + withUnsafePointer(to: joinType.rawValue) { pArg2 in + withUnsafePointer(to: endType.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_offset_polyline, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_make_atlas: GDExtensionMethodBindPtr = { + let methodName = StringName("make_atlas") + return withUnsafePointer(to: &Geometry2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1337682371)! + } + + } + + }() + + /// Given an array of ``Vector2``s representing tiles, builds an atlas. The returned dictionary has two keys: `points` is a ``PackedVector2Array`` that specifies the positions of each tile, `size` contains the overall size of the whole atlas as ``Vector2i``. + public static func makeAtlas(sizes: PackedVector2Array) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: sizes.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_make_atlas, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Geometry3D.swift b/Sources/SwiftGodot/Generated/Api/Geometry3D.swift new file mode 100644 index 000000000..b5c5c73a2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Geometry3D.swift @@ -0,0 +1,546 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides methods for some common 3D geometric operations. +/// +/// Provides a set of helper functions to create geometric shapes, compute intersections between shapes, and process various other geometric operations in 3D. +open class Geometry3D: Object { + /// The shared instance of this class + public static var shared: Geometry3D = { + return withUnsafePointer (to: &Geometry3D.godotClassName.content) { ptr in + Geometry3D (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Geometry3D" } + /* Methods */ + fileprivate static var method_compute_convex_mesh_points: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_convex_mesh_points") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1936902142)! + } + + } + + }() + + /// Calculates and returns all the vertex points of a convex shape defined by an array of `planes`. + public static func computeConvexMeshPoints(planes: VariantCollection) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: planes.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_compute_convex_mesh_points, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_build_box_planes: GDExtensionMethodBindPtr = { + let methodName = StringName("build_box_planes") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3622277145)! + } + + } + + }() + + /// Returns an array with 6 ``Plane``s that describe the sides of a box centered at the origin. The box size is defined by `extents`, which represents one (positive) corner of the box (i.e. half its actual size). + public static func buildBoxPlanes(extents: Vector3) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_build_box_planes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_build_cylinder_planes: GDExtensionMethodBindPtr = { + let methodName = StringName("build_cylinder_planes") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 449920067)! + } + + } + + }() + + /// Returns an array of ``Plane``s closely bounding a faceted cylinder centered at the origin with radius `radius` and height `height`. The parameter `sides` defines how many planes will be generated for the round part of the cylinder. The parameter `axis` describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). + public static func buildCylinderPlanes(radius: Double, height: Double, sides: Int32, axis: Vector3.Axis = .z) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: sides) { pArg2 in + withUnsafePointer(to: axis.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_build_cylinder_planes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_build_capsule_planes: GDExtensionMethodBindPtr = { + let methodName = StringName("build_capsule_planes") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2113592876)! + } + + } + + }() + + /// Returns an array of ``Plane``s closely bounding a faceted capsule centered at the origin with radius `radius` and height `height`. The parameter `sides` defines how many planes will be generated for the side part of the capsule, whereas `lats` gives the number of latitudinal steps at the bottom and top of the capsule. The parameter `axis` describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). + public static func buildCapsulePlanes(radius: Double, height: Double, sides: Int32, lats: Int32, axis: Vector3.Axis = .z) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: sides) { pArg2 in + withUnsafePointer(to: lats) { pArg3 in + withUnsafePointer(to: axis.rawValue) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_build_capsule_planes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_get_closest_points_between_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_points_between_segments") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1056373962)! + } + + } + + }() + + /// Given the two 3D segments (`p1`, `p2`) and (`q1`, `q2`), finds those two points on the two segments that are closest to each other. Returns a ``PackedVector3Array`` that contains this point on (`p1`, `p2`) as well the accompanying point on (`q1`, `q2`). + public static func getClosestPointsBetweenSegments(p1: Vector3, p2: Vector3, q1: Vector3, q2: Vector3) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: p1) { pArg0 in + withUnsafePointer(to: p2) { pArg1 in + withUnsafePointer(to: q1) { pArg2 in + withUnsafePointer(to: q2) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_points_between_segments, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_point_to_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point_to_segment") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2168193209)! + } + + } + + }() + + /// Returns the 3D point on the 3D segment (`s1`, `s2`) that is closest to `point`. The returned point will always be inside the specified segment. + public static func getClosestPointToSegment(point: Vector3, s1: Vector3, s2: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: s1) { pArg1 in + withUnsafePointer(to: s2) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_point_to_segment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_point_to_segment_uncapped: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point_to_segment_uncapped") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2168193209)! + } + + } + + }() + + /// Returns the 3D point on the 3D line defined by (`s1`, `s2`) that is closest to `point`. The returned point can be inside the segment (`s1`, `s2`) or outside of it, i.e. somewhere on the line extending from the segment. + public static func getClosestPointToSegmentUncapped(point: Vector3, s1: Vector3, s2: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: s1) { pArg1 in + withUnsafePointer(to: s2) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_get_closest_point_to_segment_uncapped, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_triangle_barycentric_coords: GDExtensionMethodBindPtr = { + let methodName = StringName("get_triangle_barycentric_coords") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1362048029)! + } + + } + + }() + + /// Returns a ``Vector3`` containing weights based on how close a 3D position (`point`) is to a triangle's different vertices (`a`, `b` and `c`). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. + /// + /// Here is a more detailed explanation of barycentric coordinates. + /// + public static func getTriangleBarycentricCoords(point: Vector3, a: Vector3, b: Vector3, c: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: a) { pArg1 in + withUnsafePointer(to: b) { pArg2 in + withUnsafePointer(to: c) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_get_triangle_barycentric_coords, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_ray_intersects_triangle: GDExtensionMethodBindPtr = { + let methodName = StringName("ray_intersects_triangle") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1718655448)! + } + + } + + }() + + /// Tests if the 3D ray starting at `from` with the direction of `dir` intersects the triangle specified by `a`, `b` and `c`. If yes, returns the point of intersection as ``Vector3``. If no intersection takes place, returns `null`. + public static func rayIntersectsTriangle(from: Vector3, dir: Vector3, a: Vector3, b: Vector3, c: Vector3) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: dir) { pArg1 in + withUnsafePointer(to: a) { pArg2 in + withUnsafePointer(to: b) { pArg3 in + withUnsafePointer(to: c) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_ray_intersects_triangle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_segment_intersects_triangle: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_triangle") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1718655448)! + } + + } + + }() + + /// Tests if the segment (`from`, `to`) intersects the triangle `a`, `b`, `c`. If yes, returns the point of intersection as ``Vector3``. If no intersection takes place, returns `null`. + public static func segmentIntersectsTriangle(from: Vector3, to: Vector3, a: Vector3, b: Vector3, c: Vector3) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: a) { pArg2 in + withUnsafePointer(to: b) { pArg3 in + withUnsafePointer(to: c) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_triangle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_segment_intersects_sphere: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_sphere") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4080141172)! + } + + } + + }() + + /// Checks if the segment (`from`, `to`) intersects the sphere that is located at `spherePosition` and has radius `sphereRadius`. If no, returns an empty ``PackedVector3Array``. If yes, returns a ``PackedVector3Array`` containing the point of intersection and the sphere's normal at the point of intersection. + public static func segmentIntersectsSphere(from: Vector3, to: Vector3, spherePosition: Vector3, sphereRadius: Double) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: spherePosition) { pArg2 in + withUnsafePointer(to: sphereRadius) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_sphere, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_segment_intersects_cylinder: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_cylinder") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2361316491)! + } + + } + + }() + + /// Checks if the segment (`from`, `to`) intersects the cylinder with height `height` that is centered at the origin and has radius `radius`. If no, returns an empty ``PackedVector3Array``. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. + public static func segmentIntersectsCylinder(from: Vector3, to: Vector3, height: Double, radius: Double) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: radius) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_cylinder, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_segment_intersects_convex: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_intersects_convex") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 537425332)! + } + + } + + }() + + /// Given a convex hull defined though the ``Plane``s in the array `planes`, tests if the segment (`from`, `to`) intersects with that hull. If an intersection is found, returns a ``PackedVector3Array`` containing the point the intersection and the hull's normal. Otherwise, returns an empty array. + public static func segmentIntersectsConvex(from: Vector3, to: Vector3, planes: VariantCollection) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: planes.array.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_segment_intersects_convex, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_clip_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("clip_polygon") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2603188319)! + } + + } + + }() + + /// Clips the polygon defined by the points in `points` against the `plane` and returns the points of the clipped polygon. + public static func clipPolygon(points: PackedVector3Array, plane: Plane) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: plane) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_clip_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_tetrahedralize_delaunay: GDExtensionMethodBindPtr = { + let methodName = StringName("tetrahedralize_delaunay") + return withUnsafePointer(to: &Geometry3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1230191221)! + } + + } + + }() + + /// Tetrahedralizes the volume specified by a discrete set of `points` in 3D space, ensuring that no point lies within the circumsphere of any resulting tetrahedron. The method returns a ``PackedInt32Array`` where each tetrahedron consists of four consecutive point indices into the `points` array (resulting in an array with `n * 4` elements, where `n` is the number of tetrahedra found). If the tetrahedralization is unsuccessful, an empty ``PackedInt32Array`` is returned. + public static func tetrahedralizeDelaunay(points: PackedVector3Array) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_tetrahedralize_delaunay, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GeometryInstance3D.swift b/Sources/SwiftGodot/Generated/Api/GeometryInstance3D.swift new file mode 100644 index 000000000..0d92722b8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GeometryInstance3D.swift @@ -0,0 +1,1062 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base node for geometry-based visual instances. +/// +/// Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. +open class GeometryInstance3D: VisualInstance3D { + override open class var godotClassName: StringName { "GeometryInstance3D" } + public enum ShadowCastingSetting: Int64, CaseIterable, CustomDebugStringConvertible { + /// Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris). + case off = 0 // SHADOW_CASTING_SETTING_OFF + /// Will cast shadows from all visible faces in the GeometryInstance3D. + /// + /// Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. + /// + case on = 1 // SHADOW_CASTING_SETTING_ON + /// Will cast shadows from all visible faces in the GeometryInstance3D. + /// + /// Will not take culling into account, so all faces will be taken into account when shadow casting. + /// + case doubleSided = 2 // SHADOW_CASTING_SETTING_DOUBLE_SIDED + /// Will only show the shadows casted from this object. + /// + /// In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. + /// + case shadowsOnly = 3 // SHADOW_CASTING_SETTING_SHADOWS_ONLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .off: return ".off" + case .on: return ".on" + case .doubleSided: return ".doubleSided" + case .shadowsOnly: return ".shadowsOnly" + } + + } + + } + + public enum GIMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using ``VoxelGI`` and SDFGI, the geometry will _receive_ indirect lighting and reflections but the geometry will not be considered in GI baking. + case disabled = 0 // GI_MODE_DISABLED + /// Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using ``VoxelGI``, SDFGI and ``LightmapGI``. + case `static` = 1 // GI_MODE_STATIC + /// Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using ``VoxelGI``, but it has a higher performance impact than ``GIMode/`static```. When using other GI methods, this will act the same as ``GIMode/disabled``. When using ``LightmapGI``, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. + case dynamic = 2 // GI_MODE_DYNAMIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`static`: return ".`static`" + case .dynamic: return ".dynamic" + } + + } + + } + + public enum LightmapScale: Int64, CaseIterable, CustomDebugStringConvertible { + /// The standard texel density for lightmapping with ``LightmapGI``. + case lightmapScale1x = 0 // LIGHTMAP_SCALE_1X + /// Multiplies texel density by 2× for lightmapping with ``LightmapGI``. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0. + case lightmapScale2x = 1 // LIGHTMAP_SCALE_2X + /// Multiplies texel density by 4× for lightmapping with ``LightmapGI``. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0. + case lightmapScale4x = 2 // LIGHTMAP_SCALE_4X + /// Multiplies texel density by 8× for lightmapping with ``LightmapGI``. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0. + case lightmapScale8x = 3 // LIGHTMAP_SCALE_8X + /// Represents the size of the ``GeometryInstance3D/LightmapScale`` enum. + case max = 4 // LIGHTMAP_SCALE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .lightmapScale1x: return ".lightmapScale1x" + case .lightmapScale2x: return ".lightmapScale2x" + case .lightmapScale4x: return ".lightmapScale4x" + case .lightmapScale8x: return ".lightmapScale8x" + case .max: return ".max" + } + + } + + } + + public enum VisibilityRangeFadeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See ``visibilityRangeBegin`` and ``Node3D/visibilityParent`` for more information. + case disabled = 0 // VISIBILITY_RANGE_FADE_DISABLED + /// Will fade-out itself when reaching the limits of its own visibility range. This is slower than ``VisibilityRangeFadeMode/disabled``, but it can provide smoother transitions. The fading range is determined by ``visibilityRangeBeginMargin`` and ``visibilityRangeEndMargin``. + /// + /// > Note: Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like ``VisibilityRangeFadeMode/disabled`` but with hysteresis disabled. + /// + case `self` = 1 // VISIBILITY_RANGE_FADE_SELF + /// Will fade-in its visibility dependencies (see ``Node3D/visibilityParent``) when reaching the limits of its own visibility range. This is slower than ``VisibilityRangeFadeMode/disabled``, but it can provide smoother transitions. The fading range is determined by ``visibilityRangeBeginMargin`` and ``visibilityRangeEndMargin``. + /// + /// > Note: Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like ``VisibilityRangeFadeMode/disabled`` but with hysteresis disabled. + /// + case dependencies = 2 // VISIBILITY_RANGE_FADE_DEPENDENCIES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`self`: return ".`self`" + case .dependencies: return ".dependencies" + } + + } + + } + + + /* Properties */ + + /// The material override for the whole geometry. + /// + /// If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. + /// + final public var materialOverride: Material? { + get { + return get_material_override () + } + + set { + set_material_override (newValue) + } + + } + + /// The material overlay for the whole geometry. + /// + /// If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces. + /// + final public var materialOverlay: Material? { + get { + return get_material_overlay () + } + + set { + set_material_overlay (newValue) + } + + } + + /// The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). `0.0` is fully opaque, while `1.0` is fully transparent. Values greater than `0.0` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting ``transparency`` to a value greater than `0.0` (exclusive) will _not_ disable shadow rendering. + /// + /// In spatial shaders, `1.0 - transparency` is set as the default value of the `ALPHA` built-in. + /// + /// > Note: ``transparency`` is clamped between `0.0` and `1.0`, so this property cannot be used to make transparent materials more opaque than they originally are. + /// + /// > Note: Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, ``transparency`` is ignored and is considered as always being `0.0`. + /// + final public var transparency: Double { + get { + return get_transparency () + } + + set { + set_transparency (newValue) + } + + } + + /// The selected shadow casting flag. See ``GeometryInstance3D/ShadowCastingSetting`` for possible values. + final public var castShadow: GeometryInstance3D.ShadowCastingSetting { + get { + return get_cast_shadows_setting () + } + + set { + set_cast_shadows_setting (newValue) + } + + } + + /// The extra distance added to the GeometryInstance3D's bounding box (``AABB``) to increase its cull box. + final public var extraCullMargin: Double { + get { + return get_extra_cull_margin () + } + + set { + set_extra_cull_margin (newValue) + } + + } + + /// Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive ``AABB`` recalculation that happens when a skeleton is used with a ``MeshInstance3D`` or to have precise control over the ``MeshInstance3D``'s bounding box. To use the default AABB, set value to an ``AABB`` with all fields set to `0.0`. To avoid frustum culling, set ``customAabb`` to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. To disable all forms of culling (including occlusion culling), call ``RenderingServer/instanceSetIgnoreCulling(instance:enabled:)`` on the ``GeometryInstance3D``'s ``RID``. + final public var customAabb: AABB { + get { + return get_custom_aabb () + } + + set { + set_custom_aabb (newValue) + } + + } + + /// Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances. + /// + /// Useful for testing level of detail transitions in the editor. + /// + final public var lodBias: Double { + get { + return get_lod_bias () + } + + set { + set_lod_bias (newValue) + } + + } + + /// If `true`, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use. + /// + /// > Note: ``ignoreOcclusionCulling`` does not affect frustum culling (which is what happens when an object is not visible given the camera's angle). To avoid frustum culling, set ``customAabb`` to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. + /// + final public var ignoreOcclusionCulling: Bool { + get { + return is_ignoring_occlusion_culling () + } + + set { + set_ignore_occlusion_culling (newValue) + } + + } + + /// The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic). + /// + /// > Note: Lights' bake mode will also affect the global illumination rendering. See ``Light3D/lightBakeMode``. + /// + final public var giMode: GeometryInstance3D.GIMode { + get { + return get_gi_mode () + } + + set { + set_gi_mode (newValue) + } + + } + + /// The texel density to use for lightmapping in ``LightmapGI``. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes. + final public var giLightmapScale: GeometryInstance3D.LightmapScale { + get { + return get_lightmap_scale () + } + + set { + set_lightmap_scale (newValue) + } + + } + + /// Starting distance from which the GeometryInstance3D will be visible, taking ``visibilityRangeBeginMargin`` into account as well. The default value of 0 is used to disable the range check. + final public var visibilityRangeBegin: Double { + get { + return get_visibility_range_begin () + } + + set { + set_visibility_range_begin (newValue) + } + + } + + /// Margin for the ``visibilityRangeBegin`` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the ``visibilityRangeBegin`` threshold by this amount. + /// + /// If ``visibilityRangeFadeMode`` is ``VisibilityRangeFadeMode/disabled``, this acts as a hysteresis distance. If ``visibilityRangeFadeMode`` is ``VisibilityRangeFadeMode/`self``` or ``VisibilityRangeFadeMode/dependencies``, this acts as a fade transition distance and must be set to a value greater than `0.0` for the effect to be noticeable. + /// + final public var visibilityRangeBeginMargin: Double { + get { + return get_visibility_range_begin_margin () + } + + set { + set_visibility_range_begin_margin (newValue) + } + + } + + /// Distance from which the GeometryInstance3D will be hidden, taking ``visibilityRangeEndMargin`` into account as well. The default value of 0 is used to disable the range check. + final public var visibilityRangeEnd: Double { + get { + return get_visibility_range_end () + } + + set { + set_visibility_range_end (newValue) + } + + } + + /// Margin for the ``visibilityRangeEnd`` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the ``visibilityRangeEnd`` threshold by this amount. + /// + /// If ``visibilityRangeFadeMode`` is ``VisibilityRangeFadeMode/disabled``, this acts as a hysteresis distance. If ``visibilityRangeFadeMode`` is ``VisibilityRangeFadeMode/`self``` or ``VisibilityRangeFadeMode/dependencies``, this acts as a fade transition distance and must be set to a value greater than `0.0` for the effect to be noticeable. + /// + final public var visibilityRangeEndMargin: Double { + get { + return get_visibility_range_end_margin () + } + + set { + set_visibility_range_end_margin (newValue) + } + + } + + /// Controls which instances will be faded when approaching the limits of the visibility range. See ``GeometryInstance3D/VisibilityRangeFadeMode`` for possible values. + final public var visibilityRangeFadeMode: GeometryInstance3D.VisibilityRangeFadeMode { + get { + return get_visibility_range_fade_mode () + } + + set { + set_visibility_range_fade_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material_override") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material_override(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_material_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material_override") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material_override() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_material_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_material_overlay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material_overlay") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material_overlay(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_material_overlay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material_overlay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material_overlay") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material_overlay() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_material_overlay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_cast_shadows_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cast_shadows_setting") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 856677339)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cast_shadows_setting(_ shadowCastingSetting: GeometryInstance3D.ShadowCastingSetting) { + withUnsafePointer(to: shadowCastingSetting.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_cast_shadows_setting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cast_shadows_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cast_shadows_setting") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383019359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cast_shadows_setting() -> GeometryInstance3D.ShadowCastingSetting { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_cast_shadows_setting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.ShadowCastingSetting (rawValue: _result)! + } + + fileprivate static var method_set_lod_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lod_bias") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lod_bias(_ bias: Double) { + withUnsafePointer(to: bias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_lod_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lod_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lod_bias") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lod_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_lod_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transparency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transparency") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transparency(_ transparency: Double) { + withUnsafePointer(to: transparency) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_transparency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transparency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transparency") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transparency() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_transparency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_end_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_end_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_end_margin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_visibility_range_end_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_end_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_end_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_end_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_visibility_range_end_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_end") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_end(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_visibility_range_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_end") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_end() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_visibility_range_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_begin_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_begin_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_begin_margin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_visibility_range_begin_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_begin_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_begin_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_begin_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_visibility_range_begin_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_begin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_begin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_visibility_range_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_begin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_begin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_visibility_range_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_fade_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_fade_mode") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1440117808)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_fade_mode(_ mode: GeometryInstance3D.VisibilityRangeFadeMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_visibility_range_fade_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_fade_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_fade_mode") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2067221882)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_fade_mode() -> GeometryInstance3D.VisibilityRangeFadeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_visibility_range_fade_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.VisibilityRangeFadeMode (rawValue: _result)! + } + + fileprivate static var method_set_instance_shader_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_shader_parameter") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Set the value of a shader uniform for this instance only (per-instance uniform). See also ``ShaderMaterial/setShaderParameter(param:value:)`` to assign a uniform on all instances using the same ``ShaderMaterial``. + /// + /// > Note: For a shader uniform to be assignable on a per-instance basis, it _must_ be defined with `instance uniform ...` rather than `uniform ...` in the shader code. + /// + /// > Note: `name` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + /// + /// > Note: Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method. + /// + public final func setInstanceShaderParameter(name: StringName, value: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_instance_shader_parameter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_instance_shader_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_shader_parameter") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Get the value of a shader parameter as set on this instance. + public final func getInstanceShaderParameter(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_instance_shader_parameter, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_extra_cull_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_extra_cull_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_extra_cull_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_extra_cull_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_extra_cull_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_extra_cull_margin") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_extra_cull_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_extra_cull_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lightmap_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lightmap_scale") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2462696582)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lightmap_scale(_ scale: GeometryInstance3D.LightmapScale) { + withUnsafePointer(to: scale.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_lightmap_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lightmap_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lightmap_scale") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 798767852)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lightmap_scale() -> GeometryInstance3D.LightmapScale { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_lightmap_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.LightmapScale (rawValue: _result)! + } + + fileprivate static var method_set_gi_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gi_mode") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2548557163)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gi_mode(_ mode: GeometryInstance3D.GIMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_gi_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gi_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gi_mode") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2188566509)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gi_mode() -> GeometryInstance3D.GIMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_gi_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.GIMode (rawValue: _result)! + } + + fileprivate static var method_set_ignore_occlusion_culling: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_occlusion_culling") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ignore_occlusion_culling(_ ignoreCulling: Bool) { + withUnsafePointer(to: ignoreCulling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_ignore_occlusion_culling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ignoring_occlusion_culling: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ignoring_occlusion_culling") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ignoring_occlusion_culling() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GeometryInstance3D.method_is_ignoring_occlusion_culling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_aabb") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GeometryInstance3D.method_set_custom_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_aabb") + return withUnsafePointer(to: &GeometryInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(GeometryInstance3D.method_get_custom_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Gradient.swift b/Sources/SwiftGodot/Generated/Api/Gradient.swift new file mode 100644 index 000000000..b768afdf2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Gradient.swift @@ -0,0 +1,537 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A color transition. +/// +/// This resource describes a color transition by defining a set of colored points and how to interpolate between them. +/// +/// See also ``Curve`` which supports more complex easing methods, but does not support colors. +/// +open class Gradient: Resource { + override open class var godotClassName: StringName { "Gradient" } + public enum InterpolationMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Linear interpolation. + case linear = 0 // GRADIENT_INTERPOLATE_LINEAR + /// Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases. + case constant = 1 // GRADIENT_INTERPOLATE_CONSTANT + /// Cubic interpolation. + case cubic = 2 // GRADIENT_INTERPOLATE_CUBIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linear: return ".linear" + case .constant: return ".constant" + case .cubic: return ".cubic" + } + + } + + } + + public enum ColorSpace: Int64, CaseIterable, CustomDebugStringConvertible { + /// sRGB color space. + case srgb = 0 // GRADIENT_COLOR_SPACE_SRGB + /// Linear sRGB color space. + case linearSrgb = 1 // GRADIENT_COLOR_SPACE_LINEAR_SRGB + /// Oklab color space. This color space provides a smooth and uniform-looking transition between colors. + case oklab = 2 // GRADIENT_COLOR_SPACE_OKLAB + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .srgb: return ".srgb" + case .linearSrgb: return ".linearSrgb" + case .oklab: return ".oklab" + } + + } + + } + + + /* Properties */ + + /// The algorithm used to interpolate between points of the gradient. See ``Gradient/InterpolationMode`` for available modes. + final public var interpolationMode: Gradient.InterpolationMode { + get { + return get_interpolation_mode () + } + + set { + set_interpolation_mode (newValue) + } + + } + + /// The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See ``Gradient/ColorSpace`` for available modes. + /// + /// > Note: This setting has no effect when ``interpolationMode`` is set to ``InterpolationMode/constant``. + /// + final public var interpolationColorSpace: Gradient.ColorSpace { + get { + return get_interpolation_color_space () + } + + set { + set_interpolation_color_space (newValue) + } + + } + + /// Gradient's offsets as a ``PackedFloat32Array``. + /// + /// > Note: Setting this property updates all offsets at once. To update any offset individually use ``setOffset(point:offset:)``. + /// + final public var offsets: PackedFloat32Array { + get { + return get_offsets () + } + + set { + set_offsets (newValue) + } + + } + + /// Gradient's colors as a ``PackedColorArray``. + /// + /// > Note: Setting this property updates all colors at once. To update any color individually use ``setColor(point:color:)``. + /// + final public var colors: PackedColorArray { + get { + return get_colors () + } + + set { + set_colors (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3629403827)! + } + + } + + }() + + /// Adds the specified color to the gradient, with the specified offset. + public final func addPoint(offset: Double, color: Color) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the color at index `point`. + public final func removePoint(_ point: Int32) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the offset for the gradient color at index `point`. + public final func setOffset(point: Int32, offset: Double) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4025615559)! + } + + } + + }() + + /// Returns the offset of the gradient color at index `point`. + public final func getOffset(point: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_get_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_reverse: GDExtensionMethodBindPtr = { + let methodName = StringName("reverse") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Reverses/mirrors the gradient. + /// + /// > Note: This method mirrors all points around the middle of the gradient, which may produce unexpected results when ``interpolationMode`` is set to ``InterpolationMode/constant``. + /// + public final func reverse() { + gi.object_method_bind_ptrcall(Gradient.method_reverse, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the color of the gradient color at index `point`. + public final func setColor(point: Int32, color: Color) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2624840992)! + } + + } + + }() + + /// Returns the color of the gradient color at index `point`. + public final func getColor(point: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_get_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_sample: GDExtensionMethodBindPtr = { + let methodName = StringName("sample") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1250405064)! + } + + } + + }() + + /// Returns the interpolated color specified by `offset`. + public final func sample(offset: Double) -> Color { + var _result: Color = Color () + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_sample, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of colors in the gradient. + public final func getPointCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Gradient.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offsets: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offsets") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offsets(_ offsets: PackedFloat32Array) { + withUnsafePointer(to: offsets.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_offsets, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offsets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offsets") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offsets() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(Gradient.method_get_offsets, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_colors") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3546319833)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_colors(_ colors: PackedColorArray) { + withUnsafePointer(to: colors.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_colors") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_colors() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(Gradient.method_get_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_interpolation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interpolation_mode") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1971444490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interpolation_mode(_ interpolationMode: Gradient.InterpolationMode) { + withUnsafePointer(to: interpolationMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_interpolation_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_interpolation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interpolation_mode") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3674172981)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interpolation_mode() -> Gradient.InterpolationMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Gradient.method_get_interpolation_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Gradient.InterpolationMode (rawValue: _result)! + } + + fileprivate static var method_set_interpolation_color_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interpolation_color_space") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3685995981)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interpolation_color_space(_ interpolationColorSpace: Gradient.ColorSpace) { + withUnsafePointer(to: interpolationColorSpace.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Gradient.method_set_interpolation_color_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_interpolation_color_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interpolation_color_space") + return withUnsafePointer(to: &Gradient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1538296000)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interpolation_color_space() -> Gradient.ColorSpace { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Gradient.method_get_interpolation_color_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Gradient.ColorSpace (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GradientTexture1D.swift b/Sources/SwiftGodot/Generated/Api/GradientTexture1D.swift new file mode 100644 index 000000000..d38f2eea6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GradientTexture1D.swift @@ -0,0 +1,181 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 1D texture that uses colors obtained from a ``Gradient``. +/// +/// A 1D texture that obtains colors from a ``Gradient`` to fill the texture data. The texture is filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels. See also ``GradientTexture2D``, ``CurveTexture`` and ``CurveXYZTexture``. +open class GradientTexture1D: Texture2D { + override open class var godotClassName: StringName { "GradientTexture1D" } + + /* Properties */ + + /// The ``Gradient`` used to fill the texture. + final public var gradient: Gradient? { + get { + return get_gradient () + } + + set { + set_gradient (newValue) + } + + } + + /// The number of color samples that will be obtained from the ``Gradient``. + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// If `true`, the generated texture will support high dynamic range (``Image/Format/rgbaf`` format). This allows for glow effects to work if ``Environment/glowEnabled`` is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped (``Image/Format/rgba8`` format). + final public var useHdr: Bool { + get { + return is_using_hdr () + } + + set { + set_use_hdr (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gradient") + return withUnsafePointer(to: &GradientTexture1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gradient(_ gradient: Gradient?) { + withUnsafePointer(to: gradient?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture1D.method_set_gradient, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gradient") + return withUnsafePointer(to: &GradientTexture1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gradient() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GradientTexture1D.method_get_gradient, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &GradientTexture1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture1D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_hdr: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_hdr") + return withUnsafePointer(to: &GradientTexture1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_hdr(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture1D.method_set_use_hdr, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_hdr: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_hdr") + return withUnsafePointer(to: &GradientTexture1D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_hdr() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GradientTexture1D.method_is_using_hdr, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GradientTexture2D.swift b/Sources/SwiftGodot/Generated/Api/GradientTexture2D.swift new file mode 100644 index 000000000..d0c4edd71 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GradientTexture2D.swift @@ -0,0 +1,481 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D texture that creates a pattern with colors obtained from a ``Gradient``. +/// +/// A 2D texture that obtains colors from a ``Gradient`` to fill the texture data. This texture is able to transform a color transition into different patterns such as a linear or a radial gradient. The gradient is sampled individually for each pixel so it does not necessarily represent an exact copy of the gradient(see ``width`` and ``height``). See also ``GradientTexture1D``, ``CurveTexture`` and ``CurveXYZTexture``. +open class GradientTexture2D: Texture2D { + override open class var godotClassName: StringName { "GradientTexture2D" } + public enum Fill: Int64, CaseIterable, CustomDebugStringConvertible { + /// The colors are linearly interpolated in a straight line. + case linear = 0 // FILL_LINEAR + /// The colors are linearly interpolated in a circular pattern. + case radial = 1 // FILL_RADIAL + /// The colors are linearly interpolated in a square pattern. + case square = 2 // FILL_SQUARE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linear: return ".linear" + case .radial: return ".radial" + case .square: return ".square" + } + + } + + } + + public enum Repeat: Int64, CaseIterable, CustomDebugStringConvertible { + /// The gradient fill is restricted to the range defined by ``fillFrom`` to ``fillTo`` offsets. + case repeatNone = 0 // REPEAT_NONE + /// The texture is filled starting from ``fillFrom`` to ``fillTo`` offsets, repeating the same pattern in both directions. + case `repeat` = 1 // REPEAT + /// The texture is filled starting from ``fillFrom`` to ``fillTo`` offsets, mirroring the pattern in both directions. + case repeatMirror = 2 // REPEAT_MIRROR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .repeatNone: return ".repeatNone" + case .`repeat`: return ".`repeat`" + case .repeatMirror: return ".repeatMirror" + } + + } + + } + + + /* Properties */ + + /// The ``Gradient`` used to fill the texture. + final public var gradient: Gradient? { + get { + return get_gradient () + } + + set { + set_gradient (newValue) + } + + } + + /// The number of horizontal color samples that will be obtained from the ``Gradient``, which also represents the texture's width. + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// The number of vertical color samples that will be obtained from the ``Gradient``, which also represents the texture's height. + final public var height: Int32 { + get { + return getHeight () + } + + set { + set_height (newValue) + } + + } + + /// If `true`, the generated texture will support high dynamic range (``Image/Format/rgbaf`` format). This allows for glow effects to work if ``Environment/glowEnabled`` is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped (``Image/Format/rgba8`` format). + final public var useHdr: Bool { + get { + return is_using_hdr () + } + + set { + set_use_hdr (newValue) + } + + } + + /// The gradient fill type, one of the ``GradientTexture2D/Fill`` values. The texture is filled by interpolating colors starting from ``fillFrom`` to ``fillTo`` offsets. + final public var fill: GradientTexture2D.Fill { + get { + return get_fill () + } + + set { + set_fill (newValue) + } + + } + + /// The initial offset used to fill the texture specified in UV coordinates. + final public var fillFrom: Vector2 { + get { + return get_fill_from () + } + + set { + set_fill_from (newValue) + } + + } + + /// The final offset used to fill the texture specified in UV coordinates. + final public var fillTo: Vector2 { + get { + return get_fill_to () + } + + set { + set_fill_to (newValue) + } + + } + + /// The gradient repeat type, one of the ``GradientTexture2D/Repeat`` values. The texture is filled starting from ``fillFrom`` to ``fillTo`` offsets by default, but the gradient fill can be repeated to cover the entire texture. + final public var `repeat`: GradientTexture2D.Repeat { + get { + return get_repeat () + } + + set { + set_repeat (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gradient") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gradient(_ gradient: Gradient?) { + withUnsafePointer(to: gradient?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_gradient, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gradient") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gradient() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GradientTexture2D.method_get_gradient, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Int32) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_hdr: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_hdr") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_hdr(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_use_hdr, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_hdr: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_hdr") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_hdr() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GradientTexture2D.method_is_using_hdr, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fill: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fill") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3623927636)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fill(_ fill: GradientTexture2D.Fill) { + withUnsafePointer(to: fill.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_fill, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fill: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fill") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1876227217)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fill() -> GradientTexture2D.Fill { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GradientTexture2D.method_get_fill, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GradientTexture2D.Fill (rawValue: _result)! + } + + fileprivate static var method_set_fill_from: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fill_from") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fill_from(_ fillFrom: Vector2) { + withUnsafePointer(to: fillFrom) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_fill_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fill_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fill_from") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fill_from() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(GradientTexture2D.method_get_fill_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fill_to: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fill_to") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fill_to(_ fillTo: Vector2) { + withUnsafePointer(to: fillTo) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_fill_to, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fill_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fill_to") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fill_to() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(GradientTexture2D.method_get_fill_to, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1357597002)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat(_ `repeat`: GradientTexture2D.Repeat) { + withUnsafePointer(to: `repeat`.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GradientTexture2D.method_set_repeat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat") + return withUnsafePointer(to: &GradientTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3351758665)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat() -> GradientTexture2D.Repeat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GradientTexture2D.method_get_repeat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GradientTexture2D.Repeat (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GraphEdit.swift b/Sources/SwiftGodot/Generated/Api/GraphEdit.swift new file mode 100644 index 000000000..d96a91eaf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GraphEdit.swift @@ -0,0 +1,3233 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An editor for graph-like structures, using ``GraphNode``s. +/// +/// ``GraphEdit`` provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects. +/// +/// ``GraphEdit`` by itself is only an empty container, representing an infinite grid where ``GraphNode``s can be placed. Each ``GraphNode`` represents a node in the graph, a single unit of data in the connected scheme. ``GraphEdit``, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or delete a ``GraphNode``, a signal is emitted in the ``GraphEdit``, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled. +/// +/// **Performance:** It is greatly advised to enable low-processor usage mode (see ``OS/lowProcessorUsageMode``) when using GraphEdits. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``connectionRequest`` +/// - ``disconnectionRequest`` +/// - ``connectionToEmpty`` +/// - ``connectionFromEmpty`` +/// - ``connectionDragStarted`` +/// - ``connectionDragEnded`` +/// - ``copyNodesRequest`` +/// - ``pasteNodesRequest`` +/// - ``duplicateNodesRequest`` +/// - ``deleteNodesRequest`` +/// - ``nodeSelected`` +/// - ``nodeDeselected`` +/// - ``frameRectChanged`` +/// - ``popupRequest`` +/// - ``beginNodeMove`` +/// - ``endNodeMove`` +/// - ``graphElementsLinkedToFrameRequest`` +/// - ``scrollOffsetChanged`` +open class GraphEdit: Control { + override open class var godotClassName: StringName { "GraphEdit" } + public enum PanningScheme: Int64, CaseIterable, CustomDebugStringConvertible { + /// [kbd]Mouse Wheel[/kbd] will zoom, [kbd]Ctrl + Mouse Wheel[/kbd] will move the view. + case zooms = 0 // SCROLL_ZOOMS + /// [kbd]Mouse Wheel[/kbd] will move the view, [kbd]Ctrl + Mouse Wheel[/kbd] will zoom. + case pans = 1 // SCROLL_PANS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .zooms: return ".zooms" + case .pans: return ".pans" + } + + } + + } + + public enum GridPattern: Int64, CaseIterable, CustomDebugStringConvertible { + /// Draw the grid using solid lines. + case lines = 0 // GRID_PATTERN_LINES + /// Draw the grid using dots. + case dots = 1 // GRID_PATTERN_DOTS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .lines: return ".lines" + case .dots: return ".dots" + } + + } + + } + + + /* Properties */ + + /// The scroll offset. + final public var scrollOffset: Vector2 { + get { + return get_scroll_offset () + } + + set { + set_scroll_offset (newValue) + } + + } + + /// If `true`, the grid is visible. + final public var showGrid: Bool { + get { + return is_showing_grid () + } + + set { + set_show_grid (newValue) + } + + } + + /// The pattern used for drawing the grid. + final public var gridPattern: GraphEdit.GridPattern { + get { + return get_grid_pattern () + } + + set { + set_grid_pattern (newValue) + } + + } + + /// If `true`, enables snapping. + final public var snappingEnabled: Bool { + get { + return is_snapping_enabled () + } + + set { + set_snapping_enabled (newValue) + } + + } + + /// The snapping distance in pixels, also determines the grid line distance. + final public var snappingDistance: Int32 { + get { + return get_snapping_distance () + } + + set { + set_snapping_distance (newValue) + } + + } + + /// Defines the control scheme for panning with mouse wheel. + final public var panningScheme: GraphEdit.PanningScheme { + get { + return get_panning_scheme () + } + + set { + set_panning_scheme (newValue) + } + + } + + /// If `true`, enables disconnection of existing connections in the GraphEdit by dragging the right end. + final public var rightDisconnects: Bool { + get { + return is_right_disconnects_enabled () + } + + set { + set_right_disconnects (newValue) + } + + } + + /// The curvature of the lines between the nodes. 0 results in straight lines. + final public var connectionLinesCurvature: Double { + get { + return get_connection_lines_curvature () + } + + set { + set_connection_lines_curvature (newValue) + } + + } + + /// The thickness of the lines between the nodes. + final public var connectionLinesThickness: Double { + get { + return get_connection_lines_thickness () + } + + set { + set_connection_lines_thickness (newValue) + } + + } + + /// If `true`, the lines between nodes will use antialiasing. + final public var connectionLinesAntialiased: Bool { + get { + return is_connection_lines_antialiased () + } + + set { + set_connection_lines_antialiased (newValue) + } + + } + + /// The current zoom value. + final public var zoom: Double { + get { + return get_zoom () + } + + set { + set_zoom (newValue) + } + + } + + /// The lower zoom limit. + final public var zoomMin: Double { + get { + return get_zoom_min () + } + + set { + set_zoom_min (newValue) + } + + } + + /// The upper zoom limit. + final public var zoomMax: Double { + get { + return get_zoom_max () + } + + set { + set_zoom_max (newValue) + } + + } + + /// The step of each zoom level. + final public var zoomStep: Double { + get { + return get_zoom_step () + } + + set { + set_zoom_step (newValue) + } + + } + + /// If `true`, the minimap is visible. + final public var minimapEnabled: Bool { + get { + return is_minimap_enabled () + } + + set { + set_minimap_enabled (newValue) + } + + } + + /// The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle. + final public var minimapSize: Vector2 { + get { + return get_minimap_size () + } + + set { + set_minimap_size (newValue) + } + + } + + /// The opacity of the minimap rectangle. + final public var minimapOpacity: Double { + get { + return get_minimap_opacity () + } + + set { + set_minimap_opacity (newValue) + } + + } + + /// If `true`, the menu toolbar is visible. + final public var showMenu: Bool { + get { + return is_showing_menu () + } + + set { + set_show_menu (newValue) + } + + } + + /// If `true`, the label with the current zoom level is visible. The zoom level is displayed in percents. + final public var showZoomLabel: Bool { + get { + return is_showing_zoom_label () + } + + set { + set_show_zoom_label (newValue) + } + + } + + /// If `true`, buttons that allow to change and reset the zoom level are visible. + final public var showZoomButtons: Bool { + get { + return is_showing_zoom_buttons () + } + + set { + set_show_zoom_buttons (newValue) + } + + } + + /// If `true`, buttons that allow to configure grid and snapping options are visible. + final public var showGridButtons: Bool { + get { + return is_showing_grid_buttons () + } + + set { + set_show_grid_buttons (newValue) + } + + } + + /// If `true`, the button to toggle the minimap is visible. + final public var showMinimapButton: Bool { + get { + return is_showing_minimap_button () + } + + set { + set_show_minimap_button (newValue) + } + + } + + /// If `true`, the button to automatically arrange graph nodes is visible. + final public var showArrangeButton: Bool { + get { + return is_showing_arrange_button () + } + + set { + set_show_arrange_button (newValue) + } + + } + + /* Methods */ + /// Returns whether the `mousePosition` is in the input hot zone. + /// + /// By default, a hot zone is a ``Rect2`` positioned such that its center is at `inNode`.``GraphNode/getInputPortPosition(portIdx:)``(`inPort`) (For output's case, call ``GraphNode/getOutputPortPosition(portIdx:)`` instead). The hot zone's width is twice the Theme Property `port_grab_distance_horizontal`, and its height is twice the `port_grab_distance_vertical`. + /// + /// Below is a sample code to help get started: + /// + @_documentation(visibility: public) + open func _isInInputHotzone(inNode: Object?, inPort: Int32, mousePosition: Vector2) -> Bool { + return false + } + + /// Returns whether the `mousePosition` is in the output hot zone. For more information on hot zones, see ``_isInInputHotzone(inNode:inPort:mousePosition:)``. + /// + /// Below is a sample code to help get started: + /// + @_documentation(visibility: public) + open func _isInOutputHotzone(inNode: Object?, inPort: Int32, mousePosition: Vector2) -> Bool { + return false + } + + /// Virtual method which can be overridden to customize how connections are drawn. + @_documentation(visibility: public) + open func _getConnectionLine(fromPosition: Vector2, toPosition: Vector2) -> PackedVector2Array { + return PackedVector2Array () + } + + /// This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. + /// + /// Return `true` if the connection is indeed valid or return `false` if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen. + /// + /// In this example a connection to same node is suppressed: + /// + @_documentation(visibility: public) + open func _isNodeHoverValid(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> Bool { + return false + } + + fileprivate static var method_connect_node: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_node") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 195065850)! + } + + } + + }() + + /// Create a connection between the `fromPort` of the `fromNode` ``GraphNode`` and the `toPort` of the `toNode` ``GraphNode``. If the connection already exists, no connection is created. + public final func connectNode(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromNode.content) { pArg0 in + withUnsafePointer(to: fromPort) { pArg1 in + withUnsafePointer(to: toNode.content) { pArg2 in + withUnsafePointer(to: toPort) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_connect_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_node_connected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_node_connected") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4216241294)! + } + + } + + }() + + /// Returns `true` if the `fromPort` of the `fromNode` ``GraphNode`` is connected to the `toPort` of the `toNode` ``GraphNode``. + public final func isNodeConnected(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: fromNode.content) { pArg0 in + withUnsafePointer(to: fromPort) { pArg1 in + withUnsafePointer(to: toNode.content) { pArg2 in + withUnsafePointer(to: toPort) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_is_node_connected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_disconnect_node: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_node") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1933654315)! + } + + } + + }() + + /// Removes the connection between the `fromPort` of the `fromNode` ``GraphNode`` and the `toPort` of the `toNode` ``GraphNode``. If the connection does not exist, no connection is removed. + public final func disconnectNode(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32) { + withUnsafePointer(to: fromNode.content) { pArg0 in + withUnsafePointer(to: fromPort) { pArg1 in + withUnsafePointer(to: toNode.content) { pArg2 in + withUnsafePointer(to: toPort) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_disconnect_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_connection_activity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_connection_activity") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1141899943)! + } + + } + + }() + + /// Sets the coloration of the connection between `fromNode`'s `fromPort` and `toNode`'s `toPort` with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using `amount` as weight. + public final func setConnectionActivity(fromNode: StringName, fromPort: Int32, toNode: StringName, toPort: Int32, amount: Double) { + withUnsafePointer(to: fromNode.content) { pArg0 in + withUnsafePointer(to: fromPort) { pArg1 in + withUnsafePointer(to: toNode.content) { pArg2 in + withUnsafePointer(to: toPort) { pArg3 in + withUnsafePointer(to: amount) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_connection_activity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_connection_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_list") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` containing the list of connections. A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. + public final func getConnectionList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_connection_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_closest_connection_at_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_connection_at_point") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 453879819)! + } + + } + + }() + + /// Returns the closest connection to the given point in screen space. If no connection is found within `maxDistance` pixels, an empty ``GDictionary`` is returned. + /// + /// A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. + /// + /// For example, getting a connection at a given mouse position can be achieved like this: + /// + public final func getClosestConnectionAtPoint(_ point: Vector2, maxDistance: Double = 4.0) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: maxDistance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_get_closest_connection_at_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_connections_intersecting_with_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connections_intersecting_with_rect") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2709748719)! + } + + } + + }() + + /// Returns an ``GArray`` containing the list of connections that intersect with the given ``Rect2``. A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. + public final func getConnectionsIntersectingWithRect(_ rect: Rect2) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_get_connections_intersecting_with_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_clear_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_connections") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all connections between nodes. + public final func clearConnections() { + gi.object_method_bind_ptrcall(GraphEdit.method_clear_connections, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_force_connection_drag_end: GDExtensionMethodBindPtr = { + let methodName = StringName("force_connection_drag_end") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor. + /// + /// This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts. + /// + /// > Note: This method suppresses any other connection request signals apart from [signal connection_drag_ended]. + /// + public final func forceConnectionDragEnd() { + gi.object_method_bind_ptrcall(GraphEdit.method_force_connection_drag_end, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_offset") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(GraphEdit.method_get_scroll_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_offset") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_scroll_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_valid_right_disconnect_type: GDExtensionMethodBindPtr = { + let methodName = StringName("add_valid_right_disconnect_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Allows to disconnect nodes when dragging from the right port of the ``GraphNode``'s slot if it has the specified type. See also ``removeValidRightDisconnectType(_:)``. + public final func addValidRightDisconnectType(_ type: Int32) { + withUnsafePointer(to: type) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_add_valid_right_disconnect_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_valid_right_disconnect_type: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_valid_right_disconnect_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Disallows to disconnect nodes when dragging from the right port of the ``GraphNode``'s slot if it has the specified type. Use this to disable disconnection previously allowed with ``addValidRightDisconnectType(_:)``. + public final func removeValidRightDisconnectType(_ type: Int32) { + withUnsafePointer(to: type) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_remove_valid_right_disconnect_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_valid_left_disconnect_type: GDExtensionMethodBindPtr = { + let methodName = StringName("add_valid_left_disconnect_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Allows to disconnect nodes when dragging from the left port of the ``GraphNode``'s slot if it has the specified type. See also ``removeValidLeftDisconnectType(_:)``. + public final func addValidLeftDisconnectType(_ type: Int32) { + withUnsafePointer(to: type) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_add_valid_left_disconnect_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_valid_left_disconnect_type: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_valid_left_disconnect_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Disallows to disconnect nodes when dragging from the left port of the ``GraphNode``'s slot if it has the specified type. Use this to disable disconnection previously allowed with ``addValidLeftDisconnectType(_:)``. + public final func removeValidLeftDisconnectType(_ type: Int32) { + withUnsafePointer(to: type) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_remove_valid_left_disconnect_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_valid_connection_type: GDExtensionMethodBindPtr = { + let methodName = StringName("add_valid_connection_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the ``GraphNode/setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:)`` method. + /// + /// See also ``isValidConnectionType(fromType:toType:)`` and ``removeValidConnectionType(fromType:toType:)``. + /// + public final func addValidConnectionType(fromType: Int32, toType: Int32) { + withUnsafePointer(to: fromType) { pArg0 in + withUnsafePointer(to: toType) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_add_valid_connection_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_valid_connection_type: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_valid_connection_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Disallows the connection between two different port types previously allowed by ``addValidConnectionType(fromType:toType:)``. The port type is defined individually for the left and the right port of each slot with the ``GraphNode/setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:)`` method. + /// + /// See also ``isValidConnectionType(fromType:toType:)``. + /// + public final func removeValidConnectionType(fromType: Int32, toType: Int32) { + withUnsafePointer(to: fromType) { pArg0 in + withUnsafePointer(to: toType) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_remove_valid_connection_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_valid_connection_type: GDExtensionMethodBindPtr = { + let methodName = StringName("is_valid_connection_type") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the ``GraphNode/setSlot(slotIndex:enableLeftPort:typeLeft:colorLeft:enableRightPort:typeRight:colorRight:customIconLeft:customIconRight:drawStylebox:)`` method. + /// + /// See also ``addValidConnectionType(fromType:toType:)`` and ``removeValidConnectionType(fromType:toType:)``. + /// + public final func isValidConnectionType(fromType: Int32, toType: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: fromType) { pArg0 in + withUnsafePointer(to: toType) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_is_valid_connection_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_line: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_line") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3932192302)! + } + + } + + }() + + /// Returns the points which would make up a connection between `fromNode` and `toNode`. + public final func getConnectionLine(fromNode: Vector2, toNode: Vector2) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: fromNode) { pArg0 in + withUnsafePointer(to: toNode) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_get_connection_line, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_attach_graph_element_to_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("attach_graph_element_to_frame") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Attaches the `element` ``GraphElement`` to the `frame` ``GraphFrame``. + public final func attachGraphElementToFrame(element: StringName, frame: StringName) { + withUnsafePointer(to: element.content) { pArg0 in + withUnsafePointer(to: frame.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_attach_graph_element_to_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_detach_graph_element_from_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("detach_graph_element_from_frame") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Detaches the `element` ``GraphElement`` from the ``GraphFrame`` it is currently attached to. + public final func detachGraphElementFromFrame(element: StringName) { + withUnsafePointer(to: element.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_detach_graph_element_from_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_element_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_element_frame") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 988084372)! + } + + } + + }() + + /// Returns the ``GraphFrame`` that contains the ``GraphElement`` with the given name. + public final func getElementFrame(element: StringName) -> GraphFrame? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: element.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_get_element_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_attached_nodes_of_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attached_nodes_of_frame") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 689397652)! + } + + } + + }() + + /// Returns an array of node names that are attached to the ``GraphFrame`` with the given name. + public final func getAttachedNodesOfFrame(_ frame: StringName) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: frame.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_get_attached_nodes_of_frame, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_set_panning_scheme: GDExtensionMethodBindPtr = { + let methodName = StringName("set_panning_scheme") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 18893313)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_panning_scheme(_ scheme: GraphEdit.PanningScheme) { + withUnsafePointer(to: scheme.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_panning_scheme, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_panning_scheme: GDExtensionMethodBindPtr = { + let methodName = StringName("get_panning_scheme") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 549924446)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_panning_scheme() -> GraphEdit.PanningScheme { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GraphEdit.method_get_panning_scheme, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GraphEdit.PanningScheme (rawValue: _result)! + } + + fileprivate static var method_set_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zoom") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zoom(_ zoom: Double) { + withUnsafePointer(to: zoom) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_zoom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zoom") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zoom() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_zoom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_zoom_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zoom_min") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zoom_min(_ zoomMin: Double) { + withUnsafePointer(to: zoomMin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_zoom_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zoom_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zoom_min") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zoom_min() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_zoom_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_zoom_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zoom_max") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zoom_max(_ zoomMax: Double) { + withUnsafePointer(to: zoomMax) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_zoom_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zoom_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zoom_max") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zoom_max() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_zoom_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_zoom_step: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zoom_step") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zoom_step(_ zoomStep: Double) { + withUnsafePointer(to: zoomStep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_zoom_step, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zoom_step: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zoom_step") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zoom_step() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_zoom_step, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_grid: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_grid") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_grid(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_grid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_grid: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_grid") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_grid() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_grid, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_grid_pattern: GDExtensionMethodBindPtr = { + let methodName = StringName("set_grid_pattern") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1074098205)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_grid_pattern(_ pattern: GraphEdit.GridPattern) { + withUnsafePointer(to: pattern.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_grid_pattern, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_grid_pattern: GDExtensionMethodBindPtr = { + let methodName = StringName("get_grid_pattern") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286127528)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_grid_pattern() -> GraphEdit.GridPattern { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(GraphEdit.method_get_grid_pattern, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GraphEdit.GridPattern (rawValue: _result)! + } + + fileprivate static var method_set_snapping_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_snapping_enabled") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_snapping_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_snapping_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_snapping_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_snapping_enabled") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_snapping_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_snapping_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_snapping_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_snapping_distance") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_snapping_distance(_ pixels: Int32) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_snapping_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_snapping_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_snapping_distance") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_snapping_distance() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_snapping_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_connection_lines_curvature: GDExtensionMethodBindPtr = { + let methodName = StringName("set_connection_lines_curvature") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_connection_lines_curvature(_ curvature: Double) { + withUnsafePointer(to: curvature) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_connection_lines_curvature, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_connection_lines_curvature: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_lines_curvature") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_connection_lines_curvature() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_connection_lines_curvature, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_connection_lines_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_connection_lines_thickness") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_connection_lines_thickness(_ pixels: Double) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_connection_lines_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_connection_lines_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_lines_thickness") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_connection_lines_thickness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_connection_lines_thickness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_connection_lines_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("set_connection_lines_antialiased") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_connection_lines_antialiased(_ pixels: Bool) { + withUnsafePointer(to: pixels) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_connection_lines_antialiased, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_connection_lines_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("is_connection_lines_antialiased") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_connection_lines_antialiased() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_connection_lines_antialiased, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_minimap_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_minimap_size") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_minimap_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_minimap_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_minimap_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minimap_size") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_minimap_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(GraphEdit.method_get_minimap_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_minimap_opacity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_minimap_opacity") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_minimap_opacity(_ opacity: Double) { + withUnsafePointer(to: opacity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_minimap_opacity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_minimap_opacity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minimap_opacity") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_minimap_opacity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GraphEdit.method_get_minimap_opacity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_minimap_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_minimap_enabled") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_minimap_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_minimap_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_minimap_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_minimap_enabled") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_minimap_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_minimap_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_menu") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_menu(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_menu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_menu") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_menu() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_zoom_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_zoom_label") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_zoom_label(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_zoom_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_zoom_label: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_zoom_label") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_zoom_label() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_zoom_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_grid_buttons: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_grid_buttons") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_grid_buttons(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_grid_buttons, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_grid_buttons: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_grid_buttons") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_grid_buttons() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_grid_buttons, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_zoom_buttons: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_zoom_buttons") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_zoom_buttons(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_zoom_buttons, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_zoom_buttons: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_zoom_buttons") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_zoom_buttons() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_zoom_buttons, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_minimap_button: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_minimap_button") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_minimap_button(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_minimap_button, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_minimap_button: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_minimap_button") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_minimap_button() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_minimap_button, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_arrange_button: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_arrange_button") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_arrange_button(_ hidden: Bool) { + withUnsafePointer(to: hidden) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_show_arrange_button, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_showing_arrange_button: GDExtensionMethodBindPtr = { + let methodName = StringName("is_showing_arrange_button") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_showing_arrange_button() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_showing_arrange_button, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_right_disconnects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_right_disconnects") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_right_disconnects(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_right_disconnects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_right_disconnects_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_right_disconnects_enabled") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_right_disconnects_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphEdit.method_is_right_disconnects_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_menu_hbox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu_hbox") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3590609951)! + } + + } + + }() + + /// Gets the ``HBoxContainer`` that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getMenuHbox() -> HBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GraphEdit.method_get_menu_hbox, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_arrange_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("arrange_nodes") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. + public final func arrangeNodes() { + gi.object_method_bind_ptrcall(GraphEdit.method_arrange_nodes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("set_selected") + return withUnsafePointer(to: &GraphEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Sets the specified `node` as the one selected. + public final func setSelected(node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphEdit.method_set_selected, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_connection_line": + return _GraphEdit_proxy_get_connection_line + case "_is_in_input_hotzone": + return _GraphEdit_proxy_is_in_input_hotzone + case "_is_in_output_hotzone": + return _GraphEdit_proxy_is_in_output_hotzone + case "_is_node_hover_valid": + return _GraphEdit_proxy_is_node_hover_valid + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ fromNode: StringName, _ fromPort: Int64, _ toNode: StringName, _ toPort: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = StringName (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted to the GraphEdit when the connection between the `fromPort` of the `fromNode` ``GraphNode`` and the `toPort` of the `toNode` ``GraphNode`` is attempted to be created. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionRequest.connect { fromNode, fromPort, toNode, toPort in + /// print ("caught signal") + /// } + /// ``` + public var connectionRequest: Signal1 { Signal1 (target: self, signalName: "connection_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ fromNode: StringName, _ fromPort: Int64, _ toNode: StringName, _ toPort: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = StringName (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted to the GraphEdit when the connection between `fromPort` of `fromNode` ``GraphNode`` and `toPort` of `toNode` ``GraphNode`` is attempted to be removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.disconnectionRequest.connect { fromNode, fromPort, toNode, toPort in + /// print ("caught signal") + /// } + /// ``` + public var disconnectionRequest: Signal2 { Signal2 (target: self, signalName: "disconnection_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ fromNode: StringName, _ fromPort: Int64, _ releasePosition: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = Vector2 (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when user drags a connection from an output port into the empty space of the graph. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionToEmpty.connect { fromNode, fromPort, releasePosition in + /// print ("caught signal") + /// } + /// ``` + public var connectionToEmpty: Signal3 { Signal3 (target: self, signalName: "connection_to_empty") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ toNode: StringName, _ toPort: Int64, _ releasePosition: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = Vector2 (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when user drags a connection from an input port into the empty space of the graph. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionFromEmpty.connect { toNode, toPort, releasePosition in + /// print ("caught signal") + /// } + /// ``` + public var connectionFromEmpty: Signal4 { Signal4 (target: self, signalName: "connection_from_empty") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ fromNode: StringName, _ fromPort: Int64, _ isOutput: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = StringName (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = Bool (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted at the beginning of a connection drag. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionDragStarted.connect { fromNode, fromPort, isOutput in + /// print ("caught signal") + /// } + /// ``` + public var connectionDragStarted: Signal5 { Signal5 (target: self, signalName: "connection_drag_started") } + + /// Emitted at the end of a connection drag. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionDragEnded.connect { + /// print ("caught signal") + /// } + /// ``` + public var connectionDragEnded: SimpleSignal { SimpleSignal (target: self, signalName: "connection_drag_ended") } + + /// Emitted when this ``GraphEdit`` captures a `ui_copy` action ([kbd]Ctrl + C[/kbd] by default). In general, this signal indicates that the selected ``GraphElement``s should be copied. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.copyNodesRequest.connect { + /// print ("caught signal") + /// } + /// ``` + public var copyNodesRequest: SimpleSignal { SimpleSignal (target: self, signalName: "copy_nodes_request") } + + /// Emitted when this ``GraphEdit`` captures a `ui_paste` action ([kbd]Ctrl + V[/kbd] by default). In general, this signal indicates that previously copied ``GraphElement``s should be pasted. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pasteNodesRequest.connect { + /// print ("caught signal") + /// } + /// ``` + public var pasteNodesRequest: SimpleSignal { SimpleSignal (target: self, signalName: "paste_nodes_request") } + + /// Emitted when this ``GraphEdit`` captures a `ui_graph_duplicate` action ([kbd]Ctrl + D[/kbd] by default). In general, this signal indicates that the selected ``GraphElement``s should be duplicated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.duplicateNodesRequest.connect { + /// print ("caught signal") + /// } + /// ``` + public var duplicateNodesRequest: SimpleSignal { SimpleSignal (target: self, signalName: "duplicate_nodes_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal6/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal6/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal6/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal6 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal6 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ nodes: VariantCollection) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = VariantCollection (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this ``GraphEdit`` captures a `ui_graph_delete` action ([kbd]Delete[/kbd] by default). + /// + /// `nodes` is an array of node names that should be removed. These usually include all selected nodes. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.deleteNodesRequest.connect { nodes in + /// print ("caught signal") + /// } + /// ``` + public var deleteNodesRequest: Signal6 { Signal6 (target: self, signalName: "delete_nodes_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal7/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal7/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal7/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal7 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal7 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given ``GraphElement`` node is selected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeSelected.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeSelected: Signal7 { Signal7 (target: self, signalName: "node_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal8/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal8/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal8/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal8 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal8 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the given ``GraphElement`` node is deselected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeDeselected.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeDeselected: Signal8 { Signal8 (target: self, signalName: "node_deselected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal9/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal9/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal9/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal9 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal9 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ frame: GraphFrame, _ newRect: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? GraphFrame ?? GraphFrame (nativeHandle: ptr_0!) + let arg_1 = Vector2 (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the ``GraphFrame`` `frame` is resized to `newRect`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.frameRectChanged.connect { frame, newRect in + /// print ("caught signal") + /// } + /// ``` + public var frameRectChanged: Signal9 { Signal9 (target: self, signalName: "frame_rect_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal10/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal10/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal10/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal10 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal10 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ atPosition: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. `atPosition` is the position of the mouse pointer when the signal is sent. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.popupRequest.connect { atPosition in + /// print ("caught signal") + /// } + /// ``` + public var popupRequest: Signal10 { Signal10 (target: self, signalName: "popup_request") } + + /// Emitted at the beginning of a ``GraphElement``'s movement. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.beginNodeMove.connect { + /// print ("caught signal") + /// } + /// ``` + public var beginNodeMove: SimpleSignal { SimpleSignal (target: self, signalName: "begin_node_move") } + + /// Emitted at the end of a ``GraphElement``'s movement. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.endNodeMove.connect { + /// print ("caught signal") + /// } + /// ``` + public var endNodeMove: SimpleSignal { SimpleSignal (target: self, signalName: "end_node_move") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal11/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal11/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal11/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal11 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal11 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ elements: GArray, _ frame: StringName) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GArray (args [0]!)! + let arg_1 = StringName (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when one or more ``GraphElement``s are dropped onto the ``GraphFrame`` named `frame`, when they were not previously attached to any other one. + /// + /// `elements` is an array of ``GraphElement``s to be attached. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.graphElementsLinkedToFrameRequest.connect { elements, frame in + /// print ("caught signal") + /// } + /// ``` + public var graphElementsLinkedToFrameRequest: Signal11 { Signal11 (target: self, signalName: "graph_elements_linked_to_frame_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal12/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal12/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal12/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal12 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal12 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ offset: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.scrollOffsetChanged.connect { offset in + /// print ("caught signal") + /// } + /// ``` + public var scrollOffsetChanged: Signal12 { Signal12 (target: self, signalName: "scroll_offset_changed") } + +} + +// Support methods for proxies +func _GraphEdit_proxy_get_connection_line (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConnectionLine (fromPosition: args [0]!.assumingMemoryBound (to: Vector2.self).pointee, toPosition: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedVector2Array + ret.content = PackedVector2Array.zero +} + +func _GraphEdit_proxy_is_in_input_hotzone (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._isInInputHotzone (inNode: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), inPort: args [1]!.assumingMemoryBound (to: Int32.self).pointee, mousePosition: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _GraphEdit_proxy_is_in_output_hotzone (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._isInOutputHotzone (inNode: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), inPort: args [1]!.assumingMemoryBound (to: Int32.self).pointee, mousePosition: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _GraphEdit_proxy_is_node_hover_valid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isNodeHoverValid (fromNode: StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), fromPort: args [1]!.assumingMemoryBound (to: Int32.self).pointee, toNode: StringName (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), toPort: args [3]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/GraphElement.swift b/Sources/SwiftGodot/Generated/Api/GraphElement.swift new file mode 100644 index 000000000..57b217cd5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GraphElement.swift @@ -0,0 +1,651 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that represents a basic element that can be placed inside a ``GraphEdit`` control. +/// +/// ``GraphElement`` allows to create custom elements for a ``GraphEdit`` graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see ``GraphNode``. +/// +/// +/// This object emits the following signals: +/// +/// - ``nodeSelected`` +/// - ``nodeDeselected`` +/// - ``raiseRequest`` +/// - ``deleteRequest`` +/// - ``resizeRequest`` +/// - ``resizeEnd`` +/// - ``dragged`` +/// - ``positionOffsetChanged`` +open class GraphElement: Container { + override open class var godotClassName: StringName { "GraphElement" } + + /* Properties */ + + /// The offset of the GraphElement, relative to the scroll offset of the ``GraphEdit``. + final public var positionOffset: Vector2 { + get { + return get_position_offset () + } + + set { + set_position_offset (newValue) + } + + } + + /// If `true`, the user can resize the GraphElement. + /// + /// > Note: Dragging the handle will only emit the [signal resize_request] and [signal resize_end] signals, the GraphElement needs to be resized manually. + /// + final public var resizable: Bool { + get { + return is_resizable () + } + + set { + set_resizable (newValue) + } + + } + + /// If `true`, the user can drag the GraphElement. + final public var draggable: Bool { + get { + return is_draggable () + } + + set { + set_draggable (newValue) + } + + } + + /// If `true`, the user can select the GraphElement. + final public var selectable: Bool { + get { + return is_selectable () + } + + set { + set_selectable (newValue) + } + + } + + /// If `true`, the GraphElement is selected. + final public var selected: Bool { + get { + return is_selected () + } + + set { + set_selected (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_resizable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resizable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resizable(_ resizable: Bool) { + withUnsafePointer(to: resizable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphElement.method_set_resizable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_resizable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_resizable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_resizable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphElement.method_is_resizable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draggable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draggable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draggable(_ draggable: Bool) { + withUnsafePointer(to: draggable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphElement.method_set_draggable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_draggable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_draggable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_draggable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphElement.method_is_draggable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_selectable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_selectable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_selectable(_ selectable: Bool) { + withUnsafePointer(to: selectable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphElement.method_set_selectable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_selectable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_selectable") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_selectable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphElement.method_is_selectable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("set_selected") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_selected(_ selected: Bool) { + withUnsafePointer(to: selected) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphElement.method_set_selected, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_selected") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_selected() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphElement.method_is_selected, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position_offset") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphElement.method_set_position_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position_offset") + return withUnsafePointer(to: &GraphElement.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(GraphElement.method_get_position_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the GraphElement is selected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeSelected.connect { + /// print ("caught signal") + /// } + /// ``` + public var nodeSelected: SimpleSignal { SimpleSignal (target: self, signalName: "node_selected") } + + /// Emitted when the GraphElement is deselected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeDeselected.connect { + /// print ("caught signal") + /// } + /// ``` + public var nodeDeselected: SimpleSignal { SimpleSignal (target: self, signalName: "node_deselected") } + + /// Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.raiseRequest.connect { + /// print ("caught signal") + /// } + /// ``` + public var raiseRequest: SimpleSignal { SimpleSignal (target: self, signalName: "raise_request") } + + /// Emitted when removing the GraphElement is requested. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.deleteRequest.connect { + /// print ("caught signal") + /// } + /// ``` + public var deleteRequest: SimpleSignal { SimpleSignal (target: self, signalName: "delete_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ newSize: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see ``resizable``). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resizeRequest.connect { newSize in + /// print ("caught signal") + /// } + /// ``` + public var resizeRequest: Signal1 { Signal1 (target: self, signalName: "resize_request") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ newSize: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when releasing the mouse button after dragging the resizer handle (see ``resizable``). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.resizeEnd.connect { newSize in + /// print ("caught signal") + /// } + /// ``` + public var resizeEnd: Signal2 { Signal2 (target: self, signalName: "resize_end") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ from: Vector2, _ to: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + let arg_1 = Vector2 (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the GraphElement is dragged. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.dragged.connect { from, to in + /// print ("caught signal") + /// } + /// ``` + public var dragged: Signal3 { Signal3 (target: self, signalName: "dragged") } + + /// Emitted when the GraphElement is moved. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.positionOffsetChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var positionOffsetChanged: SimpleSignal { SimpleSignal (target: self, signalName: "position_offset_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GraphFrame.swift b/Sources/SwiftGodot/Generated/Api/GraphFrame.swift new file mode 100644 index 000000000..565d1aebc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GraphFrame.swift @@ -0,0 +1,414 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// GraphFrame is a special ``GraphElement`` that can be used to organize other ``GraphElement``s inside a ``GraphEdit``. +/// +/// GraphFrame is a special ``GraphElement`` to which other ``GraphElement``s can be attached. It can be configured to automatically resize to enclose all attached ``GraphElement``s. If the frame is moved, all the attached ``GraphElement``s inside it will be moved as well. +/// +/// A GraphFrame is always kept behind the connection layer and other ``GraphElement``s inside a ``GraphEdit``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``autoshrinkChanged`` +open class GraphFrame: GraphElement { + override open class var godotClassName: StringName { "GraphFrame" } + + /* Properties */ + + /// Title of the frame. + final public var title: String { + get { + return get_title () + } + + set { + set_title (newValue) + } + + } + + /// If `true`, the frame's rect will be adjusted automatically to enclose all attached ``GraphElement``s. + final public var autoshrinkEnabled: Bool { + get { + return is_autoshrink_enabled () + } + + set { + set_autoshrink_enabled (newValue) + } + + } + + /// The margin around the attached nodes that is used to calculate the size of the frame when ``autoshrinkEnabled`` is `true`. + final public var autoshrinkMargin: Int32 { + get { + return get_autoshrink_margin () + } + + set { + set_autoshrink_margin (newValue) + } + + } + + /// The margin inside the frame that can be used to drag the frame. + final public var dragMargin: Int32 { + get { + return get_drag_margin () + } + + set { + set_drag_margin (newValue) + } + + } + + /// If `true`, the tint color will be used to tint the frame. + final public var tintColorEnabled: Bool { + get { + return is_tint_color_enabled () + } + + set { + set_tint_color_enabled (newValue) + } + + } + + /// The color of the frame when ``tintColorEnabled`` is `true`. + final public var tintColor: Color { + get { + return get_tint_color () + } + + set { + set_tint_color (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_title: GDExtensionMethodBindPtr = { + let methodName = StringName("set_title") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_title(_ title: String) { + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_title, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_title: GDExtensionMethodBindPtr = { + let methodName = StringName("get_title") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_title() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GraphFrame.method_get_title, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_titlebar_hbox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_titlebar_hbox") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3590609951)! + } + + } + + }() + + /// Returns the ``HBoxContainer`` used for the title bar, only containing a ``Label`` for displaying the title by default. + /// + /// This can be used to add custom controls to the title bar such as option or close buttons. + /// + public final func getTitlebarHbox() -> HBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GraphFrame.method_get_titlebar_hbox, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_autoshrink_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoshrink_enabled") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoshrink_enabled(_ shrink: Bool) { + withUnsafePointer(to: shrink) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_autoshrink_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_autoshrink_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_autoshrink_enabled") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_autoshrink_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphFrame.method_is_autoshrink_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autoshrink_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoshrink_margin") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoshrink_margin(_ autoshrinkMargin: Int32) { + withUnsafePointer(to: autoshrinkMargin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_autoshrink_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autoshrink_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autoshrink_margin") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autoshrink_margin() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GraphFrame.method_get_autoshrink_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_margin") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_margin(_ dragMargin: Int32) { + withUnsafePointer(to: dragMargin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_drag_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_drag_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_drag_margin") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_drag_margin() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GraphFrame.method_get_drag_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tint_color_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tint_color_enabled") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tint_color_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_tint_color_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_tint_color_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_tint_color_enabled") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_tint_color_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphFrame.method_is_tint_color_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tint_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tint_color") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tint_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphFrame.method_set_tint_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tint_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tint_color") + return withUnsafePointer(to: &GraphFrame.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tint_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(GraphFrame.method_get_tint_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when ``autoshrinkEnabled`` or ``autoshrinkMargin`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.autoshrinkChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var autoshrinkChanged: SimpleSignal { SimpleSignal (target: self, signalName: "autoshrink_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GraphNode.swift b/Sources/SwiftGodot/Generated/Api/GraphNode.swift new file mode 100644 index 000000000..20894f3f3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GraphNode.swift @@ -0,0 +1,1145 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container with connection ports, representing a node in a ``GraphEdit``. +/// +/// ``GraphNode`` allows to create nodes for a ``GraphEdit`` graph with customizable content based on its child controls. ``GraphNode`` is derived from ``Container`` and it is responsible for placing its children on screen. This works similar to ``VBoxContainer``. Children, in turn, provide ``GraphNode`` with so-called slots, each of which can have a connection port on either side. +/// +/// Each ``GraphNode`` slot is defined by its index and can provide the node with up to two ports: one on the left, and one on the right. By convention the left port is also referred to as the **input port** and the right port is referred to as the **output port**. Each port can be enabled and configured individually, using different type and color. The type is an arbitrary value that you can define using your own considerations. The parent ``GraphEdit`` will receive this information on each connect and disconnect request. +/// +/// Slots can be configured in the Inspector dock once you add at least one child ``Control``. The properties are grouped by each slot's index in the "Slot" section. +/// +/// > Note: While GraphNode is set up using slots and slot indices, connections are made between the ports which are enabled. Because of that ``GraphEdit`` uses the port's index and not the slot's index. You can use ``getInputPortSlot(portIdx:)`` and ``getOutputPortSlot(portIdx:)`` to get the slot index from the port index. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``slotUpdated`` +open class GraphNode: GraphElement { + override open class var godotClassName: StringName { "GraphNode" } + + /* Properties */ + + /// The text displayed in the GraphNode's title bar. + final public var title: String { + get { + return get_title () + } + + set { + set_title (newValue) + } + + } + + /// If `true`, you can connect ports with different types, even if the connection was not explicitly allowed in the parent ``GraphEdit``. + final public var ignoreInvalidConnectionType: Bool { + get { + return is_ignoring_valid_connection_type () + } + + set { + set_ignore_invalid_connection_type (newValue) + } + + } + + /* Methods */ + /// + @_documentation(visibility: public) + open func _drawPort(slotIndex: Int32, position: Vector2i, left: Bool, color: Color) { + } + + fileprivate static var method_set_title: GDExtensionMethodBindPtr = { + let methodName = StringName("set_title") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_title(_ title: String) { + let title = GString(title) + withUnsafePointer(to: title.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_title, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_title: GDExtensionMethodBindPtr = { + let methodName = StringName("get_title") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_title() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(GraphNode.method_get_title, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_titlebar_hbox: GDExtensionMethodBindPtr = { + let methodName = StringName("get_titlebar_hbox") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3590609951)! + } + + } + + }() + + /// Returns the ``HBoxContainer`` used for the title bar, only containing a ``Label`` for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons. + public final func getTitlebarHbox() -> HBoxContainer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GraphNode.method_get_titlebar_hbox, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_slot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2873310869)! + } + + } + + }() + + /// Sets properties of the slot with the given `slotIndex`. + /// + /// If `enableLeftPort`/`enableRightPort` is `true`, a port will appear and the slot will be able to be connected from this side. + /// + /// With `typeLeft`/`typeRight` an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent ``GraphEdit`` (see ``GraphEdit/addValidConnectionType(fromType:toType:)``). Keep in mind that the ``GraphEdit`` has the final say in accepting the connection. Type compatibility simply allows the [signal GraphEdit.connection_request] signal to be emitted. + /// + /// Ports can be further customized using `colorLeft`/`colorRight` and `customIconLeft`/`customIconRight`. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot. + /// + /// Additionally, `drawStylebox` can be used to enable or disable drawing of the background stylebox for each slot. See [theme_item slot]. + /// + /// Individual properties can also be set using one of the `set_slot_*` methods. + /// + /// > Note: This method only sets properties of the slot. To create the slot itself, add a ``Control``-derived child to the GraphNode. + /// + public final func setSlot(slotIndex: Int32, enableLeftPort: Bool, typeLeft: Int32, colorLeft: Color, enableRightPort: Bool, typeRight: Int32, colorRight: Color, customIconLeft: Texture2D? = nil, customIconRight: Texture2D? = nil, drawStylebox: Bool = true) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: enableLeftPort) { pArg1 in + withUnsafePointer(to: typeLeft) { pArg2 in + withUnsafePointer(to: colorLeft) { pArg3 in + withUnsafePointer(to: enableRightPort) { pArg4 in + withUnsafePointer(to: typeRight) { pArg5 in + withUnsafePointer(to: colorRight) { pArg6 in + withUnsafePointer(to: customIconLeft?.handle) { pArg7 in + withUnsafePointer(to: customIconRight?.handle) { pArg8 in + withUnsafePointer(to: drawStylebox) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_clear_slot: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_slot") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Disables the slot with the given `slotIndex`. This will remove the corresponding input and output port from the GraphNode. + public final func clearSlot(slotIndex: Int32) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_clear_slot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_all_slots: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_all_slots") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Disables all slots of the GraphNode. This will remove all input/output ports from the GraphNode. + public final func clearAllSlots() { + gi.object_method_bind_ptrcall(GraphNode.method_clear_all_slots, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_slot_enabled_left: GDExtensionMethodBindPtr = { + let methodName = StringName("is_slot_enabled_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if left (input) side of the slot with the given `slotIndex` is enabled. + public final func isSlotEnabledLeft(slotIndex: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_is_slot_enabled_left, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_enabled_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_enabled_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Toggles the left (input) side of the slot with the given `slotIndex`. If `enable` is `true`, a port will appear on the left side and the slot will be able to be connected from this side. + public final func setSlotEnabledLeft(slotIndex: Int32, enable: Bool) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_enabled_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_slot_type_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_type_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the left (input) type of the slot with the given `slotIndex` to `type`. If the value is negative, all connections will be disallowed to be created via user inputs. + public final func setSlotTypeLeft(slotIndex: Int32, type: Int32) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: type) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_type_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_type_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_type_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the left (input) type of the slot with the given `slotIndex`. + public final func getSlotTypeLeft(slotIndex: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_type_left, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_color_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_color_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the ``Color`` of the left (input) side of the slot with the given `slotIndex` to `color`. + public final func setSlotColorLeft(slotIndex: Int32, color: Color) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_color_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_color_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_color_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the left (input) ``Color`` of the slot with the given `slotIndex`. + public final func getSlotColorLeft(slotIndex: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_color_left, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_custom_icon_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_custom_icon_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets the custom ``Texture2D`` of the left (input) side of the slot with the given `slotIndex` to `customIcon`. + public final func setSlotCustomIconLeft(slotIndex: Int32, customIcon: Texture2D?) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: customIcon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_custom_icon_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_custom_icon_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_custom_icon_left") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the left (input) custom ``Texture2D`` of the slot with the given `slotIndex`. + public final func getSlotCustomIconLeft(slotIndex: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_custom_icon_left, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_slot_enabled_right: GDExtensionMethodBindPtr = { + let methodName = StringName("is_slot_enabled_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if right (output) side of the slot with the given `slotIndex` is enabled. + public final func isSlotEnabledRight(slotIndex: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_is_slot_enabled_right, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_enabled_right: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_enabled_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Toggles the right (output) side of the slot with the given `slotIndex`. If `enable` is `true`, a port will appear on the right side and the slot will be able to be connected from this side. + public final func setSlotEnabledRight(slotIndex: Int32, enable: Bool) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_enabled_right, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_slot_type_right: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_type_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the right (output) type of the slot with the given `slotIndex` to `type`. If the value is negative, all connections will be disallowed to be created via user inputs. + public final func setSlotTypeRight(slotIndex: Int32, type: Int32) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: type) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_type_right, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_type_right: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_type_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the right (output) type of the slot with the given `slotIndex`. + public final func getSlotTypeRight(slotIndex: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_type_right, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_color_right: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_color_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the ``Color`` of the right (output) side of the slot with the given `slotIndex` to `color`. + public final func setSlotColorRight(slotIndex: Int32, color: Color) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_color_right, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_color_right: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_color_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the right (output) ``Color`` of the slot with the given `slotIndex`. + public final func getSlotColorRight(slotIndex: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_color_right, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_custom_icon_right: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_custom_icon_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets the custom ``Texture2D`` of the right (output) side of the slot with the given `slotIndex` to `customIcon`. + public final func setSlotCustomIconRight(slotIndex: Int32, customIcon: Texture2D?) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: customIcon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_custom_icon_right, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_slot_custom_icon_right: GDExtensionMethodBindPtr = { + let methodName = StringName("get_slot_custom_icon_right") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the right (output) custom ``Texture2D`` of the slot with the given `slotIndex`. + public final func getSlotCustomIconRight(slotIndex: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_slot_custom_icon_right, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_slot_draw_stylebox: GDExtensionMethodBindPtr = { + let methodName = StringName("is_slot_draw_stylebox") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns true if the background ``StyleBox`` of the slot with the given `slotIndex` is drawn. + public final func isSlotDrawStylebox(slotIndex: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_is_slot_draw_stylebox, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_slot_draw_stylebox: GDExtensionMethodBindPtr = { + let methodName = StringName("set_slot_draw_stylebox") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Toggles the background ``StyleBox`` of the slot with the given `slotIndex`. + public final func setSlotDrawStylebox(slotIndex: Int32, enable: Bool) { + withUnsafePointer(to: slotIndex) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_slot_draw_stylebox, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_ignore_invalid_connection_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_invalid_connection_type") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ignore_invalid_connection_type(_ ignore: Bool) { + withUnsafePointer(to: ignore) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_set_ignore_invalid_connection_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ignoring_valid_connection_type: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ignoring_valid_connection_type") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ignoring_valid_connection_type() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GraphNode.method_is_ignoring_valid_connection_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_input_port_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_port_count") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the number of slots with an enabled input port. + public final func getInputPortCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GraphNode.method_get_input_port_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_input_port_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_port_position") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3114997196)! + } + + } + + }() + + /// Returns the position of the input port with the given `portIdx`. + public final func getInputPortPosition(portIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_input_port_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_input_port_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_port_type") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the type of the input port with the given `portIdx`. + public final func getInputPortType(portIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_input_port_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_input_port_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_port_color") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2624840992)! + } + + } + + }() + + /// Returns the ``Color`` of the input port with the given `portIdx`. + public final func getInputPortColor(portIdx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_input_port_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_input_port_slot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_port_slot") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the corresponding slot index of the input port with the given `portIdx`. + public final func getInputPortSlot(portIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_input_port_slot, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_output_port_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_port_count") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the number of slots with an enabled output port. + public final func getOutputPortCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GraphNode.method_get_output_port_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_output_port_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_port_position") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3114997196)! + } + + } + + }() + + /// Returns the position of the output port with the given `portIdx`. + public final func getOutputPortPosition(portIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_output_port_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_output_port_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_port_type") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the type of the output port with the given `portIdx`. + public final func getOutputPortType(portIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_output_port_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_output_port_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_port_color") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2624840992)! + } + + } + + }() + + /// Returns the ``Color`` of the output port with the given `portIdx`. + public final func getOutputPortColor(portIdx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_output_port_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_output_port_slot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_port_slot") + return withUnsafePointer(to: &GraphNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the corresponding slot index of the output port with the given `portIdx`. + public final func getOutputPortSlot(portIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: portIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GraphNode.method_get_output_port_slot, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_draw_port": + return _GraphNode_proxy_draw_port + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ slotIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when any GraphNode's slot is updated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.slotUpdated.connect { slotIndex in + /// print ("caught signal") + /// } + /// ``` + public var slotUpdated: Signal1 { Signal1 (target: self, signalName: "slot_updated") } + +} + +// Support methods for proxies +func _GraphNode_proxy_draw_port (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._drawPort (slotIndex: args [0]!.assumingMemoryBound (to: Int32.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector2i.self).pointee, left: args [2]!.assumingMemoryBound (to: Bool.self).pointee, color: args [3]!.assumingMemoryBound (to: Color.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/GridContainer.swift b/Sources/SwiftGodot/Generated/Api/GridContainer.swift new file mode 100644 index 000000000..2dc1569d6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GridContainer.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that arranges its child controls in a grid layout. +/// +/// ``GridContainer`` arranges its child controls in a grid layout. The number of columns is specified by the ``columns`` property, whereas the number of rows depends on how many are needed for the child controls. The number of rows and columns is preserved for every size of the container. +/// +/// > Note: ``GridContainer`` only works with child nodes inheriting from ``Control``. It won't rearrange child nodes inheriting from ``Node2D``. +/// +open class GridContainer: Container { + override open class var godotClassName: StringName { "GridContainer" } + + /* Properties */ + + /// The number of columns in the ``GridContainer``. If modified, ``GridContainer`` reorders its Control-derived children to accommodate the new layout. + final public var columns: Int32 { + get { + return get_columns () + } + + set { + set_columns (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_columns: GDExtensionMethodBindPtr = { + let methodName = StringName("set_columns") + return withUnsafePointer(to: &GridContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_columns(_ columns: Int32) { + withUnsafePointer(to: columns) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridContainer.method_set_columns, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_columns: GDExtensionMethodBindPtr = { + let methodName = StringName("get_columns") + return withUnsafePointer(to: &GridContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_columns() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GridContainer.method_get_columns, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GridMap.swift b/Sources/SwiftGodot/Generated/Api/GridMap.swift new file mode 100644 index 000000000..30209d77b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GridMap.swift @@ -0,0 +1,1410 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node for 3D tile-based maps. +/// +/// GridMap lets you place meshes on a grid interactively. It works both from the editor and from scripts, which can help you create in-game level editors. +/// +/// GridMaps use a ``MeshLibrary`` which contains a list of tiles. Each tile is a mesh with materials plus optional collision and navigation shapes. +/// +/// A GridMap contains a collection of cells. Each grid cell refers to a tile in the ``MeshLibrary``. All cells in the map have the same dimensions. +/// +/// Internally, a GridMap is split into a sparse collection of octants for efficient rendering and physics processing. Every octant has the same dimensions and can contain several cells. +/// +/// > Note: GridMap doesn't extend ``VisualInstance3D`` and therefore can't be hidden or cull masked based on ``VisualInstance3D/layers``. If you make a light not affect the first layer, the whole GridMap won't be lit by the light in question. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``cellSizeChanged`` +/// - ``changed`` +open class GridMap: Node3D { + override open class var godotClassName: StringName { "GridMap" } + /* Constants */ + /// Invalid cell item that can be used in ``setCellItem(position:item:orientation:)`` to clear cells (or represent an empty cell in ``getCellItem(position:)``). + public static let invalidCellItem = -1 + + /* Properties */ + + /// The assigned ``MeshLibrary``. + final public var meshLibrary: MeshLibrary? { + get { + return get_mesh_library () + } + + set { + set_mesh_library (newValue) + } + + } + + /// Overrides the default friction and bounce physics properties for the whole ``GridMap``. + final public var physicsMaterial: PhysicsMaterial? { + get { + return get_physics_material () + } + + set { + set_physics_material (newValue) + } + + } + + /// The dimensions of the grid's cells. + /// + /// This does not affect the size of the meshes. See ``cellScale``. + /// + final public var cellSize: Vector3 { + get { + return get_cell_size () + } + + set { + set_cell_size (newValue) + } + + } + + /// The size of each octant measured in number of cells. This applies to all three axis. + final public var cellOctantSize: Int32 { + get { + return get_octant_size () + } + + set { + set_octant_size (newValue) + } + + } + + /// If `true`, grid items are centered on the X axis. + final public var cellCenterX: Bool { + get { + return get_center_x () + } + + set { + set_center_x (newValue) + } + + } + + /// If `true`, grid items are centered on the Y axis. + final public var cellCenterY: Bool { + get { + return get_center_y () + } + + set { + set_center_y (newValue) + } + + } + + /// If `true`, grid items are centered on the Z axis. + final public var cellCenterZ: Bool { + get { + return get_center_z () + } + + set { + set_center_z (newValue) + } + + } + + /// The scale of the cell items. + /// + /// This does not affect the size of the grid cells themselves, only the items in them. This can be used to make cell items overlap their neighbors. + /// + final public var cellScale: Double { + get { + return get_cell_scale () + } + + set { + set_cell_scale (newValue) + } + + } + + /// The physics layers this GridMap is in. + /// + /// GridMaps act as static bodies, meaning they aren't affected by gravity or other forces. They only affect other physics bodies that collide with them. + /// + final public var collisionLayer: UInt32 { + get { + return get_collision_layer () + } + + set { + set_collision_layer (newValue) + } + + } + + /// The physics layers this GridMap detects collisions in. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. + final public var collisionPriority: Double { + get { + return get_collision_priority () + } + + set { + set_collision_priority (newValue) + } + + } + + /// If `true`, this GridMap creates a navigation region for each cell that uses a ``meshLibrary`` item with a navigation mesh. The created navigation region will use the navigation layers bitmask assigned to the ``MeshLibrary``'s item. + final public var bakeNavigation: Bool { + get { + return is_baking_navigation () + } + + set { + set_bake_navigation (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_layer(_ layer: UInt32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_collision_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_layer() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(GridMap.method_get_collision_layer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(GridMap.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_layer_value") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionLayer``, given a `layerNumber` between 1 and 32. + public final func setCollisionLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_layer_value") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionLayer`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_collision_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_priority") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_collision_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_priority") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GridMap.method_get_collision_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_material") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1784508650)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_material(_ material: PhysicsMaterial?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_physics_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_material") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2521850424)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physics_material() -> PhysicsMaterial? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GridMap.method_get_physics_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_bake_navigation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_navigation") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_navigation(_ bakeNavigation: Bool) { + withUnsafePointer(to: bakeNavigation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_bake_navigation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_baking_navigation: GDExtensionMethodBindPtr = { + let methodName = StringName("is_baking_navigation") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_baking_navigation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GridMap.method_is_baking_navigation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this GridMap node should use for its cell baked navigation meshes. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the navigation map this GridMap node uses for its cell baked navigation meshes. + /// + /// This function returns always the map set on the GridMap node and not the map on the NavigationServer. If the map is changed directly with the NavigationServer API the GridMap node will not be aware of the map change. + /// + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(GridMap.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_mesh_library: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh_library") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1488083439)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh_library(_ meshLibrary: MeshLibrary?) { + withUnsafePointer(to: meshLibrary?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_mesh_library, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh_library: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh_library") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3350993772)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh_library() -> MeshLibrary? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(GridMap.method_get_mesh_library, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_size") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(GridMap.method_get_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_scale") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_cell_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_scale") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GridMap.method_get_cell_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_octant_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_octant_size") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_octant_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_octant_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_octant_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_octant_size") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_octant_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(GridMap.method_get_octant_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_item: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_item") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3449088946)! + } + + } + + }() + + /// Sets the mesh index for the cell referenced by its grid coordinates. + /// + /// A negative item index such as ``invalidCellItem`` will clear the cell. + /// + /// Optionally, the item's orientation can be passed. For valid orientation values, see ``getOrthogonalIndexFromBasis(_:)``. + /// + public final func setCellItem(position: Vector3i, item: Int32, orientation: Int32 = 0) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: item) { pArg1 in + withUnsafePointer(to: orientation) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_cell_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_cell_item: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_item") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3724960147)! + } + + } + + }() + + /// The ``MeshLibrary`` item index located at the given grid coordinates. If the cell is empty, ``invalidCellItem`` will be returned. + public final func getCellItem(position: Vector3i) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_cell_item, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_cell_item_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_item_orientation") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3724960147)! + } + + } + + }() + + /// The orientation of the cell at the given grid coordinates. `-1` is returned if the cell is empty. + public final func getCellItemOrientation(position: Vector3i) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_cell_item_orientation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_cell_item_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_item_basis") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3493604918)! + } + + } + + }() + + /// Returns the basis that gives the specified cell its orientation. + public final func getCellItemBasis(position: Vector3i) -> Basis { + var _result: Basis = Basis () + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_cell_item_basis, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_basis_with_orthogonal_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_basis_with_orthogonal_index") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2816196998)! + } + + } + + }() + + /// Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code. + public final func getBasisWithOrthogonalIndex(_ index: Int32) -> Basis { + var _result: Basis = Basis () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_basis_with_orthogonal_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_orthogonal_index_from_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_orthogonal_index_from_basis") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4210359952)! + } + + } + + }() + + /// This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code. + public final func getOrthogonalIndexFromBasis(_ basis: Basis) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: basis) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_orthogonal_index_from_basis, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_local_to_map: GDExtensionMethodBindPtr = { + let methodName = StringName("local_to_map") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1257687843)! + } + + } + + }() + + /// Returns the map coordinates of the cell containing the given `localPosition`. If `localPosition` is in global coordinates, consider using ``Node3D/toLocal(globalPoint:)`` before passing it to this method. See also ``mapToLocal(mapPosition:)``. + public final func localToMap(localPosition: Vector3) -> Vector3i { + var _result: Vector3i = Vector3i () + withUnsafePointer(to: localPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_local_to_map, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_to_local: GDExtensionMethodBindPtr = { + let methodName = StringName("map_to_local") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1088329196)! + } + + } + + }() + + /// Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use ``Node3D/toGlobal(localPoint:)``. See also ``localToMap(localPosition:)``. + public final func mapToLocal(mapPosition: Vector3i) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: mapPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_map_to_local, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_resource_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("resource_changed") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + /// This method does nothing. + public final func resourceChanged(resource: Resource?) { + withUnsafePointer(to: resource?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_resource_changed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_center_x: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_x") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_x(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_center_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_x: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_x") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_x() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GridMap.method_get_center_x, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_center_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_y") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_y(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_center_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_y") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_y() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GridMap.method_get_center_y, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_center_z: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_z") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_z(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_set_center_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_z: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_z") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_z() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(GridMap.method_get_center_z, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all cells. + public final func clear() { + gi.object_method_bind_ptrcall(GridMap.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_used_cells: GDExtensionMethodBindPtr = { + let methodName = StringName("get_used_cells") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an array of ``Vector3`` with the non-empty cell coordinates in the grid map. + public final func getUsedCells() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(GridMap.method_get_used_cells, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_used_cells_by_item: GDExtensionMethodBindPtr = { + let methodName = StringName("get_used_cells_by_item") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns an array of all cells with the given item index specified in `item`. + public final func getUsedCellsByItem(_ item: Int32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: item) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_used_cells_by_item, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_get_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_meshes") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an array of ``Transform3D`` and ``Mesh`` references corresponding to the non-empty cells in the grid. The transforms are specified in local space. + public final func getMeshes() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(GridMap.method_get_meshes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_bake_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_meshes") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of ``ArrayMesh``es and ``Transform3D`` references of all bake meshes that exist within the current GridMap. + public final func getBakeMeshes() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(GridMap.method_get_bake_meshes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_bake_mesh_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mesh_instance") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 937000113)! + } + + } + + }() + + /// Returns ``RID`` of a baked mesh with the given `idx`. + public final func getBakeMeshInstance(idx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_get_bake_mesh_instance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_baked_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_baked_meshes") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all baked meshes. See ``makeBakedMeshes(genLightmapUv:lightmapUvTexelSize:)``. + public final func clearBakedMeshes() { + gi.object_method_bind_ptrcall(GridMap.method_clear_baked_meshes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_make_baked_meshes: GDExtensionMethodBindPtr = { + let methodName = StringName("make_baked_meshes") + return withUnsafePointer(to: &GridMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3609286057)! + } + + } + + }() + + /// Bakes lightmap data for all meshes in the assigned ``MeshLibrary``. + public final func makeBakedMeshes(genLightmapUv: Bool = false, lightmapUvTexelSize: Double = 0.1) { + withUnsafePointer(to: genLightmapUv) { pArg0 in + withUnsafePointer(to: lightmapUvTexelSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(GridMap.method_make_baked_meshes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ cellSize: Vector3) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector3 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when ``cellSize`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.cellSizeChanged.connect { cellSize in + /// print ("caught signal") + /// } + /// ``` + public var cellSizeChanged: Signal1 { Signal1 (target: self, signalName: "cell_size_changed") } + + /// Emitted when the ``MeshLibrary`` of this GridMap changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.changed.connect { + /// print ("caught signal") + /// } + /// ``` + public var changed: SimpleSignal { SimpleSignal (target: self, signalName: "changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/GrooveJoint2D.swift b/Sources/SwiftGodot/Generated/Api/GrooveJoint2D.swift new file mode 100644 index 000000000..9543e9d3e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/GrooveJoint2D.swift @@ -0,0 +1,143 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. +/// +/// A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. For example, a ``StaticBody2D`` representing a piston base can be attached to a ``RigidBody2D`` representing the piston head, moving up and down. +open class GrooveJoint2D: Joint2D { + override open class var godotClassName: StringName { "GrooveJoint2D" } + + /* Properties */ + + /// The groove's length. The groove is from the joint's origin towards ``length`` along the joint's local Y axis. + final public var length: Double { + get { + return get_length () + } + + set { + set_length (newValue) + } + + } + + /// The body B's initial anchor position defined by the joint's origin and a local offset ``initialOffset`` along the joint's Y axis (along the groove). + final public var initialOffset: Double { + get { + return get_initial_offset () + } + + set { + set_initial_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_length") + return withUnsafePointer(to: &GrooveJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_length(_ length: Double) { + withUnsafePointer(to: length) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GrooveJoint2D.method_set_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &GrooveJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GrooveJoint2D.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_initial_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_initial_offset") + return withUnsafePointer(to: &GrooveJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_initial_offset(_ offset: Double) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(GrooveJoint2D.method_set_initial_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_initial_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_initial_offset") + return withUnsafePointer(to: &GrooveJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_initial_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(GrooveJoint2D.method_get_initial_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HBoxContainer.swift b/Sources/SwiftGodot/Generated/Api/HBoxContainer.swift new file mode 100644 index 000000000..a43776e4a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HBoxContainer.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that arranges its child controls horizontally. +/// +/// A variant of ``BoxContainer`` that can only arrange its child controls horizontally. Child controls are rearranged automatically when their minimum size changes. +open class HBoxContainer: BoxContainer { + override open class var godotClassName: StringName { "HBoxContainer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HFlowContainer.swift b/Sources/SwiftGodot/Generated/Api/HFlowContainer.swift new file mode 100644 index 000000000..93a6760f7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HFlowContainer.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that arranges its child controls horizontally and wraps them around at the borders. +/// +/// A variant of ``FlowContainer`` that can only arrange its child controls horizontally, wrapping them around at the borders. This is similar to how text in a book wraps around when no more words can fit on a line. +open class HFlowContainer: FlowContainer { + override open class var godotClassName: StringName { "HFlowContainer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HMACContext.swift b/Sources/SwiftGodot/Generated/Api/HMACContext.swift new file mode 100644 index 000000000..df10b794e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HMACContext.swift @@ -0,0 +1,104 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Used to create an HMAC for a message using a key. +/// +/// The HMACContext class is useful for advanced HMAC use cases, such as streaming the message as it supports creating the message over time rather than providing it all at once. +/// +open class HMACContext: RefCounted { + override open class var godotClassName: StringName { "HMACContext" } + /* Methods */ + fileprivate static var method_start: GDExtensionMethodBindPtr = { + let methodName = StringName("start") + return withUnsafePointer(to: &HMACContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3537364598)! + } + + } + + }() + + /// Initializes the HMACContext. This method cannot be called again on the same HMACContext until ``finish()`` has been called. + public final func start(hashType: HashingContext.HashType, key: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: hashType.rawValue) { pArg0 in + withUnsafePointer(to: key.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HMACContext.method_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &HMACContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Updates the message to be HMACed. This can be called multiple times before ``finish()`` is called to append `data` to the message, but cannot be called until ``start(hashType:key:)`` has been called. + public final func update(data: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HMACContext.method_update, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_finish: GDExtensionMethodBindPtr = { + let methodName = StringName("finish") + return withUnsafePointer(to: &HMACContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + /// Returns the resulting HMAC. If the HMAC failed, an empty ``PackedByteArray`` is returned. + public final func finish() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(HMACContext.method_finish, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HScrollBar.swift b/Sources/SwiftGodot/Generated/Api/HScrollBar.swift new file mode 100644 index 000000000..89756f946 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HScrollBar.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A horizontal scrollbar that goes from left (min) to right (max). +/// +/// A horizontal scrollbar, typically used to navigate through content that extends beyond the visible width of a control. It is a ``Range``-based control and goes from left (min) to right (max). +open class HScrollBar: ScrollBar { + override open class var godotClassName: StringName { "HScrollBar" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HSeparator.swift b/Sources/SwiftGodot/Generated/Api/HSeparator.swift new file mode 100644 index 000000000..a03a0a375 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HSeparator.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A horizontal line used for separating other controls. +/// +/// A horizontal separator used for separating other controls that are arranged **vertically**. ``HSeparator`` is purely visual and normally drawn as a ``StyleBoxLine``. +open class HSeparator: Separator { + override open class var godotClassName: StringName { "HSeparator" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HSlider.swift b/Sources/SwiftGodot/Generated/Api/HSlider.swift new file mode 100644 index 000000000..17632b694 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HSlider.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A horizontal slider that goes from left (min) to right (max). +/// +/// A horizontal slider, used to adjust a value by moving a grabber along a horizontal axis. It is a ``Range``-based control and goes from left (min) to right (max). +open class HSlider: Slider { + override open class var godotClassName: StringName { "HSlider" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HSplitContainer.swift b/Sources/SwiftGodot/Generated/Api/HSplitContainer.swift new file mode 100644 index 000000000..230f9061c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HSplitContainer.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that splits two child controls horizontally and provides a grabber for adjusting the split ratio. +/// +/// A container that accepts only two child controls, then arranges them horizontally and creates a divisor between them. The divisor can be dragged around to change the size relation between the child controls. +open class HSplitContainer: SplitContainer { + override open class var godotClassName: StringName { "HSplitContainer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/HTTPClient.swift b/Sources/SwiftGodot/Generated/Api/HTTPClient.swift new file mode 100644 index 000000000..b0873c548 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HTTPClient.swift @@ -0,0 +1,902 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Low-level hyper-text transfer protocol client. +/// +/// Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. +/// +/// See the ``HTTPRequest`` node for a higher-level alternative. +/// +/// > Note: This client only needs to connect to a host once (see ``connectToHost(_:port:tlsOptions:)``) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See ``request(method:url:headers:body:)`` for a full example and to get started. +/// +/// A ``HTTPClient`` should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports Transport Layer Security (TLS), including server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. +/// +/// For more information on HTTP, see MDN's documentation on HTTP (or read RFC 2616 to get it straight from the source). +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +/// > Note: It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. +/// +/// > Note: When performing HTTP requests from a project exported to Web, keep in mind the remote server may not allow requests from foreign origins due to CORS. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the `Access-Control-Allow-Origin: *` HTTP header. +/// +/// > Note: TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. +/// +/// > Warning: TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. +/// +open class HTTPClient: RefCounted { + override open class var godotClassName: StringName { "HTTPClient" } + public enum Method: Int64, CaseIterable, CustomDebugStringConvertible { + /// HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. + case get = 0 // METHOD_GET + /// HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists. + case head = 1 // METHOD_HEAD + /// HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. + case post = 2 // METHOD_POST + /// HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning). + case put = 3 // METHOD_PUT + /// HTTP DELETE method. The DELETE method requests to delete the specified resource. + case delete = 4 // METHOD_DELETE + /// HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used. + case options = 5 // METHOD_OPTIONS + /// HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used. + case trace = 6 // METHOD_TRACE + /// HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. + case connect = 7 // METHOD_CONNECT + /// HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. + case patch = 8 // METHOD_PATCH + /// Represents the size of the ``HTTPClient/Method`` enum. + case max = 9 // METHOD_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .get: return ".get" + case .head: return ".head" + case .post: return ".post" + case .put: return ".put" + case .delete: return ".delete" + case .options: return ".options" + case .trace: return ".trace" + case .connect: return ".connect" + case .patch: return ".patch" + case .max: return ".max" + } + + } + + } + + public enum Status: Int64, CaseIterable, CustomDebugStringConvertible { + /// Status: Disconnected from the server. + case disconnected = 0 // STATUS_DISCONNECTED + /// Status: Currently resolving the hostname for the given URL into an IP. + case resolving = 1 // STATUS_RESOLVING + /// Status: DNS failure: Can't resolve the hostname for the given URL. + case cantResolve = 2 // STATUS_CANT_RESOLVE + /// Status: Currently connecting to server. + case connecting = 3 // STATUS_CONNECTING + /// Status: Can't connect to the server. + case cantConnect = 4 // STATUS_CANT_CONNECT + /// Status: Connection established. + case connected = 5 // STATUS_CONNECTED + /// Status: Currently sending request. + case requesting = 6 // STATUS_REQUESTING + /// Status: HTTP body received. + case body = 7 // STATUS_BODY + /// Status: Error in HTTP connection. + case connectionError = 8 // STATUS_CONNECTION_ERROR + /// Status: Error in TLS handshake. + case tlsHandshakeError = 9 // STATUS_TLS_HANDSHAKE_ERROR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disconnected: return ".disconnected" + case .resolving: return ".resolving" + case .cantResolve: return ".cantResolve" + case .connecting: return ".connecting" + case .cantConnect: return ".cantConnect" + case .connected: return ".connected" + case .requesting: return ".requesting" + case .body: return ".body" + case .connectionError: return ".connectionError" + case .tlsHandshakeError: return ".tlsHandshakeError" + } + + } + + } + + public enum ResponseCode: Int64, CaseIterable, CustomDebugStringConvertible { + /// HTTP status code `100 Continue`. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished). + case `continue` = 100 // RESPONSE_CONTINUE + /// HTTP status code `101 Switching Protocol`. Sent in response to an `Upgrade` request header by the client. Indicates the protocol the server is switching to. + case switchingProtocols = 101 // RESPONSE_SWITCHING_PROTOCOLS + /// HTTP status code `102 Processing` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet. + case processing = 102 // RESPONSE_PROCESSING + /// HTTP status code `200 OK`. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server. + case ok = 200 // RESPONSE_OK + /// HTTP status code `201 Created`. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request. + case created = 201 // RESPONSE_CREATED + /// HTTP status code `202 Accepted`. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. + case accepted = 202 // RESPONSE_ACCEPTED + /// HTTP status code `203 Non-Authoritative Information`. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response. + case nonAuthoritativeInformation = 203 // RESPONSE_NON_AUTHORITATIVE_INFORMATION + /// HTTP status code `204 No Content`. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones. + case noContent = 204 // RESPONSE_NO_CONTENT + /// HTTP status code `205 Reset Content`. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server. + case resetContent = 205 // RESPONSE_RESET_CONTENT + /// HTTP status code `206 Partial Content`. This response code is used because of a range header sent by the client to separate download into multiple streams. + case partialContent = 206 // RESPONSE_PARTIAL_CONTENT + /// HTTP status code `207 Multi-Status` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. + case multiStatus = 207 // RESPONSE_MULTI_STATUS + /// HTTP status code `208 Already Reported` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. + case alreadyReported = 208 // RESPONSE_ALREADY_REPORTED + /// HTTP status code `226 IM Used` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. + case imUsed = 226 // RESPONSE_IM_USED + /// HTTP status code `300 Multiple Choice`. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them. + case multipleChoices = 300 // RESPONSE_MULTIPLE_CHOICES + /// HTTP status code `301 Moved Permanently`. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response. + case movedPermanently = 301 // RESPONSE_MOVED_PERMANENTLY + /// HTTP status code `302 Found`. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests. + case found = 302 // RESPONSE_FOUND + /// HTTP status code `303 See Other`. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. + case seeOther = 303 // RESPONSE_SEE_OTHER + /// HTTP status code `304 Not Modified`. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to `false`. + case notModified = 304 // RESPONSE_NOT_MODIFIED + /// HTTP status code `305 Use Proxy`. + case useProxy = 305 // RESPONSE_USE_PROXY + /// HTTP status code `306 Switch Proxy`. + case switchProxy = 306 // RESPONSE_SWITCH_PROXY + /// HTTP status code `307 Temporary Redirect`. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. + case temporaryRedirect = 307 // RESPONSE_TEMPORARY_REDIRECT + /// HTTP status code `308 Permanent Redirect`. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. + case permanentRedirect = 308 // RESPONSE_PERMANENT_REDIRECT + /// HTTP status code `400 Bad Request`. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). + case badRequest = 400 // RESPONSE_BAD_REQUEST + /// HTTP status code `401 Unauthorized`. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource. + case unauthorized = 401 // RESPONSE_UNAUTHORIZED + /// HTTP status code `402 Payment Required`. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used. + case paymentRequired = 402 // RESPONSE_PAYMENT_REQUIRED + /// HTTP status code `403 Forbidden`. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike `401`, the client's identity is known to the server. + case forbidden = 403 // RESPONSE_FORBIDDEN + /// HTTP status code `404 Not Found`. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized. + case notFound = 404 // RESPONSE_NOT_FOUND + /// HTTP status code `405 Method Not Allowed`. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. + case methodNotAllowed = 405 // RESPONSE_METHOD_NOT_ALLOWED + /// HTTP status code `406 Not Acceptable`. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content. + case notAcceptable = 406 // RESPONSE_NOT_ACCEPTABLE + /// HTTP status code `407 Proxy Authentication Required`. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy. + case proxyAuthenticationRequired = 407 // RESPONSE_PROXY_AUTHENTICATION_REQUIRED + /// HTTP status code `408 Request Timeout`. The server did not receive a complete request message within the time that it was prepared to wait. + case requestTimeout = 408 // RESPONSE_REQUEST_TIMEOUT + /// HTTP status code `409 Conflict`. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. + case conflict = 409 // RESPONSE_CONFLICT + /// HTTP status code `410 Gone`. The target resource is no longer available at the origin server and this condition is likely permanent. + case gone = 410 // RESPONSE_GONE + /// HTTP status code `411 Length Required`. The server refuses to accept the request without a defined Content-Length header. + case lengthRequired = 411 // RESPONSE_LENGTH_REQUIRED + /// HTTP status code `412 Precondition Failed`. One or more conditions given in the request header fields evaluated to `false` when tested on the server. + case preconditionFailed = 412 // RESPONSE_PRECONDITION_FAILED + /// HTTP status code `413 Entity Too Large`. The server is refusing to process a request because the request payload is larger than the server is willing or able to process. + case requestEntityTooLarge = 413 // RESPONSE_REQUEST_ENTITY_TOO_LARGE + /// HTTP status code `414 Request-URI Too Long`. The server is refusing to service the request because the request-target is longer than the server is willing to interpret. + case requestUriTooLong = 414 // RESPONSE_REQUEST_URI_TOO_LONG + /// HTTP status code `415 Unsupported Media Type`. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. + case unsupportedMediaType = 415 // RESPONSE_UNSUPPORTED_MEDIA_TYPE + /// HTTP status code `416 Requested Range Not Satisfiable`. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges. + case requestedRangeNotSatisfiable = 416 // RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE + /// HTTP status code `417 Expectation Failed`. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. + case expectationFailed = 417 // RESPONSE_EXPECTATION_FAILED + /// HTTP status code `418 I'm A Teapot`. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. + case imATeapot = 418 // RESPONSE_IM_A_TEAPOT + /// HTTP status code `421 Misdirected Request`. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. + case misdirectedRequest = 421 // RESPONSE_MISDIRECTED_REQUEST + /// HTTP status code `422 Unprocessable Entity` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. + case unprocessableEntity = 422 // RESPONSE_UNPROCESSABLE_ENTITY + /// HTTP status code `423 Locked` (WebDAV). The source or destination resource of a method is locked. + case locked = 423 // RESPONSE_LOCKED + /// HTTP status code `424 Failed Dependency` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed. + case failedDependency = 424 // RESPONSE_FAILED_DEPENDENCY + /// HTTP status code `426 Upgrade Required`. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. + case upgradeRequired = 426 // RESPONSE_UPGRADE_REQUIRED + /// HTTP status code `428 Precondition Required`. The origin server requires the request to be conditional. + case preconditionRequired = 428 // RESPONSE_PRECONDITION_REQUIRED + /// HTTP status code `429 Too Many Requests`. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. + case tooManyRequests = 429 // RESPONSE_TOO_MANY_REQUESTS + /// HTTP status code `431 Request Header Fields Too Large`. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. + case requestHeaderFieldsTooLarge = 431 // RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE + /// HTTP status code `451 Response Unavailable For Legal Reasons`. The server is denying access to the resource as a consequence of a legal demand. + case unavailableForLegalReasons = 451 // RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS + /// HTTP status code `500 Internal Server Error`. The server encountered an unexpected condition that prevented it from fulfilling the request. + case internalServerError = 500 // RESPONSE_INTERNAL_SERVER_ERROR + /// HTTP status code `501 Not Implemented`. The server does not support the functionality required to fulfill the request. + case notImplemented = 501 // RESPONSE_NOT_IMPLEMENTED + /// HTTP status code `502 Bad Gateway`. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies. + case badGateway = 502 // RESPONSE_BAD_GATEWAY + /// HTTP status code `503 Service Unavailable`. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later. + case serviceUnavailable = 503 // RESPONSE_SERVICE_UNAVAILABLE + /// HTTP status code `504 Gateway Timeout`. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies. + case gatewayTimeout = 504 // RESPONSE_GATEWAY_TIMEOUT + /// HTTP status code `505 HTTP Version Not Supported`. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. + case httpVersionNotSupported = 505 // RESPONSE_HTTP_VERSION_NOT_SUPPORTED + /// HTTP status code `506 Variant Also Negotiates`. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. + case variantAlsoNegotiates = 506 // RESPONSE_VARIANT_ALSO_NEGOTIATES + /// HTTP status code `507 Insufficient Storage`. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. + case insufficientStorage = 507 // RESPONSE_INSUFFICIENT_STORAGE + /// HTTP status code `508 Loop Detected`. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. + case loopDetected = 508 // RESPONSE_LOOP_DETECTED + /// HTTP status code `510 Not Extended`. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. + case notExtended = 510 // RESPONSE_NOT_EXTENDED + /// HTTP status code `511 Network Authentication Required`. The client needs to authenticate to gain network access. + case networkAuthRequired = 511 // RESPONSE_NETWORK_AUTH_REQUIRED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`continue`: return ".`continue`" + case .switchingProtocols: return ".switchingProtocols" + case .processing: return ".processing" + case .ok: return ".ok" + case .created: return ".created" + case .accepted: return ".accepted" + case .nonAuthoritativeInformation: return ".nonAuthoritativeInformation" + case .noContent: return ".noContent" + case .resetContent: return ".resetContent" + case .partialContent: return ".partialContent" + case .multiStatus: return ".multiStatus" + case .alreadyReported: return ".alreadyReported" + case .imUsed: return ".imUsed" + case .multipleChoices: return ".multipleChoices" + case .movedPermanently: return ".movedPermanently" + case .found: return ".found" + case .seeOther: return ".seeOther" + case .notModified: return ".notModified" + case .useProxy: return ".useProxy" + case .switchProxy: return ".switchProxy" + case .temporaryRedirect: return ".temporaryRedirect" + case .permanentRedirect: return ".permanentRedirect" + case .badRequest: return ".badRequest" + case .unauthorized: return ".unauthorized" + case .paymentRequired: return ".paymentRequired" + case .forbidden: return ".forbidden" + case .notFound: return ".notFound" + case .methodNotAllowed: return ".methodNotAllowed" + case .notAcceptable: return ".notAcceptable" + case .proxyAuthenticationRequired: return ".proxyAuthenticationRequired" + case .requestTimeout: return ".requestTimeout" + case .conflict: return ".conflict" + case .gone: return ".gone" + case .lengthRequired: return ".lengthRequired" + case .preconditionFailed: return ".preconditionFailed" + case .requestEntityTooLarge: return ".requestEntityTooLarge" + case .requestUriTooLong: return ".requestUriTooLong" + case .unsupportedMediaType: return ".unsupportedMediaType" + case .requestedRangeNotSatisfiable: return ".requestedRangeNotSatisfiable" + case .expectationFailed: return ".expectationFailed" + case .imATeapot: return ".imATeapot" + case .misdirectedRequest: return ".misdirectedRequest" + case .unprocessableEntity: return ".unprocessableEntity" + case .locked: return ".locked" + case .failedDependency: return ".failedDependency" + case .upgradeRequired: return ".upgradeRequired" + case .preconditionRequired: return ".preconditionRequired" + case .tooManyRequests: return ".tooManyRequests" + case .requestHeaderFieldsTooLarge: return ".requestHeaderFieldsTooLarge" + case .unavailableForLegalReasons: return ".unavailableForLegalReasons" + case .internalServerError: return ".internalServerError" + case .notImplemented: return ".notImplemented" + case .badGateway: return ".badGateway" + case .serviceUnavailable: return ".serviceUnavailable" + case .gatewayTimeout: return ".gatewayTimeout" + case .httpVersionNotSupported: return ".httpVersionNotSupported" + case .variantAlsoNegotiates: return ".variantAlsoNegotiates" + case .insufficientStorage: return ".insufficientStorage" + case .loopDetected: return ".loopDetected" + case .notExtended: return ".notExtended" + case .networkAuthRequired: return ".networkAuthRequired" + } + + } + + } + + + /* Properties */ + + /// If `true`, execution will block until all data is read from the response. + final public var blockingModeEnabled: Bool { + get { + return is_blocking_mode_enabled () + } + + set { + set_blocking_mode (newValue) + } + + } + + /// The connection to use for this client. + final public var connection: StreamPeer? { + get { + return get_connection () + } + + set { + set_connection (newValue) + } + + } + + /// The size of the buffer used and maximum bytes to read per iteration. See ``readResponseBodyChunk()``. + final public var readChunkSize: Int32 { + get { + return get_read_chunk_size () + } + + set { + set_read_chunk_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_connect_to_host: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_to_host") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 504540374)! + } + + } + + }() + + /// Connects to a host. This needs to be done before any requests are sent. + /// + /// If no `port` is specified (or `-1` is used), it is automatically set to 80 for HTTP and 443 for HTTPS. You can pass the optional `tlsOptions` parameter to customize the trusted certification authorities, or the common name verification when using HTTPS. See ``TLSOptions/client(trustedChain:commonNameOverride:)`` and ``TLSOptions/clientUnsafe(trustedChain:)``. + /// + public final func connectToHost(_ host: String, port: Int32 = -1, tlsOptions: TLSOptions? = nil) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: tlsOptions?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_connect_to_host, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_connection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_connection") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3281897016)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_connection(_ connection: StreamPeer?) { + withUnsafePointer(to: connection?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_set_connection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_connection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2741655269)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_connection() -> StreamPeer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(HTTPClient.method_get_connection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_request_raw: GDExtensionMethodBindPtr = { + let methodName = StringName("request_raw") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 540161961)! + } + + } + + }() + + /// Sends a raw request to the connected host. + /// + /// The URL parameter is usually just the part after the host, so for `https://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For ``HTTPClient/Method/options`` requests, `*` is also allowed. For ``HTTPClient/Method/connect`` requests, it should be the authority component (`host:port`). + /// + /// Headers are HTTP request headers. For available HTTP methods, see ``HTTPClient/Method``. + /// + /// Sends the body data raw, as a byte array and does not encode it in any way. + /// + public final func requestRaw(method: HTTPClient.Method, url: String, headers: PackedStringArray, body: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: method.rawValue) { pArg0 in + let url = GString(url) + withUnsafePointer(to: url.content) { pArg1 in + withUnsafePointer(to: headers.content) { pArg2 in + withUnsafePointer(to: body.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_request_raw, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_request: GDExtensionMethodBindPtr = { + let methodName = StringName("request") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3778990155)! + } + + } + + }() + + /// Sends a request to the connected host. + /// + /// The URL parameter is usually just the part after the host, so for `https://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For ``HTTPClient/Method/options`` requests, `*` is also allowed. For ``HTTPClient/Method/connect`` requests, it should be the authority component (`host:port`). + /// + /// Headers are HTTP request headers. For available HTTP methods, see ``HTTPClient/Method``. + /// + /// To create a POST request with query strings to push to the server, do: + /// + /// > Note: The `body` parameter is ignored if `method` is ``HTTPClient/Method/get``. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See ``GString/uriEncode()`` for an example. + /// + public final func request(method: HTTPClient.Method, url: String, headers: PackedStringArray, body: String = "") -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: method.rawValue) { pArg0 in + let url = GString(url) + withUnsafePointer(to: url.content) { pArg1 in + withUnsafePointer(to: headers.content) { pArg2 in + let body = GString(body) + withUnsafePointer(to: body.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_request, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_close: GDExtensionMethodBindPtr = { + let methodName = StringName("close") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Closes the current connection, allowing reuse of this ``HTTPClient``. + public final func close() { + gi.object_method_bind_ptrcall(HTTPClient.method_close, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_has_response: GDExtensionMethodBindPtr = { + let methodName = StringName("has_response") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// If `true`, this ``HTTPClient`` has a response available. + public final func hasResponse() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(HTTPClient.method_has_response, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_response_chunked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_response_chunked") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// If `true`, this ``HTTPClient`` has a response that is chunked. + public final func isResponseChunked() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(HTTPClient.method_is_response_chunked, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_response_code: GDExtensionMethodBindPtr = { + let methodName = StringName("get_response_code") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the response's HTTP status code. + public final func getResponseCode() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPClient.method_get_response_code, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_response_headers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_response_headers") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns the response headers. + public final func getResponseHeaders() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(HTTPClient.method_get_response_headers, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_response_headers_as_dictionary: GDExtensionMethodBindPtr = { + let methodName = StringName("get_response_headers_as_dictionary") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + /// Returns all response headers as a Dictionary of structure `{ "key": "value1; value2" }` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. + /// + /// **Example:** + /// + public final func getResponseHeadersAsDictionary() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(HTTPClient.method_get_response_headers_as_dictionary, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_response_body_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_response_body_length") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the response's body length. + /// + /// > Note: Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`. + /// + /// > Note: This function always returns `-1` on the Web platform due to browsers limitations. + /// + public final func getResponseBodyLength() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(HTTPClient.method_get_response_body_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_read_response_body_chunk: GDExtensionMethodBindPtr = { + let methodName = StringName("read_response_body_chunk") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + /// Reads one chunk from the response. + public final func readResponseBodyChunk() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(HTTPClient.method_read_response_body_chunk, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_read_chunk_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_read_chunk_size") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_read_chunk_size(_ bytes: Int32) { + withUnsafePointer(to: bytes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_set_read_chunk_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_read_chunk_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_read_chunk_size") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_read_chunk_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPClient.method_get_read_chunk_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_blocking_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blocking_mode") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blocking_mode(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_set_blocking_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_blocking_mode_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_blocking_mode_enabled") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_blocking_mode_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(HTTPClient.method_is_blocking_mode_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_status: GDExtensionMethodBindPtr = { + let methodName = StringName("get_status") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1426656811)! + } + + } + + }() + + /// Returns a ``HTTPClient/Status`` constant. Need to call ``poll()`` in order to get status updates. + public final func getStatus() -> HTTPClient.Status { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(HTTPClient.method_get_status, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HTTPClient.Status (rawValue: _result)! + } + + fileprivate static var method_poll: GDExtensionMethodBindPtr = { + let methodName = StringName("poll") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// This needs to be called in order to have any request processed. Check results with ``getStatus()``. + public final func poll() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(HTTPClient.method_poll, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_http_proxy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_http_proxy") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Sets the proxy server for HTTP requests. + /// + /// The proxy server is unset if `host` is empty or `port` is -1. + /// + public final func setHttpProxy(host: String, port: Int32) { + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_set_http_proxy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_https_proxy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_https_proxy") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Sets the proxy server for HTTPS requests. + /// + /// The proxy server is unset if `host` is empty or `port` is -1. + /// + public final func setHttpsProxy(host: String, port: Int32) { + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_set_https_proxy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_query_string_from_dict: GDExtensionMethodBindPtr = { + let methodName = StringName("query_string_from_dict") + return withUnsafePointer(to: &HTTPClient.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2538086567)! + } + + } + + }() + + /// Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: + /// + /// Furthermore, if a key has a `null` value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. + /// + public final func queryStringFromDict(fields: GDictionary) -> String { + let _result = GString () + withUnsafePointer(to: fields.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPClient.method_query_string_from_dict, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HTTPRequest.swift b/Sources/SwiftGodot/Generated/Api/HTTPRequest.swift new file mode 100644 index 000000000..f30e24cbf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HTTPRequest.swift @@ -0,0 +1,840 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node with the ability to send HTTP(S) requests. +/// +/// A node with the ability to send HTTP requests. Uses ``HTTPClient`` internally. +/// +/// Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. +/// +/// > Warning: See the notes and warnings on ``HTTPClient`` for limitations, especially regarding TLS security. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +/// **Example of contacting a REST API and printing one of its returned fields:** +/// +/// **Example of loading and displaying an image using HTTPRequest:** +/// +/// **Gzipped response bodies**: HTTPRequest will automatically handle decompression of response bodies. A `Accept-Encoding` header will be automatically added to each of your requests, unless one is already specified. Any response with a `Content-Encoding: gzip` header will automatically be decompressed and delivered to you as uncompressed bytes. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``requestCompleted`` +open class HTTPRequest: Node { + override open class var godotClassName: StringName { "HTTPRequest" } + public enum Result: Int64, CaseIterable, CustomDebugStringConvertible { + /// Request successful. + case success = 0 // RESULT_SUCCESS + /// + case chunkedBodySizeMismatch = 1 // RESULT_CHUNKED_BODY_SIZE_MISMATCH + /// Request failed while connecting. + case cantConnect = 2 // RESULT_CANT_CONNECT + /// Request failed while resolving. + case cantResolve = 3 // RESULT_CANT_RESOLVE + /// Request failed due to connection (read/write) error. + case connectionError = 4 // RESULT_CONNECTION_ERROR + /// Request failed on TLS handshake. + case tlsHandshakeError = 5 // RESULT_TLS_HANDSHAKE_ERROR + /// Request does not have a response (yet). + case noResponse = 6 // RESULT_NO_RESPONSE + /// Request exceeded its maximum size limit, see ``bodySizeLimit``. + case bodySizeLimitExceeded = 7 // RESULT_BODY_SIZE_LIMIT_EXCEEDED + /// + case bodyDecompressFailed = 8 // RESULT_BODY_DECOMPRESS_FAILED + /// Request failed (currently unused). + case requestFailed = 9 // RESULT_REQUEST_FAILED + /// HTTPRequest couldn't open the download file. + case downloadFileCantOpen = 10 // RESULT_DOWNLOAD_FILE_CANT_OPEN + /// HTTPRequest couldn't write to the download file. + case downloadFileWriteError = 11 // RESULT_DOWNLOAD_FILE_WRITE_ERROR + /// Request reached its maximum redirect limit, see ``maxRedirects``. + case redirectLimitReached = 12 // RESULT_REDIRECT_LIMIT_REACHED + /// Request failed due to a timeout. If you expect requests to take a long time, try increasing the value of ``timeout`` or setting it to `0.0` to remove the timeout completely. + case timeout = 13 // RESULT_TIMEOUT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .success: return ".success" + case .chunkedBodySizeMismatch: return ".chunkedBodySizeMismatch" + case .cantConnect: return ".cantConnect" + case .cantResolve: return ".cantResolve" + case .connectionError: return ".connectionError" + case .tlsHandshakeError: return ".tlsHandshakeError" + case .noResponse: return ".noResponse" + case .bodySizeLimitExceeded: return ".bodySizeLimitExceeded" + case .bodyDecompressFailed: return ".bodyDecompressFailed" + case .requestFailed: return ".requestFailed" + case .downloadFileCantOpen: return ".downloadFileCantOpen" + case .downloadFileWriteError: return ".downloadFileWriteError" + case .redirectLimitReached: return ".redirectLimitReached" + case .timeout: return ".timeout" + } + + } + + } + + + /* Properties */ + + /// The file to download into. Will output any received file into it. + final public var downloadFile: String { + get { + return get_download_file () + } + + set { + set_download_file (newValue) + } + + } + + /// The size of the buffer used and maximum bytes to read per iteration. See ``HTTPClient/readChunkSize``. + /// + /// Set this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds. + /// + final public var downloadChunkSize: Int32 { + get { + return get_download_chunk_size () + } + + set { + set_download_chunk_size (newValue) + } + + } + + /// If `true`, multithreading is used to improve performance. + final public var useThreads: Bool { + get { + return is_using_threads () + } + + set { + set_use_threads (newValue) + } + + } + + /// If `true`, this header will be added to each request: `Accept-Encoding: gzip, deflate` telling servers that it's okay to compress response bodies. + /// + /// Any Response body declaring a `Content-Encoding` of either `gzip` or `deflate` will then be automatically decompressed, and the uncompressed bytes will be delivered via [signal request_completed]. + /// + /// If the user has specified their own `Accept-Encoding` header, then no header will be added regardless of ``acceptGzip``. + /// + /// If `false` no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [signal request_completed]. + /// + final public var acceptGzip: Bool { + get { + return is_accepting_gzip () + } + + set { + set_accept_gzip (newValue) + } + + } + + /// Maximum allowed size for response bodies. If the response body is compressed, this will be used as the maximum allowed size for the decompressed body. + final public var bodySizeLimit: Int32 { + get { + return get_body_size_limit () + } + + set { + set_body_size_limit (newValue) + } + + } + + /// Maximum number of allowed redirects. + final public var maxRedirects: Int32 { + get { + return get_max_redirects () + } + + set { + set_max_redirects (newValue) + } + + } + + /// The duration to wait in seconds before a request times out. If ``timeout`` is set to `0.0` then the request will never time out. For simple requests, such as communication with a REST API, it is recommended that ``timeout`` is set to a value suitable for the server response time (e.g. between `1.0` and `10.0`). This will help prevent unwanted timeouts caused by variation in server response times while still allowing the application to detect when a request has timed out. For larger requests such as file downloads it is suggested the ``timeout`` be set to `0.0`, disabling the timeout functionality. This will help to prevent large transfers from failing due to exceeding the timeout value. + final public var timeout: Double { + get { + return get_timeout () + } + + set { + set_timeout (newValue) + } + + } + + /* Methods */ + fileprivate static var method_request: GDExtensionMethodBindPtr = { + let methodName = StringName("request") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3215244323)! + } + + } + + }() + + /// Creates request on the underlying ``HTTPClient``. If there is no configuration errors, it tries to connect using ``HTTPClient/connectToHost(_:port:tlsOptions:)`` and passes parameters onto ``HTTPClient/request(method:url:headers:body:)``. + /// + /// Returns ``GodotError/ok`` if request is successfully created. (Does not imply that the server has responded), ``GodotError/errUnconfigured`` if not in the tree, ``GodotError/errBusy`` if still processing previous request, ``GodotError/errInvalidParameter`` if given string is not a valid URL format, or ``GodotError/errCantConnect`` if not using thread and the ``HTTPClient`` cannot connect to host. + /// + /// > Note: When `method` is ``HTTPClient/Method/get``, the payload sent via `requestData` might be ignored by the server or even cause the server to reject the request (check RFC 7231 section 4.3.1 for more details). As a workaround, you can send data as a query string in the URL (see ``GString/uriEncode()`` for an example). + /// + /// > Note: It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. + /// + public final func request(url: String, customHeaders: PackedStringArray = PackedStringArray(), method: HTTPClient.Method = .get, requestData: String = "") -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let url = GString(url) + withUnsafePointer(to: url.content) { pArg0 in + withUnsafePointer(to: customHeaders.content) { pArg1 in + withUnsafePointer(to: method.rawValue) { pArg2 in + let requestData = GString(requestData) + withUnsafePointer(to: requestData.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_request, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_request_raw: GDExtensionMethodBindPtr = { + let methodName = StringName("request_raw") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2714829993)! + } + + } + + }() + + /// Creates request on the underlying ``HTTPClient`` using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using ``HTTPClient/connectToHost(_:port:tlsOptions:)`` and passes parameters onto ``HTTPClient/request(method:url:headers:body:)``. + /// + /// Returns ``GodotError/ok`` if request is successfully created. (Does not imply that the server has responded), ``GodotError/errUnconfigured`` if not in the tree, ``GodotError/errBusy`` if still processing previous request, ``GodotError/errInvalidParameter`` if given string is not a valid URL format, or ``GodotError/errCantConnect`` if not using thread and the ``HTTPClient`` cannot connect to host. + /// + public final func requestRaw(url: String, customHeaders: PackedStringArray = PackedStringArray(), method: HTTPClient.Method = .get, requestDataRaw: PackedByteArray = PackedByteArray()) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let url = GString(url) + withUnsafePointer(to: url.content) { pArg0 in + withUnsafePointer(to: customHeaders.content) { pArg1 in + withUnsafePointer(to: method.rawValue) { pArg2 in + withUnsafePointer(to: requestDataRaw.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_request_raw, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_cancel_request: GDExtensionMethodBindPtr = { + let methodName = StringName("cancel_request") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Cancels the current request. + public final func cancelRequest() { + gi.object_method_bind_ptrcall(HTTPRequest.method_cancel_request, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_tls_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tls_options") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2210231844)! + } + + } + + }() + + /// Sets the ``TLSOptions`` to be used when connecting to an HTTPS server. See ``TLSOptions/client(trustedChain:commonNameOverride:)``. + public final func setTlsOptions(clientOptions: TLSOptions?) { + withUnsafePointer(to: clientOptions?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_tls_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_http_client_status: GDExtensionMethodBindPtr = { + let methodName = StringName("get_http_client_status") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1426656811)! + } + + } + + }() + + /// Returns the current status of the underlying ``HTTPClient``. See ``HTTPClient.Status``. + public final func getHttpClientStatus() -> HTTPClient.Status { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(HTTPRequest.method_get_http_client_status, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HTTPClient.Status (rawValue: _result)! + } + + fileprivate static var method_set_use_threads: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_threads") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_threads(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_use_threads, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_threads: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_threads") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_threads() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(HTTPRequest.method_is_using_threads, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_accept_gzip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_accept_gzip") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_accept_gzip(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_accept_gzip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_accepting_gzip: GDExtensionMethodBindPtr = { + let methodName = StringName("is_accepting_gzip") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_accepting_gzip() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(HTTPRequest.method_is_accepting_gzip, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_body_size_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_body_size_limit") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_body_size_limit(_ bytes: Int32) { + withUnsafePointer(to: bytes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_body_size_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_body_size_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_body_size_limit") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_body_size_limit() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_body_size_limit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_redirects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_redirects") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_redirects(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_max_redirects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_redirects: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_redirects") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_redirects() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_max_redirects, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_download_file: GDExtensionMethodBindPtr = { + let methodName = StringName("set_download_file") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_download_file(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_download_file, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_download_file: GDExtensionMethodBindPtr = { + let methodName = StringName("get_download_file") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_download_file() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(HTTPRequest.method_get_download_file, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_downloaded_bytes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_downloaded_bytes") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of bytes this HTTPRequest downloaded. + public final func getDownloadedBytes() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_downloaded_bytes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_body_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_body_size") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the response body length. + /// + /// > Note: Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`. + /// + public final func getBodySize() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_body_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_timeout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_timeout") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_timeout(_ timeout: Double) { + withUnsafePointer(to: timeout) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_timeout, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_timeout: GDExtensionMethodBindPtr = { + let methodName = StringName("get_timeout") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_timeout() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_timeout, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_download_chunk_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_download_chunk_size") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_download_chunk_size(_ chunkSize: Int32) { + withUnsafePointer(to: chunkSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_download_chunk_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_download_chunk_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_download_chunk_size") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_download_chunk_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HTTPRequest.method_get_download_chunk_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_http_proxy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_http_proxy") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Sets the proxy server for HTTP requests. + /// + /// The proxy server is unset if `host` is empty or `port` is -1. + /// + public final func setHttpProxy(host: String, port: Int32) { + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_http_proxy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_https_proxy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_https_proxy") + return withUnsafePointer(to: &HTTPRequest.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Sets the proxy server for HTTPS requests. + /// + /// The proxy server is unset if `host` is empty or `port` is -1. + /// + public final func setHttpsProxy(host: String, port: Int32) { + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HTTPRequest.method_set_https_proxy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ result: Int64, _ responseCode: Int64, _ headers: PackedStringArray, _ body: PackedByteArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = Int64 (args [1]!)! + let arg_2 = PackedStringArray (args [2]!)! + let arg_3 = PackedByteArray (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a request is completed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.requestCompleted.connect { result, responseCode, headers, body in + /// print ("caught signal") + /// } + /// ``` + public var requestCompleted: Signal1 { Signal1 (target: self, signalName: "request_completed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HashingContext.swift b/Sources/SwiftGodot/Generated/Api/HashingContext.swift new file mode 100644 index 000000000..d75f1840e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HashingContext.swift @@ -0,0 +1,122 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides functionality for computing cryptographic hashes chunk by chunk. +/// +/// The HashingContext class provides an interface for computing cryptographic hashes over multiple iterations. Useful for computing hashes of big files (so you don't have to load them all in memory), network streams, and data streams in general (so you don't have to hold buffers). +/// +/// The ``HashingContext/HashType`` enum shows the supported hashing algorithms. +/// +open class HashingContext: RefCounted { + override open class var godotClassName: StringName { "HashingContext" } + public enum HashType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Hashing algorithm: MD5. + case md5 = 0 // HASH_MD5 + /// Hashing algorithm: SHA-1. + case sha1 = 1 // HASH_SHA1 + /// Hashing algorithm: SHA-256. + case sha256 = 2 // HASH_SHA256 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .md5: return ".md5" + case .sha1: return ".sha1" + case .sha256: return ".sha256" + } + + } + + } + + /* Methods */ + fileprivate static var method_start: GDExtensionMethodBindPtr = { + let methodName = StringName("start") + return withUnsafePointer(to: &HashingContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3940338335)! + } + + } + + }() + + /// Starts a new hash computation of the given `type` (e.g. ``HashType/sha256`` to start computation of an SHA-256). + public final func start(type: HashingContext.HashType) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HashingContext.method_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &HashingContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Updates the computation with the given `chunk` of data. + public final func update(chunk: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: chunk.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HashingContext.method_update, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_finish: GDExtensionMethodBindPtr = { + let methodName = StringName("finish") + return withUnsafePointer(to: &HashingContext.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + /// Closes the current context, and return the computed hash. + public final func finish() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(HashingContext.method_finish, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HeightMapShape3D.swift b/Sources/SwiftGodot/Generated/Api/HeightMapShape3D.swift new file mode 100644 index 000000000..b8584530e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HeightMapShape3D.swift @@ -0,0 +1,277 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D height map shape used for physics collision. +/// +/// A 3D heightmap shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape3D``. This is useful for terrain, but it is limited as overhangs (such as caves) cannot be stored. Holes in a ``HeightMapShape3D`` are created by assigning very low values to points in the desired area. +/// +/// **Performance:** ``HeightMapShape3D`` is faster to check collisions against than ``ConcavePolygonShape3D``, but it is significantly slower than primitive shapes like ``BoxShape3D``. +/// +/// A heightmap collision shape can also be build by using an ``Image`` reference: +/// +open class HeightMapShape3D: Shape3D { + override open class var godotClassName: StringName { "HeightMapShape3D" } + + /* Properties */ + + /// Number of vertices in the width of the height map. Changing this will resize the ``mapData``. + final public var mapWidth: Int32 { + get { + return get_map_width () + } + + set { + set_map_width (newValue) + } + + } + + /// Number of vertices in the depth of the height map. Changing this will resize the ``mapData``. + final public var mapDepth: Int32 { + get { + return get_map_depth () + } + + set { + set_map_depth (newValue) + } + + } + + /// Height map data. The array's size must be equal to ``mapWidth`` multiplied by ``mapDepth``. + final public var mapData: PackedFloat32Array { + get { + return get_map_data () + } + + set { + set_map_data (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_map_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_map_width") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_map_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HeightMapShape3D.method_set_map_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_map_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_map_width") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_map_width() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HeightMapShape3D.method_get_map_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_map_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_map_depth") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_map_depth(_ height: Int32) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HeightMapShape3D.method_set_map_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_map_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_map_depth") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_map_depth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(HeightMapShape3D.method_get_map_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_map_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_map_data") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_map_data(_ data: PackedFloat32Array) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HeightMapShape3D.method_set_map_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_map_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_map_data") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_map_data() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(HeightMapShape3D.method_get_map_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_min_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_height") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the smallest height value found in ``mapData``. Recalculates only when ``mapData`` changes. + public final func getMinHeight() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(HeightMapShape3D.method_get_min_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_max_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_height") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the largest height value found in ``mapData``. Recalculates only when ``mapData`` changes. + public final func getMaxHeight() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(HeightMapShape3D.method_get_max_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_update_map_data_from_image: GDExtensionMethodBindPtr = { + let methodName = StringName("update_map_data_from_image") + return withUnsafePointer(to: &HeightMapShape3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2636652979)! + } + + } + + }() + + /// Updates ``mapData`` with data read from an ``Image`` reference. Automatically resizes heightmap ``mapWidth`` and ``mapDepth`` to fit the full image width and height. + /// + /// The image needs to be in either ``Image/Format/rf`` (32 bit), ``Image/Format/rh`` (16 bit), or ``Image/Format/r8`` (8 bit). + /// + /// Each image pixel is read in as a float on the range from `0.0` (black pixel) to `1.0` (white pixel). This range value gets remapped to `heightMin` and `heightMax` to form the final height value. + /// + public final func updateMapDataFromImage(_ image: Image?, heightMin: Double, heightMax: Double) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: heightMin) { pArg1 in + withUnsafePointer(to: heightMax) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(HeightMapShape3D.method_update_map_data_from_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/HingeJoint3D.swift b/Sources/SwiftGodot/Generated/Api/HingeJoint3D.swift new file mode 100644 index 000000000..ecd7fa976 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/HingeJoint3D.swift @@ -0,0 +1,196 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. +/// +/// A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. For example, Body A can be a ``StaticBody3D`` representing a door hinge that a ``RigidBody3D`` rotates around. +open class HingeJoint3D: Joint3D { + override open class var godotClassName: StringName { "HingeJoint3D" } + public enum Param: Int64, CaseIterable, CustomDebugStringConvertible { + /// The speed with which the two bodies get pulled together when they move in different directions. + case bias = 0 // PARAM_BIAS + /// The maximum rotation. Only active if ``angularLimit/enable`` is `true`. + case limitUpper = 1 // PARAM_LIMIT_UPPER + /// The minimum rotation. Only active if ``angularLimit/enable`` is `true`. + case limitLower = 2 // PARAM_LIMIT_LOWER + /// The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + case limitBias = 3 // PARAM_LIMIT_BIAS + /// + case limitSoftness = 4 // PARAM_LIMIT_SOFTNESS + /// The lower this value, the more the rotation gets slowed down. + case limitRelaxation = 5 // PARAM_LIMIT_RELAXATION + /// Target speed for the motor. + case motorTargetVelocity = 6 // PARAM_MOTOR_TARGET_VELOCITY + /// Maximum acceleration for the motor. + case motorMaxImpulse = 7 // PARAM_MOTOR_MAX_IMPULSE + /// Represents the size of the ``HingeJoint3D/Param`` enum. + case max = 8 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bias: return ".bias" + case .limitUpper: return ".limitUpper" + case .limitLower: return ".limitLower" + case .limitBias: return ".limitBias" + case .limitSoftness: return ".limitSoftness" + case .limitRelaxation: return ".limitRelaxation" + case .motorTargetVelocity: return ".motorTargetVelocity" + case .motorMaxImpulse: return ".motorMaxImpulse" + case .max: return ".max" + } + + } + + } + + public enum Flag: Int64, CaseIterable, CustomDebugStringConvertible { + /// If `true`, the hinges maximum and minimum rotation, defined by ``angularLimit/lower`` and ``angularLimit/upper`` has effects. + case useLimit = 0 // FLAG_USE_LIMIT + /// When activated, a motor turns the hinge. + case enableMotor = 1 // FLAG_ENABLE_MOTOR + /// Represents the size of the ``HingeJoint3D/Flag`` enum. + case max = 2 // FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .useLimit: return ".useLimit" + case .enableMotor: return ".enableMotor" + case .max: return ".max" + } + + } + + } + + /* Methods */ + fileprivate static var method_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param") + return withUnsafePointer(to: &HingeJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3082977519)! + } + + } + + }() + + /// Sets the value of the specified parameter. + public final func setParam(_ param: HingeJoint3D.Param, value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HingeJoint3D.method_set_param, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param") + return withUnsafePointer(to: &HingeJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4066002676)! + } + + } + + }() + + /// Returns the value of the specified parameter. + public final func getParam(_ param: HingeJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HingeJoint3D.method_get_param, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flag") + return withUnsafePointer(to: &HingeJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1083494620)! + } + + } + + }() + + /// If `true`, enables the specified flag. + public final func setFlag(_ flag: HingeJoint3D.Flag, enabled: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(HingeJoint3D.method_set_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flag") + return withUnsafePointer(to: &HingeJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841369610)! + } + + } + + }() + + /// Returns the value of the specified flag. + public final func getFlag(_ flag: HingeJoint3D.Flag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(HingeJoint3D.method_get_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/IP.swift b/Sources/SwiftGodot/Generated/Api/IP.swift new file mode 100644 index 000000000..a8577bfc4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/IP.swift @@ -0,0 +1,351 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Internet protocol (IP) support functions such as DNS resolution. +/// +/// IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see ``StreamPeerTCP`` and ``TCPServer``). IP provides DNS hostname resolution support, both blocking and threaded. +open class IP: Object { + /// The shared instance of this class + public static var shared: IP = { + return withUnsafePointer (to: &IP.godotClassName.content) { ptr in + IP (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "IP" } + public enum ResolverStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// DNS hostname resolver status: No status. + case none = 0 // RESOLVER_STATUS_NONE + /// DNS hostname resolver status: Waiting. + case waiting = 1 // RESOLVER_STATUS_WAITING + /// DNS hostname resolver status: Done. + case done = 2 // RESOLVER_STATUS_DONE + /// DNS hostname resolver status: Error. + case error = 3 // RESOLVER_STATUS_ERROR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .waiting: return ".waiting" + case .done: return ".done" + case .error: return ".error" + } + + } + + } + + public enum GType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Address type: None. + case none = 0 // TYPE_NONE + /// Address type: Internet protocol version 4 (IPv4). + case ipv4 = 1 // TYPE_IPV4 + /// Address type: Internet protocol version 6 (IPv6). + case ipv6 = 2 // TYPE_IPV6 + /// Address type: Any. + case any = 3 // TYPE_ANY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .ipv4: return ".ipv4" + case .ipv6: return ".ipv6" + case .any: return ".any" + } + + } + + } + + /* Constants */ + /// Maximum number of concurrent DNS resolver queries allowed, ``resolverInvalidId`` is returned if exceeded. + public static let resolverMaxQueries = 256 + /// Invalid ID constant. Returned if ``resolverMaxQueries`` is exceeded. + public static let resolverInvalidId = -1 + /* Methods */ + fileprivate static var method_resolve_hostname: GDExtensionMethodBindPtr = { + let methodName = StringName("resolve_hostname") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4283295457)! + } + + } + + }() + + /// Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the ``IP/Type`` constant given as `ipType`. + public static func resolveHostname(host: String, ipType: IP.GType = .any) -> String { + let _result = GString () + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: ipType.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_resolve_hostname, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_resolve_hostname_addresses: GDExtensionMethodBindPtr = { + let methodName = StringName("resolve_hostname_addresses") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 773767525)! + } + + } + + }() + + /// Resolves a given hostname in a blocking way. Addresses are returned as an ``GArray`` of IPv4 or IPv6 addresses depending on `ipType`. + public static func resolveHostnameAddresses(host: String, ipType: IP.GType = .any) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: ipType.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_resolve_hostname_addresses, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_resolve_hostname_queue_item: GDExtensionMethodBindPtr = { + let methodName = StringName("resolve_hostname_queue_item") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1749894742)! + } + + } + + }() + + /// Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the ``IP/Type`` constant given as `ipType`. Returns the queue ID if successful, or ``resolverInvalidId`` on error. + public static func resolveHostnameQueueItem(host: String, ipType: IP.GType = .any) -> Int32 { + var _result: Int32 = 0 + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: ipType.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_resolve_hostname_queue_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_resolve_item_status: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolve_item_status") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3812250196)! + } + + } + + }() + + /// Returns a queued hostname's status as a ``IP/ResolverStatus`` constant, given its queue `id`. + public static func getResolveItemStatus(id: Int32) -> IP.ResolverStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_resolve_item_status, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return IP.ResolverStatus (rawValue: _result)! + } + + fileprivate static var method_get_resolve_item_address: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolve_item_address") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns a queued hostname's IP address, given its queue `id`. Returns an empty string on error or if resolution hasn't happened yet (see ``getResolveItemStatus(id:)``). + public static func getResolveItemAddress(id: Int32) -> String { + let _result = GString () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_resolve_item_address, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_resolve_item_addresses: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolve_item_addresses") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see ``getResolveItemStatus(id:)``). + public static func getResolveItemAddresses(id: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_resolve_item_addresses, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_erase_resolve_item: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_resolve_item") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes a given item `id` from the queue. This should be used to free a queue after it has completed to enable more queries to happen. + public static func eraseResolveItem(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_erase_resolve_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_local_addresses: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_addresses") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns all the user's current IPv4 and IPv6 addresses as an array. + public static func getLocalAddresses() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_local_addresses, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_local_interfaces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_interfaces") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns all network adapters as an array. + /// + /// Each adapter is a dictionary of the form: + /// + public static func getLocalInterfaces() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_local_interfaces, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_clear_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_cache") + return withUnsafePointer(to: &IP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3005725572)! + } + + } + + }() + + /// Removes all of a `hostname`'s cached references. If no `hostname` is given, all cached IP addresses are removed. + public static func clearCache(hostname: String = "") { + let hostname = GString(hostname) + withUnsafePointer(to: hostname.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clear_cache, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Image.swift b/Sources/SwiftGodot/Generated/Api/Image.swift new file mode 100644 index 000000000..20c844ddb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Image.swift @@ -0,0 +1,2235 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Image datatype. +/// +/// Native image datatype. Contains image data which can be converted to an ``ImageTexture`` and provides commonly used _image processing_ methods. The maximum width and height for an ``Image`` are ``maxWidth`` and ``maxHeight``. +/// +/// An ``Image`` cannot be assigned to a texture property of an object directly (such as ``Sprite2D/texture``), and has to be converted manually to an ``ImageTexture`` first. +/// +/// > Note: The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. +/// +open class Image: Resource { + override open class var godotClassName: StringName { "Image" } + public enum Format: Int64, CaseIterable, CustomDebugStringConvertible { + /// Texture format with a single 8-bit depth representing luminance. + case l8 = 0 // FORMAT_L8 + /// OpenGL texture format with two values, luminance and alpha each stored with 8 bits. + case la8 = 1 // FORMAT_LA8 + /// OpenGL texture format `RED` with a single component and a bitdepth of 8. + case r8 = 2 // FORMAT_R8 + /// OpenGL texture format `RG` with two components and a bitdepth of 8 for each. + case rg8 = 3 // FORMAT_RG8 + /// OpenGL texture format `RGB` with three components, each with a bitdepth of 8. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case rgb8 = 4 // FORMAT_RGB8 + /// OpenGL texture format `RGBA` with four components, each with a bitdepth of 8. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case rgba8 = 5 // FORMAT_RGBA8 + /// OpenGL texture format `RGBA` with four components, each with a bitdepth of 4. + case rgba4444 = 6 // FORMAT_RGBA4444 + /// OpenGL texture format `RGB` with three components. Red and blue have a bitdepth of 5, and green has a bitdepth of 6. + case rgb565 = 7 // FORMAT_RGB565 + /// OpenGL texture format `GL_R32F` where there's one component, a 32-bit floating-point value. + case rf = 8 // FORMAT_RF + /// OpenGL texture format `GL_RG32F` where there are two components, each a 32-bit floating-point values. + case rgf = 9 // FORMAT_RGF + /// OpenGL texture format `GL_RGB32F` where there are three components, each a 32-bit floating-point values. + case rgbf = 10 // FORMAT_RGBF + /// OpenGL texture format `GL_RGBA32F` where there are four components, each a 32-bit floating-point values. + case rgbaf = 11 // FORMAT_RGBAF + /// OpenGL texture format `GL_R16F` where there's one component, a 16-bit "half-precision" floating-point value. + case rh = 12 // FORMAT_RH + /// OpenGL texture format `GL_RG16F` where there are two components, each a 16-bit "half-precision" floating-point value. + case rgh = 13 // FORMAT_RGH + /// OpenGL texture format `GL_RGB16F` where there are three components, each a 16-bit "half-precision" floating-point value. + case rgbh = 14 // FORMAT_RGBH + /// OpenGL texture format `GL_RGBA16F` where there are four components, each a 16-bit "half-precision" floating-point value. + case rgbah = 15 // FORMAT_RGBAH + /// A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. + case rgbe9995 = 16 // FORMAT_RGBE9995 + /// The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case dxt1 = 17 // FORMAT_DXT1 + /// The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case dxt3 = 18 // FORMAT_DXT3 + /// The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case dxt5 = 19 // FORMAT_DXT5 + /// Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. + case rgtcR = 20 // FORMAT_RGTC_R + /// Texture format that uses Red Green Texture Compression, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. + case rgtcRg = 21 // FORMAT_RGTC_RG + /// Texture format that uses BPTC compression with unsigned normalized RGBA components. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case bptcRgba = 22 // FORMAT_BPTC_RGBA + /// Texture format that uses BPTC compression with signed floating-point RGB components. + case bptcRgbf = 23 // FORMAT_BPTC_RGBF + /// Texture format that uses BPTC compression with unsigned floating-point RGB components. + case bptcRgbfu = 24 // FORMAT_BPTC_RGBFU + /// Ericsson Texture Compression format 1, also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. + case etc = 25 // FORMAT_ETC + /// Ericsson Texture Compression format 2 (`R11_EAC` variant), which provides one channel of unsigned data. + case etc2R11 = 26 // FORMAT_ETC2_R11 + /// Ericsson Texture Compression format 2 (`SIGNED_R11_EAC` variant), which provides one channel of signed data. + case etc2R11s = 27 // FORMAT_ETC2_R11S + /// Ericsson Texture Compression format 2 (`RG11_EAC` variant), which provides two channels of unsigned data. + case etc2Rg11 = 28 // FORMAT_ETC2_RG11 + /// Ericsson Texture Compression format 2 (`SIGNED_RG11_EAC` variant), which provides two channels of signed data. + case etc2Rg11s = 29 // FORMAT_ETC2_RG11S + /// Ericsson Texture Compression format 2 (`RGB8` variant), which is a follow-up of ETC1 and compresses RGB888 data. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case etc2Rgb8 = 30 // FORMAT_ETC2_RGB8 + /// Ericsson Texture Compression format 2 (`RGBA8`variant), which compresses RGBA8888 data with full alpha support. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case etc2Rgba8 = 31 // FORMAT_ETC2_RGBA8 + /// Ericsson Texture Compression format 2 (`RGB8_PUNCHTHROUGH_ALPHA1` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. + /// + /// > Note: When creating an ``ImageTexture``, an sRGB to linear color space conversion is performed. + /// + case etc2Rgb8a1 = 32 // FORMAT_ETC2_RGB8A1 + /// Ericsson Texture Compression format 2 (`RGBA8` variant), which compresses RA data and interprets it as two channels (red and green). See also ``Format/etc2Rgba8``. + case etc2RaAsRg = 33 // FORMAT_ETC2_RA_AS_RG + /// The S3TC texture format also known as Block Compression 3 or BC3, which compresses RA data and interprets it as two channels (red and green). See also ``Format/dxt5``. + case dxt5RaAsRg = 34 // FORMAT_DXT5_RA_AS_RG + /// Adaptive Scalable Texture Compression. This implements the 4×4 (high quality) mode. + case astc4x4 = 35 // FORMAT_ASTC_4x4 + /// Same format as ``Format/astc4x4``, but with the hint to let the GPU know it is used for HDR. + case astc4x4Hdr = 36 // FORMAT_ASTC_4x4_HDR + /// Adaptive Scalable Texture Compression. This implements the 8×8 (low quality) mode. + case astc8x8 = 37 // FORMAT_ASTC_8x8 + /// Same format as ``Format/astc8x8``, but with the hint to let the GPU know it is used for HDR. + case astc8x8Hdr = 38 // FORMAT_ASTC_8x8_HDR + /// Represents the size of the ``Image/Format`` enum. + case max = 39 // FORMAT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .l8: return ".l8" + case .la8: return ".la8" + case .r8: return ".r8" + case .rg8: return ".rg8" + case .rgb8: return ".rgb8" + case .rgba8: return ".rgba8" + case .rgba4444: return ".rgba4444" + case .rgb565: return ".rgb565" + case .rf: return ".rf" + case .rgf: return ".rgf" + case .rgbf: return ".rgbf" + case .rgbaf: return ".rgbaf" + case .rh: return ".rh" + case .rgh: return ".rgh" + case .rgbh: return ".rgbh" + case .rgbah: return ".rgbah" + case .rgbe9995: return ".rgbe9995" + case .dxt1: return ".dxt1" + case .dxt3: return ".dxt3" + case .dxt5: return ".dxt5" + case .rgtcR: return ".rgtcR" + case .rgtcRg: return ".rgtcRg" + case .bptcRgba: return ".bptcRgba" + case .bptcRgbf: return ".bptcRgbf" + case .bptcRgbfu: return ".bptcRgbfu" + case .etc: return ".etc" + case .etc2R11: return ".etc2R11" + case .etc2R11s: return ".etc2R11s" + case .etc2Rg11: return ".etc2Rg11" + case .etc2Rg11s: return ".etc2Rg11s" + case .etc2Rgb8: return ".etc2Rgb8" + case .etc2Rgba8: return ".etc2Rgba8" + case .etc2Rgb8a1: return ".etc2Rgb8a1" + case .etc2RaAsRg: return ".etc2RaAsRg" + case .dxt5RaAsRg: return ".dxt5RaAsRg" + case .astc4x4: return ".astc4x4" + case .astc4x4Hdr: return ".astc4x4Hdr" + case .astc8x8: return ".astc8x8" + case .astc8x8Hdr: return ".astc8x8Hdr" + case .max: return ".max" + } + + } + + } + + public enum Interpolation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. + case nearest = 0 // INTERPOLATE_NEAREST + /// Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than ``Interpolation/cubic``, but it results in lower quality. + case bilinear = 1 // INTERPOLATE_BILINEAR + /// Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to ``Interpolation/bilinear``, at the cost of being slower. + case cubic = 2 // INTERPOLATE_CUBIC + /// Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. + /// + /// It's slower than ``Interpolation/bilinear``, but produces higher-quality results with far fewer aliasing artifacts. + /// + /// If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. + /// + /// > Note: If you intend to scale multiple copies of the original image, it's better to call ``generateMipmaps(renormalize:)``] on it in advance, to avoid wasting processing power in generating them again and again. + /// + /// On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. + /// + case trilinear = 3 // INTERPOLATE_TRILINEAR + /// Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscaling images. + case lanczos = 4 // INTERPOLATE_LANCZOS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .bilinear: return ".bilinear" + case .cubic: return ".cubic" + case .trilinear: return ".trilinear" + case .lanczos: return ".lanczos" + } + + } + + } + + public enum AlphaMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Image does not have alpha. + case none = 0 // ALPHA_NONE + /// Image stores alpha in a single bit. + case bit = 1 // ALPHA_BIT + /// Image uses alpha. + case blend = 2 // ALPHA_BLEND + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .bit: return ".bit" + case .blend: return ".blend" + } + + } + + } + + public enum CompressMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use S3TC compression. + case s3tc = 0 // COMPRESS_S3TC + /// Use ETC compression. + case etc = 1 // COMPRESS_ETC + /// Use ETC2 compression. + case etc2 = 2 // COMPRESS_ETC2 + /// Use BPTC compression. + case bptc = 3 // COMPRESS_BPTC + /// Use ASTC compression. + case astc = 4 // COMPRESS_ASTC + /// Represents the size of the ``Image/CompressMode`` enum. + case max = 5 // COMPRESS_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .s3tc: return ".s3tc" + case .etc: return ".etc" + case .etc2: return ".etc2" + case .bptc: return ".bptc" + case .astc: return ".astc" + case .max: return ".max" + } + + } + + } + + public enum UsedChannels: Int64, CaseIterable, CustomDebugStringConvertible { + /// The image only uses one channel for luminance (grayscale). + case l = 0 // USED_CHANNELS_L + /// The image uses two channels for luminance and alpha, respectively. + case la = 1 // USED_CHANNELS_LA + /// The image only uses the red channel. + case r = 2 // USED_CHANNELS_R + /// The image uses two channels for red and green. + case rg = 3 // USED_CHANNELS_RG + /// The image uses three channels for red, green, and blue. + case rgb = 4 // USED_CHANNELS_RGB + /// The image uses four channels for red, green, blue, and alpha. + case rgba = 5 // USED_CHANNELS_RGBA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .l: return ".l" + case .la: return ".la" + case .r: return ".r" + case .rg: return ".rg" + case .rgb: return ".rgb" + case .rgba: return ".rgba" + } + + } + + } + + public enum CompressSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Source texture (before compression) is a regular texture. Default for all textures. + case generic = 0 // COMPRESS_SOURCE_GENERIC + /// Source texture (before compression) is in sRGB space. + case srgb = 1 // COMPRESS_SOURCE_SRGB + /// Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). + case normal = 2 // COMPRESS_SOURCE_NORMAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .generic: return ".generic" + case .srgb: return ".srgb" + case .normal: return ".normal" + } + + } + + } + + public enum ASTCFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Hint to indicate that the high quality 4×4 ASTC compression format should be used. + case astcFormat4x4 = 0 // ASTC_FORMAT_4x4 + /// Hint to indicate that the low quality 8×8 ASTC compression format should be used. + case astcFormat8x8 = 1 // ASTC_FORMAT_8x8 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .astcFormat4x4: return ".astcFormat4x4" + case .astcFormat8x8: return ".astcFormat8x8" + } + + } + + } + + /* Constants */ + /// The maximal width allowed for ``Image`` resources. + public static let maxWidth = 16777216 + /// The maximal height allowed for ``Image`` resources. + public static let maxHeight = 16777216 + + /* Properties */ + + /* Methods */ + fileprivate static var method_get_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_width") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the image's width. + public final func getWidth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Image.method_get_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the image's height. + public final func getHeight() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Image.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns the image's size (width and height). + public final func getSize() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(Image.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("has_mipmaps") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the image has generated mipmaps. + public final func hasMipmaps() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Image.method_has_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3847873762)! + } + + } + + }() + + /// Returns the image's format. See ``Image/Format`` constants. + public final func getFormat() -> Image.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Image.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Image.Format (rawValue: _result)! + } + + fileprivate static var method_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2362200018)! + } + + } + + }() + + /// Returns a copy of the image's raw data. + public final func getData() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(Image.method_get_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_data_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data_size") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns size (in bytes) of the image's raw data. + public final func getDataSize() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(Image.method_get_data_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_convert: GDExtensionMethodBindPtr = { + let methodName = StringName("convert") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2120693146)! + } + + } + + }() + + /// Converts the image's format. See ``Image/Format`` constants. + public final func convert(format: Image.Format) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_convert, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mipmap_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mipmap_count") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count. + public final func getMipmapCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Image.method_get_mipmap_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_mipmap_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mipmap_offset") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the offset where the image's mipmap with index `mipmap` is stored in the ``data`` dictionary. + public final func getMipmapOffset(mipmap: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: mipmap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_get_mipmap_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_resize_to_po2: GDExtensionMethodBindPtr = { + let methodName = StringName("resize_to_po2") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4189212329)! + } + + } + + }() + + /// Resizes the image to the nearest power of 2 for the width and height. If `square` is `true` then set width and height to be the same. New pixels are calculated using the `interpolation` mode defined via ``Image/Interpolation`` constants. + public final func resizeToPo2(square: Bool = false, interpolation: Image.Interpolation = .bilinear) { + withUnsafePointer(to: square) { pArg0 in + withUnsafePointer(to: interpolation.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_resize_to_po2, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_resize: GDExtensionMethodBindPtr = { + let methodName = StringName("resize") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 994498151)! + } + + } + + }() + + /// Resizes the image to the given `width` and `height`. New pixels are calculated using the `interpolation` mode defined via ``Image/Interpolation`` constants. + public final func resize(width: Int32, height: Int32, interpolation: Image.Interpolation = .bilinear) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: interpolation.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_resize, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_shrink_x2: GDExtensionMethodBindPtr = { + let methodName = StringName("shrink_x2") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Shrinks the image by a factor of 2 on each axis (this divides the pixel count by 4). + public final func shrinkX2() { + gi.object_method_bind_ptrcall(Image.method_shrink_x2, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_crop: GDExtensionMethodBindPtr = { + let methodName = StringName("crop") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Crops the image to the given `width` and `height`. If the specified size is larger than the current size, the extra area is filled with black pixels. + public final func crop(width: Int32, height: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_crop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_flip_x: GDExtensionMethodBindPtr = { + let methodName = StringName("flip_x") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Flips the image horizontally. + public final func flipX() { + gi.object_method_bind_ptrcall(Image.method_flip_x, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_flip_y: GDExtensionMethodBindPtr = { + let methodName = StringName("flip_y") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Flips the image vertically. + public final func flipY() { + gi.object_method_bind_ptrcall(Image.method_flip_y, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_generate_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_mipmaps") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1633102583)! + } + + } + + }() + + /// Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is `0`. Enabling `renormalize` when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. + /// + /// It is possible to check if the image has mipmaps by calling ``hasMipmaps()`` or ``getMipmapCount()``. Calling ``generateMipmaps(renormalize:)`` on an image that already has mipmaps will replace existing mipmaps in the image. + /// + public final func generateMipmaps(renormalize: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: renormalize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_generate_mipmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_clear_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_mipmaps") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes the image's mipmaps. + public final func clearMipmaps() { + gi.object_method_bind_ptrcall(Image.method_clear_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create: GDExtensionMethodBindPtr = { + let methodName = StringName("create") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 986942177)! + } + + } + + }() + + /// Creates an empty image of given size and format. See ``Image/Format`` constants. If `useMipmaps` is `true`, then generate mipmaps for this image. See the ``generateMipmaps(renormalize:)``. + public static func create(width: Int32, height: Int32, useMipmaps: Bool, format: Image.Format) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: useMipmaps) { pArg2 in + withUnsafePointer(to: format.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_create, nil, pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_empty: GDExtensionMethodBindPtr = { + let methodName = StringName("create_empty") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 986942177)! + } + + } + + }() + + /// Creates an empty image of given size and format. See ``Image/Format`` constants. If `useMipmaps` is `true`, then generate mipmaps for this image. See the ``generateMipmaps(renormalize:)``. + public static func createEmpty(width: Int32, height: Int32, useMipmaps: Bool, format: Image.Format) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: useMipmaps) { pArg2 in + withUnsafePointer(to: format.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_create_empty, nil, pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_from_data: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_data") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 299398494)! + } + + } + + }() + + /// Creates a new image of given size and format. See ``Image/Format`` constants. Fills the image with the given raw data. If `useMipmaps` is `true` then loads mipmaps for this image from `data`. See ``generateMipmaps(renormalize:)``. + public static func createFromData(width: Int32, height: Int32, useMipmaps: Bool, format: Image.Format, data: PackedByteArray) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: useMipmaps) { pArg2 in + withUnsafePointer(to: format.rawValue) { pArg3 in + withUnsafePointer(to: data.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_create_from_data, nil, pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_data") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2740482212)! + } + + } + + }() + + /// Overwrites data of an existing ``Image``. Non-static equivalent of ``createFromData(width:height:useMipmaps:format:data:)``. + public final func setData(width: Int32, height: Int32, useMipmaps: Bool, format: Image.Format, data: PackedByteArray) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: useMipmaps) { pArg2 in + withUnsafePointer(to: format.rawValue) { pArg3 in + withUnsafePointer(to: data.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Image.method_set_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_empty: GDExtensionMethodBindPtr = { + let methodName = StringName("is_empty") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the image has no data. + public final func isEmpty() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Image.method_is_empty, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Loads an image from file `path`. See Supported image formats for a list of supported image formats and limitations. + /// + /// > Warning: This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the `user://` directory, and may not work in exported projects. + /// + /// See also ``ImageTexture`` description for usage examples. + /// + public final func load(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_from_file: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_file") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 736337515)! + } + + } + + }() + + /// Creates a new ``Image`` and loads data from the specified file. + public static func loadFromFile(path: String) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_from_file, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_save_png: GDExtensionMethodBindPtr = { + let methodName = StringName("save_png") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2113323047)! + } + + } + + }() + + /// Saves the image as a PNG file to the file at `path`. + public final func savePng(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_png, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_png_to_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("save_png_to_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2362200018)! + } + + } + + }() + + /// Saves the image as a PNG file to a byte array. + public final func savePngToBuffer() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(Image.method_save_png_to_buffer, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_save_jpg: GDExtensionMethodBindPtr = { + let methodName = StringName("save_jpg") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2800019068)! + } + + } + + }() + + /// Saves the image as a JPEG file to `path` with the specified `quality` between `0.01` and `1.0` (inclusive). Higher `quality` values result in better-looking output at the cost of larger file sizes. Recommended `quality` values are between `0.75` and `0.90`. Even at quality `1.00`, JPEG compression remains lossy. + /// + /// > Note: JPEG does not save an alpha channel. If the ``Image`` contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. + /// + public final func saveJpg(path: String, quality: Double = 0.75) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: quality) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_jpg, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_jpg_to_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("save_jpg_to_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 592235273)! + } + + } + + }() + + /// Saves the image as a JPEG file to a byte array with the specified `quality` between `0.01` and `1.0` (inclusive). Higher `quality` values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended `quality` values are between `0.75` and `0.90`. Even at quality `1.00`, JPEG compression remains lossy. + /// + /// > Note: JPEG does not save an alpha channel. If the ``Image`` contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. + /// + public final func saveJpgToBuffer(quality: Double = 0.75) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: quality) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_jpg_to_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_save_exr: GDExtensionMethodBindPtr = { + let methodName = StringName("save_exr") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3108122999)! + } + + } + + }() + + /// Saves the image as an EXR file to `path`. If `grayscale` is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return ``GodotError/errUnavailable`` if Godot was compiled without the TinyEXR module. + /// + /// > Note: The TinyEXR module is disabled in non-editor builds, which means ``saveExr(path:grayscale:)`` will return ``GodotError/errUnavailable`` when it is called from an exported project. + /// + public final func saveExr(path: String, grayscale: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: grayscale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_exr, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_exr_to_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("save_exr_to_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3178917920)! + } + + } + + }() + + /// Saves the image as an EXR file to a byte array. If `grayscale` is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. + /// + /// > Note: The TinyEXR module is disabled in non-editor builds, which means ``saveExr(path:grayscale:)`` will return an empty byte array when it is called from an exported project. + /// + public final func saveExrToBuffer(grayscale: Bool = false) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: grayscale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_exr_to_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_save_webp: GDExtensionMethodBindPtr = { + let methodName = StringName("save_webp") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2781156876)! + } + + } + + }() + + /// Saves the image as a WebP (Web Picture) file to the file at `path`. By default it will save lossless. If `lossy` is true, the image will be saved lossy, using the `quality` setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + /// + /// > Note: The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. + /// + public final func saveWebp(path: String, lossy: Bool = false, quality: Double = 0.75) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: lossy) { pArg1 in + withUnsafePointer(to: quality) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_webp, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_save_webp_to_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("save_webp_to_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214628238)! + } + + } + + }() + + /// Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If `lossy` is true, the image will be saved lossy, using the `quality` setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + /// + /// > Note: The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. + /// + public final func saveWebpToBuffer(lossy: Bool = false, quality: Double = 0.75) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: lossy) { pArg0 in + withUnsafePointer(to: quality) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_save_webp_to_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_detect_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("detect_alpha") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2030116505)! + } + + } + + }() + + /// Returns ``AlphaMode/blend`` if the image has data for alpha values. Returns ``AlphaMode/bit`` if all the alpha values are stored in a single bit. Returns ``AlphaMode/none`` if no data for alpha values is found. + public final func detectAlpha() -> Image.AlphaMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Image.method_detect_alpha, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Image.AlphaMode (rawValue: _result)! + } + + fileprivate static var method_is_invisible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_invisible") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if all the image's pixels have an alpha value of 0. Returns `false` if any pixel has an alpha value higher than 0. + public final func isInvisible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Image.method_is_invisible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_detect_used_channels: GDExtensionMethodBindPtr = { + let methodName = StringName("detect_used_channels") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2703139984)! + } + + } + + }() + + /// Returns the color channels used by this image, as one of the ``Image/UsedChannels`` constants. If the image is compressed, the original `source` must be specified. + public final func detectUsedChannels(source: Image.CompressSource = .generic) -> Image.UsedChannels { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: source.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_detect_used_channels, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Image.UsedChannels (rawValue: _result)! + } + + fileprivate static var method_compress: GDExtensionMethodBindPtr = { + let methodName = StringName("compress") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2975424957)! + } + + } + + }() + + /// Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + /// + /// The `source` parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. + /// + /// For ASTC compression, the `astcFormat` parameter must be supplied. + /// + public final func compress(mode: Image.CompressMode, source: Image.CompressSource = .generic, astcFormat: Image.ASTCFormat = .astcFormat4x4) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: source.rawValue) { pArg1 in + withUnsafePointer(to: astcFormat.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_compress, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_compress_from_channels: GDExtensionMethodBindPtr = { + let methodName = StringName("compress_from_channels") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4212890953)! + } + + } + + }() + + /// Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + /// + /// This is an alternative to ``compress(mode:source:astcFormat:)`` that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. + /// + /// For ASTC compression, the `astcFormat` parameter must be supplied. + /// + public final func compressFromChannels(mode: Image.CompressMode, channels: Image.UsedChannels, astcFormat: Image.ASTCFormat = .astcFormat4x4) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: channels.rawValue) { pArg1 in + withUnsafePointer(to: astcFormat.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_compress_from_channels, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_decompress: GDExtensionMethodBindPtr = { + let methodName = StringName("decompress") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Decompresses the image if it is VRAM compressed in a supported format. Returns ``GodotError/ok`` if the format is supported, otherwise ``GodotError/errUnavailable``. + /// + /// > Note: The following formats can be decompressed: DXT, RGTC, BPTC. The formats ETC1 and ETC2 are not supported. + /// + public final func decompress() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Image.method_decompress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_compressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_compressed") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the image is compressed. + public final func isCompressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Image.method_is_compressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_rotate_90: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_90") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1901204267)! + } + + } + + }() + + /// Rotates the image in the specified `direction` by `90` degrees. The width and height of the image must be greater than `1`. If the width and height are not equal, the image will be resized. + public final func rotate90(direction: ClockDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_rotate_90, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rotate_180: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_180") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Rotates the image by `180` degrees. The width and height of the image must be greater than `1`. + public final func rotate180() { + gi.object_method_bind_ptrcall(Image.method_rotate_180, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_fix_alpha_edges: GDExtensionMethodBindPtr = { + let methodName = StringName("fix_alpha_edges") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Blends low-alpha pixels with nearby pixels. + public final func fixAlphaEdges() { + gi.object_method_bind_ptrcall(Image.method_fix_alpha_edges, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_premultiply_alpha: GDExtensionMethodBindPtr = { + let methodName = StringName("premultiply_alpha") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Multiplies color values with alpha values. Resulting color values for a pixel are `(color * alpha)/256`. See also ``CanvasItemMaterial/blendMode``. + public final func premultiplyAlpha() { + gi.object_method_bind_ptrcall(Image.method_premultiply_alpha, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_srgb_to_linear: GDExtensionMethodBindPtr = { + let methodName = StringName("srgb_to_linear") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Converts the raw data from the sRGB colorspace to a linear scale. + public final func srgbToLinear() { + gi.object_method_bind_ptrcall(Image.method_srgb_to_linear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_normal_map_to_xy: GDExtensionMethodBindPtr = { + let methodName = StringName("normal_map_to_xy") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count. + public final func normalMapToXy() { + gi.object_method_bind_ptrcall(Image.method_normal_map_to_xy, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_rgbe_to_srgb: GDExtensionMethodBindPtr = { + let methodName = StringName("rgbe_to_srgb") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 564927088)! + } + + } + + }() + + /// Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. + public final func rgbeToSrgb() -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Image.method_rgbe_to_srgb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_bump_map_to_normal_map: GDExtensionMethodBindPtr = { + let methodName = StringName("bump_map_to_normal_map") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3423495036)! + } + + } + + }() + + /// Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel. + public final func bumpMapToNormalMap(bumpScale: Double = 1.0) { + withUnsafePointer(to: bumpScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_bump_map_to_normal_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_compute_image_metrics: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_image_metrics") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3080961247)! + } + + } + + }() + + /// Compute image metrics on the current image and the compared image. + /// + /// The dictionary contains `max`, `mean`, `mean_squared`, `root_mean_squared` and `peak_snr`. + /// + public final func computeImageMetrics(comparedImage: Image?, useLuma: Bool) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: comparedImage?.handle) { pArg0 in + withUnsafePointer(to: useLuma) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_compute_image_metrics, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_blit_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("blit_rect") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2903928755)! + } + + } + + }() + + /// Copies `srcRect` from `src` image to this image at coordinates `dst`, clipped accordingly to both image bounds. This image and `src` image **must** have the same format. `srcRect` with non-positive size is treated as empty. + public final func blitRect(src: Image, srcRect: Rect2i, dst: Vector2i) { + withUnsafePointer(to: src.handle) { pArg0 in + withUnsafePointer(to: srcRect) { pArg1 in + withUnsafePointer(to: dst) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_blit_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_blit_rect_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("blit_rect_mask") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383581145)! + } + + } + + }() + + /// Blits `srcRect` area from `src` image to this image at the coordinates given by `dst`, clipped accordingly to both image bounds. `src` pixel is copied onto `dst` if the corresponding `mask` pixel's alpha value is not 0. This image and `src` image **must** have the same format. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats. `srcRect` with non-positive size is treated as empty. + public final func blitRectMask(src: Image?, mask: Image?, srcRect: Rect2i, dst: Vector2i) { + withUnsafePointer(to: src?.handle) { pArg0 in + withUnsafePointer(to: mask?.handle) { pArg1 in + withUnsafePointer(to: srcRect) { pArg2 in + withUnsafePointer(to: dst) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Image.method_blit_rect_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_blend_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_rect") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2903928755)! + } + + } + + }() + + /// Alpha-blends `srcRect` from `src` image to this image at coordinates `dst`, clipped accordingly to both image bounds. This image and `src` image **must** have the same format. `srcRect` with non-positive size is treated as empty. + public final func blendRect(src: Image?, srcRect: Rect2i, dst: Vector2i) { + withUnsafePointer(to: src?.handle) { pArg0 in + withUnsafePointer(to: srcRect) { pArg1 in + withUnsafePointer(to: dst) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_blend_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_blend_rect_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("blend_rect_mask") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383581145)! + } + + } + + }() + + /// Alpha-blends `srcRect` from `src` image to this image using `mask` image at coordinates `dst`, clipped accordingly to both image bounds. Alpha channels are required for both `src` and `mask`. `dst` pixels and `src` pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and `src` image **must** have the same format. `src` image and `mask` image **must** have the same size (width and height) but they can have different formats. `srcRect` with non-positive size is treated as empty. + public final func blendRectMask(src: Image?, mask: Image?, srcRect: Rect2i, dst: Vector2i) { + withUnsafePointer(to: src?.handle) { pArg0 in + withUnsafePointer(to: mask?.handle) { pArg1 in + withUnsafePointer(to: srcRect) { pArg2 in + withUnsafePointer(to: dst) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Image.method_blend_rect_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_fill: GDExtensionMethodBindPtr = { + let methodName = StringName("fill") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Fills the image with `color`. + public final func fill(color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_fill, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_fill_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("fill_rect") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 514693913)! + } + + } + + }() + + /// Fills `rect` with `color`. + public final func fillRect(_ rect: Rect2i, color: Color) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_fill_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_used_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_used_rect") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 410525958)! + } + + } + + }() + + /// Returns a ``Rect2i`` enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. + public final func getUsedRect() -> Rect2i { + var _result: Rect2i = Rect2i () + gi.object_method_bind_ptrcall(Image.method_get_used_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_region: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2601441065)! + } + + } + + }() + + /// Returns a new ``Image`` that is a copy of this ``Image``'s area specified with `region`. + public final func getRegion(_ region: Rect2i) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: region) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_get_region, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_copy_from: GDExtensionMethodBindPtr = { + let methodName = StringName("copy_from") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + /// Copies `src` image to this image. + public final func copyFrom(src: Image?) { + withUnsafePointer(to: src?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_copy_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pixelv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pixelv") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1532707496)! + } + + } + + }() + + /// Returns the color of the pixel at `point`. + /// + /// This is the same as ``getPixel(x:y:)``, but with a ``Vector2i`` argument instead of two integer arguments. + /// + public final func getPixelv(point: Vector2i) -> Color { + var _result: Color = Color () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_get_pixelv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_pixel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pixel") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2165839948)! + } + + } + + }() + + /// Returns the color of the pixel at `(x, y)`. + /// + /// This is the same as ``getPixelv(point:)``, but with two integer arguments instead of a ``Vector2i`` argument. + /// + public final func getPixel(x: Int32, y: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_get_pixel, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_pixelv: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pixelv") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 287851464)! + } + + } + + }() + + /// Sets the ``Color`` of the pixel at `point` to `color`. + /// + /// **Example:** + /// + /// This is the same as ``setPixel(x:y:color:)``, but with a ``Vector2i`` argument instead of two integer arguments. + /// + public final func setPixelv(point: Vector2i, color: Color) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_set_pixelv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_pixel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pixel") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3733378741)! + } + + } + + }() + + /// Sets the ``Color`` of the pixel at `(x, y)` to `color`. + /// + /// **Example:** + /// + /// This is the same as ``setPixelv(point:color:)``, but with a two integer arguments instead of a ``Vector2i`` argument. + /// + public final func setPixel(x: Int32, y: Int32, color: Color) { + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_set_pixel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_adjust_bcs: GDExtensionMethodBindPtr = { + let methodName = StringName("adjust_bcs") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2385087082)! + } + + } + + }() + + /// Adjusts this image's `brightness`, `contrast`, and `saturation` by the given values. Does not work if the image is compressed (see ``isCompressed()``). + public final func adjustBcs(brightness: Double, contrast: Double, saturation: Double) { + withUnsafePointer(to: brightness) { pArg0 in + withUnsafePointer(to: contrast) { pArg1 in + withUnsafePointer(to: saturation) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Image.method_adjust_bcs, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_load_png_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_png_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a PNG file. + public final func loadPngFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_png_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_jpg_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_jpg_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a JPEG file. + public final func loadJpgFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_jpg_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_webp_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_webp_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a WebP file. + public final func loadWebpFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_webp_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_tga_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_tga_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a TGA file. + /// + /// > Note: This method is only available in engine builds with the TGA module enabled. By default, the TGA module is enabled, but it can be disabled at build-time using the `module_tga_enabled=no` SCons option. + /// + public final func loadTgaFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_tga_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_bmp_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_bmp_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a BMP file. + /// + /// > Note: Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. + /// + /// > Note: This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the `module_bmp_enabled=no` SCons option. + /// + public final func loadBmpFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_bmp_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_ktx_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_ktx_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Loads an image from the binary contents of a KTX file. Unlike most image formats, KTX can store VRAM-compressed data and embed mipmaps. + /// + /// > Note: Godot's libktx implementation only supports 2D images. Cubemaps, texture arrays, and de-padding are not supported. + /// + /// > Note: This method is only available in engine builds with the KTX module enabled. By default, the KTX module is enabled, but it can be disabled at build-time using the `module_ktx_enabled=no` SCons option. + /// + public final func loadKtxFromBuffer(_ buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_ktx_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_svg_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_svg_from_buffer") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 311853421)! + } + + } + + }() + + /// Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (**.svg**). + /// + /// > Note: Beware when using compressed SVG files (like **.svgz**), they need to be `decompressed` before loading. + /// + /// > Note: This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the `module_svg_enabled=no` SCons option. + /// + public final func loadSvgFromBuffer(_ buffer: PackedByteArray, scale: Double = 1.0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_svg_from_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_svg_from_string: GDExtensionMethodBindPtr = { + let methodName = StringName("load_svg_from_string") + return withUnsafePointer(to: &Image.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3254053600)! + } + + } + + }() + + /// Loads an image from the string contents of an SVG file (**.svg**). + /// + /// > Note: This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the `module_svg_enabled=no` SCons option. + /// + public final func loadSvgFromString(svgStr: String, scale: Double = 1.0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let svgStr = GString(svgStr) + withUnsafePointer(to: svgStr.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Image.method_load_svg_from_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImageFormatLoader.swift b/Sources/SwiftGodot/Generated/Api/ImageFormatLoader.swift new file mode 100644 index 000000000..6460ab829 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImageFormatLoader.swift @@ -0,0 +1,48 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class to add support for specific image formats. +/// +/// The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending ``ImageFormatLoaderExtension``. +open class ImageFormatLoader: RefCounted { + override open class var godotClassName: StringName { "ImageFormatLoader" } + public struct LoaderFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// + public static let forceLinear = LoaderFlags (rawValue: 1) + /// + public static let convertColors = LoaderFlags (rawValue: 2) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.forceLinear) { result += "forceLinear, " } + if self.contains (.convertColors) { result += "convertColors, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImageFormatLoaderExtension.swift b/Sources/SwiftGodot/Generated/Api/ImageFormatLoaderExtension.swift new file mode 100644 index 000000000..e5e8d7697 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImageFormatLoaderExtension.swift @@ -0,0 +1,110 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for creating ``ImageFormatLoader`` extensions (adding support for extra image formats). +/// +/// The engine supports multiple image formats out of the box (PNG, SVG, JPEG, WebP to name a few), but you can choose to implement support for additional image formats by extending this class. +/// +/// Be sure to respect the documented return types and values. You should create an instance of it, and call ``addFormatLoader()`` to register that loader during the initialization phase. +/// +open class ImageFormatLoaderExtension: ImageFormatLoader { + override open class var godotClassName: StringName { "ImageFormatLoaderExtension" } + /* Methods */ + /// Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class. + @_documentation(visibility: public) + open func _getRecognizedExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// Loads the content of `fileaccess` into the provided `image`. + @_documentation(visibility: public) + open func _loadImage(_ image: Image?, fileaccess: FileAccess?, flags: ImageFormatLoader.LoaderFlags, scale: Double) -> GodotError { + return .ok + } + + fileprivate static var method_add_format_loader: GDExtensionMethodBindPtr = { + let methodName = StringName("add_format_loader") + return withUnsafePointer(to: &ImageFormatLoaderExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Add this format loader to the engine, allowing it to recognize the file extensions returned by ``_getRecognizedExtensions()``. + public final func addFormatLoader() { + gi.object_method_bind_ptrcall(ImageFormatLoaderExtension.method_add_format_loader, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_remove_format_loader: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_format_loader") + return withUnsafePointer(to: &ImageFormatLoaderExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Remove this format loader from the engine. + public final func removeFormatLoader() { + gi.object_method_bind_ptrcall(ImageFormatLoaderExtension.method_remove_format_loader, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_recognized_extensions": + return _ImageFormatLoaderExtension_proxy_get_recognized_extensions + case "_load_image": + return _ImageFormatLoaderExtension_proxy_load_image + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _ImageFormatLoaderExtension_proxy_get_recognized_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRecognizedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _ImageFormatLoaderExtension_proxy_load_image (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._loadImage (lookupLiveObject (handleAddress: resolved_0) as? Image ?? Image (nativeHandle: resolved_0), fileaccess: lookupLiveObject (handleAddress: resolved_1) as? FileAccess ?? FileAccess (nativeHandle: resolved_1), flags: args [2]!.assumingMemoryBound (to: ImageFormatLoader.LoaderFlags.self).pointee, scale: args [3]!.assumingMemoryBound (to: Double.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImageTexture.swift b/Sources/SwiftGodot/Generated/Api/ImageTexture.swift new file mode 100644 index 000000000..fda083b2d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImageTexture.swift @@ -0,0 +1,172 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``Texture2D`` based on an ``Image``. +/// +/// A ``Texture2D`` based on an ``Image``. For an image to be displayed, an ``ImageTexture`` has to be created from it using the ``createFromImage(_:)`` method: +/// +/// This way, textures can be created at run-time by loading images both from within the editor and externally. +/// +/// > Warning: Prefer to load imported textures with ``@GDScript.load`` over loading them from within the filesystem dynamically with ``Image/load(path:)``, as it may not work in exported projects: +/// +/// This is because images have to be imported as a ``CompressedTexture2D`` first to be loaded with ``@GDScript.load``. If you'd still like to load an image file just like any other ``Resource``, import it as an ``Image`` resource instead, and then load it normally using the ``@GDScript.load`` method. +/// +/// > Note: The image can be retrieved from an imported texture using the ``Texture2D/getImage()`` method, which returns a copy of the image: +/// +/// An ``ImageTexture`` is not meant to be operated from within the editor interface directly, and is mostly useful for rendering images on screen dynamically via code. If you need to generate images procedurally from within the editor, consider saving and importing images as custom texture resources implementing a new ``EditorImportPlugin``. +/// +/// > Note: The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. +/// +open class ImageTexture: Texture2D { + override open class var godotClassName: StringName { "ImageTexture" } + /* Methods */ + fileprivate static var method_create_from_image: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_image") + return withUnsafePointer(to: &ImageTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2775144163)! + } + + } + + }() + + /// Creates a new ``ImageTexture`` and initializes it by allocating and setting the data from an ``Image``. + public static func createFromImage(_ image: Image?) -> ImageTexture? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_create_from_image, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &ImageTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3847873762)! + } + + } + + }() + + /// Returns the format of the texture, one of ``Image.Format``. + public final func getFormat() -> Image.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ImageTexture.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Image.Format (rawValue: _result)! + } + + fileprivate static var method_set_image: GDExtensionMethodBindPtr = { + let methodName = StringName("set_image") + return withUnsafePointer(to: &ImageTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + /// Replaces the texture's data with a new ``Image``. This will re-allocate new memory for the texture. + /// + /// If you want to update the image, but don't need to change its parameters (format, size), use ``update(image:)`` instead for better performance. + /// + public final func setImage(_ image: Image?) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImageTexture.method_set_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &ImageTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 532598488)! + } + + } + + }() + + /// Replaces the texture's data with a new ``Image``. + /// + /// > Note: The texture has to be created using ``createFromImage(_:)`` or initialized first with the ``setImage(_:)`` method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. + /// + /// Use this method over ``setImage(_:)`` if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. + /// + public final func update(image: Image?) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImageTexture.method_update, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size_override") + return withUnsafePointer(to: &ImageTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + /// Resizes the texture to the specified dimensions. + public final func setSizeOverride(size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImageTexture.method_set_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImageTexture3D.swift b/Sources/SwiftGodot/Generated/Api/ImageTexture3D.swift new file mode 100644 index 000000000..d3184c356 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImageTexture3D.swift @@ -0,0 +1,99 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture with 3 dimensions. +/// +/// ``ImageTexture3D`` is a 3-dimensional ``ImageTexture`` that has a width, height, and depth. See also ``ImageTextureLayered``. +/// +/// 3D textures are typically used to store density maps for ``FogMaterial``, color correction LUTs for ``Environment``, vector fields for ``GPUParticlesAttractorVectorField3D`` and collision maps for ``GPUParticlesCollisionSDF3D``. 3D textures can also be used in custom shaders. +/// +open class ImageTexture3D: Texture3D { + override open class var godotClassName: StringName { "ImageTexture3D" } + /* Methods */ + fileprivate static var method_create: GDExtensionMethodBindPtr = { + let methodName = StringName("create") + return withUnsafePointer(to: &ImageTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130379827)! + } + + } + + }() + + /// Creates the ``ImageTexture3D`` with specified `width`, `height`, and `depth`. See ``Image.Format`` for `format` options. If `useMipmaps` is `true`, then generate mipmaps for the ``ImageTexture3D``. + public final func create(format: Image.Format, width: Int32, height: Int32, depth: Int32, useMipmaps: Bool, data: ObjectCollection) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: depth) { pArg3 in + withUnsafePointer(to: useMipmaps) { pArg4 in + withUnsafePointer(to: data.array.content) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(ImageTexture3D.method_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_update: GDExtensionMethodBindPtr = { + let methodName = StringName("update") + return withUnsafePointer(to: &ImageTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + /// Replaces the texture's existing data with the layers specified in `data`. The size of `data` must match the parameters that were used for ``create(format:width:height:depth:useMipmaps:data:)``. In other words, the texture cannot be resized or have its format changed by calling ``update(data:)``. + public final func update(data: ObjectCollection) { + withUnsafePointer(to: data.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImageTexture3D.method_update, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImageTextureLayered.swift b/Sources/SwiftGodot/Generated/Api/ImageTextureLayered.swift new file mode 100644 index 000000000..fe894f22b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImageTextureLayered.swift @@ -0,0 +1,94 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for texture types which contain the data of multiple ``ImageTexture``s. Each image is of the same size and format. +/// +/// Base class for ``Texture2DArray``, ``Cubemap`` and ``CubemapArray``. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also ``Texture3D``. +open class ImageTextureLayered: TextureLayered { + override open class var godotClassName: StringName { "ImageTextureLayered" } + /* Methods */ + fileprivate static var method_create_from_images: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_images") + return withUnsafePointer(to: &ImageTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2785773503)! + } + + } + + }() + + /// Creates an ``ImageTextureLayered`` from an array of ``Image``s. See ``Image/create(width:height:useMipmaps:format:)`` for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images _must_ have the same width, height, image format and mipmapping setting. + /// + /// Each ``Image`` represents one `layer`. + /// + public final func createFromImages(_ images: ObjectCollection) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: images.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImageTextureLayered.method_create_from_images, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_update_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("update_layer") + return withUnsafePointer(to: &ImageTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3331733361)! + } + + } + + }() + + /// Replaces the existing ``Image`` data at the given `layer` with this new image. + /// + /// The given ``Image`` must have the same width, height, image format, and mipmapping flag as the rest of the referenced images. + /// + /// If the image format is unsupported, it will be decompressed and converted to a similar and supported ``Image.Format``. + /// + /// The update is immediate: it's synchronized with drawing. + /// + public final func updateLayer(image: Image?, layer: Int32) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImageTextureLayered.method_update_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImmediateMesh.swift b/Sources/SwiftGodot/Generated/Api/ImmediateMesh.swift new file mode 100644 index 000000000..96d2a3222 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImmediateMesh.swift @@ -0,0 +1,278 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Mesh optimized for creating geometry manually. +/// +/// A mesh type optimized for creating geometry manually, similar to OpenGL 1.x immediate mode. +/// +/// Here's a sample on how to generate a triangular face: +/// +/// > Note: Generating complex geometries with ``ImmediateMesh`` is highly inefficient. Instead, it is designed to generate simple geometry that changes often. +/// +open class ImmediateMesh: Mesh { + override open class var godotClassName: StringName { "ImmediateMesh" } + /* Methods */ + fileprivate static var method_surface_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_begin") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2794442543)! + } + + } + + }() + + /// Begin a new surface. + public final func surfaceBegin(primitive: Mesh.PrimitiveType, material: Material? = nil) { + withUnsafePointer(to: primitive.rawValue) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_surface_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_color") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Set the color attribute that will be pushed with the next vertex. + public final func surfaceSetColor(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_set_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_normal") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Set the normal attribute that will be pushed with the next vertex. + public final func surfaceSetNormal(_ normal: Vector3) { + withUnsafePointer(to: normal) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_set_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_set_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_tangent") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3505987427)! + } + + } + + }() + + /// Set the tangent attribute that will be pushed with the next vertex. + public final func surfaceSetTangent(_ tangent: Plane) { + withUnsafePointer(to: tangent) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_set_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_set_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_uv") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Set the UV attribute that will be pushed with the next vertex. + public final func surfaceSetUv(_ uv: Vector2) { + withUnsafePointer(to: uv) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_set_uv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_set_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_uv2") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Set the UV2 attribute that will be pushed with the next vertex. + public final func surfaceSetUv2(_ uv2: Vector2) { + withUnsafePointer(to: uv2) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_set_uv2, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_add_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_add_vertex") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Add a 3D vertex using the current attributes previously set. + public final func surfaceAddVertex(_ vertex: Vector3) { + withUnsafePointer(to: vertex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_add_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_add_vertex_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_add_vertex_2d") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Add a 2D vertex using the current attributes previously set. + public final func surfaceAddVertex2d(vertex: Vector2) { + withUnsafePointer(to: vertex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_add_vertex_2d, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_surface_end: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_end") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// End and commit current surface. Note that surface being created will not be visible until this function is called. + public final func surfaceEnd() { + gi.object_method_bind_ptrcall(ImmediateMesh.method_surface_end, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_clear_surfaces: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_surfaces") + return withUnsafePointer(to: &ImmediateMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all surfaces. + public final func clearSurfaces() { + gi.object_method_bind_ptrcall(ImmediateMesh.method_clear_surfaces, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImporterMesh.swift b/Sources/SwiftGodot/Generated/Api/ImporterMesh.swift new file mode 100644 index 000000000..60c9299a9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImporterMesh.swift @@ -0,0 +1,666 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``Resource`` that contains vertex array-based geometry during the import process. +/// +/// ImporterMesh is a type of ``Resource`` analogous to ``ArrayMesh``. It contains vertex array-based geometry, divided in _surfaces_. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. +/// +/// Unlike its runtime counterpart, ``ImporterMesh`` contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling ``clear()``, followed by ``addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)`` for each surface. +/// +open class ImporterMesh: Resource { + override open class var godotClassName: StringName { "ImporterMesh" } + /* Methods */ + fileprivate static var method_add_blend_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("add_blend_shape") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds name for a blend shape that will be added with ``addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)``. Must be called before surface is added. + public final func addBlendShape(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_add_blend_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_count") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of blend shapes that the mesh holds. + public final func getBlendShapeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ImporterMesh.method_get_blend_shape_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_blend_shape_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_name") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the name of the blend shape at this index. + public final func getBlendShapeName(blendShapeIdx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: blendShapeIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_blend_shape_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_shape_mode") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 227983991)! + } + + } + + }() + + /// Sets the blend shape mode to one of ``Mesh.BlendShapeMode``. + public final func setBlendShapeMode(_ mode: Mesh.BlendShapeMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_set_blend_shape_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_mode") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 836485024)! + } + + } + + }() + + /// Returns the blend shape mode for this Mesh. + public final func getBlendShapeMode() -> Mesh.BlendShapeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ImporterMesh.method_get_blend_shape_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Mesh.BlendShapeMode (rawValue: _result)! + } + + fileprivate static var method_add_surface: GDExtensionMethodBindPtr = { + let methodName = StringName("add_surface") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740448849)! + } + + } + + }() + + /// Creates a new surface. ``Mesh/getSurfaceCount()`` will become the `surf_idx` for this new surface. + /// + /// Surfaces are created to be rendered using a `primitive`, which may be any of the values defined in ``Mesh.PrimitiveType``. + /// + /// The `arrays` argument is an array of arrays. Each of the ``Mesh/ArrayType/max`` elements contains an array with some of the mesh data for this surface as described by the corresponding member of ``Mesh.ArrayType`` or `null` if it is not used by the surface. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for ``Mesh/ArrayType/index`` if it is used. + /// + /// The `blendShapes` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as `arrays`, but ``Mesh/ArrayType/vertex``, ``Mesh/ArrayType/normal``, and ``Mesh/ArrayType/tangent`` are set if and only if they are set in `arrays` and all other entries are `null`. + /// + /// The `lods` argument is a dictionary with float keys and ``PackedInt32Array`` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the ``Mesh/ArrayType/index`` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. + /// + /// The `flags` argument is the bitwise or of, as required: One value of ``Mesh.ArrayCustomFormat`` left shifted by `ARRAY_FORMAT_CUSTOMn_SHIFT` for each custom channel in use, ``Mesh/ArrayFormat/flagUseDynamicUpdate``, ``Mesh/ArrayFormat/flagUse8BoneWeights``, or ``Mesh/ArrayFormat/flagUsesEmptyVertexArray``. + /// + /// > Note: When using indices, it is recommended to only use points, lines, or triangles. + /// + public final func addSurface(primitive: Mesh.PrimitiveType, arrays: GArray, blendShapes: VariantCollection = VariantCollection (), lods: GDictionary = GDictionary (), material: Material? = nil, name: String = "", flags: UInt = 0) { + withUnsafePointer(to: primitive.rawValue) { pArg0 in + withUnsafePointer(to: arrays.content) { pArg1 in + withUnsafePointer(to: blendShapes.array.content) { pArg2 in + withUnsafePointer(to: lods.content) { pArg3 in + withUnsafePointer(to: material?.handle) { pArg4 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg5 in + withUnsafePointer(to: flags) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_add_surface, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_surface_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_count") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of surfaces that the mesh holds. + public final func getSurfaceCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_surface_primitive_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_primitive_type") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3552571330)! + } + + } + + }() + + /// Returns the primitive type of the requested surface (see ``addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)``). + public final func getSurfacePrimitiveType(surfaceIdx: Int32) -> Mesh.PrimitiveType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_primitive_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Mesh.PrimitiveType (rawValue: _result)! + } + + fileprivate static var method_get_surface_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_name") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Gets the name assigned to this surface. + public final func getSurfaceName(surfaceIdx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_surface_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_arrays") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See ``addSurface(primitive:arrays:blendShapes:lods:material:name:flags:)``. + public final func getSurfaceArrays(surfaceIdx: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_surface_blend_shape_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_blend_shape_arrays") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2345056839)! + } + + } + + }() + + /// Returns a single set of blend shape arrays for the requested blend shape index for a surface. + public final func getSurfaceBlendShapeArrays(surfaceIdx: Int32, blendShapeIdx: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: blendShapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_blend_shape_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_surface_lod_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_lod_count") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of lods that the mesh holds on a given surface. + public final func getSurfaceLodCount(surfaceIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_lod_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_surface_lod_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_lod_size") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3085491603)! + } + + } + + }() + + /// Returns the screen ratio which activates a lod for a surface. + public final func getSurfaceLodSize(surfaceIdx: Int32, lodIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: lodIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_lod_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_surface_lod_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_lod_indices") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265128013)! + } + + } + + }() + + /// Returns the index buffer of a lod for a surface. + public final func getSurfaceLodIndices(surfaceIdx: Int32, lodIdx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: lodIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_lod_indices, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_surface_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_material") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2897466400)! + } + + } + + }() + + /// Returns a ``Material`` in a given surface. Surface is rendered using this material. + public final func getSurfaceMaterial(surfaceIdx: Int32) -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_material, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_surface_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_format") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the format of the surface that the mesh holds. + public final func getSurfaceFormat(surfaceIdx: Int32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_surface_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_surface_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_surface_name") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets a name for a given surface. + public final func setSurfaceName(surfaceIdx: Int32, name: String) { + withUnsafePointer(to: surfaceIdx) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_set_surface_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_surface_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_surface_material") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3671737478)! + } + + } + + }() + + /// Sets a ``Material`` for a given surface. Surface will be rendered using this material. + public final func setSurfaceMaterial(surfaceIdx: Int32, material: Material?) { + withUnsafePointer(to: surfaceIdx) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_set_surface_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_generate_lods: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_lods") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2491878677)! + } + + } + + }() + + /// Generates all lods for this ImporterMesh. + /// + /// `normalMergeAngle` and `normalSplitAngle` are in degrees and used in the same way as the importer settings in `lods`. As a good default, use 25 and 60 respectively. + /// + /// The number of generated lods can be accessed using ``getSurfaceLodCount(surfaceIdx:)``, and each LOD is available in ``getSurfaceLodSize(surfaceIdx:lodIdx:)`` and ``getSurfaceLodIndices(surfaceIdx:lodIdx:)``. + /// + /// `boneTransformArray` is an ``GArray`` which can be either empty or contain ``Transform3D``s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data. + /// + public final func generateLods(normalMergeAngle: Double, normalSplitAngle: Double, boneTransformArray: GArray) { + withUnsafePointer(to: normalMergeAngle) { pArg0 in + withUnsafePointer(to: normalSplitAngle) { pArg1 in + withUnsafePointer(to: boneTransformArray.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_generate_lods, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1457573577)! + } + + } + + }() + + /// Returns the mesh data represented by this ``ImporterMesh`` as a usable ``ArrayMesh``. + /// + /// This method caches the returned mesh, and subsequent calls will return the cached data until ``clear()`` is called. + /// + /// If not yet cached and `baseMesh` is provided, `baseMesh` will be used and mutated. + /// + public final func getMesh(baseMesh: ArrayMesh? = nil) -> ArrayMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: baseMesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all surfaces and blend shapes from this ``ImporterMesh``. + public final func clear() { + gi.object_method_bind_ptrcall(ImporterMesh.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_lightmap_size_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lightmap_size_hint") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + /// Sets the size hint of this mesh for lightmap-unwrapping in UV-space. + public final func setLightmapSizeHint(size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMesh.method_set_lightmap_size_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lightmap_size_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lightmap_size_hint") + return withUnsafePointer(to: &ImporterMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns the size hint of this mesh for lightmap-unwrapping in UV-space. + public final func getLightmapSizeHint() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(ImporterMesh.method_get_lightmap_size_hint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ImporterMeshInstance3D.swift b/Sources/SwiftGodot/Generated/Api/ImporterMeshInstance3D.swift new file mode 100644 index 000000000..71c0aa394 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ImporterMeshInstance3D.swift @@ -0,0 +1,578 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class ImporterMeshInstance3D: Node3D { + override open class var godotClassName: StringName { "ImporterMeshInstance3D" } + + /* Properties */ + + final public var mesh: ImporterMesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + final public var skin: Skin? { + get { + return get_skin () + } + + set { + set_skin (newValue) + } + + } + + final public var skeletonPath: NodePath { + get { + return get_skeleton_path () + } + + set { + set_skeleton_path (newValue) + } + + } + + final public var layerMask: UInt32 { + get { + return get_layer_mask () + } + + set { + set_layer_mask (newValue) + } + + } + + final public var castShadow: GeometryInstance3D.ShadowCastingSetting { + get { + return get_cast_shadows_setting () + } + + set { + set_cast_shadows_setting (newValue) + } + + } + + final public var visibilityRangeBegin: Double { + get { + return get_visibility_range_begin () + } + + set { + set_visibility_range_begin (newValue) + } + + } + + final public var visibilityRangeBeginMargin: Double { + get { + return get_visibility_range_begin_margin () + } + + set { + set_visibility_range_begin_margin (newValue) + } + + } + + final public var visibilityRangeEnd: Double { + get { + return get_visibility_range_end () + } + + set { + set_visibility_range_end (newValue) + } + + } + + final public var visibilityRangeEndMargin: Double { + get { + return get_visibility_range_end_margin () + } + + set { + set_visibility_range_end_margin (newValue) + } + + } + + final public var visibilityRangeFadeMode: GeometryInstance3D.VisibilityRangeFadeMode { + get { + return get_visibility_range_fade_mode () + } + + set { + set_visibility_range_fade_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2255166972)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: ImporterMesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3161779525)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> ImporterMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3971435618)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skin(_ skin: Skin?) { + withUnsafePointer(to: skin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_skin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074563878)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skin() -> Skin? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_skin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_skeleton_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton_path") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton_path(_ skeletonPath: NodePath) { + withUnsafePointer(to: skeletonPath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_skeleton_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton_path") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_skeleton_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_layer_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layer_mask") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layer_mask(_ layerMask: UInt32) { + withUnsafePointer(to: layerMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_layer_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layer_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layer_mask") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layer_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_layer_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cast_shadows_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cast_shadows_setting") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 856677339)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cast_shadows_setting(_ shadowCastingSetting: GeometryInstance3D.ShadowCastingSetting) { + withUnsafePointer(to: shadowCastingSetting.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_cast_shadows_setting, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cast_shadows_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cast_shadows_setting") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383019359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cast_shadows_setting() -> GeometryInstance3D.ShadowCastingSetting { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_cast_shadows_setting, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.ShadowCastingSetting (rawValue: _result)! + } + + fileprivate static var method_set_visibility_range_end_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_end_margin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_end_margin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_visibility_range_end_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_end_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_end_margin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_end_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_visibility_range_end_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_end") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_end(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_visibility_range_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_end") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_end() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_visibility_range_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_begin_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_begin_margin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_begin_margin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_visibility_range_begin_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_begin_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_begin_margin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_begin_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_visibility_range_begin_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_begin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_begin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_visibility_range_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_begin") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_begin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_visibility_range_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visibility_range_fade_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_range_fade_mode") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1440117808)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_range_fade_mode(_ mode: GeometryInstance3D.VisibilityRangeFadeMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_set_visibility_range_fade_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_range_fade_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_range_fade_mode") + return withUnsafePointer(to: &ImporterMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2067221882)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_range_fade_mode() -> GeometryInstance3D.VisibilityRangeFadeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ImporterMeshInstance3D.method_get_visibility_range_fade_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GeometryInstance3D.VisibilityRangeFadeMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Input.swift b/Sources/SwiftGodot/Generated/Api/Input.swift new file mode 100644 index 000000000..b258682c3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Input.swift @@ -0,0 +1,1786 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton for handling inputs. +/// +/// The ``Input`` singleton handles key presses, mouse buttons and movement, gamepads, and input actions. Actions and their events can be set in the **Input Map** tab in **Project > Project Settings**, or with the ``InputMap`` class. +/// +/// > Note: ``Input``'s methods reflect the global input state and are not affected by ``Control/acceptEvent()`` or ``Viewport/setInputAsHandled()``, as those methods only deal with the way input is propagated in the ``SceneTree``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``joyConnectionChanged`` +open class Input: Object { + /// The shared instance of this class + public static var shared: Input = { + return withUnsafePointer (to: &Input.godotClassName.content) { ptr in + Input (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Input" } + public enum MouseMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Makes the mouse cursor visible if it is hidden. + case visible = 0 // MOUSE_MODE_VISIBLE + /// Makes the mouse cursor hidden if it is visible. + case hidden = 1 // MOUSE_MODE_HIDDEN + /// Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. + /// + /// > Note: If you want to process the mouse's movement in this mode, you need to use ``InputEventMouseMotion/relative``. + /// + case captured = 2 // MOUSE_MODE_CAPTURED + /// Confines the mouse cursor to the game window, and make it visible. + case confined = 3 // MOUSE_MODE_CONFINED + /// Confines the mouse cursor to the game window, and make it hidden. + case confinedHidden = 4 // MOUSE_MODE_CONFINED_HIDDEN + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .visible: return ".visible" + case .hidden: return ".hidden" + case .captured: return ".captured" + case .confined: return ".confined" + case .confinedHidden: return ".confinedHidden" + } + + } + + } + + public enum CursorShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Arrow cursor. Standard, default pointing cursor. + case arrow = 0 // CURSOR_ARROW + /// I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. + case ibeam = 1 // CURSOR_IBEAM + /// Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. + case pointingHand = 2 // CURSOR_POINTING_HAND + /// Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. + case cross = 3 // CURSOR_CROSS + /// Wait cursor. Indicates that the application is busy performing an operation, and that it cannot be used during the operation (e.g. something is blocking its main thread). + case wait = 4 // CURSOR_WAIT + /// Busy cursor. Indicates that the application is busy performing an operation, and that it is still usable during the operation. + case busy = 5 // CURSOR_BUSY + /// Drag cursor. Usually displayed when dragging something. + /// + /// > Note: Windows lacks a dragging cursor, so ``CursorShape/drag`` is the same as ``CursorShape/move`` for this platform. + /// + case drag = 6 // CURSOR_DRAG + /// Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. + case canDrop = 7 // CURSOR_CAN_DROP + /// Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. + case forbidden = 8 // CURSOR_FORBIDDEN + /// Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. + case vsize = 9 // CURSOR_VSIZE + /// Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + case hsize = 10 // CURSOR_HSIZE + /// Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + case bdiagsize = 11 // CURSOR_BDIAGSIZE + /// Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of ``CursorShape/bdiagsize``. It tells the user they can resize the window or the panel both horizontally and vertically. + case fdiagsize = 12 // CURSOR_FDIAGSIZE + /// Move cursor. Indicates that something can be moved. + case move = 13 // CURSOR_MOVE + /// Vertical split mouse cursor. On Windows, it's the same as ``CursorShape/vsize``. + case vsplit = 14 // CURSOR_VSPLIT + /// Horizontal split mouse cursor. On Windows, it's the same as ``CursorShape/hsize``. + case hsplit = 15 // CURSOR_HSPLIT + /// Help cursor. Usually a question mark. + case help = 16 // CURSOR_HELP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .arrow: return ".arrow" + case .ibeam: return ".ibeam" + case .pointingHand: return ".pointingHand" + case .cross: return ".cross" + case .wait: return ".wait" + case .busy: return ".busy" + case .drag: return ".drag" + case .canDrop: return ".canDrop" + case .forbidden: return ".forbidden" + case .vsize: return ".vsize" + case .hsize: return ".hsize" + case .bdiagsize: return ".bdiagsize" + case .fdiagsize: return ".fdiagsize" + case .move: return ".move" + case .vsplit: return ".vsplit" + case .hsplit: return ".hsplit" + case .help: return ".help" + } + + } + + } + + + /* Properties */ + + /// Controls the mouse mode. See ``Input/MouseMode`` for more information. + static public var mouseMode: Input.MouseMode { + get { + return get_mouse_mode () + } + + set { + set_mouse_mode (newValue) + } + + } + + /// If `true`, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + /// + /// Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. + /// + /// > Note: Input accumulation is _enabled_ by default. + /// + static public var useAccumulatedInput: Bool { + get { + return is_using_accumulated_input () + } + + set { + set_use_accumulated_input (newValue) + } + + } + + /// If `true`, sends mouse input events when tapping or swiping on the touchscreen. See also ``ProjectSettings/inputDevices/pointing/emulateMouseFromTouch``. + static public var emulateMouseFromTouch: Bool { + get { + return is_emulating_mouse_from_touch () + } + + set { + set_emulate_mouse_from_touch (newValue) + } + + } + + /// If `true`, sends touch input events when clicking or dragging the mouse. See also ``ProjectSettings/inputDevices/pointing/emulateTouchFromMouse``. + static public var emulateTouchFromMouse: Bool { + get { + return is_emulating_touch_from_mouse () + } + + set { + set_emulate_touch_from_mouse (newValue) + } + + } + + /* Methods */ + fileprivate static var method_is_anything_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_anything_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if any action, key, joypad button, or mouse button is being pressed. This will also return `true` if any action is simulated via code by calling ``actionPress(action:strength:)``. + public static func isAnythingPressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_anything_pressed, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_is_key_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_key_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1938909964)! + } + + } + + }() + + /// Returns `true` if you are pressing the Latin key in the current keyboard layout. You can pass a ``Key`` constant. + /// + /// ``isKeyPressed(keycode:)`` is only recommended over ``isPhysicalKeyPressed(keycode:)`` in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use ``isPhysicalKeyPressed(keycode:)``. + /// + /// > Note: Due to keyboard ghosting, ``isKeyPressed(keycode:)`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + public static func isKeyPressed(keycode: Key) -> Bool { + var _result: Bool = false + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_key_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_physical_key_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physical_key_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1938909964)! + } + + } + + }() + + /// Returns `true` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a ``Key`` constant. + /// + /// ``isPhysicalKeyPressed(keycode:)`` is recommended over ``isKeyPressed(keycode:)`` for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. ``isPhysicalKeyPressed(keycode:)`` will also ensure that the top row number keys work on any keyboard layout. If in doubt, use ``isPhysicalKeyPressed(keycode:)``. + /// + /// > Note: Due to keyboard ghosting, ``isPhysicalKeyPressed(keycode:)`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + public static func isPhysicalKeyPressed(keycode: Key) -> Bool { + var _result: Bool = false + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_physical_key_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_key_label_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_key_label_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1938909964)! + } + + } + + }() + + /// Returns `true` if you are pressing the key with the `keycode` printed on it. You can pass a ``Key`` constant or any Unicode character code. + public static func isKeyLabelPressed(keycode: Key) -> Bool { + var _result: Bool = false + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_key_label_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_mouse_button_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_mouse_button_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1821097125)! + } + + } + + }() + + /// Returns `true` if you are pressing the mouse button specified with ``MouseButton``. + public static func isMouseButtonPressed(button: MouseButton) -> Bool { + var _result: Bool = false + withUnsafePointer(to: button.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_mouse_button_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_joy_button_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_joy_button_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 787208542)! + } + + } + + }() + + /// Returns `true` if you are pressing the joypad button (see ``JoyButton``). + public static func isJoyButtonPressed(device: Int32, button: JoyButton) -> Bool { + var _result: Bool = false + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: button.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_joy_button_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558498928)! + } + + } + + }() + + /// Returns `true` if you are pressing the action event. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + /// > Note: Due to keyboard ghosting, ``isActionPressed(action:exactMatch:)`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + public static func isActionPressed(action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_action_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_just_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_just_pressed") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558498928)! + } + + } + + }() + + /// Returns `true` when the user has _started_ pressing the action event in the current frame or physics tick. It will only return `true` on the frame or tick that the user pressed down the button. + /// + /// This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + /// > Note: Returning `true` does not imply that the action is _still_ pressed. An action can be pressed and released again rapidly, and `true` will still be returned so as not to miss input. + /// + /// > Note: Due to keyboard ghosting, ``isActionJustPressed(action:exactMatch:)`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + /// > Note: During input handling (e.g. ``Node/_input(event:)``), use ``InputEvent/isActionPressed(action:allowEcho:exactMatch:)`` instead to query the action state of the current event. + /// + public static func isActionJustPressed(action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_action_just_pressed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_just_released: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_just_released") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558498928)! + } + + } + + }() + + /// Returns `true` when the user _stops_ pressing the action event in the current frame or physics tick. It will only return `true` on the frame or tick that the user releases the button. + /// + /// > Note: Returning `true` does not imply that the action is _still_ not pressed. An action can be released and pressed again rapidly, and `true` will still be returned so as not to miss input. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + /// > Note: During input handling (e.g. ``Node/_input(event:)``), use ``InputEvent/isActionReleased(action:exactMatch:)`` instead to query the action state of the current event. + /// + public static func isActionJustReleased(action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_action_just_released, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_action_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_strength") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 801543509)! + } + + } + + }() + + /// Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public static func getActionStrength(action: StringName, exactMatch: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_action_strength, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_action_raw_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_raw_strength") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 801543509)! + } + + } + + }() + + /// Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use ``getActionStrength(action:exactMatch:)`` instead. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public static func getActionRawStrength(action: StringName, exactMatch: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_action_raw_strength, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_axis") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1958752504)! + } + + } + + }() + + /// Get axis input by specifying two actions, one negative and one positive. + /// + /// This is a shorthand for writing `Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")`. + /// + public static func getAxis(negativeAction: StringName, positiveAction: StringName) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: negativeAction.content) { pArg0 in + withUnsafePointer(to: positiveAction.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_axis, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_vector: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vector") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2479607902)! + } + + } + + }() + + /// Gets an input vector by specifying four actions for the positive and negative X and Y axes. + /// + /// This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement. + /// + /// By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1). + /// + public static func getVector(negativeX: StringName, positiveX: StringName, negativeY: StringName, positiveY: StringName, deadzone: Double = -1.0) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: negativeX.content) { pArg0 in + withUnsafePointer(to: positiveX.content) { pArg1 in + withUnsafePointer(to: negativeY.content) { pArg2 in + withUnsafePointer(to: positiveY.content) { pArg3 in + withUnsafePointer(to: deadzone) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_get_vector, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_joy_mapping: GDExtensionMethodBindPtr = { + let methodName = StringName("add_joy_mapping") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1168363258)! + } + + } + + }() + + /// Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. + public static func addJoyMapping(_ mapping: String, updateExisting: Bool = false) { + let mapping = GString(mapping) + withUnsafePointer(to: mapping.content) { pArg0 in + withUnsafePointer(to: updateExisting) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_joy_mapping, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_joy_mapping: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_joy_mapping") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes all mappings from the internal database that match the given GUID. + public static func removeJoyMapping(guid: String) { + let guid = GString(guid) + withUnsafePointer(to: guid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_joy_mapping, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_joy_known: GDExtensionMethodBindPtr = { + let methodName = StringName("is_joy_known") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3067735520)! + } + + } + + }() + + /// Returns `true` if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. + public static func isJoyKnown(device: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_joy_known, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_joy_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_axis") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4063175957)! + } + + } + + }() + + /// Returns the current value of the joypad axis at given index (see ``JoyAxis``). + public static func getJoyAxis(device: Int32, axis: JoyAxis) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_axis, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_joy_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_name") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 990163283)! + } + + } + + }() + + /// Returns the name of the joypad at the specified device index, e.g. `PS4 Controller`. Godot uses the SDL2 game controller database to determine gamepad names. + public static func getJoyName(device: Int32) -> String { + let _result = GString () + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_joy_guid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_guid") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. `030000004c050000c405000000010000`. Returns `"Default Gamepad"` otherwise. Godot uses the SDL2 game controller database to determine gamepad names and mappings based on this GUID. + public static func getJoyGuid(device: Int32) -> String { + let _result = GString () + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_guid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_joy_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_info") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3485342025)! + } + + } + + }() + + /// Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. + /// + /// On Windows the dictionary contains the following fields: + /// + /// `xinput_index`: The index of the controller in the XInput system. + /// + /// On Linux: + /// + /// `raw_name`: The name of the controller as it came from the OS, before getting renamed by the godot controller database. + /// + /// `vendor_id`: The USB vendor ID of the device. + /// + /// `product_id`: The USB product ID of the device. + /// + /// `steam_input_index`: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. + /// + public static func getJoyInfo(device: Int32) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_should_ignore_device: GDExtensionMethodBindPtr = { + let methodName = StringName("should_ignore_device") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2522259332)! + } + + } + + }() + + /// Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable `SDL_GAMECONTROLLER_IGNORE_DEVICES`. Read the SDL documentation for more information. + /// + /// > Note: Some 3rd party tools can contribute to the list of ignored devices. For example, _SteamInput_ creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list. + /// + public static func shouldIgnoreDevice(vendorId: Int32, productId: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: vendorId) { pArg0 in + withUnsafePointer(to: productId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_should_ignore_device, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_connected_joypads: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connected_joypads") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an ``GArray`` containing the device IDs of all currently connected joypads. + public static func getConnectedJoypads() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_connected_joypads, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_joy_vibration_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_vibration_strength") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3114997196)! + } + + } + + }() + + /// Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. + public static func getJoyVibrationStrength(device: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_vibration_strength, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_joy_vibration_duration: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joy_vibration_duration") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4025615559)! + } + + } + + }() + + /// Returns the duration of the current vibration effect in seconds. + public static func getJoyVibrationDuration(device: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_joy_vibration_duration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_start_joy_vibration: GDExtensionMethodBindPtr = { + let methodName = StringName("start_joy_vibration") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2576575033)! + } + + } + + }() + + /// Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. `weakMagnitude` is the strength of the weak motor (between 0 and 1) and `strongMagnitude` is the strength of the strong motor (between 0 and 1). `duration` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling ``stopJoyVibration(device:)``. + /// + /// > Note: Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. + /// + /// > Note: For macOS, vibration is only supported in macOS 11 and later. + /// + public static func startJoyVibration(device: Int32, weakMagnitude: Double, strongMagnitude: Double, duration: Double = 0) { + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: weakMagnitude) { pArg1 in + withUnsafePointer(to: strongMagnitude) { pArg2 in + withUnsafePointer(to: duration) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_start_joy_vibration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_stop_joy_vibration: GDExtensionMethodBindPtr = { + let methodName = StringName("stop_joy_vibration") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Stops the vibration of the joypad started with ``startJoyVibration(device:weakMagnitude:strongMagnitude:duration:)``. + public static func stopJoyVibration(device: Int32) { + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_stop_joy_vibration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_vibrate_handheld: GDExtensionMethodBindPtr = { + let methodName = StringName("vibrate_handheld") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 544894297)! + } + + } + + }() + + /// Vibrate the handheld device for the specified duration in milliseconds. + /// + /// `amplitude` is the strength of the vibration, as a value between `0.0` and `1.0`. If set to `-1.0`, the default vibration strength of the device is used. + /// + /// > Note: This method is implemented on Android, iOS, and Web. It has no effect on other platforms. + /// + /// > Note: For Android, ``vibrateHandheld(durationMs:amplitude:)`` requires enabling the `VIBRATE` permission in the export preset. Otherwise, ``vibrateHandheld(durationMs:amplitude:)`` will have no effect. + /// + /// > Note: For iOS, specifying the duration is only supported in iOS 13 and later. + /// + /// > Note: For Web, the amplitude cannot be changed. + /// + /// > Note: Some web browsers such as Safari and Firefox for Android do not support ``vibrateHandheld(durationMs:amplitude:)``. + /// + public static func vibrateHandheld(durationMs: Int32 = 500, amplitude: Double = -1.0) { + withUnsafePointer(to: durationMs) { pArg0 in + withUnsafePointer(to: amplitude) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_vibrate_handheld, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns ``Vector3/zero``. + /// + /// > Note: This method only works on Android and iOS. On other platforms, it always returns ``Vector3/zero``. + /// + public static func getGravity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(method_get_gravity, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_accelerometer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_accelerometer") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns ``Vector3/zero``. + /// + /// Note this method returns an empty ``Vector3`` when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. + /// + /// > Note: This method only works on Android and iOS. On other platforms, it always returns ``Vector3/zero``. + /// + public static func getAccelerometer() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(method_get_accelerometer, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_magnetometer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_magnetometer") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns ``Vector3/zero``. + /// + /// > Note: This method only works on Android and iOS. On other platforms, it always returns ``Vector3/zero``. + /// + public static func getMagnetometer() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(method_get_magnetometer, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_gyroscope: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gyroscope") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns ``Vector3/zero``. + /// + /// > Note: This method only works on Android and iOS. On other platforms, it always returns ``Vector3/zero``. + /// + public static func getGyroscope() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(method_get_gyroscope, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + /// + /// > Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS. + /// + public static func setGravity(value: Vector3) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_gravity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_accelerometer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_accelerometer") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + /// + /// > Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS. + /// + public static func setAccelerometer(value: Vector3) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_accelerometer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_magnetometer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_magnetometer") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + /// + /// > Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS. + /// + public static func setMagnetometer(value: Vector3) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_magnetometer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_gyroscope: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gyroscope") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + /// + /// > Note: This value can be immediately overwritten by the hardware sensor value on Android and iOS. + /// + public static func setGyroscope(value: Vector3) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_gyroscope, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_last_mouse_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_mouse_velocity") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + /// Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. + public static func getLastMouseVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(method_get_last_mouse_velocity, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_last_mouse_screen_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_mouse_screen_velocity") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + /// Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. + public static func getLastMouseScreenVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(method_get_last_mouse_screen_velocity, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_mouse_button_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mouse_button_mask") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2512161324)! + } + + } + + }() + + /// Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to ``DisplayServer/mouseGetButtonState()``. + public static func getMouseButtonMask() -> MouseButtonMask { + var _result: MouseButtonMask = MouseButtonMask () + gi.object_method_bind_ptrcall(method_get_mouse_button_mask, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mouse_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mouse_mode") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2228490894)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_mouse_mode(_ mode: Input.MouseMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_mouse_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mouse_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mouse_mode") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 965286182)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_mouse_mode() -> Input.MouseMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_mouse_mode, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return Input.MouseMode (rawValue: _result)! + } + + fileprivate static var method_warp_mouse: GDExtensionMethodBindPtr = { + let methodName = StringName("warp_mouse") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. + /// + /// Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if ``Input/MouseMode`` is set to ``MouseMode/confined`` or ``MouseMode/confinedHidden``. + /// + /// > Note: ``warpMouse(position:)`` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. + /// + public static func warpMouse(position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_warp_mouse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_action_press: GDExtensionMethodBindPtr = { + let methodName = StringName("action_press") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1713091165)! + } + + } + + }() + + /// This will simulate pressing the specified action. + /// + /// The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. + /// + /// > Note: This method will not cause any ``Node/_input(event:)`` calls. It is intended to be used with ``isActionPressed(action:exactMatch:)`` and ``isActionJustPressed(action:exactMatch:)``. If you want to simulate `_input`, use ``parseInputEvent(_:)`` instead. + /// + public static func actionPress(action: StringName, strength: Double = 1.0) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: strength) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_action_press, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_action_release: GDExtensionMethodBindPtr = { + let methodName = StringName("action_release") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// If the specified action is already pressed, this will release it. + public static func actionRelease(action: StringName) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_action_release, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_default_cursor_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_cursor_shape") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2124816902)! + } + + } + + }() + + /// Sets the default cursor shape to be used in the viewport instead of ``CursorShape/arrow``. + /// + /// > Note: If you want to change the default cursor shape for ``Control``'s nodes, use ``Control/mouseDefaultCursorShape`` instead. + /// + /// > Note: This method generates an ``InputEventMouseMotion`` to update cursor immediately. + /// + public static func setDefaultCursorShape(_ shape: Input.CursorShape = .arrow) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_default_cursor_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_current_cursor_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_cursor_shape") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3455658929)! + } + + } + + }() + + /// Returns the currently assigned cursor shape (see ``Input/CursorShape``). + public static func getCurrentCursorShape() -> Input.CursorShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_current_cursor_shape, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return Input.CursorShape (rawValue: _result)! + } + + fileprivate static var method_set_custom_mouse_cursor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_mouse_cursor") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 703945977)! + } + + } + + }() + + /// Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing `null` to the image parameter resets to the system cursor. See ``Input/CursorShape`` for the list of shapes. + /// + /// `image` can be either ``Texture2D`` or ``Image`` and its size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. + /// + /// `hotspot` must be within `image`'s size. + /// + /// > Note: ``AnimatedTexture``s aren't supported as custom mouse cursors. If using an ``AnimatedTexture``, only the first frame will be displayed. + /// + /// > Note: The **Lossless**, **Lossy** or **Uncompressed** compression modes are recommended. The **Video RAM** compression mode can be used, but it will be decompressed on the CPU, which means loading times are slowed down and no memory is saved compared to lossless modes. + /// + /// > Note: On the web platform, the maximum allowed cursor image size is 128×128. Cursor images larger than 32×32 will also only be displayed if the mouse cursor image is entirely located within the page for security reasons. + /// + public static func setCustomMouseCursor(image: Resource?, shape: Input.CursorShape = .arrow, hotspot: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: shape.rawValue) { pArg1 in + withUnsafePointer(to: hotspot) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_custom_mouse_cursor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_parse_input_event: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_input_event") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3754044979)! + } + + } + + }() + + /// Feeds an ``InputEvent`` to the game. Can be used to artificially trigger input events from code. Also generates ``Node/_input(event:)`` calls. + /// + /// **Example:** + /// + /// > Note: Calling this function has no influence on the operating system. So for example sending an ``InputEventMouseMotion`` will not move the OS mouse cursor to the specified position (use ``warpMouse(position:)`` instead) and sending [kbd]Alt/Cmd + Tab[/kbd] as ``InputEventKey`` won't toggle between active windows. + /// + public static func parseInputEvent(_ event: InputEvent?) { + withUnsafePointer(to: event?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_parse_input_event, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_accumulated_input: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_accumulated_input") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_use_accumulated_input(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_use_accumulated_input, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_accumulated_input: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_accumulated_input") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_using_accumulated_input() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_using_accumulated_input, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_flush_buffered_events: GDExtensionMethodBindPtr = { + let methodName = StringName("flush_buffered_events") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input (``useAccumulatedInput``) or agile input flushing (``ProjectSettings/inputDevices/buffering/agileEventFlushing``). + /// + /// The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling. + /// + public static func flushBufferedEvents() { + gi.object_method_bind_ptrcall(method_flush_buffered_events, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_set_emulate_mouse_from_touch: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emulate_mouse_from_touch") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_emulate_mouse_from_touch(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_emulate_mouse_from_touch, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emulating_mouse_from_touch: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emulating_mouse_from_touch") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_emulating_mouse_from_touch() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_emulating_mouse_from_touch, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emulate_touch_from_mouse: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emulate_touch_from_mouse") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_emulate_touch_from_mouse(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_emulate_touch_from_mouse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_emulating_touch_from_mouse: GDExtensionMethodBindPtr = { + let methodName = StringName("is_emulating_touch_from_mouse") + return withUnsafePointer(to: &Input.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_emulating_touch_from_mouse() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_emulating_touch_from_mouse, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ device: Int64, _ connected: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a joypad device has been connected or disconnected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.joyConnectionChanged.connect { device, connected in + /// print ("caught signal") + /// } + /// ``` + public var joyConnectionChanged: Signal1 { Signal1 (target: self, signalName: "joy_connection_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEvent.swift b/Sources/SwiftGodot/Generated/Api/InputEvent.swift new file mode 100644 index 000000000..c948a0a88 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEvent.swift @@ -0,0 +1,437 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for input events. +/// +/// Abstract base class of all types of input events. See ``Node/_input(event:)``. +open class InputEvent: Resource { + override open class var godotClassName: StringName { "InputEvent" } + /* Constants */ + /// Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input. + public static let deviceIdEmulation = -1 + + /* Properties */ + + /// The event's device ID. + /// + /// > Note: ``device`` can be negative for special use cases that don't refer to devices physically present on the system. See ``deviceIdEmulation``. + /// + final public var device: Int32 { + get { + return get_device () + } + + set { + set_device (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_device: GDExtensionMethodBindPtr = { + let methodName = StringName("set_device") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_device(_ device: Int32) { + withUnsafePointer(to: device) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_set_device, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_device: GDExtensionMethodBindPtr = { + let methodName = StringName("get_device") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_device() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEvent.method_get_device, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_action: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558498928)! + } + + } + + }() + + /// Returns `true` if this input event matches a pre-defined action of any type. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public final func isAction(_ action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_is_action, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_pressed") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1631499404)! + } + + } + + }() + + /// Returns `true` if the given action is being pressed (and is not an echo event for ``InputEventKey`` events, unless `allowEcho` is `true`). Not relevant for events of type ``InputEventMouseMotion`` or ``InputEventScreenDrag``. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + /// > Note: Due to keyboard ghosting, ``isActionPressed(action:allowEcho:exactMatch:)`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + public final func isActionPressed(action: StringName, allowEcho: Bool = false, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: allowEcho) { pArg1 in + withUnsafePointer(to: exactMatch) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_is_action_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_released: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_released") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558498928)! + } + + } + + }() + + /// Returns `true` if the given action is released (i.e. not pressed). Not relevant for events of type ``InputEventMouseMotion`` or ``InputEventScreenDrag``. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public final func isActionReleased(action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_is_action_released, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_action_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_strength") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 801543509)! + } + + } + + }() + + /// Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type ``InputEventJoypadMotion``. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public final func getActionStrength(action: StringName, exactMatch: Bool = false) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_get_action_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_canceled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_canceled") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this input event has been canceled. + public final func isCanceled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEvent.method_is_canceled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_pressed") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this input event is pressed. Not relevant for events of type ``InputEventMouseMotion`` or ``InputEventScreenDrag``. + /// + /// > Note: Due to keyboard ghosting, ``isPressed()`` may return `false` even if one of the action's keys is pressed. See Input examples in the documentation for more information. + /// + public final func isPressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEvent.method_is_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_released: GDExtensionMethodBindPtr = { + let methodName = StringName("is_released") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this input event is released. Not relevant for events of type ``InputEventMouseMotion`` or ``InputEventScreenDrag``. + public final func isReleased() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEvent.method_is_released, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_echo: GDExtensionMethodBindPtr = { + let methodName = StringName("is_echo") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this input event is an echo event (only for events of type ``InputEventKey``). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns `false`. + /// + /// > Note: The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. + /// + public final func isEcho() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEvent.method_is_echo, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_as_text: GDExtensionMethodBindPtr = { + let methodName = StringName("as_text") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a ``String`` representation of the event. + public final func asText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InputEvent.method_as_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_match: GDExtensionMethodBindPtr = { + let methodName = StringName("is_match") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1754951977)! + } + + } + + }() + + /// Returns `true` if the specified `event` matches this event. Only valid for action events i.e key (``InputEventKey``), button (``InputEventMouseButton`` or ``InputEventJoypadButton``), axis ``InputEventJoypadMotion`` or action (``InputEventAction``) events. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public final func isMatch(event: InputEvent?, exactMatch: Bool = true) -> Bool { + var _result: Bool = false + withUnsafePointer(to: event?.handle) { pArg0 in + withUnsafePointer(to: exactMatch) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_is_match, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_action_type: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_type") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this input event's type is one that can be assigned to an input action. + public final func isActionType() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEvent.method_is_action_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_accumulate: GDExtensionMethodBindPtr = { + let methodName = StringName("accumulate") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1062211774)! + } + + } + + }() + + /// Returns `true` if the given input event and this input event can be added together (only for events of type ``InputEventMouseMotion``). + /// + /// The given input event's position, global position and speed will be copied. The resulting `relative` is a sum of both events. Both events' modifiers have to be identical. + /// + public final func accumulate(withEvent: InputEvent?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: withEvent?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_accumulate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_xformed_by: GDExtensionMethodBindPtr = { + let methodName = StringName("xformed_by") + return withUnsafePointer(to: &InputEvent.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1282766827)! + } + + } + + }() + + /// Returns a copy of the given input event which has been offset by `localOfs` and transformed by `xform`. Relevant for events of type ``InputEventMouseButton``, ``InputEventMouseMotion``, ``InputEventScreenTouch``, ``InputEventScreenDrag``, ``InputEventMagnifyGesture`` and ``InputEventPanGesture``. + public final func xformedBy(xform: Transform2D, localOfs: Vector2 = Vector2 (x: 0, y: 0)) -> InputEvent? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: localOfs) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InputEvent.method_xformed_by, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventAction.swift b/Sources/SwiftGodot/Generated/Api/InputEventAction.swift new file mode 100644 index 000000000..3ed3c1bfd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventAction.swift @@ -0,0 +1,240 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An input event type for actions. +/// +/// Contains a generic action which can be targeted from several types of inputs. Actions and their events can be set in the **Input Map** tab in **Project > Project Settings**, or with the ``InputMap`` class. +/// +/// > Note: Unlike the other ``InputEvent`` subclasses which map to unique physical events, this virtual one is not emitted by the engine. This class is useful to emit actions manually with ``Input/parseInputEvent(_:)``, which are then received in ``Node/_input(event:)``. To check if a physical event matches an action from the Input Map, use ``InputEvent/isAction(_:exactMatch:)`` and ``InputEvent/isActionPressed(action:allowEcho:exactMatch:)``. +/// +open class InputEventAction: InputEvent { + override open class var godotClassName: StringName { "InputEventAction" } + + /* Properties */ + + /// The action's name. Actions are accessed via this ``String``. + final public var action: StringName { + get { + return get_action () + } + + set { + set_action (newValue) + } + + } + + /// If `true`, the action's state is pressed. If `false`, the action's state is released. + final public var pressed: Bool { + get { + return isPressed () + } + + set { + set_pressed (newValue) + } + + } + + /// The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is `false`. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed. + final public var strength: Double { + get { + return get_strength () + } + + set { + set_strength (newValue) + } + + } + + /// The real event index in action this event corresponds to (from events defined for this action in the ``InputMap``). If `-1`, a unique ID will be used and actions pressed with this ID will need to be released with another ``InputEventAction``. + final public var eventIndex: Int32 { + get { + return get_event_index () + } + + set { + set_event_index (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_action: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_action(_ action: StringName) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventAction.method_set_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_action: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_action() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(InputEventAction.method_get_action, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventAction.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_strength") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventAction.method_set_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_strength") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventAction.method_get_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_event_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_event_index") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_event_index(_ index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventAction.method_set_event_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_event_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_event_index") + return withUnsafePointer(to: &InputEventAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_event_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventAction.method_get_event_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventFromWindow.swift b/Sources/SwiftGodot/Generated/Api/InputEventFromWindow.swift new file mode 100644 index 000000000..5862663f6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventFromWindow.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for ``Viewport``-based input events. +/// +/// InputEventFromWindow represents events specifically received by windows. This includes mouse events, keyboard events in focused windows or touch screen actions. +open class InputEventFromWindow: InputEvent { + override open class var godotClassName: StringName { "InputEventFromWindow" } + + /* Properties */ + + /// The ID of a ``Window`` that received this event. + final public var windowId: Int { + get { + return get_window_id () + } + + set { + set_window_id (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_window_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_window_id") + return withUnsafePointer(to: &InputEventFromWindow.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_window_id(_ id: Int) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventFromWindow.method_set_window_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_window_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_window_id") + return withUnsafePointer(to: &InputEventFromWindow.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_window_id() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(InputEventFromWindow.method_get_window_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventGesture.swift b/Sources/SwiftGodot/Generated/Api/InputEventGesture.swift new file mode 100644 index 000000000..6be787ccd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventGesture.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for touch gestures. +/// +/// InputEventGestures are sent when a user performs a supported gesture on a touch screen. Gestures can't be emulated using mouse, because they typically require multi-touch. +open class InputEventGesture: InputEventWithModifiers { + override open class var godotClassName: StringName { "InputEventGesture" } + + /* Properties */ + + /// The local gesture position relative to the ``Viewport``. If used in ``Control/_guiInput(event:)``, the position is relative to the current ``Control`` that received this gesture. + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &InputEventGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventGesture.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &InputEventGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventGesture.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventJoypadButton.swift b/Sources/SwiftGodot/Generated/Api/InputEventJoypadButton.swift new file mode 100644 index 000000000..7d4e96246 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventJoypadButton.swift @@ -0,0 +1,180 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a gamepad button being pressed or released. +/// +/// Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see ``InputEventJoypadMotion``. +open class InputEventJoypadButton: InputEvent { + override open class var godotClassName: StringName { "InputEventJoypadButton" } + + /* Properties */ + + /// Button identifier. One of the ``JoyButton`` button constants. + final public var buttonIndex: JoyButton { + get { + return get_button_index () + } + + set { + set_button_index (newValue) + } + + } + + final public var pressure: Double { + get { + return get_pressure () + } + + set { + set_pressure (newValue) + } + + } + + /// If `true`, the button's state is pressed. If `false`, the button's state is released. + final public var pressed: Bool { + get { + return isPressed () + } + + set { + set_pressed (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_button_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_index") + return withUnsafePointer(to: &InputEventJoypadButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1466368136)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_index(_ buttonIndex: JoyButton) { + withUnsafePointer(to: buttonIndex.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventJoypadButton.method_set_button_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_index") + return withUnsafePointer(to: &InputEventJoypadButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 595588182)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_index() -> JoyButton { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventJoypadButton.method_get_button_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return JoyButton (rawValue: _result)! + } + + fileprivate static var method_set_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressure") + return withUnsafePointer(to: &InputEventJoypadButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressure(_ pressure: Double) { + withUnsafePointer(to: pressure) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventJoypadButton.method_set_pressure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pressure") + return withUnsafePointer(to: &InputEventJoypadButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pressure() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventJoypadButton.method_get_pressure, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &InputEventJoypadButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventJoypadButton.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventJoypadMotion.swift b/Sources/SwiftGodot/Generated/Api/InputEventJoypadMotion.swift new file mode 100644 index 000000000..2a89796a9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventJoypadMotion.swift @@ -0,0 +1,143 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents axis motions (such as joystick or analog triggers) from a gamepad. +/// +/// Stores information about joystick motions. One ``InputEventJoypadMotion`` represents one axis at a time. For gamepad buttons, see ``InputEventJoypadButton``. +open class InputEventJoypadMotion: InputEvent { + override open class var godotClassName: StringName { "InputEventJoypadMotion" } + + /* Properties */ + + /// Axis identifier. Use one of the ``JoyAxis`` axis constants. + final public var axis: JoyAxis { + get { + return get_axis () + } + + set { + set_axis (newValue) + } + + } + + /// Current position of the joystick on the given axis. The value ranges from `-1.0` to `1.0`. A value of `0` means the axis is in its resting position. + final public var axisValue: Double { + get { + return get_axis_value () + } + + set { + set_axis_value (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("set_axis") + return withUnsafePointer(to: &InputEventJoypadMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1332685170)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_axis(_ axis: JoyAxis) { + withUnsafePointer(to: axis.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventJoypadMotion.method_set_axis, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_axis") + return withUnsafePointer(to: &InputEventJoypadMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4019121683)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_axis() -> JoyAxis { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventJoypadMotion.method_get_axis, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return JoyAxis (rawValue: _result)! + } + + fileprivate static var method_set_axis_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_axis_value") + return withUnsafePointer(to: &InputEventJoypadMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_axis_value(_ axisValue: Double) { + withUnsafePointer(to: axisValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventJoypadMotion.method_set_axis_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_axis_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_axis_value") + return withUnsafePointer(to: &InputEventJoypadMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_axis_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventJoypadMotion.method_get_axis_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventKey.swift b/Sources/SwiftGodot/Generated/Api/InputEventKey.swift new file mode 100644 index 000000000..ca5d4ebf1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventKey.swift @@ -0,0 +1,541 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a key on a keyboard being pressed or released. +/// +/// An input event for keys on a keyboard. Supports key presses, key releases and ``echo`` events. It can also be received in ``Node/_unhandledKeyInput(event:)``. +/// +/// > Note: Events received from the keyboard usually have all properties set. Event mappings should have only one of the ``keycode``, ``physicalKeycode`` or ``unicode`` set. +/// +/// When events are compared, properties are checked in the following priority - ``keycode``, ``physicalKeycode`` and ``unicode``. Events with the first matching value will be considered equal. +/// +open class InputEventKey: InputEventWithModifiers { + override open class var godotClassName: StringName { "InputEventKey" } + + /* Properties */ + + /// If `true`, the key's state is pressed. If `false`, the key's state is released. + final public var pressed: Bool { + get { + return isPressed () + } + + set { + set_pressed (newValue) + } + + } + + /// Latin label printed on the key in the current keyboard layout, which corresponds to one of the ``Key`` constants. + /// + /// To get a human-readable representation of the ``InputEventKey``, use `OS.get_keycode_string(event.keycode)` where `event` is the ``InputEventKey``. + /// + final public var keycode: Key { + get { + return get_keycode () + } + + set { + set_keycode (newValue) + } + + } + + /// Represents the physical location of a key on the 101/102-key US QWERTY keyboard, which corresponds to one of the ``Key`` constants. + /// + /// To get a human-readable representation of the ``InputEventKey``, use ``OS/getKeycodeString(code:)`` in combination with ``DisplayServer/keyboardGetKeycodeFromPhysical(keycode:)``: + /// + final public var physicalKeycode: Key { + get { + return get_physical_keycode () + } + + set { + set_physical_keycode (newValue) + } + + } + + /// Represents the localized label printed on the key in the current keyboard layout, which corresponds to one of the ``Key`` constants or any valid Unicode character. + /// + /// For keyboard layouts with a single label on the key, it is equivalent to ``keycode``. + /// + /// To get a human-readable representation of the ``InputEventKey``, use `OS.get_keycode_string(event.key_label)` where `event` is the ``InputEventKey``. + /// + final public var keyLabel: Key { + get { + return get_key_label () + } + + set { + set_key_label (newValue) + } + + } + + /// The key Unicode character code (when relevant), shifted by modifier keys. Unicode character codes for composite characters and complex scripts may not be available unless IME input mode is active. See ``Window/setImeActive(_:)`` for more information. + final public var unicode: Int64 { + get { + return get_unicode () + } + + set { + set_unicode (newValue) + } + + } + + /// Represents the location of a key which has both left and right versions, such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. + final public var location: KeyLocation { + get { + return get_location () + } + + set { + set_location (newValue) + } + + } + + /// If `true`, the key was already pressed before this event. An echo event is a repeated key event sent when the user is holding down the key. + /// + /// > Note: The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. + /// + final public var echo: Bool { + get { + return isEcho () + } + + set { + set_echo (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 888074362)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keycode(_ keycode: Key) { + withUnsafePointer(to: keycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_keycode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_keycode() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_keycode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_set_physical_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physical_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 888074362)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physical_keycode(_ physicalKeycode: Key) { + withUnsafePointer(to: physicalKeycode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_physical_keycode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physical_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physical_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physical_keycode() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_physical_keycode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_set_key_label: GDExtensionMethodBindPtr = { + let methodName = StringName("set_key_label") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 888074362)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_key_label(_ keyLabel: Key) { + withUnsafePointer(to: keyLabel.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_key_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_key_label: GDExtensionMethodBindPtr = { + let methodName = StringName("get_key_label") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_key_label() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_key_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_set_unicode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unicode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_unicode(_ unicode: Int64) { + withUnsafePointer(to: unicode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_unicode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unicode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unicode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_unicode() -> Int64 { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(InputEventKey.method_get_unicode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_location: GDExtensionMethodBindPtr = { + let methodName = StringName("set_location") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 634453155)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_location(_ location: KeyLocation) { + withUnsafePointer(to: location.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_location, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_location: GDExtensionMethodBindPtr = { + let methodName = StringName("get_location") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 211810873)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_location() -> KeyLocation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_location, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return KeyLocation (rawValue: _result)! + } + + fileprivate static var method_set_echo: GDExtensionMethodBindPtr = { + let methodName = StringName("set_echo") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_echo(_ echo: Bool) { + withUnsafePointer(to: echo) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventKey.method_set_echo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_keycode_with_modifiers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keycode_with_modifiers") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + /// Returns the Latin keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also ``InputEventWithModifiers``. + /// + /// To get a human-readable representation of the ``InputEventKey`` with modifiers, use `OS.get_keycode_string(event.get_keycode_with_modifiers())` where `event` is the ``InputEventKey``. + /// + public final func getKeycodeWithModifiers() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_keycode_with_modifiers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_get_physical_keycode_with_modifiers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physical_keycode_with_modifiers") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + /// Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also ``InputEventWithModifiers``. + /// + /// To get a human-readable representation of the ``InputEventKey`` with modifiers, use `OS.get_keycode_string(event.get_physical_keycode_with_modifiers())` where `event` is the ``InputEventKey``. + /// + public final func getPhysicalKeycodeWithModifiers() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_physical_keycode_with_modifiers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_get_key_label_with_modifiers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_key_label_with_modifiers") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1585896689)! + } + + } + + }() + + /// Returns the localized key label combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also ``InputEventWithModifiers``. + /// + /// To get a human-readable representation of the ``InputEventKey`` with modifiers, use `OS.get_keycode_string(event.get_key_label_with_modifiers())` where `event` is the ``InputEventKey``. + /// + public final func getKeyLabelWithModifiers() -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventKey.method_get_key_label_with_modifiers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Key (rawValue: _result)! + } + + fileprivate static var method_as_text_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("as_text_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a ``String`` representation of the event's ``keycode`` and modifiers. + public final func asTextKeycode() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InputEventKey.method_as_text_keycode, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_as_text_physical_keycode: GDExtensionMethodBindPtr = { + let methodName = StringName("as_text_physical_keycode") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a ``String`` representation of the event's ``physicalKeycode`` and modifiers. + public final func asTextPhysicalKeycode() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InputEventKey.method_as_text_physical_keycode, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_as_text_key_label: GDExtensionMethodBindPtr = { + let methodName = StringName("as_text_key_label") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a ``String`` representation of the event's ``keyLabel`` and modifiers. + public final func asTextKeyLabel() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InputEventKey.method_as_text_key_label, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_as_text_location: GDExtensionMethodBindPtr = { + let methodName = StringName("as_text_location") + return withUnsafePointer(to: &InputEventKey.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a ``String`` representation of the event's ``location``. This will be a blank string if the event is not specific to a location. + public final func asTextLocation() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InputEventKey.method_as_text_location, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventMIDI.swift b/Sources/SwiftGodot/Generated/Api/InputEventMIDI.swift new file mode 100644 index 000000000..1c46e7a66 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventMIDI.swift @@ -0,0 +1,501 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a MIDI message from a MIDI device, such as a musical keyboard. +/// +/// InputEventMIDI stores information about messages from MIDI (Musical Instrument Digital Interface) devices. These may include musical keyboards, synthesizers, and drum machines. +/// +/// MIDI messages can be received over a 5-pin MIDI connector or over USB. If your device supports both be sure to check the settings in the device to see which output it is using. +/// +/// By default, Godot does not detect MIDI devices. You need to call ``OS/openMidiInputs()``, first. You can check which devices are detected with ``OS/getConnectedMidiInputs()``, and close the connection with ``OS/closeMidiInputs()``. +/// +/// > Note: Godot does not support MIDI output, so there is no way to emit MIDI messages from Godot. Only MIDI input is supported. +/// +open class InputEventMIDI: InputEvent { + override open class var godotClassName: StringName { "InputEventMIDI" } + + /* Properties */ + + /// The MIDI channel of this message, ranging from `0` to `15`. MIDI channel `9` is reserved for percussion instruments. + final public var channel: Int32 { + get { + return get_channel () + } + + set { + set_channel (newValue) + } + + } + + /// Represents the type of MIDI message (see the ``MIDIMessage`` enum). + /// + /// For more information, see the MIDI message status byte list chart. + /// + final public var message: MIDIMessage { + get { + return get_message () + } + + set { + set_message (newValue) + } + + } + + /// The pitch index number of this MIDI message. This value ranges from `0` to `127`. + /// + /// On a piano, the **middle C** is `60`, followed by a **C-sharp** (`61`), then a **D** (`62`), and so on. Each octave is split in offsets of 12. See the "MIDI note number" column of the piano key frequency chart a full list. + /// + final public var pitch: Int32 { + get { + return get_pitch () + } + + set { + set_pitch (newValue) + } + + } + + /// The velocity of the MIDI message. This value ranges from `0` to `127`. For a musical keyboard, this corresponds to how quickly the key was pressed, and is rarely above `110` in practice. + /// + /// > Note: Some MIDI devices may send a ``MIDIMessage/noteOn`` message with `0` velocity and expect it to be treated the same as a ``MIDIMessage/noteOff`` message. If necessary, this can be handled with a few lines of code: + /// + final public var velocity: Int32 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// The instrument (also called _program_ or _preset_) used on this MIDI message. This value ranges from `0` to `127`. + /// + /// To see what each value means, refer to the General MIDI's instrument list. Keep in mind that the list is off by 1 because it does not begin from 0. A value of `0` corresponds to the acoustic grand piano. + /// + final public var instrument: Int32 { + get { + return get_instrument () + } + + set { + set_instrument (newValue) + } + + } + + /// The strength of the key being pressed. This value ranges from `0` to `127`. + /// + /// > Note: For many devices, this value is always `0`. Other devices such as musical keyboards may simulate pressure by changing the ``velocity``, instead. + /// + final public var pressure: Int32 { + get { + return get_pressure () + } + + set { + set_pressure (newValue) + } + + } + + /// The unique number of the controller, if ``message`` is ``MIDIMessage/controlChange``, otherwise this is `0`. This value can be used to identify sliders for volume, balance, and panning, as well as switches and pedals on the MIDI device. See the General MIDI specification for a small list. + final public var controllerNumber: Int32 { + get { + return get_controller_number () + } + + set { + set_controller_number (newValue) + } + + } + + /// The value applied to the controller. If ``message`` is ``MIDIMessage/controlChange``, this value ranges from `0` to `127`, otherwise it is `0`. See also ``controllerValue``. + final public var controllerValue: Int32 { + get { + return get_controller_value () + } + + set { + set_controller_value (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_channel") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_channel(_ channel: Int32) { + withUnsafePointer(to: channel) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_channel") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_channel() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_message: GDExtensionMethodBindPtr = { + let methodName = StringName("set_message") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1064271510)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_message(_ message: MIDIMessage) { + withUnsafePointer(to: message.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_message, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_message: GDExtensionMethodBindPtr = { + let methodName = StringName("get_message") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1936512097)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_message() -> MIDIMessage { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_message, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MIDIMessage (rawValue: _result)! + } + + fileprivate static var method_set_pitch: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pitch") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pitch(_ pitch: Int32) { + withUnsafePointer(to: pitch) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_pitch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pitch: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pitch") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pitch() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_pitch, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Int32) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_instrument: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instrument") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_instrument(_ instrument: Int32) { + withUnsafePointer(to: instrument) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_instrument, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_instrument: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instrument") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_instrument() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_instrument, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressure") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressure(_ pressure: Int32) { + withUnsafePointer(to: pressure) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_pressure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pressure") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pressure() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_pressure, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_controller_number: GDExtensionMethodBindPtr = { + let methodName = StringName("set_controller_number") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_controller_number(_ controllerNumber: Int32) { + withUnsafePointer(to: controllerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_controller_number, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_controller_number: GDExtensionMethodBindPtr = { + let methodName = StringName("get_controller_number") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_controller_number() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_controller_number, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_controller_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_controller_value") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_controller_value(_ controllerValue: Int32) { + withUnsafePointer(to: controllerValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMIDI.method_set_controller_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_controller_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_controller_value") + return withUnsafePointer(to: &InputEventMIDI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_controller_value() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventMIDI.method_get_controller_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventMagnifyGesture.swift b/Sources/SwiftGodot/Generated/Api/InputEventMagnifyGesture.swift new file mode 100644 index 000000000..7d4c10e0c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventMagnifyGesture.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a magnifying touch gesture. +/// +/// Stores the factor of a magnifying touch gesture. This is usually performed when the user pinches the touch screen and used for zooming in/out. +/// +/// > Note: On Android, this requires the ``ProjectSettings/inputDevices/pointing/android/enablePanAndScaleGestures`` project setting to be enabled. +/// +open class InputEventMagnifyGesture: InputEventGesture { + override open class var godotClassName: StringName { "InputEventMagnifyGesture" } + + /* Properties */ + + /// The amount (or delta) of the event. This value is closer to `1.0` the slower the gesture is performed. + final public var factor: Double { + get { + return get_factor () + } + + set { + set_factor (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_factor") + return withUnsafePointer(to: &InputEventMagnifyGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_factor(_ factor: Double) { + withUnsafePointer(to: factor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMagnifyGesture.method_set_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_factor") + return withUnsafePointer(to: &InputEventMagnifyGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventMagnifyGesture.method_get_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventMouse.swift b/Sources/SwiftGodot/Generated/Api/InputEventMouse.swift new file mode 100644 index 000000000..832e9e6eb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventMouse.swift @@ -0,0 +1,205 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base input event type for mouse events. +/// +/// Stores general information about mouse events. +open class InputEventMouse: InputEventWithModifiers { + override open class var godotClassName: StringName { "InputEventMouse" } + + /* Properties */ + + /// The mouse button mask identifier, one of or a bitwise combination of the ``MouseButton`` button masks. + final public var buttonMask: MouseButtonMask { + get { + return get_button_mask () + } + + set { + set_button_mask (newValue) + } + + } + + /// When received in ``Node/_input(event:)`` or ``Node/_unhandledInput(event:)``, returns the mouse's position in the ``Viewport`` this ``Node`` is in using the coordinate system of this ``Viewport``. + /// + /// When received in ``Control/_guiInput(event:)``, returns the mouse's position in the ``Control`` using the local coordinate system of the ``Control``. + /// + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// When received in ``Node/_input(event:)`` or ``Node/_unhandledInput(event:)``, returns the mouse's position in the root ``Viewport`` using the coordinate system of the root ``Viewport``. + /// + /// When received in ``Control/_guiInput(event:)``, returns the mouse's position in the ``CanvasLayer`` that the ``Control`` is in using the coordinate system of the ``CanvasLayer``. + /// + final public var globalPosition: Vector2 { + get { + return get_global_position () + } + + set { + set_global_position (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_button_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_mask") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3950145251)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_mask(_ buttonMask: MouseButtonMask) { + withUnsafePointer(to: buttonMask.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouse.method_set_button_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_mask") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2512161324)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_mask() -> MouseButtonMask { + var _result: MouseButtonMask = MouseButtonMask () + gi.object_method_bind_ptrcall(InputEventMouse.method_get_button_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouse.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouse.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_position") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_position(_ globalPosition: Vector2) { + withUnsafePointer(to: globalPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouse.method_set_global_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_position") + return withUnsafePointer(to: &InputEventMouse.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouse.method_get_global_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventMouseButton.swift b/Sources/SwiftGodot/Generated/Api/InputEventMouseButton.swift new file mode 100644 index 000000000..beb1f74e3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventMouseButton.swift @@ -0,0 +1,278 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a mouse button being pressed or released. +/// +/// Stores information about mouse click events. See ``Node/_input(event:)``. +/// +/// > Note: On Wear OS devices, rotary input is mapped to ``MouseButton/wheelUp`` and ``MouseButton/wheelDown``. This can be changed to ``MouseButton/wheelLeft`` and ``MouseButton/wheelRight`` with the ``ProjectSettings/inputDevices/pointing/android/rotaryInputScrollAxis`` setting. +/// +open class InputEventMouseButton: InputEventMouse { + override open class var godotClassName: StringName { "InputEventMouseButton" } + + /* Properties */ + + /// The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported. + final public var factor: Double { + get { + return get_factor () + } + + set { + set_factor (newValue) + } + + } + + /// The mouse button identifier, one of the ``MouseButton`` button or button wheel constants. + final public var buttonIndex: MouseButton { + get { + return get_button_index () + } + + set { + set_button_index (newValue) + } + + } + + /// If `true`, the mouse button event has been canceled. + final public var canceled: Bool { + get { + return isCanceled () + } + + set { + set_canceled (newValue) + } + + } + + /// If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released. + final public var pressed: Bool { + get { + return isPressed () + } + + set { + set_pressed (newValue) + } + + } + + /// If `true`, the mouse button's state is a double-click. + final public var doubleClick: Bool { + get { + return is_double_click () + } + + set { + set_double_click (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_factor") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_factor(_ factor: Double) { + withUnsafePointer(to: factor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseButton.method_set_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_factor") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventMouseButton.method_get_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_button_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_button_index") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3624991109)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_button_index(_ buttonIndex: MouseButton) { + withUnsafePointer(to: buttonIndex.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseButton.method_set_button_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_button_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_button_index") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1132662608)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_button_index() -> MouseButton { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(InputEventMouseButton.method_get_button_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MouseButton (rawValue: _result)! + } + + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseButton.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_canceled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_canceled") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_canceled(_ canceled: Bool) { + withUnsafePointer(to: canceled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseButton.method_set_canceled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_double_click: GDExtensionMethodBindPtr = { + let methodName = StringName("set_double_click") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_double_click(_ doubleClick: Bool) { + withUnsafePointer(to: doubleClick) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseButton.method_set_double_click, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_double_click: GDExtensionMethodBindPtr = { + let methodName = StringName("is_double_click") + return withUnsafePointer(to: &InputEventMouseButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_double_click() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventMouseButton.method_is_double_click, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventMouseMotion.swift b/Sources/SwiftGodot/Generated/Api/InputEventMouseMotion.swift new file mode 100644 index 000000000..a934ed1d2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventMouseMotion.swift @@ -0,0 +1,440 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a mouse or a pen movement. +/// +/// Stores information about a mouse or a pen motion. This includes relative position, absolute position, and velocity. See ``Node/_input(event:)``. +/// +/// > Note: By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, set ``Input/useAccumulatedInput`` to `false` to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing Bresenham's line algorithm as well to avoid visible gaps in lines if the user is moving the mouse quickly. +/// +open class InputEventMouseMotion: InputEventMouse { + override open class var godotClassName: StringName { "InputEventMouseMotion" } + + /* Properties */ + + /// Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes. + final public var tilt: Vector2 { + get { + return get_tilt () + } + + set { + set_tilt (newValue) + } + + } + + /// Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`. + final public var pressure: Double { + get { + return get_pressure () + } + + set { + set_pressure (newValue) + } + + } + + /// Returns `true` when using the eraser end of a stylus pen. + /// + /// > Note: This property is implemented on Linux, macOS and Windows. + /// + final public var penInverted: Bool { + get { + return get_pen_inverted () + } + + set { + set_pen_inverted (newValue) + } + + } + + /// The mouse position relative to the previous position (position at the last frame). + /// + /// > Note: Since ``InputEventMouseMotion`` is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse. + /// + /// > Note: ``relative`` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using ``relative`` in a script that handles mouse aiming with the ``Input/MouseMode/captured`` mouse mode. To avoid this, use ``screenRelative`` instead. + /// + final public var relative: Vector2 { + get { + return get_relative () + } + + set { + set_relative (newValue) + } + + } + + /// The unscaled mouse position relative to the previous position in the coordinate system of the screen (position at the last frame). + /// + /// > Note: Since ``InputEventMouseMotion`` is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse. This coordinate is _not_ scaled according to the content scale factor or calls to ``InputEvent/xformedBy(xform:localOfs:)``. This should be preferred over ``relative`` for mouse aiming when using the ``Input/MouseMode/captured`` mouse mode, regardless of the project's stretch mode. + /// + final public var screenRelative: Vector2 { + get { + return get_screen_relative () + } + + set { + set_screen_relative (newValue) + } + + } + + /// The mouse velocity in pixels per second. + /// + /// > Note: ``velocity`` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using ``velocity`` in a script that handles mouse aiming with the ``Input/MouseMode/captured`` mouse mode. To avoid this, use ``screenVelocity`` instead. + /// + final public var velocity: Vector2 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is _not_ scaled according to the content scale factor or calls to ``InputEvent/xformedBy(xform:localOfs:)``. This should be preferred over ``velocity`` for mouse aiming when using the ``Input/MouseMode/captured`` mouse mode, regardless of the project's stretch mode. + final public var screenVelocity: Vector2 { + get { + return get_screen_velocity () + } + + set { + set_screen_velocity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tilt") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tilt(_ tilt: Vector2) { + withUnsafePointer(to: tilt) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_tilt, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tilt") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tilt() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_tilt, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressure") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressure(_ pressure: Double) { + withUnsafePointer(to: pressure) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_pressure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pressure") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pressure() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_pressure, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pen_inverted: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pen_inverted") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pen_inverted(_ penInverted: Bool) { + withUnsafePointer(to: penInverted) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_pen_inverted, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pen_inverted: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pen_inverted") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pen_inverted() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_pen_inverted, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_relative") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_relative(_ relative: Vector2) { + withUnsafePointer(to: relative) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_relative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("get_relative") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_relative() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_screen_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_relative") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_relative(_ relative: Vector2) { + withUnsafePointer(to: relative) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_screen_relative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_relative") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_relative() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_screen_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_screen_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_velocity") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_set_screen_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_velocity") + return withUnsafePointer(to: &InputEventMouseMotion.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventMouseMotion.method_get_screen_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventPanGesture.swift b/Sources/SwiftGodot/Generated/Api/InputEventPanGesture.swift new file mode 100644 index 000000000..318ffb0e3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventPanGesture.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a panning touch gesture. +/// +/// Stores information about pan gestures. A pan gesture is performed when the user swipes the touch screen with two fingers. It's typically used for panning/scrolling. +/// +/// > Note: On Android, this requires the ``ProjectSettings/inputDevices/pointing/android/enablePanAndScaleGestures`` project setting to be enabled. +/// +open class InputEventPanGesture: InputEventGesture { + override open class var godotClassName: StringName { "InputEventPanGesture" } + + /* Properties */ + + /// Panning amount since last pan event. + final public var delta: Vector2 { + get { + return get_delta () + } + + set { + set_delta (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delta") + return withUnsafePointer(to: &InputEventPanGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_delta(_ delta: Vector2) { + withUnsafePointer(to: delta) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventPanGesture.method_set_delta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delta") + return withUnsafePointer(to: &InputEventPanGesture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_delta() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventPanGesture.method_get_delta, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventScreenDrag.swift b/Sources/SwiftGodot/Generated/Api/InputEventScreenDrag.swift new file mode 100644 index 000000000..e006b0b74 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventScreenDrag.swift @@ -0,0 +1,541 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a screen drag event. +/// +/// Stores information about screen drag events. See ``Node/_input(event:)``. +open class InputEventScreenDrag: InputEventFromWindow { + override open class var godotClassName: StringName { "InputEventScreenDrag" } + + /* Properties */ + + /// The drag event index in the case of a multi-drag event. + final public var index: Int32 { + get { + return get_index () + } + + set { + set_index (newValue) + } + + } + + /// Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes. + final public var tilt: Vector2 { + get { + return get_tilt () + } + + set { + set_tilt (newValue) + } + + } + + /// Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`. + final public var pressure: Double { + get { + return get_pressure () + } + + set { + set_pressure (newValue) + } + + } + + /// Returns `true` when using the eraser end of a stylus pen. + final public var penInverted: Bool { + get { + return get_pen_inverted () + } + + set { + set_pen_inverted (newValue) + } + + } + + /// The drag position in the viewport the node is in, using the coordinate system of this viewport. + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// The drag position relative to the previous position (position at the last frame). + /// + /// > Note: ``relative`` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using ``relative`` in a script that handles touch aiming. To avoid this, use ``screenRelative`` instead. + /// + final public var relative: Vector2 { + get { + return get_relative () + } + + set { + set_relative (newValue) + } + + } + + /// The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is _not_ scaled according to the content scale factor or calls to ``InputEvent/xformedBy(xform:localOfs:)``. This should be preferred over ``relative`` for touch aiming regardless of the project's stretch mode. + final public var screenRelative: Vector2 { + get { + return get_screen_relative () + } + + set { + set_screen_relative (newValue) + } + + } + + /// The drag velocity. + /// + /// > Note: ``velocity`` is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using ``velocity`` in a script that handles touch aiming. To avoid this, use ``screenVelocity`` instead. + /// + final public var velocity: Vector2 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// The unscaled drag velocity in pixels per second in screen coordinates. This velocity is _not_ scaled according to the content scale factor or calls to ``InputEvent/xformedBy(xform:localOfs:)``. This should be preferred over ``velocity`` for touch aiming regardless of the project's stretch mode. + final public var screenVelocity: Vector2 { + get { + return get_screen_velocity () + } + + set { + set_screen_velocity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_index") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_index(_ index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_index") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tilt") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tilt(_ tilt: Vector2) { + withUnsafePointer(to: tilt) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_tilt, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tilt: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tilt") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tilt() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_tilt, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressure") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressure(_ pressure: Double) { + withUnsafePointer(to: pressure) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_pressure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pressure: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pressure") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pressure() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_pressure, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pen_inverted: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pen_inverted") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pen_inverted(_ penInverted: Bool) { + withUnsafePointer(to: penInverted) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_pen_inverted, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pen_inverted: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pen_inverted") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pen_inverted() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_pen_inverted, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_relative") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_relative(_ relative: Vector2) { + withUnsafePointer(to: relative) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_relative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("get_relative") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_relative() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_screen_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_relative") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_relative(_ relative: Vector2) { + withUnsafePointer(to: relative) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_screen_relative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_relative") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_relative() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_screen_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_screen_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_velocity") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_set_screen_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_velocity") + return withUnsafePointer(to: &InputEventScreenDrag.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenDrag.method_get_screen_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventScreenTouch.swift b/Sources/SwiftGodot/Generated/Api/InputEventScreenTouch.swift new file mode 100644 index 000000000..fd0cf954d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventScreenTouch.swift @@ -0,0 +1,275 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a screen touch event. +/// +/// Stores information about multi-touch press/release input events. Supports touch press, touch release and ``index`` for multi-touch count and order. +open class InputEventScreenTouch: InputEventFromWindow { + override open class var godotClassName: StringName { "InputEventScreenTouch" } + + /* Properties */ + + /// The touch index in the case of a multi-touch event. One index = one finger. + final public var index: Int32 { + get { + return get_index () + } + + set { + set_index (newValue) + } + + } + + /// The touch position in the viewport the node is in, using the coordinate system of this viewport. + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// If `true`, the touch event has been canceled. + final public var canceled: Bool { + get { + return isCanceled () + } + + set { + set_canceled (newValue) + } + + } + + /// If `true`, the touch's state is pressed. If `false`, the touch's state is released. + final public var pressed: Bool { + get { + return isPressed () + } + + set { + set_pressed (newValue) + } + + } + + /// If `true`, the touch's state is a double tap. + final public var doubleTap: Bool { + get { + return is_double_tap () + } + + set { + set_double_tap (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_index") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_index(_ index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_set_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_index") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_get_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pressed") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_set_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_canceled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_canceled") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_canceled(_ canceled: Bool) { + withUnsafePointer(to: canceled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_set_canceled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_double_tap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_double_tap") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_double_tap(_ doubleTap: Bool) { + withUnsafePointer(to: doubleTap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_set_double_tap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_double_tap: GDExtensionMethodBindPtr = { + let methodName = StringName("is_double_tap") + return withUnsafePointer(to: &InputEventScreenTouch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_double_tap() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventScreenTouch.method_is_double_tap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventShortcut.swift b/Sources/SwiftGodot/Generated/Api/InputEventShortcut.swift new file mode 100644 index 000000000..09467ab0e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventShortcut.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a triggered keyboard ``Shortcut``. +/// +/// InputEventShortcut is a special event that can be received in ``Node/_unhandledKeyInput(event:)``. It is typically sent by the editor's Command Palette to trigger actions, but can also be sent manually using ``Viewport/pushInput(event:inLocalCoords:)``. +open class InputEventShortcut: InputEvent { + override open class var godotClassName: StringName { "InputEventShortcut" } + + /* Properties */ + + /// The ``Shortcut`` represented by this event. Its ``Shortcut/matchesEvent(_:)`` method will always return `true` for this event. + final public var shortcut: Shortcut? { + get { + return get_shortcut () + } + + set { + set_shortcut (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut") + return withUnsafePointer(to: &InputEventShortcut.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 857163497)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut(_ shortcut: Shortcut?) { + withUnsafePointer(to: shortcut?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventShortcut.method_set_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shortcut") + return withUnsafePointer(to: &InputEventShortcut.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3766804753)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shortcut() -> Shortcut? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(InputEventShortcut.method_get_shortcut, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputEventWithModifiers.swift b/Sources/SwiftGodot/Generated/Api/InputEventWithModifiers.swift new file mode 100644 index 000000000..8e9bc8cd4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputEventWithModifiers.swift @@ -0,0 +1,350 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for input events affected by modifier keys like [kbd]Shift[/kbd] and [kbd]Alt[/kbd]. +/// +/// Stores information about mouse, keyboard, and touch gesture input events. This includes information about which modifier keys are pressed, such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See ``Node/_input(event:)``. +open class InputEventWithModifiers: InputEventFromWindow { + override open class var godotClassName: StringName { "InputEventWithModifiers" } + + /* Properties */ + + /// Automatically use [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If `true`, ``ctrlPressed`` and ``metaPressed`` cannot be set. + final public var commandOrControlAutoremap: Bool { + get { + return is_command_or_control_autoremap () + } + + set { + set_command_or_control_autoremap (newValue) + } + + } + + /// State of the [kbd]Alt[/kbd] modifier. + final public var altPressed: Bool { + get { + return is_alt_pressed () + } + + set { + set_alt_pressed (newValue) + } + + } + + /// State of the [kbd]Shift[/kbd] modifier. + final public var shiftPressed: Bool { + get { + return is_shift_pressed () + } + + set { + set_shift_pressed (newValue) + } + + } + + /// State of the [kbd]Ctrl[/kbd] modifier. + final public var ctrlPressed: Bool { + get { + return is_ctrl_pressed () + } + + set { + set_ctrl_pressed (newValue) + } + + } + + /// State of the [kbd]Meta[/kbd] modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key. + final public var metaPressed: Bool { + get { + return is_meta_pressed () + } + + set { + set_meta_pressed (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_command_or_control_autoremap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_command_or_control_autoremap") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_command_or_control_autoremap(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_set_command_or_control_autoremap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_command_or_control_autoremap: GDExtensionMethodBindPtr = { + let methodName = StringName("is_command_or_control_autoremap") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_command_or_control_autoremap() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_command_or_control_autoremap, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_command_or_control_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_command_or_control_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// On macOS, returns `true` if [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) is pressed. + /// + /// On other platforms, returns `true` if [kbd]Ctrl[/kbd] is pressed. + /// + public final func isCommandOrControlPressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_command_or_control_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alt_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alt_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alt_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_set_alt_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_alt_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_alt_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_alt_pressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_alt_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shift_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shift_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shift_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_set_shift_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shift_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shift_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shift_pressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_shift_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ctrl_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ctrl_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ctrl_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_set_ctrl_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ctrl_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ctrl_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ctrl_pressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_ctrl_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_meta_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_meta_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_meta_pressed(_ pressed: Bool) { + withUnsafePointer(to: pressed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_set_meta_pressed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_meta_pressed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_meta_pressed") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_meta_pressed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_is_meta_pressed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_modifiers_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_modifiers_mask") + return withUnsafePointer(to: &InputEventWithModifiers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1258259499)! + } + + } + + }() + + /// Returns the keycode combination of modifier keys. + public final func getModifiersMask() -> KeyModifierMask { + var _result: KeyModifierMask = KeyModifierMask () + gi.object_method_bind_ptrcall(InputEventWithModifiers.method_get_modifiers_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InputMap.swift b/Sources/SwiftGodot/Generated/Api/InputMap.swift new file mode 100644 index 000000000..b513fa3a1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InputMap.swift @@ -0,0 +1,392 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton that manages all ``InputEventAction``s. +/// +/// Manages all ``InputEventAction`` which can be created/modified from the project settings menu **Project > Project Settings > Input Map** or in code with ``addAction(_:deadzone:)`` and ``actionAddEvent(action:event:)``. See ``Node/_input(event:)``. +open class InputMap: Object { + /// The shared instance of this class + public static var shared: InputMap = { + return withUnsafePointer (to: &InputMap.godotClassName.content) { ptr in + InputMap (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "InputMap" } + /* Methods */ + fileprivate static var method_has_action: GDExtensionMethodBindPtr = { + let methodName = StringName("has_action") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the ``InputMap`` has a registered action with the given name. + public static func hasAction(_ action: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_action, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_actions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_actions") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of all actions in the ``InputMap``. + public static func getActions() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_actions, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_add_action: GDExtensionMethodBindPtr = { + let methodName = StringName("add_action") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4100757082)! + } + + } + + }() + + /// Adds an empty action to the ``InputMap`` with a configurable `deadzone`. + /// + /// An ``InputEvent`` can then be added to this action with ``actionAddEvent(action:event:)``. + /// + public static func addAction(_ action: StringName, deadzone: Double = 0.5) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: deadzone) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_action, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_erase_action: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_action") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes an action from the ``InputMap``. + public static func eraseAction(_ action: StringName) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_erase_action, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_action_set_deadzone: GDExtensionMethodBindPtr = { + let methodName = StringName("action_set_deadzone") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4135858297)! + } + + } + + }() + + /// Sets a deadzone value for the action. + public static func actionSetDeadzone(action: StringName, deadzone: Double) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: deadzone) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_action_set_deadzone, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_action_get_deadzone: GDExtensionMethodBindPtr = { + let methodName = StringName("action_get_deadzone") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1391627649)! + } + + } + + }() + + /// Returns a deadzone value for the action. + public static func actionGetDeadzone(action: StringName) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_action_get_deadzone, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_action_add_event: GDExtensionMethodBindPtr = { + let methodName = StringName("action_add_event") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 518302593)! + } + + } + + }() + + /// Adds an ``InputEvent`` to an action. This ``InputEvent`` will trigger the action. + public static func actionAddEvent(action: StringName, event: InputEvent?) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: event?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_action_add_event, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_action_has_event: GDExtensionMethodBindPtr = { + let methodName = StringName("action_has_event") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1185871985)! + } + + } + + }() + + /// Returns `true` if the action has the given ``InputEvent`` associated with it. + public static func actionHasEvent(action: StringName, event: InputEvent?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: event?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_action_has_event, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_action_erase_event: GDExtensionMethodBindPtr = { + let methodName = StringName("action_erase_event") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 518302593)! + } + + } + + }() + + /// Removes an ``InputEvent`` from an action. + public static func actionEraseEvent(action: StringName, event: InputEvent?) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: event?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_action_erase_event, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_action_erase_events: GDExtensionMethodBindPtr = { + let methodName = StringName("action_erase_events") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes all events from an action. + public static func actionEraseEvents(action: StringName) { + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_action_erase_events, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_action_get_events: GDExtensionMethodBindPtr = { + let methodName = StringName("action_get_events") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 689397652)! + } + + } + + }() + + /// Returns an array of ``InputEvent``s associated with a given action. + /// + /// > Note: When used in the editor (e.g. a tool script or ``EditorPlugin``), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the `input/*` settings from ``ProjectSettings``. + /// + public static func actionGetEvents(action: StringName) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_action_get_events, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_event_is_action: GDExtensionMethodBindPtr = { + let methodName = StringName("event_is_action") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3193353650)! + } + + } + + }() + + /// Returns `true` if the given event is part of an existing action. This method ignores keyboard modifiers if the given ``InputEvent`` is not pressed (for proper release detection). See ``actionHasEvent(action:event:)`` if you don't want this behavior. + /// + /// If `exactMatch` is `false`, it ignores additional input modifiers for ``InputEventKey`` and ``InputEventMouseButton`` events, and the direction for ``InputEventJoypadMotion`` events. + /// + public static func eventIsAction(event: InputEvent?, action: StringName, exactMatch: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: event?.handle) { pArg0 in + withUnsafePointer(to: action.content) { pArg1 in + withUnsafePointer(to: exactMatch) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_event_is_action, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_load_from_project_settings: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_project_settings") + return withUnsafePointer(to: &InputMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all ``InputEventAction`` in the ``InputMap`` and load it anew from ``ProjectSettings``. + public static func loadFromProjectSettings() { + gi.object_method_bind_ptrcall(method_load_from_project_settings, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/InstancePlaceholder.swift b/Sources/SwiftGodot/Generated/Api/InstancePlaceholder.swift new file mode 100644 index 000000000..d7cfff743 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/InstancePlaceholder.swift @@ -0,0 +1,112 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder for the root ``Node`` of a ``PackedScene``. +/// +/// Turning on the option **Load As Placeholder** for an instantiated scene in the editor causes it to be replaced by an ``InstancePlaceholder`` when running the game, this will not replace the node in the editor. This makes it possible to delay actually loading the scene until calling ``createInstance(replace:customScene:)``. This is useful to avoid loading large scenes all at once by loading parts of it selectively. +/// +/// The ``InstancePlaceholder`` does not have a transform. This causes any child nodes to be positioned relatively to the ``Viewport`` from point (0,0), rather than their parent as displayed in the editor. Replacing the placeholder with a scene with a transform will transform children relatively to their parent again. +/// +open class InstancePlaceholder: Node { + override open class var godotClassName: StringName { "InstancePlaceholder" } + /* Methods */ + fileprivate static var method_get_stored_values: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stored_values") + return withUnsafePointer(to: &InstancePlaceholder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2230153369)! + } + + } + + }() + + /// Returns the list of properties that will be applied to the node when ``createInstance(replace:customScene:)`` is called. + /// + /// If `withOrder` is `true`, a key named `.order` (note the leading period) is added to the dictionary. This `.order` key is an ``GArray`` of ``String`` property names specifying the order in which properties will be applied (with index 0 being the first). + /// + public final func getStoredValues(withOrder: Bool = false) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: withOrder) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(InstancePlaceholder.method_get_stored_values, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_create_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("create_instance") + return withUnsafePointer(to: &InstancePlaceholder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3794612210)! + } + + } + + }() + + /// Call this method to actually load in the node. The created node will be placed as a sibling _above_ the ``InstancePlaceholder`` in the scene tree. The ``Node``'s reference is also returned for convenience. + /// + /// > Note: ``createInstance(replace:customScene:)`` is not thread-safe. Use ``Object/callDeferred(method:)`` if calling from a thread. + /// + public final func createInstance(replace: Bool = false, customScene: PackedScene? = nil) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: replace) { pArg0 in + withUnsafePointer(to: customScene?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(InstancePlaceholder.method_create_instance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_instance_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_path") + return withUnsafePointer(to: &InstancePlaceholder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Gets the path to the ``PackedScene`` resource file that is loaded by default when calling ``createInstance(replace:customScene:)``. Not thread-safe. Use ``Object/callDeferred(method:)`` if calling from a thread. + public final func getInstancePath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(InstancePlaceholder.method_get_instance_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/IntervalTweener.swift b/Sources/SwiftGodot/Generated/Api/IntervalTweener.swift new file mode 100644 index 000000000..35e6f6e88 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/IntervalTweener.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Creates an idle interval in a ``Tween`` animation. +/// +/// ``IntervalTweener`` is used to make delays in a tweening sequence. See ``Tween/tweenInterval(time:)`` for more usage information. +/// +/// > Note: ``Tween/tweenInterval(time:)`` is the only correct way to create ``IntervalTweener``. Any ``IntervalTweener`` created manually will not function correctly. +/// +open class IntervalTweener: Tweener { + override open class var godotClassName: StringName { "IntervalTweener" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ItemList.swift b/Sources/SwiftGodot/Generated/Api/ItemList.swift new file mode 100644 index 000000000..b922800bc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ItemList.swift @@ -0,0 +1,2507 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A vertical list of selectable items with one or multiple columns. +/// +/// This control provides a vertical list of selectable items that may be in a single or in multiple columns, with each item having options for text and an icon. Tooltips are supported and may be different for every item in the list. +/// +/// Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing [kbd]Enter[/kbd]. +/// +/// Item text only supports single-line strings. Newline characters (e.g. `\n`) in the string won't produce a newline. Text wrapping is enabled in ``IconMode/top`` mode, but the column's width is adjusted to fully fit its content by default. You need to set ``fixedColumnWidth`` greater than zero to wrap the text. +/// +/// All `set_*` methods allow negative item indices, i.e. `-1` to access the last item, `-2` to select the second-to-last item, and so on. +/// +/// **Incremental search:** Like ``PopupMenu`` and ``Tree``, ``ItemList`` supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing ``ProjectSettings/gui/timers/incrementalSearchMaxIntervalMsec``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``itemSelected`` +/// - ``emptyClicked`` +/// - ``itemClicked`` +/// - ``multiSelected`` +/// - ``itemActivated`` +open class ItemList: Control { + override open class var godotClassName: StringName { "ItemList" } + public enum IconMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Icon is drawn above the text. + case top = 0 // ICON_MODE_TOP + /// Icon is drawn to the left of the text. + case left = 1 // ICON_MODE_LEFT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .top: return ".top" + case .left: return ".left" + } + + } + + } + + public enum SelectMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Only allow selecting a single item. + case single = 0 // SELECT_SINGLE + /// Allows selecting multiple items by holding [kbd]Ctrl[/kbd] or [kbd]Shift[/kbd]. + case multi = 1 // SELECT_MULTI + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .single: return ".single" + case .multi: return ".multi" + } + + } + + } + + + /* Properties */ + + /// Allows single or multiple item selection. See the ``ItemList/SelectMode`` constants. + final public var selectMode: ItemList.SelectMode { + get { + return get_select_mode () + } + + set { + set_select_mode (newValue) + } + + } + + /// If `true`, the currently selected item can be selected again. + final public var allowReselect: Bool { + get { + return get_allow_reselect () + } + + set { + set_allow_reselect (newValue) + } + + } + + /// If `true`, right mouse button click can select items. + final public var allowRmbSelect: Bool { + get { + return get_allow_rmb_select () + } + + set { + set_allow_rmb_select (newValue) + } + + } + + /// If `true`, allows navigating the ``ItemList`` with letter keys through incremental search. + final public var allowSearch: Bool { + get { + return get_allow_search () + } + + set { + set_allow_search (newValue) + } + + } + + /// Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. + /// + /// > Note: This property takes effect only when ``iconMode`` is ``IconMode/top``. To make the text wrap, ``fixedColumnWidth`` should be greater than zero. + /// + final public var maxTextLines: Int32 { + get { + return get_max_text_lines () + } + + set { + set_max_text_lines (newValue) + } + + } + + /// If `true`, the control will automatically resize the height to fit its content. + final public var autoHeight: Bool { + get { + return has_auto_height () + } + + set { + set_auto_height (newValue) + } + + } + + /// Sets the clipping behavior when the text exceeds an item's bounding rectangle. See ``TextServer.OverrunBehavior`` for a description of all modes. + final public var textOverrunBehavior: TextServer.OverrunBehavior { + get { + return get_text_overrun_behavior () + } + + set { + set_text_overrun_behavior (newValue) + } + + } + + /// The number of items currently in the list. + final public var itemCount: Int32 { + get { + return get_item_count () + } + + set { + set_item_count (newValue) + } + + } + + /// Maximum columns the list will have. + /// + /// If greater than zero, the content will be split among the specified columns. + /// + /// A value of zero means unlimited columns, i.e. all items will be put in the same row. + /// + final public var maxColumns: Int32 { + get { + return get_max_columns () + } + + set { + set_max_columns (newValue) + } + + } + + /// Whether all columns will have the same width. + /// + /// If `true`, the width is equal to the largest column width of all columns. + /// + final public var sameColumnWidth: Bool { + get { + return is_same_column_width () + } + + set { + set_same_column_width (newValue) + } + + } + + /// The width all columns will be adjusted to. + /// + /// A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. + /// + final public var fixedColumnWidth: Int32 { + get { + return get_fixed_column_width () + } + + set { + set_fixed_column_width (newValue) + } + + } + + /// The icon position, whether above or to the left of the text. See the ``ItemList/IconMode`` constants. + final public var iconMode: ItemList.IconMode { + get { + return get_icon_mode () + } + + set { + set_icon_mode (newValue) + } + + } + + /// The scale of icon applied after ``fixedIconSize`` and transposing takes effect. + final public var iconScale: Double { + get { + return get_icon_scale () + } + + set { + set_icon_scale (newValue) + } + + } + + /// The size all icons will be adjusted to. + /// + /// If either X or Y component is not greater than zero, icon size won't be affected. + /// + final public var fixedIconSize: Vector2i { + get { + return get_fixed_icon_size () + } + + set { + set_fixed_icon_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_item") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 359861678)! + } + + } + + }() + + /// Adds an item to the item list with specified text. Returns the index of an added item. + /// + /// Specify an `icon`, or use `null` as the `icon` for a list item with no icon. + /// + /// If selectable is `true`, the list item will be selectable. + /// + public final func addItem(text: String, icon: Texture2D? = nil, selectable: Bool = true) -> Int32 { + var _result: Int32 = 0 + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + withUnsafePointer(to: selectable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_add_item, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_icon_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_item") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4256579627)! + } + + } + + }() + + /// Adds an item to the item list with no text, only an icon. Returns the index of an added item. + public final func addIconItem(icon: Texture2D?, selectable: Bool = true) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: icon?.handle) { pArg0 in + withUnsafePointer(to: selectable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_add_icon_item, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets text of the item associated with the specified index. + public final func setItemText(idx: Int32, text: String) { + withUnsafePointer(to: idx) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the text associated with the specified index. + public final func getItemText(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets (or replaces) the icon's ``Texture2D`` associated with the specified index. + public final func setItemIcon(idx: Int32, icon: Texture2D?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the icon associated with the specified index. + public final func getItemIcon(idx: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_item_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text_direction") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1707680378)! + } + + } + + }() + + /// Sets item's text base writing direction. + public final func setItemTextDirection(idx: Int32, direction: Control.TextDirection) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: direction.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text_direction") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4235602388)! + } + + } + + }() + + /// Returns item's text base writing direction. + public final func getItemTextDirection(idx: Int32) -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_item_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_language") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + public final func setItemLanguage(idx: Int32, language: String) { + withUnsafePointer(to: idx) { pArg0 in + let language = GString(language) + withUnsafePointer(to: language.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_language") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns item's text language code. + public final func getItemLanguage(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_language, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_item_icon_transposed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon_transposed") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets whether the item icon will be drawn transposed. + public final func setItemIconTransposed(idx: Int32, transposed: Bool) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: transposed) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_icon_transposed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_item_icon_transposed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_icon_transposed") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. + public final func isItemIconTransposed(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_is_item_icon_transposed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_icon_region: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon_region") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1356297692)! + } + + } + + }() + + /// Sets the region of item's icon used. The whole icon will be used if the region has no area. + public final func setItemIconRegion(idx: Int32, rect: Rect2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_icon_region, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_icon_region: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon_region") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3327874267)! + } + + } + + }() + + /// Returns the region of item's icon used. The whole icon will be used if the region has no area. + public final func getItemIconRegion(idx: Int32) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_icon_region, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_icon_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon_modulate") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets a modulating ``Color`` of the item associated with the specified index. + public final func setItemIconModulate(idx: Int32, modulate: Color) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: modulate) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_icon_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_icon_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon_modulate") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns a ``Color`` modulating item's icon at the specified index. + public final func getItemIconModulate(idx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_icon_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_selectable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_selectable") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Allows or disallows selection of the item associated with the specified index. + public final func setItemSelectable(idx: Int32, selectable: Bool) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: selectable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_selectable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_item_selectable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_selectable") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the specified index is selectable. + public final func isItemSelectable(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_is_item_selectable, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_disabled") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Disables (or enables) the item at the specified index. + /// + /// Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]). + /// + public final func setItemDisabled(idx: Int32, disabled: Bool) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_disabled") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the specified index is disabled. + public final func isItemDisabled(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_is_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_metadata") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets a value (of any type) to be stored with the item associated with the specified index. + public final func setItemMetadata(idx: Int32, metadata: Variant?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: metadata.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_metadata") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Returns the metadata value of the specified index. + public final func getItemMetadata(idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_item_custom_bg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_custom_bg_color") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the background color of the item specified by `idx` index to the specified ``Color``. + public final func setItemCustomBgColor(idx: Int32, customBgColor: Color) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: customBgColor) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_custom_bg_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_custom_bg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_custom_bg_color") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the custom background color of the item specified by `idx` index. + public final func getItemCustomBgColor(idx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_custom_bg_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_custom_fg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_custom_fg_color") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the foreground color of the item specified by `idx` index to the specified ``Color``. + public final func setItemCustomFgColor(idx: Int32, customFgColor: Color) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: customFgColor) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_custom_fg_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_custom_fg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_custom_fg_color") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the custom foreground color of the item specified by `idx` index. + public final func getItemCustomFgColor(idx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_custom_fg_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_rect") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 159227807)! + } + + } + + }() + + /// Returns the position and size of the item with the specified index, in the coordinate system of the ``ItemList`` node. If `expand` is `true` the last column expands to fill the rest of the row. + /// + /// > Note: The returned value is unreliable if called right after modifying the ``ItemList``, before it redraws in the next frame. + /// + public final func getItemRect(idx: Int32, expand: Bool = true) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: expand) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_tooltip_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tooltip_enabled") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets whether the tooltip hint is enabled for specified item index. + public final func setItemTooltipEnabled(idx: Int32, enable: Bool) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_tooltip_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_item_tooltip_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_tooltip_enabled") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the tooltip is enabled for specified item index. + public final func isItemTooltipEnabled(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_is_item_tooltip_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tooltip") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the tooltip hint for the item associated with the specified index. + public final func setItemTooltip(idx: Int32, tooltip: String) { + withUnsafePointer(to: idx) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_tooltip") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the tooltip hint associated with the specified index. + public final func getItemTooltip(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_select: GDExtensionMethodBindPtr = { + let methodName = StringName("select") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 972357352)! + } + + } + + }() + + /// Select the item at the specified index. + /// + /// > Note: This method does not trigger the item selection signal. + /// + public final func select(idx: Int32, single: Bool = true) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: single) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_select, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_deselect: GDExtensionMethodBindPtr = { + let methodName = StringName("deselect") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Ensures the item associated with the specified index is not selected. + public final func deselect(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_deselect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_deselect_all: GDExtensionMethodBindPtr = { + let methodName = StringName("deselect_all") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Ensures there are no items selected. + public final func deselectAll() { + gi.object_method_bind_ptrcall(ItemList.method_deselect_all, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_selected") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the specified index is currently selected. + public final func isSelected(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_is_selected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_selected_items: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_items") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + /// Returns an array with the indexes of the selected items. + public final func getSelectedItems() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(ItemList.method_get_selected_items, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_move_item: GDExtensionMethodBindPtr = { + let methodName = StringName("move_item") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Moves item from index `fromIdx` to `toIdx`. + public final func moveItem(fromIdx: Int32, toIdx: Int32) { + withUnsafePointer(to: fromIdx) { pArg0 in + withUnsafePointer(to: toIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_move_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_count") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_item_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_count") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ItemList.method_get_item_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_item") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the item specified by `idx` index from the list. + public final func removeItem(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_remove_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all items from the list. + public final func clear() { + gi.object_method_bind_ptrcall(ItemList.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_sort_items_by_text: GDExtensionMethodBindPtr = { + let methodName = StringName("sort_items_by_text") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sorts items in the list by their text. + public final func sortItemsByText() { + gi.object_method_bind_ptrcall(ItemList.method_sort_items_by_text, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_fixed_column_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_column_width") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_column_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_fixed_column_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fixed_column_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_column_width") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_column_width() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ItemList.method_get_fixed_column_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_same_column_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_same_column_width") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_same_column_width(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_same_column_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_same_column_width: GDExtensionMethodBindPtr = { + let methodName = StringName("is_same_column_width") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_same_column_width() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_is_same_column_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_text_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_text_lines") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_text_lines(_ lines: Int32) { + withUnsafePointer(to: lines) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_max_text_lines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_text_lines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_text_lines") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_text_lines() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ItemList.method_get_max_text_lines, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_columns: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_columns") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_columns(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_max_columns, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_columns: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_columns") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_columns() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ItemList.method_get_max_columns, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_select_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_select_mode") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 928267388)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_select_mode(_ mode: ItemList.SelectMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_select_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_select_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_select_mode") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1191945842)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_select_mode() -> ItemList.SelectMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ItemList.method_get_select_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ItemList.SelectMode (rawValue: _result)! + } + + fileprivate static var method_set_icon_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_icon_mode") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2025053633)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_icon_mode(_ mode: ItemList.IconMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_icon_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_icon_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_icon_mode") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3353929232)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_icon_mode() -> ItemList.IconMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ItemList.method_get_icon_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ItemList.IconMode (rawValue: _result)! + } + + fileprivate static var method_set_fixed_icon_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fixed_icon_size") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fixed_icon_size(_ size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_fixed_icon_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fixed_icon_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fixed_icon_size") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fixed_icon_size() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(ItemList.method_get_fixed_icon_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_icon_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_icon_scale") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_icon_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_icon_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_icon_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_icon_scale") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_icon_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ItemList.method_get_icon_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_rmb_select: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_rmb_select") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_rmb_select(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_allow_rmb_select, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_allow_rmb_select: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_rmb_select") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_rmb_select() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_get_allow_rmb_select, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_reselect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_reselect") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_reselect(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_allow_reselect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_allow_reselect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_reselect") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_reselect() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_get_allow_reselect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_search: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_search") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_search(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_allow_search, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_allow_search: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_search") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_search() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_get_allow_search, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_height") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_height(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_auto_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_auto_height: GDExtensionMethodBindPtr = { + let methodName = StringName("has_auto_height") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_auto_height() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_has_auto_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_anything_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_anything_selected") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if one or more items are selected. + public final func isAnythingSelected() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ItemList.method_is_anything_selected, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_item_at_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_at_position") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2300324924)! + } + + } + + }() + + /// Returns the item index at the given `position`. + /// + /// When there is no item at that point, -1 will be returned if `exact` is `true`, and the closest item index will be returned otherwise. + /// + /// > Note: The returned value is unreliable if called right after modifying the ``ItemList``, before it redraws in the next frame. + /// + public final func getItemAtPosition(_ position: Vector2, exact: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: exact) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_get_item_at_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_ensure_current_is_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("ensure_current_is_visible") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Ensure current selection is visible, adjusting the scroll position as necessary. + public final func ensureCurrentIsVisible() { + gi.object_method_bind_ptrcall(ItemList.method_ensure_current_is_visible, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_v_scroll_bar: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_scroll_bar") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2630340773)! + } + + } + + }() + + /// Returns the vertical scrollbar. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getVScrollBar() -> VScrollBar? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ItemList.method_get_v_scroll_bar, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_overrun_behavior") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1008890932)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_overrun_behavior(_ overrunBehavior: TextServer.OverrunBehavior) { + withUnsafePointer(to: overrunBehavior.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ItemList.method_set_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_overrun_behavior") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3779142101)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_overrun_behavior() -> TextServer.OverrunBehavior { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ItemList.method_get_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.OverrunBehavior (rawValue: _result)! + } + + fileprivate static var method_force_update_list_size: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_list_size") + return withUnsafePointer(to: &ItemList.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like ``autoHeight``, change. The method can be used to trigger the update ahead of next drawing pass. + public final func forceUpdateListSize() { + gi.object_method_bind_ptrcall(ItemList.method_force_update_list_size, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Triggered when specified item has been selected. + /// + /// ``allowReselect`` must be enabled to reselect an item. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemSelected.connect { index in + /// print ("caught signal") + /// } + /// ``` + public var itemSelected: Signal1 { Signal1 (target: self, signalName: "item_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ atPosition: Vector2, _ mouseButtonIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + let arg_1 = Int64 (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Triggered when any mouse click is issued within the rect of the list but on empty space. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.emptyClicked.connect { atPosition, mouseButtonIndex in + /// print ("caught signal") + /// } + /// ``` + public var emptyClicked: Signal2 { Signal2 (target: self, signalName: "empty_clicked") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64, _ atPosition: Vector2, _ mouseButtonIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = Vector2 (args [1]!)! + let arg_2 = Int64 (args [2]!)! + + callback (arg_0, arg_1, arg_2) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _ in c.resume () } + } + + } + + } + + } + + /// Triggered when specified list item has been clicked with any mouse button. + /// + /// The click position is also provided to allow appropriate popup of context menus at the correct location. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemClicked.connect { index, atPosition, mouseButtonIndex in + /// print ("caught signal") + /// } + /// ``` + public var itemClicked: Signal3 { Signal3 (target: self, signalName: "item_clicked") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64, _ selected: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Triggered when a multiple selection is altered on a list allowing multiple selection. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.multiSelected.connect { index, selected in + /// print ("caught signal") + /// } + /// ``` + public var multiSelected: Signal4 { Signal4 (target: self, signalName: "multi_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal5/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal5/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal5/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal5 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal5 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd]. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemActivated.connect { index in + /// print ("caught signal") + /// } + /// ``` + public var itemActivated: Signal5 { Signal5 (target: self, signalName: "item_activated") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/JNISingleton.swift b/Sources/SwiftGodot/Generated/Api/JNISingleton.swift new file mode 100644 index 000000000..5a3b3c0cc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JNISingleton.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Singleton that connects the engine with Android plugins to interface with native Android code. +/// +/// The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See Java Native Interface - Wikipedia for more information. +open class JNISingleton: Object { + override open class var godotClassName: StringName { "JNISingleton" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/JSON.swift b/Sources/SwiftGodot/Generated/Api/JSON.swift new file mode 100644 index 000000000..92a33be9e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JSON.swift @@ -0,0 +1,272 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Helper class for creating and parsing JSON data. +/// +/// The ``JSON`` enables all data types to be converted to and from a JSON string. This useful for serializing data to save to a file or send over the network. +/// +/// ``stringify(data:indent:sortKeys:fullPrecision:)`` is used to convert any data type into a JSON string. +/// +/// ``parse(jsonText:keepText:)`` is used to convert any existing JSON data into a ``Variant`` that can be used within Godot. If successfully parsed, use ``data`` to retrieve the ``Variant``, and use `typeof` to check if the Variant's type is what you expect. JSON Objects are converted into a ``GDictionary``, but JSON data can be used to store ``GArray``s, numbers, ``String``s and even just a boolean. +/// +/// **Example** +/// +/// Alternatively, you can parse string using the static ``parseString(jsonString:)`` method, but it doesn't allow to handle errors. +/// +/// > Note: Both parse methods do not fully comply with the JSON specification: +/// +/// - Trailing commas in arrays or objects are ignored, instead of causing a parser error. +/// +/// - New line and tab characters are accepted in string literals, and are treated like their corresponding escape sequences `\n` and `\t`. +/// +/// - Numbers are parsed using ``GString/toFloat()`` which is generally more lax than the JSON specification. +/// +/// - Certain errors, such as invalid Unicode sequences, do not cause a parser error. Instead, the string is cleansed and an error is logged to the console. +/// +open class JSON: Resource { + override open class var godotClassName: StringName { "JSON" } + + /* Properties */ + + /// Contains the parsed JSON data in ``Variant`` form. + final public var data: Variant? { + get { + return get_data () + } + + set { + set_data (newValue) + } + + } + + /* Methods */ + fileprivate static var method_stringify: GDExtensionMethodBindPtr = { + let methodName = StringName("stringify") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 462733549)! + } + + } + + }() + + /// Converts a ``Variant`` var to JSON text and returns the result. Useful for serializing data to store or send over the network. + /// + /// > Note: The JSON specification does not define integer or float types, but only a _number_ type. Therefore, converting a Variant to JSON text will convert all numerical values to float types. + /// + /// > Note: If `fullPrecision` is `true`, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. + /// + /// The `indent` parameter controls if and how something is indented, the string used for this parameter will be used where there should be an indent in the output, even spaces like `" "` will work. `\t` and `\n` can also be used for a tab indent, or to make a newline for each indent respectively. + /// + /// **Example output:** + /// + public static func stringify(data: Variant?, indent: String = "", sortKeys: Bool = true, fullPrecision: Bool = false) -> String { + let _result = GString () + withUnsafePointer(to: data.content) { pArg0 in + let indent = GString(indent) + withUnsafePointer(to: indent.content) { pArg1 in + withUnsafePointer(to: sortKeys) { pArg2 in + withUnsafePointer(to: fullPrecision) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_stringify, nil, pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_parse_string: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_string") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 309047738)! + } + + } + + }() + + /// Attempts to parse the `jsonString` provided and returns the parsed data. Returns `null` if parse failed. + public static func parseString(jsonString: String) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let jsonString = GString(jsonString) + withUnsafePointer(to: jsonString.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_parse_string, nil, pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_parse: GDExtensionMethodBindPtr = { + let methodName = StringName("parse") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 885841341)! + } + + } + + }() + + /// Attempts to parse the `jsonText` provided. + /// + /// Returns an ``GodotError``. If the parse was successful, it returns ``GodotError/ok`` and the result can be retrieved using ``data``. If unsuccessful, use ``getErrorLine()`` and ``getErrorMessage()`` for identifying the source of the failure. + /// + /// Non-static variant of ``parseString(jsonString:)``, if you want custom error handling. + /// + /// The optional `keepText` argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the ``getParsedText()`` function and is used when saving the resource (instead of generating new text from ``data``). + /// + public final func parse(jsonText: String, keepText: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let jsonText = GString(jsonText) + withUnsafePointer(to: jsonText.content) { pArg0 in + withUnsafePointer(to: keepText) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(JSON.method_parse, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214101251)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_data() -> Variant? { + var _result: Variant.ContentType = Variant.zero + gi.object_method_bind_ptrcall(JSON.method_get_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Variant(takingOver: _result) + } + + fileprivate static var method_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_data") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1114965689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_data(_ data: Variant?) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(JSON.method_set_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_parsed_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_text") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Return the text parsed by ``parse(jsonText:keepText:)`` as long as the function is instructed to keep it. + public final func getParsedText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(JSON.method_get_parsed_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_error_line: GDExtensionMethodBindPtr = { + let methodName = StringName("get_error_line") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns `0` if the last call to ``parse(jsonText:keepText:)`` was successful, or the line number where the parse failed. + public final func getErrorLine() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(JSON.method_get_error_line, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_error_message: GDExtensionMethodBindPtr = { + let methodName = StringName("get_error_message") + return withUnsafePointer(to: &JSON.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns an empty string if the last call to ``parse(jsonText:keepText:)`` was successful, or the error message if it failed. + public final func getErrorMessage() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(JSON.method_get_error_message, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/JSONRPC.swift b/Sources/SwiftGodot/Generated/Api/JSONRPC.swift new file mode 100644 index 000000000..90947ab2e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JSONRPC.swift @@ -0,0 +1,299 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A helper to handle dictionaries which look like JSONRPC documents. +/// +/// JSON-RPC is a standard which wraps a method call in a ``JSON`` object. The object has a particular structure and identifies which method is called, the parameters to that function, and carries an ID to keep track of responses. This class implements that standard on top of ``GDictionary``; you will have to convert between a ``GDictionary`` and ``JSON`` with other functions. +open class JSONRPC: Object { + override open class var godotClassName: StringName { "JSONRPC" } + public enum ErrorCode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The request could not be parsed as it was not valid by JSON standard (``JSON/parse(jsonText:keepText:)`` failed). + case parseError = -32700 // PARSE_ERROR + /// A method call was requested but the request's format is not valid. + case invalidRequest = -32600 // INVALID_REQUEST + /// A method call was requested but no function of that name existed in the JSONRPC subclass. + case methodNotFound = -32601 // METHOD_NOT_FOUND + /// A method call was requested but the given method parameters are not valid. Not used by the built-in JSONRPC. + case invalidParams = -32602 // INVALID_PARAMS + /// An internal error occurred while processing the request. Not used by the built-in JSONRPC. + case internalError = -32603 // INTERNAL_ERROR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .parseError: return ".parseError" + case .invalidRequest: return ".invalidRequest" + case .methodNotFound: return ".methodNotFound" + case .invalidParams: return ".invalidParams" + case .internalError: return ".internalError" + } + + } + + } + + /* Methods */ + fileprivate static var method_set_scope: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scope") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2572618360)! + } + + } + + }() + + /// + public final func setScope(_ scope: String, target: Object?) { + let scope = GString(scope) + withUnsafePointer(to: scope.content) { pArg0 in + withUnsafePointer(to: target?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_set_scope, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_process_action: GDExtensionMethodBindPtr = { + let methodName = StringName("process_action") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2963479484)! + } + + } + + }() + + /// Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. + /// + /// To add new supported methods extend the JSONRPC class and call ``processAction(_:recurse:)`` on your subclass. + /// + /// `action`: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. + /// + public final func processAction(_ action: Variant?, recurse: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: recurse) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_process_action, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_process_string: GDExtensionMethodBindPtr = { + let methodName = StringName("process_string") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// + public final func processString(action: String) -> String { + let _result = GString () + let action = GString(action) + withUnsafePointer(to: action.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_process_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_make_request: GDExtensionMethodBindPtr = { + let methodName = StringName("make_request") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3423508980)! + } + + } + + }() + + /// Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. + /// + /// - `method`: Name of the method being called. + /// + /// - `params`: An array or dictionary of parameters being passed to the method. + /// + /// - `id`: Uniquely identifies this request. The server is expected to send a response with the same ID. + /// + public final func makeRequest(method: String, params: Variant?, id: Variant?) -> GDictionary { + let _result: GDictionary = GDictionary () + let method = GString(method) + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: params.content) { pArg1 in + withUnsafePointer(to: id.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_make_request, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_make_response: GDExtensionMethodBindPtr = { + let methodName = StringName("make_response") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5053918)! + } + + } + + }() + + /// When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. + /// + /// - `result`: The return value of the function which was called. + /// + /// - `id`: The ID of the request this response is targeted to. + /// + public final func makeResponse(result: Variant?, id: Variant?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: result.content) { pArg0 in + withUnsafePointer(to: id.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_make_response, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_make_notification: GDExtensionMethodBindPtr = { + let methodName = StringName("make_notification") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2949127017)! + } + + } + + }() + + /// Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. + /// + /// - `method`: Name of the method being called. + /// + /// - `params`: An array or dictionary of parameters being passed to the method. + /// + public final func makeNotification(method: String, params: Variant?) -> GDictionary { + let _result: GDictionary = GDictionary () + let method = GString(method) + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: params.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_make_notification, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_make_response_error: GDExtensionMethodBindPtr = { + let methodName = StringName("make_response_error") + return withUnsafePointer(to: &JSONRPC.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 928596297)! + } + + } + + }() + + /// Creates a response which indicates a previous reply has failed in some way. + /// + /// - `code`: The error code corresponding to what kind of error this is. See the ``JSONRPC/ErrorCode`` constants. + /// + /// - `message`: A custom message about this error. + /// + /// - `id`: The request this error is a response to. + /// + public final func makeResponseError(code: Int32, message: String, id: Variant?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: code) { pArg0 in + let message = GString(message) + withUnsafePointer(to: message.content) { pArg1 in + withUnsafePointer(to: id.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(JSONRPC.method_make_response_error, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/JavaClass.swift b/Sources/SwiftGodot/Generated/Api/JavaClass.swift new file mode 100644 index 000000000..82ca860e6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JavaClass.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents an object from the Java Native Interface. +/// +/// Represents an object from the Java Native Interface. It is returned from ``JavaClassWrapper/wrap(name:)``. +/// +/// > Note: This class only works on Android. For any other build, this class does nothing. +/// +/// > Note: This class is not to be confused with ``JavaScriptObject``. +/// +open class JavaClass: RefCounted { + override open class var godotClassName: StringName { "JavaClass" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/JavaClassWrapper.swift b/Sources/SwiftGodot/Generated/Api/JavaClassWrapper.swift new file mode 100644 index 000000000..62cedc237 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JavaClassWrapper.swift @@ -0,0 +1,70 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to the Java Native Interface. +/// +/// The JavaClassWrapper singleton provides a way for the Godot application to send and receive data through the Java Native Interface (JNI). +/// +/// > Note: This singleton is only available in Android builds. +/// +open class JavaClassWrapper: Object { + /// The shared instance of this class + public static var shared: JavaClassWrapper = { + return withUnsafePointer (to: &JavaClassWrapper.godotClassName.content) { ptr in + JavaClassWrapper (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "JavaClassWrapper" } + /* Methods */ + fileprivate static var method_wrap: GDExtensionMethodBindPtr = { + let methodName = StringName("wrap") + return withUnsafePointer(to: &JavaClassWrapper.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1124367868)! + } + + } + + }() + + /// Wraps a class defined in Java, and returns it as a ``JavaClass`` ``Object`` type that Godot can interact with. + /// + /// > Note: This method only works on Android. On every other platform, this method does nothing and returns an empty ``JavaClass``. + /// + public static func wrap(name: String) -> JavaClass? { + var _result = UnsafeRawPointer (bitPattern: 0) + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_wrap, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/JavaScriptBridge.swift b/Sources/SwiftGodot/Generated/Api/JavaScriptBridge.swift new file mode 100644 index 000000000..4a6660375 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JavaScriptBridge.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Singleton that connects the engine with the browser's JavaScript context in Web export. +/// +/// The JavaScriptBridge singleton is implemented only in the Web export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. +/// +/// > Note: This singleton can be disabled at build-time to improve security. By default, the JavaScriptBridge singleton is enabled. Official export templates also have the JavaScriptBridge singleton enabled. See Compiling for the Web in the documentation for more information. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``pwaUpdateAvailable`` +open class JavaScriptBridge: Object { + /// The shared instance of this class + public static var shared: JavaScriptBridge = { + return withUnsafePointer (to: &JavaScriptBridge.godotClassName.content) { ptr in + JavaScriptBridge (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "JavaScriptBridge" } + /* Methods */ + fileprivate static var method_eval: GDExtensionMethodBindPtr = { + let methodName = StringName("eval") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 218087648)! + } + + } + + }() + + /// Execute the string `code` as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code skip-lint]eval()`. + /// + /// If `useGlobalExecutionContext` is `true`, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. + /// + public static func eval(code: String, useGlobalExecutionContext: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let code = GString(code) + withUnsafePointer(to: code.content) { pArg0 in + withUnsafePointer(to: useGlobalExecutionContext) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_eval, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interface") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1355533281)! + } + + } + + }() + + /// Returns an interface to a JavaScript object that can be used by scripts. The `interface` must be a valid property of the JavaScript `window`. The callback must accept a single ``GArray`` argument, which will contain the JavaScript `arguments`. See ``JavaScriptObject`` for usage. + public static func getInterface(_ interface: String) -> JavaScriptObject? { + var _result = UnsafeRawPointer (bitPattern: 0) + let interface = GString(interface) + withUnsafePointer(to: interface.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_interface, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("create_callback") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 422818440)! + } + + } + + }() + + /// Creates a reference to a ``Callable`` that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See ``JavaScriptObject`` for usage. + public static func createCallback(callable: Callable) -> JavaScriptObject? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_create_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_object: GDExtensionMethodBindPtr = { + let methodName = StringName("create_object") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093893586)! + } + + } + + }() + + /// Creates a new JavaScript object using the `new` constructor. The `object` must a valid property of the JavaScript `window`. See ``JavaScriptObject`` for usage. + public static func createObject(_ object: String, _ arguments: Variant?...) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let object = Variant(object) + withUnsafePointer(to: object.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(method_create_object, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: The browser may override the MIME type provided based on the file `name`'s extension. + /// + /// > Note: Browsers might block the download if ``downloadBuffer(_:name:mime:)`` is not being called from a user interaction (e.g. button click). + /// + /// > Note: Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. + /// + public static func downloadBuffer(_ buffer: PackedByteArray, name: String, mime: String = "application/octet-stream") { + withUnsafePointer(to: buffer.content) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + let mime = GString(mime) + withUnsafePointer(to: mime.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_download_buffer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pwa_needs_update: GDExtensionMethodBindPtr = { + let methodName = StringName("pwa_needs_update") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if a new version of the progressive web app is waiting to be activated. + /// + /// > Note: Only relevant when exported as a Progressive Web App. + /// + public static func pwaNeedsUpdate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_pwa_needs_update, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_pwa_update: GDExtensionMethodBindPtr = { + let methodName = StringName("pwa_update") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. + /// + /// > Note: Your application will be **reloaded in all browser tabs**. + /// + /// > Note: Only relevant when exported as a Progressive Web App and ``pwaNeedsUpdate()`` returns `true`. + /// + public static func pwaUpdate() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_pwa_update, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_force_fs_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("force_fs_sync") + return withUnsafePointer(to: &JavaScriptBridge.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Force synchronization of the persistent file system (when enabled). + /// + /// > Note: This is only useful for modules or extensions that can't use ``FileAccess`` to write files. + /// + public static func forceFsSync() { + gi.object_method_bind_ptrcall(method_force_fs_sync, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + // Signals + /// Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See ``pwaUpdate()`` to force the update to take place immediately. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pwaUpdateAvailable.connect { + /// print ("caught signal") + /// } + /// ``` + public var pwaUpdateAvailable: SimpleSignal { SimpleSignal (target: self, signalName: "pwa_update_available") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/JavaScriptObject.swift b/Sources/SwiftGodot/Generated/Api/JavaScriptObject.swift new file mode 100644 index 000000000..dba6e7955 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/JavaScriptObject.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A wrapper class for web native JavaScript objects. +/// +/// JavaScriptObject is used to interact with JavaScript objects retrieved or created via ``JavaScriptBridge/getInterface(_:)``, ``JavaScriptBridge/createObject(_:)``, or ``JavaScriptBridge/createCallback(callable:)``. +/// +/// **Example:** +/// +/// > Note: Only available in the Web platform. +/// +open class JavaScriptObject: RefCounted { + override open class var godotClassName: StringName { "JavaScriptObject" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Joint2D.swift b/Sources/SwiftGodot/Generated/Api/Joint2D.swift new file mode 100644 index 000000000..839ac68fb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Joint2D.swift @@ -0,0 +1,276 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for all 2D physics joints. +/// +/// Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies (``nodeA`` and ``nodeB``) and apply a constraint. +open class Joint2D: Node2D { + override open class var godotClassName: StringName { "Joint2D" } + + /* Properties */ + + /// Path to the first body (A) attached to the joint. The node must inherit ``PhysicsBody2D``. + final public var nodeA: NodePath { + get { + return get_node_a () + } + + set { + set_node_a (newValue) + } + + } + + /// Path to the second body (B) attached to the joint. The node must inherit ``PhysicsBody2D``. + final public var nodeB: NodePath { + get { + return get_node_b () + } + + set { + set_node_b (newValue) + } + + } + + /// When ``nodeA`` and ``nodeB`` move in different directions the ``bias`` controls how fast the joint pulls them back to their original position. The lower the ``bias`` the more the two bodies can pull on the joint. + /// + /// When set to `0`, the default value from ``ProjectSettings/physics/2d/solver/defaultConstraintBias`` is used. + /// + final public var bias: Double { + get { + return get_bias () + } + + set { + set_bias (newValue) + } + + } + + /// If `true`, the two bodies bound together do not collide with each other. + final public var disableCollision: Bool { + get { + return get_exclude_nodes_from_collision () + } + + set { + set_exclude_nodes_from_collision (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_node_a: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_a") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_node_a(_ node: NodePath) { + withUnsafePointer(to: node.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint2D.method_set_node_a, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_node_a: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_a") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_node_a() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Joint2D.method_get_node_a, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_node_b: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_b") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_node_b(_ node: NodePath) { + withUnsafePointer(to: node.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint2D.method_set_node_b, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_node_b: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_b") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_node_b() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Joint2D.method_get_node_b, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bias") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bias(_ bias: Double) { + withUnsafePointer(to: bias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint2D.method_set_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bias") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Joint2D.method_get_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude_nodes_from_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_nodes_from_collision") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_nodes_from_collision(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint2D.method_set_exclude_nodes_from_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_nodes_from_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_nodes_from_collision") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_nodes_from_collision() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Joint2D.method_get_exclude_nodes_from_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &Joint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the joint's internal ``RID`` from the ``PhysicsServer2D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(Joint2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Joint3D.swift b/Sources/SwiftGodot/Generated/Api/Joint3D.swift new file mode 100644 index 000000000..6da25023c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Joint3D.swift @@ -0,0 +1,279 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for all 3D physics joints. +/// +/// Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies (``nodeA`` and ``nodeB``) and apply a constraint. If only one body is defined, it is attached to a fixed ``StaticBody3D`` without collision shapes. +open class Joint3D: Node3D { + override open class var godotClassName: StringName { "Joint3D" } + + /* Properties */ + + /// Path to the first node (A) attached to the joint. The node must inherit ``PhysicsBody3D``. + /// + /// If left empty and ``nodeB`` is set, the body is attached to a fixed ``StaticBody3D`` without collision shapes. + /// + final public var nodeA: NodePath { + get { + return get_node_a () + } + + set { + set_node_a (newValue) + } + + } + + /// Path to the second node (B) attached to the joint. The node must inherit ``PhysicsBody3D``. + /// + /// If left empty and ``nodeA`` is set, the body is attached to a fixed ``StaticBody3D`` without collision shapes. + /// + final public var nodeB: NodePath { + get { + return get_node_b () + } + + set { + set_node_b (newValue) + } + + } + + /// The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. + final public var solverPriority: Int32 { + get { + return get_solver_priority () + } + + set { + set_solver_priority (newValue) + } + + } + + /// If `true`, the two bodies bound together do not collide with each other. + final public var excludeNodesFromCollision: Bool { + get { + return get_exclude_nodes_from_collision () + } + + set { + set_exclude_nodes_from_collision (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_node_a: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_a") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_node_a(_ node: NodePath) { + withUnsafePointer(to: node.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint3D.method_set_node_a, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_node_a: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_a") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_node_a() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Joint3D.method_get_node_a, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_node_b: GDExtensionMethodBindPtr = { + let methodName = StringName("set_node_b") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_node_b(_ node: NodePath) { + withUnsafePointer(to: node.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint3D.method_set_node_b, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_node_b: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_b") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_node_b() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Joint3D.method_get_node_b, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_solver_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_solver_priority") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_solver_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint3D.method_set_solver_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_solver_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_solver_priority") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_solver_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Joint3D.method_get_solver_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude_nodes_from_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_nodes_from_collision") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_nodes_from_collision(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Joint3D.method_set_exclude_nodes_from_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_nodes_from_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_nodes_from_collision") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_nodes_from_collision() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Joint3D.method_get_exclude_nodes_from_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &Joint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the joint's internal ``RID`` from the ``PhysicsServer3D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(Joint3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/KinematicCollision2D.swift b/Sources/SwiftGodot/Generated/Api/KinematicCollision2D.swift new file mode 100644 index 000000000..e8a213d8f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/KinematicCollision2D.swift @@ -0,0 +1,274 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds collision data from the movement of a ``PhysicsBody2D``. +/// +/// Holds collision data from the movement of a ``PhysicsBody2D``, usually from ``PhysicsBody2D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:)``. When a ``PhysicsBody2D`` is moved, it stops if it detects a collision with another body. If a collision is detected, a ``KinematicCollision2D`` object is returned. +/// +/// The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision. +/// +open class KinematicCollision2D: RefCounted { + override open class var godotClassName: StringName { "KinematicCollision2D" } + /* Methods */ + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the point of collision in global coordinates. + public final func getPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normal") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the colliding body's shape's normal at the point of collision. + public final func getNormal() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_travel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the moving object's travel before collision. + public final func getTravel() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_travel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_remainder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remainder") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the moving object's remaining movement vector. + public final func getRemainder() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_remainder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angle") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841063350)! + } + + } + + }() + + /// Returns the collision angle according to `upDirection`, which is ``Vector2/up`` by default. This value is always positive. + public final func getAngle(upDirection: Vector2 = Vector2 (x: 0, y: -1)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: upDirection) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the colliding body's length of overlap along the collision normal. + public final func getDepth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_shape") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the moving object's colliding shape. + public final func getLocalShape() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_local_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the colliding body's attached ``Object``. + public final func getCollider() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_id") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the unique instance ID of the colliding body's attached ``Object``. See ``Object/getInstanceId()``. + public final func getColliderId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the colliding body's ``RID`` used by the ``PhysicsServer2D``. + public final func getColliderRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the colliding body's shape. + public final func getColliderShape() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_shape_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape_index") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the colliding body's shape index. See ``CollisionObject2D``. + public final func getColliderShapeIndex() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider_shape_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collider_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_velocity") + return withUnsafePointer(to: &KinematicCollision2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the colliding body's velocity. + public final func getColliderVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(KinematicCollision2D.method_get_collider_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/KinematicCollision3D.swift b/Sources/SwiftGodot/Generated/Api/KinematicCollision3D.swift new file mode 100644 index 000000000..f09c7d98c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/KinematicCollision3D.swift @@ -0,0 +1,376 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds collision data from the movement of a ``PhysicsBody3D``. +/// +/// Holds collision data from the movement of a ``PhysicsBody3D``, usually from ``PhysicsBody3D/moveAndCollide(motion:testOnly:safeMargin:recoveryAsCollision:maxCollisions:)``. When a ``PhysicsBody3D`` is moved, it stops if it detects a collision with another body. If a collision is detected, a ``KinematicCollision3D`` object is returned. +/// +/// The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision. +/// +open class KinematicCollision3D: RefCounted { + override open class var godotClassName: StringName { "KinematicCollision3D" } + /* Methods */ + fileprivate static var method_get_travel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the moving object's travel before collision. + public final func getTravel() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_travel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_remainder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remainder") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the moving object's remaining movement vector. + public final func getRemainder() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_remainder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the colliding body's length of overlap along the collision normal. + public final func getDepth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_count") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of detected collisions. + public final func getCollisionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collision_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the point of collision in global coordinates given a collision index (the deepest collision by default). + public final func getPosition(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normal") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default). + public final func getNormal(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angle") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1242741860)! + } + + } + + }() + + /// Returns the collision angle according to `upDirection`, which is ``Vector3/up`` by default. This value is always positive. + public final func getAngle(collisionIndex: Int32 = 0, upDirection: Vector3 = Vector3 (x: 0, y: 1, z: 0)) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: upDirection) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_shape") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2639523548)! + } + + } + + }() + + /// Returns the moving object's colliding shape given a collision index (the deepest collision by default). + public final func getLocalShape(collisionIndex: Int32 = 0) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_local_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2639523548)! + } + + } + + }() + + /// Returns the colliding body's attached ``Object`` given a collision index (the deepest collision by default). + public final func getCollider(collisionIndex: Int32 = 0) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_id") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the unique instance ID of the colliding body's attached ``Object`` given a collision index (the deepest collision by default). See ``Object/getInstanceId()``. + public final func getColliderId(collisionIndex: Int32 = 0) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1231817359)! + } + + } + + }() + + /// Returns the colliding body's ``RID`` used by the ``PhysicsServer3D`` given a collision index (the deepest collision by default). + public final func getColliderRid(collisionIndex: Int32 = 0) -> RID { + let _result: RID = RID () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2639523548)! + } + + } + + }() + + /// Returns the colliding body's shape given a collision index (the deepest collision by default). + public final func getColliderShape(collisionIndex: Int32 = 0) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_shape_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape_index") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the colliding body's shape index given a collision index (the deepest collision by default). See ``CollisionObject3D``. + public final func getColliderShapeIndex(collisionIndex: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider_shape_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_velocity") + return withUnsafePointer(to: &KinematicCollision3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the colliding body's velocity given a collision index (the deepest collision by default). + public final func getColliderVelocity(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(KinematicCollision3D.method_get_collider_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Label.swift b/Sources/SwiftGodot/Generated/Api/Label.swift new file mode 100644 index 000000000..0d1523a4d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Label.swift @@ -0,0 +1,1273 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control for displaying plain text. +/// +/// A control for displaying plain text. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other rich text formatting. For that, use ``RichTextLabel`` instead. +open class Label: Control { + override open class var godotClassName: StringName { "Label" } + + /* Properties */ + + /// The text to display on screen. + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// A ``LabelSettings`` resource that can be shared between multiple ``Label`` nodes. Takes priority over theme properties. + final public var labelSettings: LabelSettings? { + get { + return get_label_settings () + } + + set { + set_label_settings (newValue) + } + + } + + /// Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the ``HorizontalAlignment`` constants. + final public var horizontalAlignment: HorizontalAlignment { + get { + return get_horizontal_alignment () + } + + set { + set_horizontal_alignment (newValue) + } + + } + + /// Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the ``VerticalAlignment`` constants. + final public var verticalAlignment: VerticalAlignment { + get { + return get_vertical_alignment () + } + + set { + set_vertical_alignment (newValue) + } + + } + + /// If set to something other than ``TextServer/AutowrapMode/off``, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see ``TextServer.AutowrapMode``. + final public var autowrapMode: TextServer.AutowrapMode { + get { + return get_autowrap_mode () + } + + set { + set_autowrap_mode (newValue) + } + + } + + /// Line fill alignment rules. For more info see ``TextServer.JustificationFlag``. + final public var justificationFlags: TextServer.JustificationFlag { + get { + return get_justification_flags () + } + + set { + set_justification_flags (newValue) + } + + } + + /// If `true`, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. + final public var clipText: Bool { + get { + return is_clipping_text () + } + + set { + set_clip_text (newValue) + } + + } + + /// Sets the clipping behavior when the text exceeds the node's bounding rectangle. See ``TextServer.OverrunBehavior`` for a description of all modes. + final public var textOverrunBehavior: TextServer.OverrunBehavior { + get { + return get_text_overrun_behavior () + } + + set { + set_text_overrun_behavior (newValue) + } + + } + + /// Ellipsis character used for text clipping. + final public var ellipsisChar: String { + get { + return get_ellipsis_char () + } + + set { + set_ellipsis_char (newValue) + } + + } + + /// If `true`, all the text displays as UPPERCASE. + final public var uppercase: Bool { + get { + return is_uppercase () + } + + set { + set_uppercase (newValue) + } + + } + + /// Aligns text to the given tab-stops. + final public var tabStops: PackedFloat32Array { + get { + return get_tab_stops () + } + + set { + set_tab_stops (newValue) + } + + } + + /// The number of the lines ignored and not displayed from the start of the ``text`` value. + final public var linesSkipped: Int32 { + get { + return get_lines_skipped () + } + + set { + set_lines_skipped (newValue) + } + + } + + /// Limits the lines of text the node shows on screen. + final public var maxLinesVisible: Int32 { + get { + return get_max_lines_visible () + } + + set { + set_max_lines_visible (newValue) + } + + } + + /// The number of characters to display. If set to `-1`, all characters are displayed. This can be useful when animating the text appearing in a dialog box. + /// + /// > Note: Setting this property updates ``visibleRatio`` accordingly. + /// + final public var visibleCharacters: Int32 { + get { + return get_visible_characters () + } + + set { + set_visible_characters (newValue) + } + + } + + /// Sets the clipping behavior when ``visibleCharacters`` or ``visibleRatio`` is set. See ``TextServer.VisibleCharactersBehavior`` for more info. + final public var visibleCharactersBehavior: TextServer.VisibleCharactersBehavior { + get { + return get_visible_characters_behavior () + } + + set { + set_visible_characters_behavior (newValue) + } + + } + + /// The fraction of characters to display, relative to the total number of characters (see ``getTotalCharacterCount()``). If set to `1.0`, all characters are displayed. If set to `0.5`, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + /// + /// > Note: Setting this property updates ``visibleCharacters`` accordingly. + /// + final public var visibleRatio: Double { + get { + return get_visible_ratio () + } + + set { + set_visible_ratio (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /// Set BiDi algorithm override for the structured text. + final public var structuredTextBidiOverride: TextServer.StructuredTextParser { + get { + return get_structured_text_bidi_override () + } + + set { + set_structured_text_bidi_override (newValue) + } + + } + + /// Set additional options for BiDi override. + final public var structuredTextBidiOverrideOptions: GArray { + get { + return get_structured_text_bidi_override_options () + } + + set { + set_structured_text_bidi_override_options (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_horizontal_alignment") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312603777)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_horizontal_alignment(_ alignment: HorizontalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_horizontal_alignment") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 341400642)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_horizontal_alignment() -> HorizontalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HorizontalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_vertical_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertical_alignment") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1796458609)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertical_alignment(_ alignment: VerticalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_vertical_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertical_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertical_alignment") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3274884059)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertical_alignment() -> VerticalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_vertical_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VerticalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Label.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_label_settings: GDExtensionMethodBindPtr = { + let methodName = StringName("set_label_settings") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1030653839)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_label_settings(_ settings: LabelSettings?) { + withUnsafePointer(to: settings?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_label_settings, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_label_settings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_label_settings") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 826676056)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_label_settings() -> LabelSettings? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Label.method_get_label_settings, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Label.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autowrap_mode") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289138044)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autowrap_mode(_ autowrapMode: TextServer.AutowrapMode) { + withUnsafePointer(to: autowrapMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autowrap_mode") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1549071663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autowrap_mode() -> TextServer.AutowrapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.AutowrapMode (rawValue: _result)! + } + + fileprivate static var method_set_justification_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_justification_flags") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2877345813)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_justification_flags(_ justificationFlags: TextServer.JustificationFlag) { + withUnsafePointer(to: justificationFlags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_justification_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_justification_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_justification_flags") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1583363614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_justification_flags() -> TextServer.JustificationFlag { + var _result: TextServer.JustificationFlag = TextServer.JustificationFlag () + gi.object_method_bind_ptrcall(Label.method_get_justification_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_clip_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clip_text") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clip_text(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_clip_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_clipping_text: GDExtensionMethodBindPtr = { + let methodName = StringName("is_clipping_text") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_clipping_text() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Label.method_is_clipping_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tab_stops: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tab_stops") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tab_stops(_ tabStops: PackedFloat32Array) { + withUnsafePointer(to: tabStops.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_tab_stops, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tab_stops: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tab_stops") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tab_stops() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(Label.method_get_tab_stops, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_overrun_behavior") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1008890932)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_overrun_behavior(_ overrunBehavior: TextServer.OverrunBehavior) { + withUnsafePointer(to: overrunBehavior.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_overrun_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_overrun_behavior") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3779142101)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_overrun_behavior() -> TextServer.OverrunBehavior { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_text_overrun_behavior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.OverrunBehavior (rawValue: _result)! + } + + fileprivate static var method_set_ellipsis_char: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ellipsis_char") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ellipsis_char(_ char: String) { + let char = GString(char) + withUnsafePointer(to: char.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_ellipsis_char, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ellipsis_char: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ellipsis_char") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ellipsis_char() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Label.method_get_ellipsis_char, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_uppercase: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uppercase") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uppercase(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_uppercase, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_uppercase: GDExtensionMethodBindPtr = { + let methodName = StringName("is_uppercase") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_uppercase() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Label.method_is_uppercase, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_line_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_height") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 181039630)! + } + + } + + }() + + /// Returns the height of the line `line`. + /// + /// If `line` is set to `-1`, returns the biggest line height. + /// + /// If there are no lines, returns font size in pixels. + /// + public final func getLineHeight(line: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_get_line_height, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_line_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_count") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of lines of text the Label has. + public final func getLineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_line_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visible_line_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_line_count") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of lines shown. Useful if the ``Label``'s height cannot currently display all lines. + public final func getVisibleLineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_visible_line_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_total_character_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_character_count") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of printable characters in the text (excluding spaces and newlines). + public final func getTotalCharacterCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_total_character_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visible_characters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_characters") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_characters(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_visible_characters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visible_characters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_characters") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_characters() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_visible_characters, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visible_characters_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_characters_behavior") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 258789322)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_characters_behavior() -> TextServer.VisibleCharactersBehavior { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_visible_characters_behavior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.VisibleCharactersBehavior (rawValue: _result)! + } + + fileprivate static var method_set_visible_characters_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_characters_behavior") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383839701)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_characters_behavior(_ behavior: TextServer.VisibleCharactersBehavior) { + withUnsafePointer(to: behavior.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_visible_characters_behavior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visible_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_ratio") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_visible_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visible_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_ratio") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label.method_get_visible_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lines_skipped: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lines_skipped") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lines_skipped(_ linesSkipped: Int32) { + withUnsafePointer(to: linesSkipped) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_lines_skipped, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lines_skipped: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lines_skipped") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lines_skipped() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_lines_skipped, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_lines_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_lines_visible") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_lines_visible(_ linesVisible: Int32) { + withUnsafePointer(to: linesVisible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_max_lines_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_lines_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_lines_visible") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_lines_visible() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label.method_get_max_lines_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 55961453)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override(_ parser: TextServer.StructuredTextParser) { + withUnsafePointer(to: parser.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385126229)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override() -> TextServer.StructuredTextParser { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label.method_get_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.StructuredTextParser (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override_options") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override_options(_ args: GArray) { + withUnsafePointer(to: args.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_set_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override_options") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override_options() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(Label.method_get_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_character_bounds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_character_bounds") + return withUnsafePointer(to: &Label.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3327874267)! + } + + } + + }() + + /// Returns the bounding rectangle of the character at position `pos`. If the character is a non-visual character or `pos` is outside the valid range, an empty ``Rect2`` is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned. + public final func getCharacterBounds(pos: Int32) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: pos) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label.method_get_character_bounds, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Label3D.swift b/Sources/SwiftGodot/Generated/Api/Label3D.swift new file mode 100644 index 000000000..00d8de6e1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Label3D.swift @@ -0,0 +1,1793 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node for displaying plain text in 3D space. +/// +/// A node for displaying plain text in 3D space. By adjusting various properties of this node, you can configure things such as the text's appearance and whether it always faces the camera. +open class Label3D: GeometryInstance3D { + override open class var godotClassName: StringName { "Label3D" } + public enum DrawFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// If set, lights in the environment affect the label. + case shaded = 0 // FLAG_SHADED + /// If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind. + case doubleSided = 1 // FLAG_DOUBLE_SIDED + /// Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. + case disableDepthTest = 2 // FLAG_DISABLE_DEPTH_TEST + /// Label is scaled by depth so that it always appears the same size on screen. + case fixedSize = 3 // FLAG_FIXED_SIZE + /// Represents the size of the ``Label3D/DrawFlags`` enum. + case max = 4 // FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .shaded: return ".shaded" + case .doubleSided: return ".doubleSided" + case .disableDepthTest: return ".disableDepthTest" + case .fixedSize: return ".fixedSize" + case .max: return ".max" + } + + } + + } + + public enum AlphaCutMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. ``GeometryInstance3D/castShadow`` has no effect when this transparency mode is used; the ``Label3D`` will never cast shadows. + case disabled = 0 // ALPHA_CUT_DISABLED + /// This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see ``ProjectSettings/rendering/antiAliasing/quality/screenSpaceAa``). This mode is also known as _alpha testing_ or _1-bit transparency_. + /// + /// > Note: This mode might have issues with anti-aliased fonts and outlines, try adjusting ``alphaScissorThreshold`` or using MSDF font. + /// + /// > Note: When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + /// + case discard = 1 // ALPHA_CUT_DISCARD + /// This mode draws fully opaque pixels in the depth prepass. This is slower than ``AlphaCutMode/disabled`` or ``AlphaCutMode/discard``, but it allows displaying translucent areas and smooth edges while using proper sorting. + /// + /// > Note: When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + /// + case opaquePrepass = 2 // ALPHA_CUT_OPAQUE_PREPASS + /// This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque. + case hash = 3 // ALPHA_CUT_HASH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .discard: return ".discard" + case .opaquePrepass: return ".opaquePrepass" + case .hash: return ".hash" + } + + } + + } + + + /* Properties */ + + /// The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase ``fontSize`` while decreasing ``pixelSize`` at the same time. + final public var pixelSize: Double { + get { + return get_pixel_size () + } + + set { + set_pixel_size (newValue) + } + + } + + /// The text drawing offset (in pixels). + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// The billboard mode to use for the label. See ``BaseMaterial3D.BillboardMode`` for possible values. + final public var billboard: BaseMaterial3D.BillboardMode { + get { + return get_billboard_mode () + } + + set { + set_billboard_mode (newValue) + } + + } + + /// If `true`, the ``Light3D`` in the ``Environment`` has effects on the label. + final public var shaded: Bool { + get { + return get_draw_flag (Label3D.DrawFlags (rawValue: 0)!) + } + + set { + set_draw_flag (Label3D.DrawFlags (rawValue: 0)!, newValue) + } + + } + + /// If `true`, text can be seen from the back as well, if `false`, it is invisible when looking at it from behind. + final public var doubleSided: Bool { + get { + return get_draw_flag (Label3D.DrawFlags (rawValue: 1)!) + } + + set { + set_draw_flag (Label3D.DrawFlags (rawValue: 1)!, newValue) + } + + } + + /// If `true`, depth testing is disabled and the object will be drawn in render order. + final public var noDepthTest: Bool { + get { + return get_draw_flag (Label3D.DrawFlags (rawValue: 2)!) + } + + set { + set_draw_flag (Label3D.DrawFlags (rawValue: 2)!, newValue) + } + + } + + /// If `true`, the label is rendered at the same size regardless of distance. + final public var fixedSize: Bool { + get { + return get_draw_flag (Label3D.DrawFlags (rawValue: 3)!) + } + + set { + set_draw_flag (Label3D.DrawFlags (rawValue: 3)!, newValue) + } + + } + + /// The alpha cutting mode to use for the sprite. See ``Label3D/AlphaCutMode`` for possible values. + final public var alphaCut: Label3D.AlphaCutMode { + get { + return get_alpha_cut_mode () + } + + set { + set_alpha_cut_mode (newValue) + } + + } + + /// Threshold at which the alpha scissor will discard values. + final public var alphaScissorThreshold: Double { + get { + return get_alpha_scissor_threshold () + } + + set { + set_alpha_scissor_threshold (newValue) + } + + } + + /// The hashing scale for Alpha Hash. Recommended values between `0` and `2`. + final public var alphaHashScale: Double { + get { + return get_alpha_hash_scale () + } + + set { + set_alpha_hash_scale (newValue) + } + + } + + /// The type of alpha antialiasing to apply. See ``BaseMaterial3D.AlphaAntiAliasing``. + final public var alphaAntialiasingMode: BaseMaterial3D.AlphaAntiAliasing { + get { + return get_alpha_antialiasing () + } + + set { + set_alpha_antialiasing (newValue) + } + + } + + /// Threshold at which antialiasing will be applied on the alpha channel. + final public var alphaAntialiasingEdge: Double { + get { + return get_alpha_antialiasing_edge () + } + + set { + set_alpha_antialiasing_edge (newValue) + } + + } + + /// Filter flags for the texture. See ``BaseMaterial3D.TextureFilter`` for options. + final public var textureFilter: BaseMaterial3D.TextureFilter { + get { + return get_texture_filter () + } + + set { + set_texture_filter (newValue) + } + + } + + /// Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. + /// + /// > Note: This only applies if ``alphaCut`` is set to ``AlphaCutMode/disabled`` (default value). + /// + /// > Note: This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + /// + final public var renderPriority: Int32 { + get { + return get_render_priority () + } + + set { + set_render_priority (newValue) + } + + } + + /// Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. + /// + /// > Note: This only applies if ``alphaCut`` is set to ``AlphaCutMode/disabled`` (default value). + /// + /// > Note: This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + /// + final public var outlineRenderPriority: Int32 { + get { + return get_outline_render_priority () + } + + set { + set_outline_render_priority (newValue) + } + + } + + /// Text ``Color`` of the ``Label3D``. + final public var modulate: Color { + get { + return get_modulate () + } + + set { + set_modulate (newValue) + } + + } + + /// The tint of text outline. + final public var outlineModulate: Color { + get { + return get_outline_modulate () + } + + set { + set_outline_modulate (newValue) + } + + } + + /// The text to display on screen. + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// Font configuration used to display text. + final public var font: Font? { + get { + return get_font () + } + + set { + set_font (newValue) + } + + } + + /// Font size of the ``Label3D``'s text. To make the font look more detailed when up close, increase ``fontSize`` while decreasing ``pixelSize`` at the same time. + /// + /// Higher font sizes require more time to render new characters, which can cause stuttering during gameplay. + /// + final public var fontSize: Int32 { + get { + return get_font_size () + } + + set { + set_font_size (newValue) + } + + } + + /// Text outline size. + final public var outlineSize: Int32 { + get { + return get_outline_size () + } + + set { + set_outline_size (newValue) + } + + } + + /// Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the ``HorizontalAlignment`` constants. + final public var horizontalAlignment: HorizontalAlignment { + get { + return get_horizontal_alignment () + } + + set { + set_horizontal_alignment (newValue) + } + + } + + /// Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the ``VerticalAlignment`` constants. + final public var verticalAlignment: VerticalAlignment { + get { + return get_vertical_alignment () + } + + set { + set_vertical_alignment (newValue) + } + + } + + /// If `true`, all the text displays as UPPERCASE. + final public var uppercase: Bool { + get { + return is_uppercase () + } + + set { + set_uppercase (newValue) + } + + } + + /// Vertical space between lines in multiline ``Label3D``. + final public var lineSpacing: Double { + get { + return get_line_spacing () + } + + set { + set_line_spacing (newValue) + } + + } + + /// If set to something other than ``TextServer/AutowrapMode/off``, the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see ``TextServer.AutowrapMode``. + final public var autowrapMode: TextServer.AutowrapMode { + get { + return get_autowrap_mode () + } + + set { + set_autowrap_mode (newValue) + } + + } + + /// Line fill alignment rules. For more info see ``TextServer.JustificationFlag``. + final public var justificationFlags: TextServer.JustificationFlag { + get { + return get_justification_flags () + } + + set { + set_justification_flags (newValue) + } + + } + + /// Text width (in pixels), used for autowrap and fill alignment. + final public var width: Double { + get { + return get_width () + } + + set { + set_width (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: TextServer.Direction { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /// Set BiDi algorithm override for the structured text. + final public var structuredTextBidiOverride: TextServer.StructuredTextParser { + get { + return get_structured_text_bidi_override () + } + + set { + set_structured_text_bidi_override (newValue) + } + + } + + /// Set additional options for BiDi override. + final public var structuredTextBidiOverrideOptions: GArray { + get { + return get_structured_text_bidi_override_options () + } + + set { + set_structured_text_bidi_override_options (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_horizontal_alignment") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312603777)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_horizontal_alignment(_ alignment: HorizontalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_horizontal_alignment") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 341400642)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_horizontal_alignment() -> HorizontalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HorizontalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_vertical_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertical_alignment") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1796458609)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertical_alignment(_ alignment: VerticalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_vertical_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertical_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertical_alignment") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3274884059)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertical_alignment() -> VerticalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_vertical_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VerticalAlignment (rawValue: _result)! + } + + fileprivate static var method_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_modulate") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_modulate(_ modulate: Color) { + withUnsafePointer(to: modulate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_modulate") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Label3D.method_get_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline_modulate") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline_modulate(_ modulate: Color) { + withUnsafePointer(to: modulate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_outline_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outline_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_modulate") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outline_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Label3D.method_get_outline_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Label3D.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1418190634)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: TextServer.Direction) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2516697328)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> TextServer.Direction { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.Direction (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Label3D.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 55961453)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override(_ parser: TextServer.StructuredTextParser) { + withUnsafePointer(to: parser.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385126229)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override() -> TextServer.StructuredTextParser { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.StructuredTextParser (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override_options") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override_options(_ args: GArray) { + withUnsafePointer(to: args.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override_options") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override_options() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(Label3D.method_get_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_uppercase: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uppercase") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uppercase(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_uppercase, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_uppercase: GDExtensionMethodBindPtr = { + let methodName = StringName("is_uppercase") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_uppercase() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Label3D.method_is_uppercase, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_render_priority") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_render_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_render_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_priority") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_render_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label3D.method_get_render_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline_render_priority") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline_render_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_outline_render_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outline_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_render_priority") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outline_render_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label3D.method_get_outline_render_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_font: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1262170328)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font(_ font: Font?) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_font, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229501585)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font() -> Font? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Label3D.method_get_font, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_font_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label3D.method_get_font_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline_size(_ outlineSize: Int32) { + withUnsafePointer(to: outlineSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_outline_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outline_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Label3D.method_get_outline_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_line_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_spacing") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_spacing(_ lineSpacing: Double) { + withUnsafePointer(to: lineSpacing) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_line_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_line_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_spacing") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_line_spacing() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_line_spacing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autowrap_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289138044)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autowrap_mode(_ autowrapMode: TextServer.AutowrapMode) { + withUnsafePointer(to: autowrapMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autowrap_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1549071663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autowrap_mode() -> TextServer.AutowrapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.AutowrapMode (rawValue: _result)! + } + + fileprivate static var method_set_justification_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_justification_flags") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2877345813)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_justification_flags(_ justificationFlags: TextServer.JustificationFlag) { + withUnsafePointer(to: justificationFlags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_justification_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_justification_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_justification_flags") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1583363614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_justification_flags() -> TextServer.JustificationFlag { + var _result: TextServer.JustificationFlag = TextServer.JustificationFlag () + gi.object_method_bind_ptrcall(Label3D.method_get_justification_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Double) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_width") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_pixel_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pixel_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pixel_size(_ pixelSize: Double) { + withUnsafePointer(to: pixelSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_pixel_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pixel_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pixel_size") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pixel_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_pixel_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Label3D.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_flag") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1285833066)! + } + + } + + }() + + @inline(__always) + /// If `true`, the specified flag will be enabled. See ``Label3D.DrawFlags`` for a list of flags. + fileprivate final func set_draw_flag(_ flag: Label3D.DrawFlags, _ enabled: Bool) { + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_draw_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_draw_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_flag") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259226453)! + } + + } + + }() + + @inline(__always) + /// Returns the value of the specified flag. + fileprivate final func get_draw_flag(_ flag: Label3D.DrawFlags) -> Bool { + var _result: Bool = false + withUnsafePointer(to: flag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_get_draw_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_billboard_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_billboard_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4202036497)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_billboard_mode(_ mode: BaseMaterial3D.BillboardMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_billboard_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_billboard_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_billboard_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1283840139)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_billboard_mode() -> BaseMaterial3D.BillboardMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_billboard_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.BillboardMode (rawValue: _result)! + } + + fileprivate static var method_set_alpha_cut_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_cut_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2549142916)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_cut_mode(_ mode: Label3D.AlphaCutMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_alpha_cut_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_cut_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_cut_mode") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 219468601)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_cut_mode() -> Label3D.AlphaCutMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_alpha_cut_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Label3D.AlphaCutMode (rawValue: _result)! + } + + fileprivate static var method_set_alpha_scissor_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_scissor_threshold") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_scissor_threshold(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_alpha_scissor_threshold, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_scissor_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_scissor_threshold") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_scissor_threshold() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_alpha_scissor_threshold, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alpha_hash_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_hash_scale") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_hash_scale(_ threshold: Double) { + withUnsafePointer(to: threshold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_alpha_hash_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_hash_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_hash_scale") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_hash_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_alpha_hash_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alpha_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_antialiasing") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3212649852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_antialiasing(_ alphaAa: BaseMaterial3D.AlphaAntiAliasing) { + withUnsafePointer(to: alphaAa.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_alpha_antialiasing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_antialiasing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_antialiasing") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2889939400)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_antialiasing() -> BaseMaterial3D.AlphaAntiAliasing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_alpha_antialiasing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.AlphaAntiAliasing (rawValue: _result)! + } + + fileprivate static var method_set_alpha_antialiasing_edge: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_antialiasing_edge") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_antialiasing_edge(_ edge: Double) { + withUnsafePointer(to: edge) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_alpha_antialiasing_edge, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_antialiasing_edge: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_antialiasing_edge") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_antialiasing_edge() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Label3D.method_get_alpha_antialiasing_edge, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_filter") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 22904437)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_filter(_ mode: BaseMaterial3D.TextureFilter) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Label3D.method_set_texture_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_filter") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289213076)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_filter() -> BaseMaterial3D.TextureFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Label3D.method_get_texture_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return BaseMaterial3D.TextureFilter (rawValue: _result)! + } + + fileprivate static var method_generate_triangle_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_triangle_mesh") + return withUnsafePointer(to: &Label3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3476533166)! + } + + } + + }() + + /// Returns a ``TriangleMesh`` with the label's vertices following its current configuration (such as its ``pixelSize``). + public final func generateTriangleMesh() -> TriangleMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Label3D.method_generate_triangle_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LabelSettings.swift b/Sources/SwiftGodot/Generated/Api/LabelSettings.swift new file mode 100644 index 000000000..45d61d480 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LabelSettings.swift @@ -0,0 +1,535 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides common settings to customize the text in a ``Label``. +/// +/// ``LabelSettings`` is a resource that provides common settings to customize the text in a ``Label``. It will take priority over the properties defined in ``Control/theme``. The resource can be shared between multiple labels and changed on the fly, so it's convenient and flexible way to setup text style. +open class LabelSettings: Resource { + override open class var godotClassName: StringName { "LabelSettings" } + + /* Properties */ + + /// Vertical space between lines when the text is multiline. + final public var lineSpacing: Double { + get { + return get_line_spacing () + } + + set { + set_line_spacing (newValue) + } + + } + + /// ``Font`` used for the text. + final public var font: Font? { + get { + return get_font () + } + + set { + set_font (newValue) + } + + } + + /// Size of the text. + final public var fontSize: Int32 { + get { + return get_font_size () + } + + set { + set_font_size (newValue) + } + + } + + /// Color of the text. + final public var fontColor: Color { + get { + return get_font_color () + } + + set { + set_font_color (newValue) + } + + } + + /// Text outline size. + final public var outlineSize: Int32 { + get { + return get_outline_size () + } + + set { + set_outline_size (newValue) + } + + } + + /// The color of the outline. + final public var outlineColor: Color { + get { + return get_outline_color () + } + + set { + set_outline_color (newValue) + } + + } + + /// Size of the shadow effect. + final public var shadowSize: Int32 { + get { + return get_shadow_size () + } + + set { + set_shadow_size (newValue) + } + + } + + /// Color of the shadow effect. If alpha is `0`, no shadow will be drawn. + final public var shadowColor: Color { + get { + return get_shadow_color () + } + + set { + set_shadow_color (newValue) + } + + } + + /// Offset of the shadow effect, in pixels. + final public var shadowOffset: Vector2 { + get { + return get_shadow_offset () + } + + set { + set_shadow_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_line_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_spacing") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_spacing(_ spacing: Double) { + withUnsafePointer(to: spacing) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_line_spacing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_line_spacing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_spacing") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_line_spacing() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LabelSettings.method_get_line_spacing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_font: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1262170328)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font(_ font: Font?) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_font, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229501585)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font() -> Font? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LabelSettings.method_get_font, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_font_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LabelSettings.method_get_font_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_font_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_font_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_font_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_font_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_font_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_font_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_font_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(LabelSettings.method_get_font_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_outline_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outline_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LabelSettings.method_get_outline_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_outline_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_outline_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_outline_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_outline_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(LabelSettings.method_get_outline_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_shadow_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_size") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LabelSettings.method_get_shadow_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_shadow_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_color") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(LabelSettings.method_get_shadow_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_offset") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LabelSettings.method_set_shadow_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_offset") + return withUnsafePointer(to: &LabelSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(LabelSettings.method_get_shadow_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Light2D.swift b/Sources/SwiftGodot/Generated/Api/Light2D.swift new file mode 100644 index 000000000..b9f576318 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Light2D.swift @@ -0,0 +1,956 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Casts light in a 2D environment. +/// +/// Casts light in a 2D environment. A light is defined as a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). +open class Light2D: Node2D { + override open class var godotClassName: StringName { "Light2D" } + public enum ShadowFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See ``shadowFilter``. + case none = 0 // SHADOW_FILTER_NONE + /// Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See ``shadowFilter``. + case pcf5 = 1 // SHADOW_FILTER_PCF5 + /// Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtering mode, and should be used sparingly. See ``shadowFilter``. + case pcf13 = 2 // SHADOW_FILTER_PCF13 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .pcf5: return ".pcf5" + case .pcf13: return ".pcf13" + } + + } + + } + + public enum BlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light. + case add = 0 // BLEND_MODE_ADD + /// Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. + case sub = 1 // BLEND_MODE_SUB + /// Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. + case mix = 2 // BLEND_MODE_MIX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .add: return ".add" + case .sub: return ".sub" + case .mix: return ".mix" + } + + } + + } + + + /* Properties */ + + /// If `true`, Light2D will emit light. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// If `true`, Light2D will only appear when editing the scene. + final public var editorOnly: Bool { + get { + return is_editor_only () + } + + set { + set_editor_only (newValue) + } + + } + + /// The Light2D's ``Color``. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// The Light2D's energy value. The larger the value, the stronger the light. + final public var energy: Double { + get { + return get_energy () + } + + set { + set_energy (newValue) + } + + } + + /// The Light2D's blend mode. See ``Light2D/BlendMode`` constants for values. + final public var blendMode: Light2D.BlendMode { + get { + return get_blend_mode () + } + + set { + set_blend_mode (newValue) + } + + } + + /// Minimum `z` value of objects that are affected by the Light2D. + final public var rangeZMin: Int32 { + get { + return get_z_range_min () + } + + set { + set_z_range_min (newValue) + } + + } + + /// Maximum `z` value of objects that are affected by the Light2D. + final public var rangeZMax: Int32 { + get { + return get_z_range_max () + } + + set { + set_z_range_max (newValue) + } + + } + + /// Minimum layer value of objects that are affected by the Light2D. + final public var rangeLayerMin: Int32 { + get { + return get_layer_range_min () + } + + set { + set_layer_range_min (newValue) + } + + } + + /// Maximum layer value of objects that are affected by the Light2D. + final public var rangeLayerMax: Int32 { + get { + return get_layer_range_max () + } + + set { + set_layer_range_max (newValue) + } + + } + + /// The layer mask. Only objects with a matching ``CanvasItem/lightMask`` will be affected by the Light2D. See also ``shadowItemCullMask``, which affects which objects can cast shadows. + /// + /// > Note: ``rangeItemCullMask`` is ignored by ``DirectionalLight2D``, which will always light a 2D node regardless of the 2D node's ``CanvasItem/lightMask``. + /// + final public var rangeItemCullMask: Int32 { + get { + return get_item_cull_mask () + } + + set { + set_item_cull_mask (newValue) + } + + } + + /// If `true`, the Light2D will cast shadows. + final public var shadowEnabled: Bool { + get { + return is_shadow_enabled () + } + + set { + set_shadow_enabled (newValue) + } + + } + + /// ``Color`` of shadows cast by the Light2D. + final public var shadowColor: Color { + get { + return get_shadow_color () + } + + set { + set_shadow_color (newValue) + } + + } + + /// Shadow filter type. See ``Light2D/ShadowFilter`` for possible values. + final public var shadowFilter: Light2D.ShadowFilter { + get { + return get_shadow_filter () + } + + set { + set_shadow_filter (newValue) + } + + } + + /// Smoothing value for shadows. Higher values will result in softer shadows, at the cost of visible streaks that can appear in shadow rendering. ``shadowFilterSmooth`` only has an effect if ``shadowFilter`` is ``ShadowFilter/pcf5`` or ``ShadowFilter/pcf13``. + final public var shadowFilterSmooth: Double { + get { + return get_shadow_smooth () + } + + set { + set_shadow_smooth (newValue) + } + + } + + /// The shadow mask. Used with ``LightOccluder2D`` to cast shadows. Only occluders with a matching ``CanvasItem/lightMask`` will cast shadows. See also ``rangeItemCullMask``, which affects which objects can _receive_ the light. + final public var shadowItemCullMask: Int32 { + get { + return get_item_shadow_cull_mask () + } + + set { + set_item_shadow_cull_mask (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light2D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editor_only") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editor_only(_ editorOnly: Bool) { + withUnsafePointer(to: editorOnly) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_editor_only, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editor_only") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editor_only() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light2D.method_is_editor_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Light2D.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_energy") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_energy(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_energy") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light2D.method_get_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_z_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_z_range_min") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_z_range_min(_ z: Int32) { + withUnsafePointer(to: z) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_z_range_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_z_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_z_range_min") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_z_range_min() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_z_range_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_z_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_z_range_max") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_z_range_max(_ z: Int32) { + withUnsafePointer(to: z) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_z_range_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_z_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_z_range_max") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_z_range_max() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_z_range_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_layer_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layer_range_min") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layer_range_min(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_layer_range_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layer_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layer_range_min") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layer_range_min() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_layer_range_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_layer_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layer_range_max") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layer_range_max(_ layer: Int32) { + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_layer_range_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layer_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layer_range_max") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layer_range_max() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_layer_range_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_item_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_cull_mask") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_cull_mask(_ itemCullMask: Int32) { + withUnsafePointer(to: itemCullMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_item_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_cull_mask") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_cull_mask() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_item_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_item_shadow_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_shadow_cull_mask") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_shadow_cull_mask(_ itemShadowCullMask: Int32) { + withUnsafePointer(to: itemShadowCullMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_item_shadow_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_shadow_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_shadow_cull_mask") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_shadow_cull_mask() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Light2D.method_get_item_shadow_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_enabled") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_shadow_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shadow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shadow_enabled") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shadow_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light2D.method_is_shadow_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_smooth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_smooth") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_smooth(_ smooth: Double) { + withUnsafePointer(to: smooth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_shadow_smooth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_smooth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_smooth") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_smooth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light2D.method_get_shadow_smooth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_filter") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3209356555)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_filter(_ filter: Light2D.ShadowFilter) { + withUnsafePointer(to: filter.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_shadow_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_filter") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1973619177)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_filter() -> Light2D.ShadowFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Light2D.method_get_shadow_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Light2D.ShadowFilter (rawValue: _result)! + } + + fileprivate static var method_set_shadow_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_color") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_color(_ shadowColor: Color) { + withUnsafePointer(to: shadowColor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_shadow_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_color") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Light2D.method_get_shadow_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_mode") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2916638796)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_mode(_ mode: Light2D.BlendMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_blend_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_mode") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 936255250)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_mode() -> Light2D.BlendMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Light2D.method_get_blend_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Light2D.BlendMode (rawValue: _result)! + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the light's height, which is used in 2D normal mapping. See ``PointLight2D/height`` and ``DirectionalLight2D/height``. + public final func setHeight(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light2D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &Light2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the light's height, which is used in 2D normal mapping. See ``PointLight2D/height`` and ``DirectionalLight2D/height``. + public final func getHeight() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light2D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Light3D.swift b/Sources/SwiftGodot/Generated/Api/Light3D.swift new file mode 100644 index 000000000..b93c23e98 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Light3D.swift @@ -0,0 +1,1138 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides a base class for different kinds of light nodes. +/// +/// Light3D is the _abstract_ base class for light nodes. As it can't be instantiated, it shouldn't be used directly. Other types of light nodes inherit from it. Light3D contains the common variables and parameters used for lighting. +open class Light3D: VisualInstance3D { + override open class var godotClassName: StringName { "Light3D" } + public enum Param: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant for accessing ``lightEnergy``. + case energy = 0 // PARAM_ENERGY + /// Constant for accessing ``lightIndirectEnergy``. + case indirectEnergy = 1 // PARAM_INDIRECT_ENERGY + /// Constant for accessing ``lightVolumetricFogEnergy``. + case volumetricFogEnergy = 2 // PARAM_VOLUMETRIC_FOG_ENERGY + /// Constant for accessing ``lightSpecular``. + case specular = 3 // PARAM_SPECULAR + /// Constant for accessing ``OmniLight3D/omniRange`` or ``SpotLight3D/spotRange``. + case range = 4 // PARAM_RANGE + /// Constant for accessing ``lightSize``. + case size = 5 // PARAM_SIZE + /// Constant for accessing ``OmniLight3D/omniAttenuation`` or ``SpotLight3D/spotAttenuation``. + case attenuation = 6 // PARAM_ATTENUATION + /// Constant for accessing ``SpotLight3D/spotAngle``. + case spotAngle = 7 // PARAM_SPOT_ANGLE + /// Constant for accessing ``SpotLight3D/spotAngleAttenuation``. + case spotAttenuation = 8 // PARAM_SPOT_ATTENUATION + /// Constant for accessing ``DirectionalLight3D/directionalShadowMaxDistance``. + case shadowMaxDistance = 9 // PARAM_SHADOW_MAX_DISTANCE + /// Constant for accessing ``DirectionalLight3D/directionalShadowSplit1``. + case shadowSplit1Offset = 10 // PARAM_SHADOW_SPLIT_1_OFFSET + /// Constant for accessing ``DirectionalLight3D/directionalShadowSplit2``. + case shadowSplit2Offset = 11 // PARAM_SHADOW_SPLIT_2_OFFSET + /// Constant for accessing ``DirectionalLight3D/directionalShadowSplit3``. + case shadowSplit3Offset = 12 // PARAM_SHADOW_SPLIT_3_OFFSET + /// Constant for accessing ``DirectionalLight3D/directionalShadowFadeStart``. + case shadowFadeStart = 13 // PARAM_SHADOW_FADE_START + /// Constant for accessing ``shadowNormalBias``. + case shadowNormalBias = 14 // PARAM_SHADOW_NORMAL_BIAS + /// Constant for accessing ``shadowBias``. + case shadowBias = 15 // PARAM_SHADOW_BIAS + /// Constant for accessing ``DirectionalLight3D/directionalShadowPancakeSize``. + case shadowPancakeSize = 16 // PARAM_SHADOW_PANCAKE_SIZE + /// Constant for accessing ``shadowOpacity``. + case shadowOpacity = 17 // PARAM_SHADOW_OPACITY + /// Constant for accessing ``shadowBlur``. + case shadowBlur = 18 // PARAM_SHADOW_BLUR + /// Constant for accessing ``shadowTransmittanceBias``. + case transmittanceBias = 19 // PARAM_TRANSMITTANCE_BIAS + /// Constant for accessing ``lightIntensityLumens`` and ``lightIntensityLux``. Only used when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is `true`. + case intensity = 20 // PARAM_INTENSITY + /// Represents the size of the ``Light3D/Param`` enum. + case max = 21 // PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .energy: return ".energy" + case .indirectEnergy: return ".indirectEnergy" + case .volumetricFogEnergy: return ".volumetricFogEnergy" + case .specular: return ".specular" + case .range: return ".range" + case .size: return ".size" + case .attenuation: return ".attenuation" + case .spotAngle: return ".spotAngle" + case .spotAttenuation: return ".spotAttenuation" + case .shadowMaxDistance: return ".shadowMaxDistance" + case .shadowSplit1Offset: return ".shadowSplit1Offset" + case .shadowSplit2Offset: return ".shadowSplit2Offset" + case .shadowSplit3Offset: return ".shadowSplit3Offset" + case .shadowFadeStart: return ".shadowFadeStart" + case .shadowNormalBias: return ".shadowNormalBias" + case .shadowBias: return ".shadowBias" + case .shadowPancakeSize: return ".shadowPancakeSize" + case .shadowOpacity: return ".shadowOpacity" + case .shadowBlur: return ".shadowBlur" + case .transmittanceBias: return ".transmittanceBias" + case .intensity: return ".intensity" + case .max: return ".max" + } + + } + + } + + public enum BakeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. + /// + /// > Note: Hiding a light does _not_ affect baking ``LightmapGI``. Hiding a light will still affect baking ``VoxelGI`` and SDFGI (see ``Environment/sdfgiEnabled``). + /// + case disabled = 0 // BAKE_DISABLED + /// Light is taken into account in static baking (``VoxelGI``, ``LightmapGI``, SDFGI (``Environment/sdfgiEnabled``)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. + /// + /// > Note: The light is not baked in ``LightmapGI`` if ``editorOnly`` is `true`. + /// + case `static` = 1 // BAKE_STATIC + /// Light is taken into account in dynamic baking (``VoxelGI`` and SDFGI (``Environment/sdfgiEnabled``) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to ``BakeMode/`static```. This has a greater performance cost compared to ``BakeMode/`static```. When using SDFGI, the update speed of dynamic lights is affected by ``ProjectSettings/rendering/globalIllumination/sdfgi/framesToUpdateLights``. + case dynamic = 2 // BAKE_DYNAMIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`static`: return ".`static`" + case .dynamic: return ".dynamic" + } + + } + + } + + + /* Properties */ + + /// Used by positional lights (``OmniLight3D`` and ``SpotLight3D``) when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is `true`. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time. + /// + /// For ``SpotLight3D``s, we assume that the area outside the visible cone is surrounded by a perfect light absorbing material. Accordingly, the apparent brightness of the cone area does not change as the cone increases and decreases in size. + /// + /// A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. + /// + final public var lightIntensityLumens: Double { + get { + return get_param (Light3D.Param (rawValue: 20)!) + } + + set { + set_param (Light3D.Param (rawValue: 20)!, newValue) + } + + } + + /// Used by ``DirectionalLight3D``s when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is `true`. Sets the intensity of the light source measured in Lux. Lux is a measure of luminous flux per unit area, it is equal to one lumen per square meter. Lux is the measure of how much light hits a surface at a given time. + /// + /// On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. + /// + final public var lightIntensityLux: Double { + get { + return get_param (Light3D.Param (rawValue: 20)!) + } + + set { + set_param (Light3D.Param (rawValue: 20)!, newValue) + } + + } + + /// Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the ``lightColor``. + /// + /// The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin. + /// + final public var lightTemperature: Double { + get { + return get_temperature () + } + + set { + set_temperature (newValue) + } + + } + + /// The light's color. An _overbright_ color can be used to achieve a result equivalent to increasing the light's ``lightEnergy``. + final public var lightColor: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// The light's strength multiplier (this is not a physical unit). For ``OmniLight3D`` and ``SpotLight3D``, changing this value will only change the light color's intensity, not the light's radius. + final public var lightEnergy: Double { + get { + return get_param (Light3D.Param (rawValue: 0)!) + } + + set { + set_param (Light3D.Param (rawValue: 0)!, newValue) + } + + } + + /// Secondary multiplier used with indirect light (light bounces). Used with ``VoxelGI`` and SDFGI (see ``Environment/sdfgiEnabled``). + /// + /// > Note: This property is ignored if ``lightEnergy`` is equal to `0.0`, as the light won't be present at all in the GI shader. + /// + final public var lightIndirectEnergy: Double { + get { + return get_param (Light3D.Param (rawValue: 1)!) + } + + set { + set_param (Light3D.Param (rawValue: 1)!, newValue) + } + + } + + /// Secondary multiplier multiplied with ``lightEnergy`` then used with the ``Environment``'s volumetric fog (if enabled). If set to `0.0`, computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. + /// + /// > Note: To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have ``lightVolumetricFogEnergy`` set to `0.0` unless ``Environment/volumetricFogTemporalReprojectionEnabled`` is disabled (or unless the reprojection amount is significantly lowered). + /// + final public var lightVolumetricFogEnergy: Double { + get { + return get_param (Light3D.Param (rawValue: 2)!) + } + + set { + set_param (Light3D.Param (rawValue: 2)!, newValue) + } + + } + + /// ``Texture2D`` projected by light. ``shadowEnabled`` must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass. + /// + /// > Note: Unlike ``BaseMaterial3D`` whose filter mode can be adjusted on a per-material basis, the filter mode for light projector textures is set globally with ``ProjectSettings/rendering/textures/lightProjectors/filter``. + /// + /// > Note: Light projector textures are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + /// + final public var lightProjector: Texture2D? { + get { + return get_projector () + } + + set { + set_projector (newValue) + } + + } + + /// The size of the light in Godot units. Only available for ``OmniLight3D``s and ``SpotLight3D``s. Increasing this value will make the light fade out slower and shadows appear blurrier (also called percentage-closer soft shadows, or PCSS). This can be used to simulate area lights to an extent. Increasing this value above `0.0` for lights with shadows enabled will have a noticeable performance cost due to PCSS. + /// + /// > Note: ``lightSize`` is not affected by ``Node3D/scale`` (the light's scale or its parent's scale). + /// + /// > Note: PCSS for positional lights is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + /// + final public var lightSize: Double { + get { + return get_param (Light3D.Param (rawValue: 5)!) + } + + set { + set_param (Light3D.Param (rawValue: 5)!, newValue) + } + + } + + /// The light's angular size in degrees. Increasing this will make shadows softer at greater distances (also called percentage-closer soft shadows, or PCSS). Only available for ``DirectionalLight3D``s. For reference, the Sun from the Earth is approximately `0.5`. Increasing this value above `0.0` for lights with shadows enabled will have a noticeable performance cost due to PCSS. + /// + /// > Note: ``lightAngularDistance`` is not affected by ``Node3D/scale`` (the light's scale or its parent's scale). + /// + /// > Note: PCSS for directional lights is only supported in the Forward+ rendering method, not Mobile or Compatibility. + /// + final public var lightAngularDistance: Double { + get { + return get_param (Light3D.Param (rawValue: 5)!) + } + + set { + set_param (Light3D.Param (rawValue: 5)!, newValue) + } + + } + + /// If `true`, the light's effect is reversed, darkening areas and casting bright shadows. + final public var lightNegative: Bool { + get { + return is_negative () + } + + set { + set_negative (newValue) + } + + } + + /// The intensity of the specular blob in objects affected by the light. At `0`, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. + final public var lightSpecular: Double { + get { + return get_param (Light3D.Param (rawValue: 3)!) + } + + set { + set_param (Light3D.Param (rawValue: 3)!, newValue) + } + + } + + /// The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See ``Light3D/BakeMode``. + /// + /// > Note: Meshes' global illumination mode will also affect the global illumination rendering. See ``GeometryInstance3D/giMode``. + /// + final public var lightBakeMode: Light3D.BakeMode { + get { + return get_bake_mode () + } + + set { + set_bake_mode (newValue) + } + + } + + /// The light will affect objects in the selected layers. + final public var lightCullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /// If `true`, the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using ``distanceFadeEnabled`` to hide the light when far away from the ``Camera3D``. + final public var shadowEnabled: Bool { + get { + return has_shadow () + } + + set { + set_shadow (newValue) + } + + } + + /// Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. + final public var shadowBias: Double { + get { + return get_param (Light3D.Param (rawValue: 15)!) + } + + set { + set_param (Light3D.Param (rawValue: 15)!, newValue) + } + + } + + /// Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using ``shadowBias``. In practice, this value should be tweaked along with ``shadowBias`` to reduce artifacts as much as possible. + final public var shadowNormalBias: Double { + get { + return get_param (Light3D.Param (rawValue: 14)!) + } + + set { + set_param (Light3D.Param (rawValue: 14)!, newValue) + } + + } + + /// If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with ``GeometryInstance3D/ShadowCastingSetting/doubleSided``. + final public var shadowReverseCullFace: Bool { + get { + return get_shadow_reverse_cull_face () + } + + set { + set_shadow_reverse_cull_face (newValue) + } + + } + + final public var shadowTransmittanceBias: Double { + get { + return get_param (Light3D.Param (rawValue: 19)!) + } + + set { + set_param (Light3D.Param (rawValue: 19)!, newValue) + } + + } + + /// The opacity to use when rendering the light's shadow map. Values lower than `1.0` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. + final public var shadowOpacity: Double { + get { + return get_param (Light3D.Param (rawValue: 17)!) + } + + set { + set_param (Light3D.Param (rawValue: 17)!, newValue) + } + + } + + /// Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. + final public var shadowBlur: Double { + get { + return get_param (Light3D.Param (rawValue: 18)!) + } + + set { + set_param (Light3D.Param (rawValue: 18)!, newValue) + } + + } + + /// If `true`, the light will smoothly fade away when far from the active ``Camera3D`` starting at ``distanceFadeBegin``. This acts as a form of level of detail (LOD). The light will fade out over ``distanceFadeBegin`` + ``distanceFadeLength``, after which it will be culled and not sent to the shader at all. Use this to reduce the number of active lights in a scene and thus improve performance. + /// + /// > Note: Only effective for ``OmniLight3D`` and ``SpotLight3D``. + /// + final public var distanceFadeEnabled: Bool { + get { + return is_distance_fade_enabled () + } + + set { + set_enable_distance_fade (newValue) + } + + } + + /// The distance from the camera at which the light begins to fade away (in 3D units). + /// + /// > Note: Only effective for ``OmniLight3D`` and ``SpotLight3D``. + /// + final public var distanceFadeBegin: Double { + get { + return get_distance_fade_begin () + } + + set { + set_distance_fade_begin (newValue) + } + + } + + /// The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than ``distanceFadeBegin`` + ``distanceFadeLength`` to further improve performance, as shadow rendering is often more expensive than light rendering itself. + /// + /// > Note: Only effective for ``OmniLight3D`` and ``SpotLight3D``, and only when ``shadowEnabled`` is `true`. + /// + final public var distanceFadeShadow: Double { + get { + return get_distance_fade_shadow () + } + + set { + set_distance_fade_shadow (newValue) + } + + } + + /// Distance over which the light and its shadow fades. The light's energy and shadow's opacity is progressively reduced over this distance and is completely invisible at the end. + /// + /// > Note: Only effective for ``OmniLight3D`` and ``SpotLight3D``. + /// + final public var distanceFadeLength: Double { + get { + return get_distance_fade_length () + } + + set { + set_distance_fade_length (newValue) + } + + } + + /// If `true`, the light only appears in the editor and will not be visible at runtime. If `true`, the light will never be baked in ``LightmapGI`` regardless of its ``lightBakeMode``. + final public var editorOnly: Bool { + get { + return is_editor_only () + } + + set { + set_editor_only (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editor_only") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editor_only(_ editorOnly: Bool) { + withUnsafePointer(to: editorOnly) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_editor_only, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editor_only") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editor_only() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light3D.method_is_editor_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1722734213)! + } + + } + + }() + + @inline(__always) + /// Sets the value of the specified ``Light3D.Param`` parameter. + final func set_param(_ param: Light3D.Param, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_param, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1844084987)! + } + + } + + }() + + @inline(__always) + /// Returns the value of the specified ``Light3D.Param`` parameter. + final func get_param(_ param: Light3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_get_param, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_shadow: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_shadow, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_shadow: GDExtensionMethodBindPtr = { + let methodName = StringName("has_shadow") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_shadow() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light3D.method_has_shadow, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_negative: GDExtensionMethodBindPtr = { + let methodName = StringName("set_negative") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_negative(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_negative, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_negative: GDExtensionMethodBindPtr = { + let methodName = StringName("is_negative") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_negative() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light3D.method_is_negative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ cullMask: UInt32) { + withUnsafePointer(to: cullMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(Light3D.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_distance_fade") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_distance_fade(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_enable_distance_fade, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_distance_fade_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_distance_fade_enabled") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_distance_fade_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light3D.method_is_distance_fade_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_begin") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_begin(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_distance_fade_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_begin") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_begin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light3D.method_get_distance_fade_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_shadow: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_shadow") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_shadow(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_distance_fade_shadow, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_shadow: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_shadow") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_shadow() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light3D.method_get_distance_fade_shadow, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_distance_fade_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_distance_fade_length") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_distance_fade_length(_ distance: Double) { + withUnsafePointer(to: distance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_distance_fade_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_distance_fade_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distance_fade_length") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_distance_fade_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light3D.method_get_distance_fade_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Light3D.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shadow_reverse_cull_face: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_reverse_cull_face") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_reverse_cull_face(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_shadow_reverse_cull_face, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_reverse_cull_face: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_reverse_cull_face") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_reverse_cull_face() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Light3D.method_get_shadow_reverse_cull_face, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bake_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_mode") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 37739303)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_mode(_ bakeMode: Light3D.BakeMode) { + withUnsafePointer(to: bakeMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_bake_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mode") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 371737608)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_mode() -> Light3D.BakeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Light3D.method_get_bake_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Light3D.BakeMode (rawValue: _result)! + } + + fileprivate static var method_set_projector: GDExtensionMethodBindPtr = { + let methodName = StringName("set_projector") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_projector(_ projector: Texture2D?) { + withUnsafePointer(to: projector?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_projector, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_projector: GDExtensionMethodBindPtr = { + let methodName = StringName("get_projector") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_projector() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Light3D.method_get_projector, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_temperature: GDExtensionMethodBindPtr = { + let methodName = StringName("set_temperature") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_temperature(_ temperature: Double) { + withUnsafePointer(to: temperature) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Light3D.method_set_temperature, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_temperature: GDExtensionMethodBindPtr = { + let methodName = StringName("get_temperature") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_temperature() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Light3D.method_get_temperature, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_correlated_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_correlated_color") + return withUnsafePointer(to: &Light3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + /// Returns the ``Color`` of an idealized blackbody at the given ``lightTemperature``. This value is calculated internally based on the ``lightTemperature``. This ``Color`` is multiplied by ``lightColor`` before being sent to the ``RenderingServer``. + public final func getCorrelatedColor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Light3D.method_get_correlated_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LightOccluder2D.swift b/Sources/SwiftGodot/Generated/Api/LightOccluder2D.swift new file mode 100644 index 000000000..3ea23521c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LightOccluder2D.swift @@ -0,0 +1,199 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Occludes light cast by a Light2D, casting shadows. +/// +/// Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an ``OccluderPolygon2D`` in order for the shadow to be computed. +open class LightOccluder2D: Node2D { + override open class var godotClassName: StringName { "LightOccluder2D" } + + /* Properties */ + + /// The ``OccluderPolygon2D`` used to compute the shadow. + final public var occluder: OccluderPolygon2D? { + get { + return get_occluder_polygon () + } + + set { + set_occluder_polygon (newValue) + } + + } + + /// If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders. + final public var sdfCollision: Bool { + get { + return is_set_as_sdf_collision () + } + + set { + set_as_sdf_collision (newValue) + } + + } + + /// The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). + final public var occluderLightMask: Int32 { + get { + return get_occluder_light_mask () + } + + set { + set_occluder_light_mask (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_occluder_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_occluder_polygon") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3258315893)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_occluder_polygon(_ polygon: OccluderPolygon2D?) { + withUnsafePointer(to: polygon?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightOccluder2D.method_set_occluder_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_occluder_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_occluder_polygon") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3962317075)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_occluder_polygon() -> OccluderPolygon2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LightOccluder2D.method_get_occluder_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_occluder_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_occluder_light_mask") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_occluder_light_mask(_ mask: Int32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightOccluder2D.method_set_occluder_light_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_occluder_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_occluder_light_mask") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_occluder_light_mask() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LightOccluder2D.method_get_occluder_light_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_as_sdf_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_sdf_collision") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_sdf_collision(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightOccluder2D.method_set_as_sdf_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_set_as_sdf_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("is_set_as_sdf_collision") + return withUnsafePointer(to: &LightOccluder2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_set_as_sdf_collision() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightOccluder2D.method_is_set_as_sdf_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LightmapGI.swift b/Sources/SwiftGodot/Generated/Api/LightmapGI.swift new file mode 100644 index 000000000..d2435b811 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LightmapGI.swift @@ -0,0 +1,1235 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Computes and stores baked lightmaps for fast global illumination. +/// +/// The ``LightmapGI`` node is used to compute and store baked lightmaps. Lightmaps are used to provide high-quality indirect lighting with very little light leaking. ``LightmapGI`` can also provide rough reflections using spherical harmonics if ``directional`` is enabled. Dynamic objects can receive indirect lighting thanks to _light probes_, which can be automatically placed by setting ``generateProbesSubdiv`` to a value other than ``GenerateProbes/disabled``. Additional lightmap probes can also be added by creating ``LightmapProbe`` nodes. The downside is that lightmaps are fully static and cannot be baked in an exported project. Baking a ``LightmapGI`` node is also slower compared to ``VoxelGI``. +/// +/// **Procedural generation:** Lightmap baking functionality is only available in the editor. This means ``LightmapGI`` is not suited to procedurally generated or user-built levels. For procedurally generated or user-built levels, use ``VoxelGI`` or SDFGI instead (see ``Environment/sdfgiEnabled``). +/// +/// **Performance:** ``LightmapGI`` provides the best possible run-time performance for global illumination. It is suitable for low-end hardware including integrated graphics and mobile devices. +/// +/// > Note: Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again. +/// +/// > Note: Lightmap baking on ``CSGShape3D``s and ``PrimitiveMesh``es is not supported, as these cannot store UV2 data required for baking. +/// +/// > Note: If no custom lightmappers are installed, ``LightmapGI`` can only be baked from devices that support the Forward+ or Mobile rendering backends. +/// +open class LightmapGI: VisualInstance3D { + override open class var godotClassName: StringName { "LightmapGI" } + public enum BakeQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing ``ProjectSettings/rendering/lightmapping/bakeQuality/lowQualityRayCount`` and ``ProjectSettings/rendering/lightmapping/bakeQuality/lowQualityProbeRayCount``. + case low = 0 // BAKE_QUALITY_LOW + /// Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing ``ProjectSettings/rendering/lightmapping/bakeQuality/mediumQualityRayCount`` and ``ProjectSettings/rendering/lightmapping/bakeQuality/mediumQualityProbeRayCount``. + case medium = 1 // BAKE_QUALITY_MEDIUM + /// High bake quality (slow bake times). The quality of this preset can be adjusted by changing ``ProjectSettings/rendering/lightmapping/bakeQuality/highQualityRayCount`` and ``ProjectSettings/rendering/lightmapping/bakeQuality/highQualityProbeRayCount``. + case high = 2 // BAKE_QUALITY_HIGH + /// Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing ``ProjectSettings/rendering/lightmapping/bakeQuality/ultraQualityRayCount`` and ``ProjectSettings/rendering/lightmapping/bakeQuality/ultraQualityProbeRayCount``. + case ultra = 3 // BAKE_QUALITY_ULTRA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + case .ultra: return ".ultra" + } + + } + + } + + public enum GenerateProbes: Int64, CaseIterable, CustomDebugStringConvertible { + /// Don't generate lightmap probes for lighting dynamic objects. + case disabled = 0 // GENERATE_PROBES_DISABLED + /// Lowest level of subdivision (fastest bake times, smallest file sizes). + case subdiv4 = 1 // GENERATE_PROBES_SUBDIV_4 + /// Low level of subdivision (fast bake times, small file sizes). + case subdiv8 = 2 // GENERATE_PROBES_SUBDIV_8 + /// High level of subdivision (slow bake times, large file sizes). + case subdiv16 = 3 // GENERATE_PROBES_SUBDIV_16 + /// Highest level of subdivision (slowest bake times, largest file sizes). + case subdiv32 = 4 // GENERATE_PROBES_SUBDIV_32 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .subdiv4: return ".subdiv4" + case .subdiv8: return ".subdiv8" + case .subdiv16: return ".subdiv16" + case .subdiv32: return ".subdiv32" + } + + } + + } + + public enum BakeError: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lightmap baking was successful. + case ok = 0 // BAKE_ERROR_OK + /// Lightmap baking failed because the root node for the edited scene could not be accessed. + case noSceneRoot = 1 // BAKE_ERROR_NO_SCENE_ROOT + /// Lightmap baking failed as the lightmap data resource is embedded in a foreign resource. + case foreignData = 2 // BAKE_ERROR_FOREIGN_DATA + /// Lightmap baking failed as there is no lightmapper available in this Godot build. + case noLightmapper = 3 // BAKE_ERROR_NO_LIGHTMAPPER + /// Lightmap baking failed as the ``LightmapGIData`` save path isn't configured in the resource. + case noSavePath = 4 // BAKE_ERROR_NO_SAVE_PATH + /// Lightmap baking failed as there are no meshes whose ``GeometryInstance3D/giMode`` is ``GeometryInstance3D/GIMode/`static``` and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly. + case noMeshes = 5 // BAKE_ERROR_NO_MESHES + /// Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking. + case meshesInvalid = 6 // BAKE_ERROR_MESHES_INVALID + /// Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved. + case cantCreateImage = 7 // BAKE_ERROR_CANT_CREATE_IMAGE + /// The user aborted the lightmap baking operation (typically by clicking the **Cancel** button in the progress dialog). + case userAborted = 8 // BAKE_ERROR_USER_ABORTED + /// Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking. + case textureSizeTooSmall = 9 // BAKE_ERROR_TEXTURE_SIZE_TOO_SMALL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ok: return ".ok" + case .noSceneRoot: return ".noSceneRoot" + case .foreignData: return ".foreignData" + case .noLightmapper: return ".noLightmapper" + case .noSavePath: return ".noSavePath" + case .noMeshes: return ".noMeshes" + case .meshesInvalid: return ".meshesInvalid" + case .cantCreateImage: return ".cantCreateImage" + case .userAborted: return ".userAborted" + case .textureSizeTooSmall: return ".textureSizeTooSmall" + } + + } + + } + + public enum EnvironmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Ignore environment lighting when baking lightmaps. + case disabled = 0 // ENVIRONMENT_MODE_DISABLED + /// Use the scene's environment lighting when baking lightmaps. + /// + /// > Note: If baking lightmaps in a scene with no ``WorldEnvironment`` node, this will act like ``EnvironmentMode/disabled``. The editor's preview sky and sun is _not_ taken into account by ``LightmapGI`` when baking lightmaps. + /// + case scene = 1 // ENVIRONMENT_MODE_SCENE + /// Use ``environmentCustomSky`` as a source of environment lighting when baking lightmaps. + case customSky = 2 // ENVIRONMENT_MODE_CUSTOM_SKY + /// Use ``environmentCustomColor`` multiplied by ``environmentCustomEnergy`` as a constant source of environment lighting when baking lightmaps. + case customColor = 3 // ENVIRONMENT_MODE_CUSTOM_COLOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .scene: return ".scene" + case .customSky: return ".customSky" + case .customColor: return ".customColor" + } + + } + + } + + + /* Properties */ + + /// The quality preset to use when baking lightmaps. This affects bake times, but output file sizes remain mostly identical across quality levels. + /// + /// To further speed up bake times, decrease ``bounces``, disable ``useDenoiser`` and increase the lightmap texel size on 3D scenes in the Import doc. + /// + final public var quality: LightmapGI.BakeQuality { + get { + return get_bake_quality () + } + + set { + set_bake_quality (newValue) + } + + } + + /// Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to `0`, only environment lighting, direct light and emissive lighting is baked. + final public var bounces: Int32 { + get { + return get_bounces () + } + + set { + set_bounces (newValue) + } + + } + + /// The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of `1.0` represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of ``bounces`` then increasing ``bounceIndirectEnergy``. + /// + /// > Note: ``bounceIndirectEnergy`` only has an effect if ``bounces`` is set to a value greater than or equal to `1`. + /// + final public var bounceIndirectEnergy: Double { + get { + return get_bounce_indirect_energy () + } + + set { + set_bounce_indirect_energy (newValue) + } + + } + + /// If `true`, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked (``Light3D/lightBakeMode`` set to ``Light3D/BakeMode/`static``` and with ``Light3D/editorOnly`` set to `false`). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes. + /// + /// > Note: The property's name has no relationship with ``DirectionalLight3D``. ``directional`` works with all light types. + /// + final public var directional: Bool { + get { + return is_directional () + } + + set { + set_directional (newValue) + } + + } + + /// If `true`, a texture with the lighting information will be generated to speed up the generation of indirect lighting at the cost of some accuracy. The geometry might exhibit extra light leak artifacts when using low resolution lightmaps or UVs that stretch the lightmap significantly across surfaces. Leave ``useTextureForBounces`` at its default value of `true` if unsure. + /// + /// > Note: ``useTextureForBounces`` only has an effect if ``bounces`` is set to a value greater than or equal to `1`. + /// + final public var useTextureForBounces: Bool { + get { + return is_using_texture_for_bounces () + } + + set { + set_use_texture_for_bounces (newValue) + } + + } + + /// If `true`, ignore environment lighting when baking lightmaps. + final public var interior: Bool { + get { + return is_interior () + } + + set { + set_interior (newValue) + } + + } + + /// If `true`, uses a GPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image. + final public var useDenoiser: Bool { + get { + return is_using_denoiser () + } + + set { + set_use_denoiser (newValue) + } + + } + + /// The strength of denoising step applied to the generated lightmaps. Only effective if ``useDenoiser`` is `true` and ``ProjectSettings/rendering/lightmapping/denoising/denoiser`` is set to JNLM. + final public var denoiserStrength: Double { + get { + return get_denoiser_strength () + } + + set { + set_denoiser_strength (newValue) + } + + } + + /// The distance in pixels from which the denoiser samples. Lower values preserve more details, but may give blotchy results if the lightmap quality is not high enough. Only effective if ``useDenoiser`` is `true` and ``ProjectSettings/rendering/lightmapping/denoising/denoiser`` is set to JNLM. + final public var denoiserRange: Int32 { + get { + return get_denoiser_range () + } + + set { + set_denoiser_range (newValue) + } + + } + + /// The bias to use when computing shadows. Increasing ``bias`` can fix shadow acne on the resulting baked lightmap, but can introduce peter-panning (shadows not connecting to their casters). Real-time ``Light3D`` shadows are not affected by this ``bias`` property. + final public var bias: Double { + get { + return get_bias () + } + + set { + set_bias (newValue) + } + + } + + /// Scales the lightmap texel density of all meshes for the current bake. This is a multiplier that builds upon the existing lightmap texel size defined in each imported 3D scene, along with the per-mesh density multiplier (which is designed to be used when the same mesh is used at different scales). Lower values will result in faster bake times. + final public var texelScale: Double { + get { + return get_texel_scale () + } + + set { + set_texel_scale (newValue) + } + + } + + /// The maximum texture size for the generated texture atlas. Higher values will result in fewer slices being generated, but may not work on all hardware as a result of hardware limitations on texture sizes. Leave ``maxTextureSize`` at its default value of `16384` if unsure. + final public var maxTextureSize: Int32 { + get { + return get_max_texture_size () + } + + set { + set_max_texture_size (newValue) + } + + } + + /// The environment mode to use when baking lightmaps. + final public var environmentMode: LightmapGI.EnvironmentMode { + get { + return get_environment_mode () + } + + set { + set_environment_mode (newValue) + } + + } + + /// The sky to use as a source of environment lighting. Only effective if ``environmentMode`` is ``EnvironmentMode/customSky``. + final public var environmentCustomSky: Sky? { + get { + return get_environment_custom_sky () + } + + set { + set_environment_custom_sky (newValue) + } + + } + + /// The color to use for environment lighting. Only effective if ``environmentMode`` is ``EnvironmentMode/customColor``. + final public var environmentCustomColor: Color { + get { + return get_environment_custom_color () + } + + set { + set_environment_custom_color (newValue) + } + + } + + /// The color multiplier to use for environment lighting. Only effective if ``environmentMode`` is ``EnvironmentMode/customColor``. + final public var environmentCustomEnergy: Double { + get { + return get_environment_custom_energy () + } + + set { + set_environment_custom_energy (newValue) + } + + } + + /// The ``CameraAttributes`` resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the ``LightmapGI`` will have banding artifacts or may have over-exposure artifacts. + final public var cameraAttributes: CameraAttributes? { + get { + return get_camera_attributes () + } + + set { + set_camera_attributes (newValue) + } + + } + + /// The level of subdivision to use when automatically generating ``LightmapProbe``s for dynamic object lighting. Higher values result in more accurate indirect lighting on dynamic objects, at the cost of longer bake times and larger file sizes. + /// + /// > Note: Automatically generated ``LightmapProbe``s are not visible as nodes in the Scene tree dock, and cannot be modified this way after they are generated. + /// + /// > Note: Regardless of ``generateProbesSubdiv``, direct lighting on dynamic objects is always applied using ``Light3D`` nodes in real-time. + /// + final public var generateProbesSubdiv: LightmapGI.GenerateProbes { + get { + return get_generate_probes () + } + + set { + set_generate_probes (newValue) + } + + } + + /// The ``LightmapGIData`` associated to this ``LightmapGI`` node. This resource is automatically created after baking, and is not meant to be created manually. + final public var lightData: LightmapGIData? { + get { + return get_light_data () + } + + set { + set_light_data (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_light_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light_data") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1790597277)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light_data(_ data: LightmapGIData?) { + withUnsafePointer(to: data?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_light_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light_data") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 290354153)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light_data() -> LightmapGIData? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LightmapGI.method_get_light_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_bake_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_quality") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1192215803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_quality(_ bakeQuality: LightmapGI.BakeQuality) { + withUnsafePointer(to: bakeQuality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_bake_quality, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_quality") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 688832735)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_quality() -> LightmapGI.BakeQuality { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LightmapGI.method_get_bake_quality, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return LightmapGI.BakeQuality (rawValue: _result)! + } + + fileprivate static var method_set_bounces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bounces") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bounces(_ bounces: Int32) { + withUnsafePointer(to: bounces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_bounces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bounces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bounces") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bounces() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_bounces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bounce_indirect_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bounce_indirect_energy") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bounce_indirect_energy(_ bounceIndirectEnergy: Double) { + withUnsafePointer(to: bounceIndirectEnergy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_bounce_indirect_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bounce_indirect_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bounce_indirect_energy") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bounce_indirect_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_bounce_indirect_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_generate_probes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_generate_probes") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 549981046)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_generate_probes(_ subdivision: LightmapGI.GenerateProbes) { + withUnsafePointer(to: subdivision.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_generate_probes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_generate_probes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_generate_probes") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3930596226)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_generate_probes() -> LightmapGI.GenerateProbes { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LightmapGI.method_get_generate_probes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return LightmapGI.GenerateProbes (rawValue: _result)! + } + + fileprivate static var method_set_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bias") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bias(_ bias: Double) { + withUnsafePointer(to: bias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bias") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_environment_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment_mode") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2282650285)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment_mode(_ mode: LightmapGI.EnvironmentMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_environment_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment_mode") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4128646479)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment_mode() -> LightmapGI.EnvironmentMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LightmapGI.method_get_environment_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return LightmapGI.EnvironmentMode (rawValue: _result)! + } + + fileprivate static var method_set_environment_custom_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment_custom_sky") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3336722921)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment_custom_sky(_ sky: Sky?) { + withUnsafePointer(to: sky?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_environment_custom_sky, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment_custom_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment_custom_sky") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1177136966)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment_custom_sky() -> Sky? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LightmapGI.method_get_environment_custom_sky, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_environment_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment_custom_color") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment_custom_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_environment_custom_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment_custom_color") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment_custom_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(LightmapGI.method_get_environment_custom_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_environment_custom_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment_custom_energy") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_environment_custom_energy(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_environment_custom_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_environment_custom_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment_custom_energy") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_environment_custom_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_environment_custom_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texel_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texel_scale") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texel_scale(_ texelScale: Double) { + withUnsafePointer(to: texelScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_texel_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texel_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texel_scale") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texel_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_texel_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_texture_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_texture_size") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_texture_size(_ maxTextureSize: Int32) { + withUnsafePointer(to: maxTextureSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_max_texture_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_texture_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_texture_size") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_texture_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_max_texture_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_denoiser: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_denoiser") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_denoiser(_ useDenoiser: Bool) { + withUnsafePointer(to: useDenoiser) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_use_denoiser, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_denoiser: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_denoiser") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_denoiser() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightmapGI.method_is_using_denoiser, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_denoiser_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_denoiser_strength") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_denoiser_strength(_ denoiserStrength: Double) { + withUnsafePointer(to: denoiserStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_denoiser_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_denoiser_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_denoiser_strength") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_denoiser_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_denoiser_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_denoiser_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_denoiser_range") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_denoiser_range(_ denoiserRange: Int32) { + withUnsafePointer(to: denoiserRange) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_denoiser_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_denoiser_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_denoiser_range") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_denoiser_range() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LightmapGI.method_get_denoiser_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interior") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interior(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_interior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("is_interior") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_interior() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightmapGI.method_is_interior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_directional: GDExtensionMethodBindPtr = { + let methodName = StringName("set_directional") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_directional(_ directional: Bool) { + withUnsafePointer(to: directional) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_directional, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_directional: GDExtensionMethodBindPtr = { + let methodName = StringName("is_directional") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_directional() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightmapGI.method_is_directional, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_texture_for_bounces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_texture_for_bounces") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_texture_for_bounces(_ useTextureForBounces: Bool) { + withUnsafePointer(to: useTextureForBounces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_use_texture_for_bounces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_texture_for_bounces: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_texture_for_bounces") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_texture_for_bounces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightmapGI.method_is_using_texture_for_bounces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_camera_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_camera_attributes") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2817810567)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_camera_attributes(_ cameraAttributes: CameraAttributes?) { + withUnsafePointer(to: cameraAttributes?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGI.method_set_camera_attributes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_camera_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_attributes") + return withUnsafePointer(to: &LightmapGI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3921283215)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_camera_attributes() -> CameraAttributes? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LightmapGI.method_get_camera_attributes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LightmapGIData.swift b/Sources/SwiftGodot/Generated/Api/LightmapGIData.swift new file mode 100644 index 000000000..2c7fb4d58 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LightmapGIData.swift @@ -0,0 +1,300 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Contains baked lightmap and dynamic object probe data for ``LightmapGI``. +/// +/// ``LightmapGIData`` contains baked lightmap and dynamic object probe data for ``LightmapGI``. It is replaced every time lightmaps are baked in ``LightmapGI``. +open class LightmapGIData: Resource { + override open class var godotClassName: StringName { "LightmapGIData" } + + /* Properties */ + + /// The lightmap atlas textures generated by the lightmapper. + final public var lightmapTextures: ObjectCollection { + get { + return get_lightmap_textures () + } + + set { + set_lightmap_textures (newValue) + } + + } + + final public var usesSphericalHarmonics: Bool { + get { + return is_using_spherical_harmonics () + } + + set { + set_uses_spherical_harmonics (newValue) + } + + } + + /// The lightmap atlas texture generated by the lightmapper. + final public var lightTexture: TextureLayered? { + get { + return get_light_texture () + } + + set { + set_light_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_lightmap_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lightmap_textures") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lightmap_textures(_ lightTextures: ObjectCollection) { + withUnsafePointer(to: lightTextures.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGIData.method_set_lightmap_textures, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lightmap_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lightmap_textures") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lightmap_textures() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(LightmapGIData.method_get_lightmap_textures, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_set_uses_spherical_harmonics: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uses_spherical_harmonics") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + /// If `usesSphericalHarmonics` is `true`, tells the engine to treat the lightmap data as if it was baked with directional information. + /// + /// > Note: Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire ``LightmapGIData`` resource is replaced by the lightmapper. + /// + fileprivate final func set_uses_spherical_harmonics(_ usesSphericalHarmonics: Bool) { + withUnsafePointer(to: usesSphericalHarmonics) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGIData.method_set_uses_spherical_harmonics, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_spherical_harmonics: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_spherical_harmonics") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + /// If `true`, lightmaps were baked with directional information. See also ``LightmapGI/directional``. + fileprivate final func is_using_spherical_harmonics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LightmapGIData.method_is_using_spherical_harmonics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_user: GDExtensionMethodBindPtr = { + let methodName = StringName("add_user") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4272570515)! + } + + } + + }() + + /// Adds an object that is considered baked within this ``LightmapGIData``. + public final func addUser(path: NodePath, uvScale: Rect2, sliceIndex: Int32, subInstance: Int32) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: uvScale) { pArg1 in + withUnsafePointer(to: sliceIndex) { pArg2 in + withUnsafePointer(to: subInstance) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(LightmapGIData.method_add_user, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_user_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_user_count") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of objects that are considered baked within this ``LightmapGIData``. + public final func getUserCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LightmapGIData.method_get_user_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_user_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_user_path") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Returns the ``NodePath`` of the baked object at index `userIdx`. + public final func getUserPath(userIdx: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: userIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGIData.method_get_user_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_users: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_users") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all objects that are considered baked within this ``LightmapGIData``. + public final func clearUsers() { + gi.object_method_bind_ptrcall(LightmapGIData.method_clear_users, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_light_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_light_texture") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1278366092)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_light_texture(_ lightTexture: TextureLayered?) { + withUnsafePointer(to: lightTexture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LightmapGIData.method_set_light_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_light_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_light_texture") + return withUnsafePointer(to: &LightmapGIData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3984243839)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_light_texture() -> TextureLayered? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LightmapGIData.method_get_light_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LightmapProbe.swift b/Sources/SwiftGodot/Generated/Api/LightmapProbe.swift new file mode 100644 index 000000000..3446cbeef --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LightmapProbe.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a single manually placed probe for dynamic object lighting with ``LightmapGI``. +/// +/// ``LightmapProbe`` represents the position of a single manually placed probe for dynamic object lighting with ``LightmapGI``. Lightmap probes affect the lighting of ``GeometryInstance3D``-derived nodes that have their ``GeometryInstance3D/giMode`` set to ``GeometryInstance3D/GIMode/dynamic``. +/// +/// Typically, ``LightmapGI`` probes are placed automatically by setting ``LightmapGI/generateProbesSubdiv`` to a value other than ``LightmapGI/GenerateProbes/disabled``. By creating ``LightmapProbe`` nodes before baking lightmaps, you can add more probes in specific areas for greater detail, or disable automatic generation and rely only on manually placed probes instead. +/// +/// > Note: ``LightmapProbe`` nodes that are placed after baking lightmaps are ignored by dynamic objects. You must bake lightmaps again after creating or modifying ``LightmapProbe``s for the probes to be effective. +/// +open class LightmapProbe: Node3D { + override open class var godotClassName: StringName { "LightmapProbe" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Lightmapper.swift b/Sources/SwiftGodot/Generated/Api/Lightmapper.swift new file mode 100644 index 000000000..cec466bd5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Lightmapper.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract class extended by lightmappers, for use in ``LightmapGI``. +/// +/// This class should be extended by custom lightmapper classes. Lightmappers can then be used with ``LightmapGI`` to provide fast baked global illumination in 3D. +/// +/// Godot contains a built-in GPU-based lightmapper ``LightmapperRD`` that uses compute shaders, but custom lightmappers can be implemented by C++ modules. +/// +open class Lightmapper: RefCounted { + override open class var godotClassName: StringName { "Lightmapper" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/LightmapperRD.swift b/Sources/SwiftGodot/Generated/Api/LightmapperRD.swift new file mode 100644 index 000000000..869e0c78c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LightmapperRD.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// The built-in GPU-based lightmapper for use with ``LightmapGI``. +/// +/// LightmapperRD ("RD" stands for ``RenderingDevice``) is the built-in GPU-based lightmapper for use with ``LightmapGI``. On most dedicated GPUs, it can bake lightmaps much faster than most CPU-based lightmappers. LightmapperRD uses compute shaders to bake lightmaps, so it does not require CUDA or OpenCL libraries to be installed to be usable. +/// +/// > Note: Only usable when using the Vulkan backend (Forward+ or Mobile), not OpenGL. +/// +open class LightmapperRD: Lightmapper { + override open class var godotClassName: StringName { "LightmapperRD" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Line2D.swift b/Sources/SwiftGodot/Generated/Api/Line2D.swift new file mode 100644 index 000000000..2d3cd8bec --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Line2D.swift @@ -0,0 +1,1034 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D polyline that can optionally be textured. +/// +/// This node draws a 2D polyline, i.e. a shape consisting of several points connected by segments. ``Line2D`` is not a mathematical polyline, i.e. the segments are not infinitely thin. It is intended for rendering and it can be colored and optionally textured. +/// +/// > Warning: Certain configurations may be impossible to draw nicely, such as very sharp angles. In these situations, the node uses fallback drawing logic to look decent. +/// +/// > Note: ``Line2D`` is drawn using a 2D mesh. +/// +open class Line2D: Node2D { + override open class var godotClassName: StringName { "Line2D" } + public enum LineJointMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on ``sharpLimit``), the joint falls back to ``LineJointMode/bevel`` to prevent very long miters. + case sharp = 0 // LINE_JOINT_SHARP + /// Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line. + case bevel = 1 // LINE_JOINT_BEVEL + /// Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on ``roundPrecision``. + case round = 2 // LINE_JOINT_ROUND + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .sharp: return ".sharp" + case .bevel: return ".bevel" + case .round: return ".round" + } + + } + + } + + public enum LineCapMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Draws no line cap. + case none = 0 // LINE_CAP_NONE + /// Draws the line cap as a box, slightly extending the first/last segment. + case box = 1 // LINE_CAP_BOX + /// Draws the line cap as a semicircle attached to the first/last segment. + case round = 2 // LINE_CAP_ROUND + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .box: return ".box" + case .round: return ".round" + } + + } + + } + + public enum LineTextureMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Takes the left pixels of the texture and renders them over the whole polyline. + case none = 0 // LINE_TEXTURE_NONE + /// Tiles the texture over the polyline. ``CanvasItem/textureRepeat`` of the ``Line2D`` node must be ``CanvasItem/TextureRepeat/enabled`` or ``CanvasItem/TextureRepeat/mirror`` for it to work properly. + case tile = 1 // LINE_TEXTURE_TILE + /// Stretches the texture across the polyline. ``CanvasItem/textureRepeat`` of the ``Line2D`` node must be ``CanvasItem/TextureRepeat/disabled`` for best results. + case stretch = 2 // LINE_TEXTURE_STRETCH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .tile: return ".tile" + case .stretch: return ".stretch" + } + + } + + } + + + /* Properties */ + + /// The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array. + final public var points: PackedVector2Array { + get { + return get_points () + } + + set { + set_points (newValue) + } + + } + + /// If `true` and the polyline has more than 2 points, the last point and the first one will be connected by a segment. + /// + /// > Note: The shape of the closing segment is not guaranteed to be seamless if a ``widthCurve`` is provided. + /// + /// > Note: The joint between the closing segment and the first segment is drawn first and it samples the ``gradient`` and the ``widthCurve`` at the beginning. This is an implementation detail that might change in a future version. + /// + final public var closed: Bool { + get { + return is_closed () + } + + set { + set_closed (newValue) + } + + } + + /// The polyline's width. + final public var width: Double { + get { + return get_width () + } + + set { + set_width (newValue) + } + + } + + /// The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. + final public var widthCurve: Curve? { + get { + return get_curve () + } + + set { + set_curve (newValue) + } + + } + + /// The color of the polyline. Will not be used if a gradient is set. + final public var defaultColor: Color { + get { + return get_default_color () + } + + set { + set_default_color (newValue) + } + + } + + /// The gradient is drawn through the whole line from start to finish. The ``defaultColor`` will not be used if this property is set. + final public var gradient: Gradient? { + get { + return get_gradient () + } + + set { + set_gradient (newValue) + } + + } + + /// The texture used for the polyline. Uses ``textureMode`` for drawing style. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// The style to render the ``texture`` of the polyline. Use ``Line2D/LineTextureMode`` constants. + final public var textureMode: Line2D.LineTextureMode { + get { + return get_texture_mode () + } + + set { + set_texture_mode (newValue) + } + + } + + /// The style of the connections between segments of the polyline. Use ``Line2D/LineJointMode`` constants. + final public var jointMode: Line2D.LineJointMode { + get { + return get_joint_mode () + } + + set { + set_joint_mode (newValue) + } + + } + + /// The style of the beginning of the polyline, if ``closed`` is `false`. Use ``Line2D/LineCapMode`` constants. + final public var beginCapMode: Line2D.LineCapMode { + get { + return get_begin_cap_mode () + } + + set { + set_begin_cap_mode (newValue) + } + + } + + /// The style of the end of the polyline, if ``closed`` is `false`. Use ``Line2D/LineCapMode`` constants. + final public var endCapMode: Line2D.LineCapMode { + get { + return get_end_cap_mode () + } + + set { + set_end_cap_mode (newValue) + } + + } + + /// Determines the miter limit of the polyline. Normally, when ``jointMode`` is set to ``LineJointMode/sharp``, sharp angles fall back to using the logic of ``LineJointMode/bevel`` joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles. + final public var sharpLimit: Double { + get { + return get_sharp_limit () + } + + set { + set_sharp_limit (newValue) + } + + } + + /// The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. + final public var roundPrecision: Int32 { + get { + return get_round_precision () + } + + set { + set_round_precision (newValue) + } + + } + + /// If `true`, the polyline's border will be anti-aliased. + /// + /// > Note: ``Line2D`` is not accelerated by batching when being anti-aliased. + /// + final public var antialiased: Bool { + get { + return get_antialiased () + } + + set { + set_antialiased (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_points") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_points(_ points: PackedVector2Array) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_points") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_points() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(Line2D.method_get_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_position") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Overwrites the position of the point at the given `index` with the supplied `position`. + public final func setPointPosition(index: Int32, position: Vector2) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_position") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the point at index `index`. + public final func getPointPosition(index: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_get_point_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_count") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of points in the polyline. + public final func getPointCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Line2D.method_get_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_point: GDExtensionMethodBindPtr = { + let methodName = StringName("add_point") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2654014372)! + } + + } + + }() + + /// Adds a point with the specified `position` relative to the polyline's own position. If no `index` is provided, the new point will be added to the end of the points array. + /// + /// If `index` is given, the new point is inserted before the existing point identified by index `index`. The indices of the points after the new point get increased by 1. The provided `index` must not exceed the number of existing points in the polyline. See ``getPointCount()``. + /// + public final func addPoint(position: Vector2, index: Int32 = -1) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_add_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_point: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_point") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the point at index `index` from the polyline. + public final func removePoint(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_remove_point, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_points: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_points") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all points from the polyline, making it empty. + public final func clearPoints() { + gi.object_method_bind_ptrcall(Line2D.method_clear_points, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_closed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_closed") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_closed(_ closed: Bool) { + withUnsafePointer(to: closed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_closed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_closed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_closed") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_closed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Line2D.method_is_closed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Double) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_width") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Line2D.method_get_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Line2D.method_get_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_default_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_color") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_default_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_default_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_color") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_default_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Line2D.method_get_default_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gradient") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gradient(_ color: Gradient?) { + withUnsafePointer(to: color?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_gradient, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gradient: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gradient") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gradient() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Line2D.method_get_gradient, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Line2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1952559516)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_mode(_ mode: Line2D.LineTextureMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_texture_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2341040722)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_mode() -> Line2D.LineTextureMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Line2D.method_get_texture_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Line2D.LineTextureMode (rawValue: _result)! + } + + fileprivate static var method_set_joint_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 604292979)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joint_mode(_ mode: Line2D.LineJointMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_joint_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2546544037)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joint_mode() -> Line2D.LineJointMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Line2D.method_get_joint_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Line2D.LineJointMode (rawValue: _result)! + } + + fileprivate static var method_set_begin_cap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_begin_cap_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1669024546)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_begin_cap_mode(_ mode: Line2D.LineCapMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_begin_cap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_begin_cap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_begin_cap_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1107511441)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_begin_cap_mode() -> Line2D.LineCapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Line2D.method_get_begin_cap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Line2D.LineCapMode (rawValue: _result)! + } + + fileprivate static var method_set_end_cap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_end_cap_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1669024546)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_end_cap_mode(_ mode: Line2D.LineCapMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_end_cap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_end_cap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_end_cap_mode") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1107511441)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_end_cap_mode() -> Line2D.LineCapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Line2D.method_get_end_cap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Line2D.LineCapMode (rawValue: _result)! + } + + fileprivate static var method_set_sharp_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sharp_limit") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sharp_limit(_ limit: Double) { + withUnsafePointer(to: limit) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_sharp_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sharp_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sharp_limit") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sharp_limit() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Line2D.method_get_sharp_limit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_round_precision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_round_precision") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_round_precision(_ precision: Int32) { + withUnsafePointer(to: precision) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_round_precision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_round_precision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_round_precision") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_round_precision() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Line2D.method_get_round_precision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("set_antialiased") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_antialiased(_ antialiased: Bool) { + withUnsafePointer(to: antialiased) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Line2D.method_set_antialiased, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("get_antialiased") + return withUnsafePointer(to: &Line2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_antialiased() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Line2D.method_get_antialiased, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LineEdit.swift b/Sources/SwiftGodot/Generated/Api/LineEdit.swift new file mode 100644 index 000000000..acd7c5d0d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LineEdit.swift @@ -0,0 +1,2477 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An input field for single-line text. +/// +/// ``LineEdit`` provides an input field for editing a single line of text. It features many built-in shortcuts that are always available ([kbd]Ctrl[/kbd] here maps to [kbd]Cmd[/kbd] on macOS): +/// +/// - [kbd]Ctrl + C[/kbd]: Copy +/// +/// - [kbd]Ctrl + X[/kbd]: Cut +/// +/// - [kbd]Ctrl + V[/kbd] or [kbd]Ctrl + Y[/kbd]: Paste/"yank" +/// +/// - [kbd]Ctrl + Z[/kbd]: Undo +/// +/// - [kbd]Ctrl + ~[/kbd]: Swap input direction. +/// +/// - [kbd]Ctrl + Shift + Z[/kbd]: Redo +/// +/// - [kbd]Ctrl + U[/kbd]: Delete text from the caret position to the beginning of the line +/// +/// - [kbd]Ctrl + K[/kbd]: Delete text from the caret position to the end of the line +/// +/// - [kbd]Ctrl + A[/kbd]: Select all text +/// +/// - [kbd]Up Arrow[/kbd]/[kbd]Down Arrow[/kbd]: Move the caret to the beginning/end of the line +/// +/// On macOS, some extra keyboard shortcuts are available: +/// +/// - [kbd]Cmd + F[/kbd]: Same as [kbd]Right Arrow[/kbd], move the caret one character right +/// +/// - [kbd]Cmd + B[/kbd]: Same as [kbd]Left Arrow[/kbd], move the caret one character left +/// +/// - [kbd]Cmd + P[/kbd]: Same as [kbd]Up Arrow[/kbd], move the caret to the previous line +/// +/// - [kbd]Cmd + N[/kbd]: Same as [kbd]Down Arrow[/kbd], move the caret to the next line +/// +/// - [kbd]Cmd + D[/kbd]: Same as [kbd]Delete[/kbd], delete the character on the right side of caret +/// +/// - [kbd]Cmd + H[/kbd]: Same as [kbd]Backspace[/kbd], delete the character on the left side of the caret +/// +/// - [kbd]Cmd + A[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line +/// +/// - [kbd]Cmd + E[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line +/// +/// - [kbd]Cmd + Left Arrow[/kbd]: Same as [kbd]Home[/kbd], move the caret to the beginning of the line +/// +/// - [kbd]Cmd + Right Arrow[/kbd]: Same as [kbd]End[/kbd], move the caret to the end of the line +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``textChanged`` +/// - ``textChangeRejected`` +/// - ``textSubmitted`` +open class LineEdit: Control { + override open class var godotClassName: StringName { "LineEdit" } + public enum MenuItems: Int64, CaseIterable, CustomDebugStringConvertible { + /// Cuts (copies and clears) the selected text. + case cut = 0 // MENU_CUT + /// Copies the selected text. + case copy = 1 // MENU_COPY + /// Pastes the clipboard text over the selected text (or at the caret's position). + /// + /// Non-printable escape characters are automatically stripped from the OS clipboard via ``GString/stripEscapes()``. + /// + case paste = 2 // MENU_PASTE + /// Erases the whole ``LineEdit`` text. + case clear = 3 // MENU_CLEAR + /// Selects the whole ``LineEdit`` text. + case selectAll = 4 // MENU_SELECT_ALL + /// Undoes the previous action. + case undo = 5 // MENU_UNDO + /// Reverse the last undo action. + case redo = 6 // MENU_REDO + /// ID of "Text Writing Direction" submenu. + case submenuTextDir = 7 // MENU_SUBMENU_TEXT_DIR + /// Sets text direction to inherited. + case dirInherited = 8 // MENU_DIR_INHERITED + /// Sets text direction to automatic. + case dirAuto = 9 // MENU_DIR_AUTO + /// Sets text direction to left-to-right. + case dirLtr = 10 // MENU_DIR_LTR + /// Sets text direction to right-to-left. + case dirRtl = 11 // MENU_DIR_RTL + /// Toggles control character display. + case displayUcc = 12 // MENU_DISPLAY_UCC + /// ID of "Insert Control Character" submenu. + case submenuInsertUcc = 13 // MENU_SUBMENU_INSERT_UCC + /// Inserts left-to-right mark (LRM) character. + case insertLrm = 14 // MENU_INSERT_LRM + /// Inserts right-to-left mark (RLM) character. + case insertRlm = 15 // MENU_INSERT_RLM + /// Inserts start of left-to-right embedding (LRE) character. + case insertLre = 16 // MENU_INSERT_LRE + /// Inserts start of right-to-left embedding (RLE) character. + case insertRle = 17 // MENU_INSERT_RLE + /// Inserts start of left-to-right override (LRO) character. + case insertLro = 18 // MENU_INSERT_LRO + /// Inserts start of right-to-left override (RLO) character. + case insertRlo = 19 // MENU_INSERT_RLO + /// Inserts pop direction formatting (PDF) character. + case insertPdf = 20 // MENU_INSERT_PDF + /// Inserts Arabic letter mark (ALM) character. + case insertAlm = 21 // MENU_INSERT_ALM + /// Inserts left-to-right isolate (LRI) character. + case insertLri = 22 // MENU_INSERT_LRI + /// Inserts right-to-left isolate (RLI) character. + case insertRli = 23 // MENU_INSERT_RLI + /// Inserts first strong isolate (FSI) character. + case insertFsi = 24 // MENU_INSERT_FSI + /// Inserts pop direction isolate (PDI) character. + case insertPdi = 25 // MENU_INSERT_PDI + /// Inserts zero width joiner (ZWJ) character. + case insertZwj = 26 // MENU_INSERT_ZWJ + /// Inserts zero width non-joiner (ZWNJ) character. + case insertZwnj = 27 // MENU_INSERT_ZWNJ + /// Inserts word joiner (WJ) character. + case insertWj = 28 // MENU_INSERT_WJ + /// Inserts soft hyphen (SHY) character. + case insertShy = 29 // MENU_INSERT_SHY + /// Represents the size of the ``LineEdit/MenuItems`` enum. + case max = 30 // MENU_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .cut: return ".cut" + case .copy: return ".copy" + case .paste: return ".paste" + case .clear: return ".clear" + case .selectAll: return ".selectAll" + case .undo: return ".undo" + case .redo: return ".redo" + case .submenuTextDir: return ".submenuTextDir" + case .dirInherited: return ".dirInherited" + case .dirAuto: return ".dirAuto" + case .dirLtr: return ".dirLtr" + case .dirRtl: return ".dirRtl" + case .displayUcc: return ".displayUcc" + case .submenuInsertUcc: return ".submenuInsertUcc" + case .insertLrm: return ".insertLrm" + case .insertRlm: return ".insertRlm" + case .insertLre: return ".insertLre" + case .insertRle: return ".insertRle" + case .insertLro: return ".insertLro" + case .insertRlo: return ".insertRlo" + case .insertPdf: return ".insertPdf" + case .insertAlm: return ".insertAlm" + case .insertLri: return ".insertLri" + case .insertRli: return ".insertRli" + case .insertFsi: return ".insertFsi" + case .insertPdi: return ".insertPdi" + case .insertZwj: return ".insertZwj" + case .insertZwnj: return ".insertZwnj" + case .insertWj: return ".insertWj" + case .insertShy: return ".insertShy" + case .max: return ".max" + } + + } + + } + + public enum VirtualKeyboardType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Default text virtual keyboard. + case `default` = 0 // KEYBOARD_TYPE_DEFAULT + /// Multiline virtual keyboard. + case multiline = 1 // KEYBOARD_TYPE_MULTILINE + /// Virtual number keypad, useful for PIN entry. + case number = 2 // KEYBOARD_TYPE_NUMBER + /// Virtual number keypad, useful for entering fractional numbers. + case numberDecimal = 3 // KEYBOARD_TYPE_NUMBER_DECIMAL + /// Virtual phone number keypad. + case phone = 4 // KEYBOARD_TYPE_PHONE + /// Virtual keyboard with additional keys to assist with typing email addresses. + case emailAddress = 5 // KEYBOARD_TYPE_EMAIL_ADDRESS + /// Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + /// + /// > Note: This is not supported on Web. Instead, this behaves identically to ``VirtualKeyboardType/`default```. + /// + case password = 6 // KEYBOARD_TYPE_PASSWORD + /// Virtual keyboard with additional keys to assist with typing URLs. + case url = 7 // KEYBOARD_TYPE_URL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .multiline: return ".multiline" + case .number: return ".number" + case .numberDecimal: return ".numberDecimal" + case .phone: return ".phone" + case .emailAddress: return ".emailAddress" + case .password: return ".password" + case .url: return ".url" + } + + } + + } + + + /* Properties */ + + /// String value of the ``LineEdit``. + /// + /// > Note: Changing text using this property won't emit the [signal text_changed] signal. + /// + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// Text shown when the ``LineEdit`` is empty. It is **not** the ``LineEdit``'s default value (see ``text``). + final public var placeholderText: String { + get { + return get_placeholder () + } + + set { + set_placeholder (newValue) + } + + } + + /// Text alignment as defined in the ``HorizontalAlignment`` enum. + final public var alignment: HorizontalAlignment { + get { + return get_horizontal_alignment () + } + + set { + set_horizontal_alignment (newValue) + } + + } + + /// Maximum number of characters that can be entered inside the ``LineEdit``. If `0`, there is no limit. + /// + /// When a limit is defined, characters that would exceed ``maxLength`` are truncated. This happens both for existing ``text`` contents when setting the max length, or for new text inserted in the ``LineEdit``, including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. + /// + /// **Example:** + /// + final public var maxLength: Int32 { + get { + return get_max_length () + } + + set { + set_max_length (newValue) + } + + } + + /// If `false`, existing text cannot be modified and new text cannot be added. + final public var editable: Bool { + get { + return is_editable () + } + + set { + set_editable (newValue) + } + + } + + /// If `true`, the ``LineEdit`` width will increase to stay longer than the ``text``. It will **not** compress if the ``text`` is shortened. + final public var expandToTextLength: Bool { + get { + return is_expand_to_text_length_enabled () + } + + set { + set_expand_to_text_length_enabled (newValue) + } + + } + + /// If `true`, the context menu will appear when right-clicked. + final public var contextMenuEnabled: Bool { + get { + return is_context_menu_enabled () + } + + set { + set_context_menu_enabled (newValue) + } + + } + + /// If `true`, the native virtual keyboard is shown when focused on platforms that support it. + final public var virtualKeyboardEnabled: Bool { + get { + return is_virtual_keyboard_enabled () + } + + set { + set_virtual_keyboard_enabled (newValue) + } + + } + + /// Specifies the type of virtual keyboard to show. + final public var virtualKeyboardType: LineEdit.VirtualKeyboardType { + get { + return get_virtual_keyboard_type () + } + + set { + set_virtual_keyboard_type (newValue) + } + + } + + /// If `true`, the ``LineEdit`` will show a clear button if ``text`` is not empty, which can be used to clear the text quickly. + final public var clearButtonEnabled: Bool { + get { + return is_clear_button_enabled () + } + + set { + set_clear_button_enabled (newValue) + } + + } + + /// If `false`, using shortcuts will be disabled. + final public var shortcutKeysEnabled: Bool { + get { + return is_shortcut_keys_enabled () + } + + set { + set_shortcut_keys_enabled (newValue) + } + + } + + /// If `false`, using middle mouse button to paste clipboard will be disabled. + /// + /// > Note: This method is only implemented on Linux. + /// + final public var middleMousePasteEnabled: Bool { + get { + return is_middle_mouse_paste_enabled () + } + + set { + set_middle_mouse_paste_enabled (newValue) + } + + } + + /// If `false`, it's impossible to select the text using mouse nor keyboard. + final public var selectingEnabled: Bool { + get { + return is_selecting_enabled () + } + + set { + set_selecting_enabled (newValue) + } + + } + + /// If `true`, the selected text will be deselected when focus is lost. + final public var deselectOnFocusLossEnabled: Bool { + get { + return is_deselect_on_focus_loss_enabled () + } + + set { + set_deselect_on_focus_loss_enabled (newValue) + } + + } + + /// If `true`, allow drag and drop of selected text. + final public var dragAndDropSelectionEnabled: Bool { + get { + return is_drag_and_drop_selection_enabled () + } + + set { + set_drag_and_drop_selection_enabled (newValue) + } + + } + + /// Sets the icon that will appear in the right end of the ``LineEdit`` if there's no ``text``, or always, if ``clearButtonEnabled`` is set to `false`. + final public var rightIcon: Texture2D? { + get { + return get_right_icon () + } + + set { + set_right_icon (newValue) + } + + } + + /// If `true`, the ``LineEdit`` doesn't display decoration. + final public var flat: Bool { + get { + return is_flat () + } + + set { + set_flat (newValue) + } + + } + + /// If `true`, control characters are displayed. + final public var drawControlChars: Bool { + get { + return get_draw_control_chars () + } + + set { + set_draw_control_chars (newValue) + } + + } + + /// If `true`, the ``LineEdit`` will select the whole text when it gains focus. + final public var selectAllOnFocus: Bool { + get { + return is_select_all_on_focus () + } + + set { + set_select_all_on_focus (newValue) + } + + } + + /// If `true`, makes the caret blink. + final public var caretBlink: Bool { + get { + return is_caret_blink_enabled () + } + + set { + set_caret_blink_enabled (newValue) + } + + } + + /// The interval at which the caret blinks (in seconds). + final public var caretBlinkInterval: Double { + get { + return get_caret_blink_interval () + } + + set { + set_caret_blink_interval (newValue) + } + + } + + /// The caret's column position inside the ``LineEdit``. When set, the text may scroll to accommodate it. + final public var caretColumn: Int32 { + get { + return get_caret_column () + } + + set { + set_caret_column (newValue) + } + + } + + /// If `true`, the ``LineEdit`` will always show the caret, even if focus is lost. + final public var caretForceDisplayed: Bool { + get { + return is_caret_force_displayed () + } + + set { + set_caret_force_displayed (newValue) + } + + } + + /// Allow moving caret, selecting and removing the individual composite character components. + /// + /// > Note: [kbd]Backspace[/kbd] is always removing individual composite character components. + /// + final public var caretMidGrapheme: Bool { + get { + return is_caret_mid_grapheme_enabled () + } + + set { + set_caret_mid_grapheme_enabled (newValue) + } + + } + + /// If `true`, every character is replaced with the secret character (see ``secretCharacter``). + final public var secret: Bool { + get { + return is_secret () + } + + set { + set_secret (newValue) + } + + } + + /// The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead. + final public var secretCharacter: String { + get { + return get_secret_character () + } + + set { + set_secret_character (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /// Set BiDi algorithm override for the structured text. + final public var structuredTextBidiOverride: TextServer.StructuredTextParser { + get { + return get_structured_text_bidi_override () + } + + set { + set_structured_text_bidi_override (newValue) + } + + } + + /// Set additional options for BiDi override. + final public var structuredTextBidiOverrideOptions: GArray { + get { + return get_structured_text_bidi_override_options () + } + + set { + set_structured_text_bidi_override_options (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_horizontal_alignment") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2312603777)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_horizontal_alignment(_ alignment: HorizontalAlignment) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_horizontal_alignment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_horizontal_alignment") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 341400642)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_horizontal_alignment() -> HorizontalAlignment { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LineEdit.method_get_horizontal_alignment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return HorizontalAlignment (rawValue: _result)! + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Erases the ``LineEdit``'s ``text``. + public final func clear() { + gi.object_method_bind_ptrcall(LineEdit.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_select: GDExtensionMethodBindPtr = { + let methodName = StringName("select") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1328111411)! + } + + } + + }() + + /// Selects characters inside ``LineEdit`` between `from` and `to`. By default, `from` is at the beginning and `to` at the end. + /// + public final func select(from: Int32 = 0, to: Int32 = -1) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_select, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_select_all: GDExtensionMethodBindPtr = { + let methodName = StringName("select_all") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Selects the whole ``String``. + public final func selectAll() { + gi.object_method_bind_ptrcall(LineEdit.method_select_all, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_deselect: GDExtensionMethodBindPtr = { + let methodName = StringName("deselect") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the current selection. + public final func deselect() { + gi.object_method_bind_ptrcall(LineEdit.method_deselect, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_has_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("has_selection") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the user has selected text. + public final func hasSelection() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_has_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selected_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_text") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns the text inside the selection. + public final func getSelectedText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LineEdit.method_get_selected_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_selection_from_column: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selection_from_column") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the selection begin column. + public final func getSelectionFromColumn() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LineEdit.method_get_selection_from_column, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selection_to_column: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selection_to_column") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the selection end column. + public final func getSelectionToColumn() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LineEdit.method_get_selection_to_column, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LineEdit.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_draw_control_chars: GDExtensionMethodBindPtr = { + let methodName = StringName("get_draw_control_chars") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_draw_control_chars() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_get_draw_control_chars, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_control_chars: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_control_chars") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_control_chars(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_draw_control_chars, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LineEdit.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LineEdit.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 55961453)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override(_ parser: TextServer.StructuredTextParser) { + withUnsafePointer(to: parser.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385126229)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override() -> TextServer.StructuredTextParser { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LineEdit.method_get_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.StructuredTextParser (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override_options") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override_options(_ args: GArray) { + withUnsafePointer(to: args.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override_options") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override_options() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(LineEdit.method_get_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("set_placeholder") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_placeholder(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_placeholder, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_placeholder") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_placeholder() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LineEdit.method_get_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_caret_column: GDExtensionMethodBindPtr = { + let methodName = StringName("set_caret_column") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_caret_column(_ position: Int32) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_caret_column, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_caret_column: GDExtensionMethodBindPtr = { + let methodName = StringName("get_caret_column") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_caret_column() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LineEdit.method_get_caret_column, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_offset") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the scroll offset due to ``caretColumn``, as a number of characters. + public final func getScrollOffset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LineEdit.method_get_scroll_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_expand_to_text_length_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_expand_to_text_length_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_expand_to_text_length_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_expand_to_text_length_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_expand_to_text_length_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_expand_to_text_length_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_expand_to_text_length_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_expand_to_text_length_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_caret_blink_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_caret_blink_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_caret_blink_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_caret_blink_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_caret_blink_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_caret_blink_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_caret_blink_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_caret_blink_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_caret_mid_grapheme_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_caret_mid_grapheme_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_caret_mid_grapheme_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_caret_mid_grapheme_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_caret_mid_grapheme_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_caret_mid_grapheme_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_caret_mid_grapheme_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_caret_mid_grapheme_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_caret_force_displayed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_caret_force_displayed") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_caret_force_displayed(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_caret_force_displayed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_caret_force_displayed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_caret_force_displayed") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_caret_force_displayed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_caret_force_displayed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_caret_blink_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_caret_blink_interval") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_caret_blink_interval(_ interval: Double) { + withUnsafePointer(to: interval) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_caret_blink_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_caret_blink_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_caret_blink_interval") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_caret_blink_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(LineEdit.method_get_caret_blink_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_length") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_length(_ chars: Int32) { + withUnsafePointer(to: chars) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_max_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_length") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_length() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(LineEdit.method_get_max_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_insert_text_at_caret: GDExtensionMethodBindPtr = { + let methodName = StringName("insert_text_at_caret") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Inserts `text` at the caret. If the resulting value is longer than ``maxLength``, nothing happens. + public final func insertTextAtCaret(text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_insert_text_at_caret, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_delete_char_at_caret: GDExtensionMethodBindPtr = { + let methodName = StringName("delete_char_at_caret") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]). + public final func deleteCharAtCaret() { + gi.object_method_bind_ptrcall(LineEdit.method_delete_char_at_caret, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_delete_text: GDExtensionMethodBindPtr = { + let methodName = StringName("delete_text") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Deletes a section of the ``text`` going from position `fromColumn` to `toColumn`. Both parameters should be within the text's length. + public final func deleteText(fromColumn: Int32, toColumn: Int32) { + withUnsafePointer(to: fromColumn) { pArg0 in + withUnsafePointer(to: toColumn) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_delete_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_editable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editable") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editable(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_editable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editable") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_editable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_secret: GDExtensionMethodBindPtr = { + let methodName = StringName("set_secret") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_secret(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_secret, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_secret: GDExtensionMethodBindPtr = { + let methodName = StringName("is_secret") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_secret() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_secret, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_secret_character: GDExtensionMethodBindPtr = { + let methodName = StringName("set_secret_character") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_secret_character(_ character: String) { + let character = GString(character) + withUnsafePointer(to: character.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_secret_character, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_secret_character: GDExtensionMethodBindPtr = { + let methodName = StringName("get_secret_character") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_secret_character() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LineEdit.method_get_secret_character, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_menu_option: GDExtensionMethodBindPtr = { + let methodName = StringName("menu_option") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Executes a given action as defined in the ``LineEdit/MenuItems`` enum. + public final func menuOption(_ option: Int32) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_menu_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229722558)! + } + + } + + }() + + /// Returns the ``PopupMenu`` of this ``LineEdit``. By default, this menu is displayed when right-clicking on the ``LineEdit``. + /// + /// You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see ``LineEdit/MenuItems``). For example: + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``Window/visible`` property. + /// + public final func getMenu() -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LineEdit.method_get_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_menu_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_menu_visible") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the menu is visible. Use this instead of `get_menu().visible` to improve performance (so the creation of the menu is avoided). + public final func isMenuVisible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_menu_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_context_menu_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_context_menu_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_context_menu_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_context_menu_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_context_menu_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_context_menu_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_context_menu_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_context_menu_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_virtual_keyboard_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_virtual_keyboard_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_virtual_keyboard_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_virtual_keyboard_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_virtual_keyboard_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_virtual_keyboard_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_virtual_keyboard_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_virtual_keyboard_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_virtual_keyboard_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_virtual_keyboard_type") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2696893573)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_virtual_keyboard_type(_ type: LineEdit.VirtualKeyboardType) { + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_virtual_keyboard_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_virtual_keyboard_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_virtual_keyboard_type") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1928699316)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_virtual_keyboard_type() -> LineEdit.VirtualKeyboardType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LineEdit.method_get_virtual_keyboard_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return LineEdit.VirtualKeyboardType (rawValue: _result)! + } + + fileprivate static var method_set_clear_button_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_clear_button_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_clear_button_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_clear_button_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_clear_button_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_clear_button_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_clear_button_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_clear_button_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shortcut_keys_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut_keys_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut_keys_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_shortcut_keys_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shortcut_keys_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shortcut_keys_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shortcut_keys_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_shortcut_keys_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_middle_mouse_paste_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_middle_mouse_paste_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_middle_mouse_paste_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_middle_mouse_paste_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_middle_mouse_paste_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_middle_mouse_paste_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_middle_mouse_paste_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_middle_mouse_paste_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_selecting_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_selecting_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_selecting_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_selecting_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_selecting_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_selecting_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_selecting_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_selecting_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_deselect_on_focus_loss_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_deselect_on_focus_loss_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_deselect_on_focus_loss_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_deselect_on_focus_loss_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_deselect_on_focus_loss_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_deselect_on_focus_loss_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_deselect_on_focus_loss_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_deselect_on_focus_loss_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_and_drop_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_and_drop_selection_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_and_drop_selection_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_drag_and_drop_selection_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drag_and_drop_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drag_and_drop_selection_enabled") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drag_and_drop_selection_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_drag_and_drop_selection_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_right_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_right_icon") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_right_icon(_ icon: Texture2D?) { + withUnsafePointer(to: icon?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_right_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_right_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_right_icon") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 255860311)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_right_icon() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(LineEdit.method_get_right_icon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flat") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flat(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_flat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flat") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flat() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_flat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_select_all_on_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("set_select_all_on_focus") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_select_all_on_focus(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LineEdit.method_set_select_all_on_focus, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_select_all_on_focus: GDExtensionMethodBindPtr = { + let methodName = StringName("is_select_all_on_focus") + return withUnsafePointer(to: &LineEdit.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_select_all_on_focus() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(LineEdit.method_is_select_all_on_focus, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ newText: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the text changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textChanged.connect { newText in + /// print ("caught signal") + /// } + /// ``` + public var textChanged: Signal1 { Signal1 (target: self, signalName: "text_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ rejectedSubstring: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when appending text that overflows the ``maxLength``. The appended text is truncated to fit ``maxLength``, and the part that couldn't fit is passed as the `rejectedSubstring` argument. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textChangeRejected.connect { rejectedSubstring in + /// print ("caught signal") + /// } + /// ``` + public var textChangeRejected: Signal2 { Signal2 (target: self, signalName: "text_change_rejected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ newText: String) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user presses ``Key/enter`` on the ``LineEdit``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textSubmitted.connect { newText in + /// print ("caught signal") + /// } + /// ``` + public var textSubmitted: Signal3 { Signal3 (target: self, signalName: "text_submitted") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/LinkButton.swift b/Sources/SwiftGodot/Generated/Api/LinkButton.swift new file mode 100644 index 000000000..3c01b78c1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/LinkButton.swift @@ -0,0 +1,451 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that represents a link. +/// +/// A button that represents a link. This type of button is primarily used for interactions that cause a context change (like linking to a web page). +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +open class LinkButton: BaseButton { + override open class var godotClassName: StringName { "LinkButton" } + public enum UnderlineMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The LinkButton will always show an underline at the bottom of its text. + case always = 0 // UNDERLINE_MODE_ALWAYS + /// The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. + case onHover = 1 // UNDERLINE_MODE_ON_HOVER + /// The LinkButton will never show an underline at the bottom of its text. + case never = 2 // UNDERLINE_MODE_NEVER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .always: return ".always" + case .onHover: return ".onHover" + case .never: return ".never" + } + + } + + } + + + /* Properties */ + + /// The button's text that will be displayed inside the button's area. + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// The underline mode to use for the text. See ``LinkButton.UnderlineMode`` for the available modes. + final public var underline: LinkButton.UnderlineMode { + get { + return get_underline_mode () + } + + set { + set_underline_mode (newValue) + } + + } + + /// The URI for this ``LinkButton``. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via ``OS/shellOpen(uri:)``). HTTP and HTTPS URLs open the default web browser. + /// + /// **Examples:** + /// + final public var uri: String { + get { + return get_uri () + } + + set { + set_uri (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /// Set BiDi algorithm override for the structured text. + final public var structuredTextBidiOverride: TextServer.StructuredTextParser { + get { + return get_structured_text_bidi_override () + } + + set { + set_structured_text_bidi_override (newValue) + } + + } + + /// Set additional options for BiDi override. + final public var structuredTextBidiOverrideOptions: GArray { + get { + return get_structured_text_bidi_override_options () + } + + set { + set_structured_text_bidi_override_options (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LinkButton.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LinkButton.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LinkButton.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_uri: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uri") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uri(_ uri: String) { + let uri = GString(uri) + withUnsafePointer(to: uri.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_uri, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uri: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uri") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uri() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(LinkButton.method_get_uri, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_underline_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_underline_mode") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4032947085)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_underline_mode(_ underlineMode: LinkButton.UnderlineMode) { + withUnsafePointer(to: underlineMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_underline_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_underline_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_underline_mode") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 568343738)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_underline_mode() -> LinkButton.UnderlineMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LinkButton.method_get_underline_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return LinkButton.UnderlineMode (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 55961453)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override(_ parser: TextServer.StructuredTextParser) { + withUnsafePointer(to: parser.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385126229)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override() -> TextServer.StructuredTextParser { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(LinkButton.method_get_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.StructuredTextParser (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override_options") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override_options(_ args: GArray) { + withUnsafePointer(to: args.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(LinkButton.method_set_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override_options") + return withUnsafePointer(to: &LinkButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override_options() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(LinkButton.method_get_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MainLoop.swift b/Sources/SwiftGodot/Generated/Api/MainLoop.swift new file mode 100644 index 000000000..c38273173 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MainLoop.swift @@ -0,0 +1,242 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for the game's main loop. +/// +/// ``MainLoop`` is the abstract base class for a Godot project's game loop. It is inherited by ``SceneTree``, which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own ``MainLoop`` subclass instead of the scene tree. +/// +/// Upon the application start, a ``MainLoop`` implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a ``SceneTree`` is created) unless a ``MainLoop`` ``Script`` is provided from the command line (with e.g. `godot -s my_loop.gd`) or the "Main Loop Type" project setting is overwritten. +/// +/// Here is an example script implementing a simple ``MainLoop``: +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``onRequestPermissionsResult`` +open class MainLoop: Object { + override open class var godotClassName: StringName { "MainLoop" } + /* Constants */ + /// Notification received from the OS when the application is exceeding its allocated memory. + /// + /// Specific to the iOS platform. + /// + public static let notificationOsMemoryWarning = 2009 + /// Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like ``Object/tr(message:context:)``. + public static let notificationTranslationChanged = 2010 + /// Notification received from the OS when a request for "About" information is sent. + /// + /// Specific to the macOS platform. + /// + public static let notificationWmAbout = 2011 + /// Notification received from Godot's crash handler when the engine is about to crash. + /// + /// Implemented on desktop platforms if the crash handler is enabled. + /// + public static let notificationCrash = 2012 + /// Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + /// + /// Specific to the macOS platform. + /// + public static let notificationOsImeUpdate = 2013 + /// Notification received from the OS when the application is resumed. + /// + /// Specific to the Android and iOS platforms. + /// + public static let notificationApplicationResumed = 2014 + /// Notification received from the OS when the application is paused. + /// + /// Specific to the Android and iOS platforms. + /// + /// > Note: On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. + /// + public static let notificationApplicationPaused = 2015 + /// Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + /// + /// Implemented on desktop and mobile platforms. + /// + public static let notificationApplicationFocusIn = 2016 + /// Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + /// + /// Implemented on desktop and mobile platforms. + /// + public static let notificationApplicationFocusOut = 2017 + /// Notification received when text server is changed. + public static let notificationTextServerChanged = 2018 + /* Methods */ + /// Called once during initialization. + @_documentation(visibility: public) + open func _initialize() { + } + + /// Called each physics frame with the time since the last physics frame as argument (`delta`, in seconds). Equivalent to ``Node/_physicsProcess(delta:)``. + /// + /// If implemented, the method must return a boolean value. `true` ends the main loop, while `false` lets it proceed to the next frame. + /// + @_documentation(visibility: public) + open func _physicsProcess(delta: Double) -> Bool { + return false + } + + /// Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to ``Node/_process(delta:)``. + /// + /// If implemented, the method must return a boolean value. `true` ends the main loop, while `false` lets it proceed to the next frame. + /// + @_documentation(visibility: public) + open func _process(delta: Double) -> Bool { + return false + } + + /// Called before the program exits. + @_documentation(visibility: public) + open func _finalize() { + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_finalize": + return _MainLoop_proxy_finalize + case "_initialize": + return _MainLoop_proxy_initialize + case "_physics_process": + return _MainLoop_proxy_physics_process + case "_process": + return _MainLoop_proxy_process + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ permission: String, _ granted: Bool) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GString (args [0]!)!.description + let arg_1 = Bool (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a user responds to a permission request. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.onRequestPermissionsResult.connect { permission, granted in + /// print ("caught signal") + /// } + /// ``` + public var onRequestPermissionsResult: Signal1 { Signal1 (target: self, signalName: "on_request_permissions_result") } + +} + +// Support methods for proxies +func _MainLoop_proxy_finalize (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._finalize () +} + +func _MainLoop_proxy_initialize (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._initialize () +} + +func _MainLoop_proxy_physics_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._physicsProcess (delta: args [0]!.assumingMemoryBound (to: Double.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _MainLoop_proxy_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._process (delta: args [0]!.assumingMemoryBound (to: Double.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/MarginContainer.swift b/Sources/SwiftGodot/Generated/Api/MarginContainer.swift new file mode 100644 index 000000000..e678fb54a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MarginContainer.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that keeps a margin around its child controls. +/// +/// ``MarginContainer`` adds an adjustable margin on each side of its child controls. The margins are added around all children, not around each individual one. To control the ``MarginContainer``'s margins, use the `margin_*` theme properties listed below. +/// +/// > Note: The margin sizes are theme overrides, not normal properties. This is an example of how to change them in code: +/// +open class MarginContainer: Container { + override open class var godotClassName: StringName { "MarginContainer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Marker2D.swift b/Sources/SwiftGodot/Generated/Api/Marker2D.swift new file mode 100644 index 000000000..553550b66 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Marker2D.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Generic 2D position hint for editing. +/// +/// Generic 2D position hint for editing. It's just like a plain ``Node2D``, but it displays as a cross in the 2D editor at all times. You can set the cross' visual size by using the gizmo in the 2D editor while the node is selected. +open class Marker2D: Node2D { + override open class var godotClassName: StringName { "Marker2D" } + + /* Properties */ + + /// Size of the gizmo cross that appears in the editor. + final public var gizmoExtents: Double { + get { + return get_gizmo_extents () + } + + set { + set_gizmo_extents (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gizmo_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gizmo_extents") + return withUnsafePointer(to: &Marker2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gizmo_extents(_ extents: Double) { + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Marker2D.method_set_gizmo_extents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gizmo_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gizmo_extents") + return withUnsafePointer(to: &Marker2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gizmo_extents() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Marker2D.method_get_gizmo_extents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Marker3D.swift b/Sources/SwiftGodot/Generated/Api/Marker3D.swift new file mode 100644 index 000000000..3050d9358 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Marker3D.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Generic 3D position hint for editing. +/// +/// Generic 3D position hint for editing. It's just like a plain ``Node3D``, but it displays as a cross in the 3D editor at all times. +open class Marker3D: Node3D { + override open class var godotClassName: StringName { "Marker3D" } + + /* Properties */ + + /// Size of the gizmo cross that appears in the editor. + final public var gizmoExtents: Double { + get { + return get_gizmo_extents () + } + + set { + set_gizmo_extents (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_gizmo_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gizmo_extents") + return withUnsafePointer(to: &Marker3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gizmo_extents(_ extents: Double) { + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Marker3D.method_set_gizmo_extents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gizmo_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gizmo_extents") + return withUnsafePointer(to: &Marker3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gizmo_extents() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Marker3D.method_get_gizmo_extents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Marshalls.swift b/Sources/SwiftGodot/Generated/Api/Marshalls.swift new file mode 100644 index 000000000..9847ee9ad --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Marshalls.swift @@ -0,0 +1,216 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Data transformation (marshaling) and encoding helpers. +/// +/// Provides data transformation and encoding utility functions. +open class Marshalls: Object { + /// The shared instance of this class + public static var shared: Marshalls = { + return withUnsafePointer (to: &Marshalls.godotClassName.content) { ptr in + Marshalls (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Marshalls" } + /* Methods */ + fileprivate static var method_variant_to_base64: GDExtensionMethodBindPtr = { + let methodName = StringName("variant_to_base64") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3876248563)! + } + + } + + }() + + /// Returns a Base64-encoded string of the ``Variant`` `variant`. If `fullObjects` is `true`, encoding objects is allowed (and can potentially include code). + /// + /// Internally, this uses the same encoding mechanism as the ``@GlobalScope.var_to_bytes`` method. + /// + public static func variantToBase64(variant: Variant?, fullObjects: Bool = false) -> String { + let _result = GString () + withUnsafePointer(to: variant.content) { pArg0 in + withUnsafePointer(to: fullObjects) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_variant_to_base64, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_base64_to_variant: GDExtensionMethodBindPtr = { + let methodName = StringName("base64_to_variant") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 218087648)! + } + + } + + }() + + /// Returns a decoded ``Variant`` corresponding to the Base64-encoded string `base64Str`. If `allowObjects` is `true`, decoding objects is allowed. + /// + /// Internally, this uses the same decoding mechanism as the ``@GlobalScope.bytes_to_var`` method. + /// + /// > Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + /// + public static func base64ToVariant(base64Str: String, allowObjects: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let base64Str = GString(base64Str) + withUnsafePointer(to: base64Str.content) { pArg0 in + withUnsafePointer(to: allowObjects) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_base64_to_variant, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_raw_to_base64: GDExtensionMethodBindPtr = { + let methodName = StringName("raw_to_base64") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3999417757)! + } + + } + + }() + + /// Returns a Base64-encoded string of a given ``PackedByteArray``. + public static func rawToBase64(array: PackedByteArray) -> String { + let _result = GString () + withUnsafePointer(to: array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_raw_to_base64, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_base64_to_raw: GDExtensionMethodBindPtr = { + let methodName = StringName("base64_to_raw") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659035735)! + } + + } + + }() + + /// Returns a decoded ``PackedByteArray`` corresponding to the Base64-encoded string `base64Str`. + public static func base64ToRaw(base64Str: String) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + let base64Str = GString(base64Str) + withUnsafePointer(to: base64Str.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_base64_to_raw, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_utf8_to_base64: GDExtensionMethodBindPtr = { + let methodName = StringName("utf8_to_base64") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns a Base64-encoded string of the UTF-8 string `utf8Str`. + public static func utf8ToBase64(utf8Str: String) -> String { + let _result = GString () + let utf8Str = GString(utf8Str) + withUnsafePointer(to: utf8Str.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_utf8_to_base64, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_base64_to_utf8: GDExtensionMethodBindPtr = { + let methodName = StringName("base64_to_utf8") + return withUnsafePointer(to: &Marshalls.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1703090593)! + } + + } + + }() + + /// Returns a decoded string corresponding to the Base64-encoded string `base64Str`. + public static func base64ToUtf8(base64Str: String) -> String { + let _result = GString () + let base64Str = GString(base64Str) + withUnsafePointer(to: base64Str.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_base64_to_utf8, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Material.swift b/Sources/SwiftGodot/Generated/Api/Material.swift new file mode 100644 index 000000000..a7c9c4e16 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Material.swift @@ -0,0 +1,267 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Virtual base class for applying visual properties to an object, such as color and roughness. +/// +/// ``Material`` is a base resource used for coloring and shading geometry. All materials inherit from it and almost all ``VisualInstance3D`` derived nodes carry a ``Material``. A few flags and parameters are shared between all material types and are configured here. +/// +/// Importantly, you can inherit from ``Material`` to create your own custom material type in script or in GDExtension. +/// +open class Material: Resource { + override open class var godotClassName: StringName { "Material" } + /* Constants */ + /// Maximum value for the ``renderPriority`` parameter. + public static let renderPriorityMax = 127 + /// Minimum value for the ``renderPriority`` parameter. + public static let renderPriorityMin = -128 + + /* Properties */ + + /// Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with ``renderPriority`` `1` will render before all objects with ``renderPriority`` `0`. + /// + /// > Note: This only applies to ``StandardMaterial3D``s and ``ShaderMaterial``s with type "Spatial". + /// + /// > Note: This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes. + /// + final public var renderPriority: Int32 { + get { + return get_render_priority () + } + + set { + set_render_priority (newValue) + } + + } + + /// Sets the ``Material`` to be used for the next pass. This renders the object again using a different material. + /// + /// > Note: ``nextPass`` materials are not necessarily drawn immediately after the source ``Material``. Draw order is determined by material properties, ``renderPriority``, and distance to camera. + /// + /// > Note: This only applies to ``StandardMaterial3D``s and ``ShaderMaterial``s with type "Spatial". + /// + final public var nextPass: Material? { + get { + return get_next_pass () + } + + set { + set_next_pass (newValue) + } + + } + + /* Methods */ + /// Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the ``Material``'s ``Shader``. + @_documentation(visibility: public) + open func _getShaderRid() -> RID { + return RID () + } + + /// Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. + @_documentation(visibility: public) + open func _getShaderMode() -> Shader.Mode { + return Shader.Mode(rawValue: 0)! + } + + /// Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if ``nextPass`` should be shown in the editor or not. + @_documentation(visibility: public) + open func _canDoNextPass() -> Bool { + return false + } + + /// Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if ``renderPriority`` should be shown in the editor or not. + @_documentation(visibility: public) + open func _canUseRenderPriority() -> Bool { + return false + } + + fileprivate static var method_set_next_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_next_pass") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_next_pass(_ nextPass: Material?) { + withUnsafePointer(to: nextPass?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Material.method_set_next_pass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_next_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_next_pass") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_next_pass() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Material.method_get_next_pass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_render_priority") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_render_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Material.method_set_render_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_priority") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_render_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Material.method_get_render_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_inspect_native_shader_code: GDExtensionMethodBindPtr = { + let methodName = StringName("inspect_native_shader_code") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. + public final func inspectNativeShaderCode() { + gi.object_method_bind_ptrcall(Material.method_inspect_native_shader_code, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("create_placeholder") + return withUnsafePointer(to: &Material.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + /// Creates a placeholder version of this resource (``PlaceholderMaterial``). + public final func createPlaceholder() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Material.method_create_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_can_do_next_pass": + return _Material_proxy_can_do_next_pass + case "_can_use_render_priority": + return _Material_proxy_can_use_render_priority + case "_get_shader_mode": + return _Material_proxy_get_shader_mode + case "_get_shader_rid": + return _Material_proxy_get_shader_rid + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _Material_proxy_can_do_next_pass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canDoNextPass () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _Material_proxy_can_use_render_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._canUseRenderPriority () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _Material_proxy_get_shader_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getShaderMode () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _Material_proxy_get_shader_rid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getShaderRid () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/MenuBar.swift b/Sources/SwiftGodot/Generated/Api/MenuBar.swift new file mode 100644 index 000000000..d10a07852 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MenuBar.swift @@ -0,0 +1,683 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A horizontal menu bar that creates a ``MenuButton`` for each ``PopupMenu`` child. +/// +/// A horizontal menu bar that creates a ``MenuButton`` for each ``PopupMenu`` child. New items are created by adding ``PopupMenu``s to this node. +open class MenuBar: Control { + override open class var godotClassName: StringName { "MenuBar" } + + /* Properties */ + + /// Flat ``MenuBar`` don't display item decoration. + final public var flat: Bool { + get { + return is_flat () + } + + set { + set_flat (newValue) + } + + } + + /// Position in the global menu to insert first ``MenuBar`` item at. + final public var startIndex: Int32 { + get { + return get_start_index () + } + + set { + set_start_index (newValue) + } + + } + + /// If `true`, when the cursor hovers above menu item, it will close the current ``PopupMenu`` and open the other one. + final public var switchOnHover: Bool { + get { + return is_switch_on_hover () + } + + set { + set_switch_on_hover (newValue) + } + + } + + /// If `true`, ``MenuBar`` will use system global menu when supported. + final public var preferGlobalMenu: Bool { + get { + return is_prefer_global_menu () + } + + set { + set_prefer_global_menu (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_switch_on_hover: GDExtensionMethodBindPtr = { + let methodName = StringName("set_switch_on_hover") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_switch_on_hover(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_switch_on_hover, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_switch_on_hover: GDExtensionMethodBindPtr = { + let methodName = StringName("is_switch_on_hover") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_switch_on_hover() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MenuBar.method_is_switch_on_hover, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_shortcuts: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_shortcuts") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true`, shortcuts are disabled and cannot be used to trigger the button. + public final func setDisableShortcuts(disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_disable_shortcuts, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_prefer_global_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_prefer_global_menu") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_prefer_global_menu(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_prefer_global_menu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_prefer_global_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_prefer_global_menu") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_prefer_global_menu() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MenuBar.method_is_prefer_global_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_native_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_native_menu") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true`, if system global menu is supported and used by this ``MenuBar``. + public final func isNativeMenu() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MenuBar.method_is_native_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_menu_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu_count") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns number of menu items. + public final func getMenuCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MenuBar.method_get_menu_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MenuBar.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(MenuBar.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flat") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flat(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_flat, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_flat: GDExtensionMethodBindPtr = { + let methodName = StringName("is_flat") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_flat() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MenuBar.method_is_flat, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_start_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_index") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_index(_ enabled: Int32) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_start_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_index") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MenuBar.method_get_start_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_menu_title: GDExtensionMethodBindPtr = { + let methodName = StringName("set_menu_title") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets menu item title. + public final func setMenuTitle(menu: Int32, title: String) { + withUnsafePointer(to: menu) { pArg0 in + let title = GString(title) + withUnsafePointer(to: title.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_menu_title, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_menu_title: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu_title") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns menu item title. + public final func getMenuTitle(menu: Int32) -> String { + let _result = GString () + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_get_menu_title, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_menu_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_menu_tooltip") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets menu item tooltip. + public final func setMenuTooltip(menu: Int32, tooltip: String) { + withUnsafePointer(to: menu) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_menu_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_menu_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu_tooltip") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns menu item tooltip. + public final func getMenuTooltip(menu: Int32) -> String { + let _result = GString () + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_get_menu_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_menu_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_menu_disabled") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, menu item is disabled. + public final func setMenuDisabled(menu: Int32, disabled: Bool) { + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_menu_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_menu_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_menu_disabled") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true`, if menu item is disabled. + public final func isMenuDisabled(menu: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_is_menu_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_menu_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_menu_hidden") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// If `true`, menu item is hidden. + public final func setMenuHidden(menu: Int32, hidden: Bool) { + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: hidden) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_set_menu_hidden, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_menu_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("is_menu_hidden") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true`, if menu item is hidden. + public final func isMenuHidden(menu: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_is_menu_hidden, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_menu_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu_popup") + return withUnsafePointer(to: &MenuBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2100501353)! + } + + } + + }() + + /// Returns ``PopupMenu`` associated with menu item. + public final func getMenuPopup(menu: Int32) -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: menu) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuBar.method_get_menu_popup, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MenuButton.swift b/Sources/SwiftGodot/Generated/Api/MenuButton.swift new file mode 100644 index 000000000..1f83265d9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MenuButton.swift @@ -0,0 +1,232 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that brings up a ``PopupMenu`` when clicked. +/// +/// A button that brings up a ``PopupMenu`` when clicked. To create new items inside this ``PopupMenu``, use `get_popup().add_item("My Item Name")`. You can also create them directly from Godot editor's inspector. +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``aboutToPopup`` +open class MenuButton: Button { + override open class var godotClassName: StringName { "MenuButton" } + + /* Properties */ + + /// If `true`, when the cursor hovers above another ``MenuButton`` within the same parent which also has ``switchOnHover`` enabled, it will close the current ``MenuButton`` and open the other one. + final public var switchOnHover: Bool { + get { + return is_switch_on_hover () + } + + set { + set_switch_on_hover (newValue) + } + + } + + /// The number of items currently in the list. + final public var itemCount: Int32 { + get { + return get_item_count () + } + + set { + set_item_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("get_popup") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229722558)! + } + + } + + }() + + /// Returns the ``PopupMenu`` contained in this button. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``Window/visible`` property. + /// + public final func getPopup() -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MenuButton.method_get_popup, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_show_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("show_popup") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adjusts popup position and sizing for the ``MenuButton``, then shows the ``PopupMenu``. Prefer this over using `get_popup().popup()`. + public final func showPopup() { + gi.object_method_bind_ptrcall(MenuButton.method_show_popup, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_switch_on_hover: GDExtensionMethodBindPtr = { + let methodName = StringName("set_switch_on_hover") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_switch_on_hover(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuButton.method_set_switch_on_hover, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_switch_on_hover: GDExtensionMethodBindPtr = { + let methodName = StringName("is_switch_on_hover") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_switch_on_hover() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MenuButton.method_is_switch_on_hover, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_shortcuts: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_shortcuts") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true`, shortcuts are disabled and cannot be used to trigger the button. + public final func setDisableShortcuts(disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuButton.method_set_disable_shortcuts, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_count") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MenuButton.method_set_item_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_count") + return withUnsafePointer(to: &MenuButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MenuButton.method_get_item_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the ``PopupMenu`` of this MenuButton is about to show. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.aboutToPopup.connect { + /// print ("caught signal") + /// } + /// ``` + public var aboutToPopup: SimpleSignal { SimpleSignal (target: self, signalName: "about_to_popup") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Mesh.swift b/Sources/SwiftGodot/Generated/Api/Mesh.swift new file mode 100644 index 000000000..b2ac13062 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Mesh.swift @@ -0,0 +1,840 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``Resource`` that contains vertex array-based geometry. +/// +/// Mesh is a type of ``Resource`` that contains vertex array-based geometry, divided in _surfaces_. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. The maximum number of surfaces per mesh is ``RenderingServer/maxMeshSurfaces``. +open class Mesh: Resource { + override open class var godotClassName: StringName { "Mesh" } + public enum PrimitiveType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Render array as points (one vertex equals one point). + case points = 0 // PRIMITIVE_POINTS + /// Render array as lines (every two vertices a line is created). + case lines = 1 // PRIMITIVE_LINES + /// Render array as line strip. + case lineStrip = 2 // PRIMITIVE_LINE_STRIP + /// Render array as triangles (every three vertices a triangle is created). + case triangles = 3 // PRIMITIVE_TRIANGLES + /// Render array as triangle strips. + case triangleStrip = 4 // PRIMITIVE_TRIANGLE_STRIP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .points: return ".points" + case .lines: return ".lines" + case .lineStrip: return ".lineStrip" + case .triangles: return ".triangles" + case .triangleStrip: return ".triangleStrip" + } + + } + + } + + public enum ArrayType: Int64, CaseIterable, CustomDebugStringConvertible { + /// ``PackedVector3Array``, ``PackedVector2Array``, or ``GArray`` of vertex positions. + case vertex = 0 // ARRAY_VERTEX + /// ``PackedVector3Array`` of vertex normals. + case normal = 1 // ARRAY_NORMAL + /// ``PackedFloat32Array`` of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. + case tangent = 2 // ARRAY_TANGENT + /// ``PackedColorArray`` of vertex colors. + case color = 3 // ARRAY_COLOR + /// ``PackedVector2Array`` for UV coordinates. + case texUv = 4 // ARRAY_TEX_UV + /// ``PackedVector2Array`` for second UV coordinates. + case texUv2 = 5 // ARRAY_TEX_UV2 + /// Contains custom color channel 0. ``PackedByteArray`` if `(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is ``ArrayCustomFormat/rgba8Unorm``, ``ArrayCustomFormat/rgba8Snorm``, ``ArrayCustomFormat/rgHalf``, or ``ArrayCustomFormat/rgbaHalf``. ``PackedFloat32Array`` otherwise. + case custom0 = 6 // ARRAY_CUSTOM0 + /// Contains custom color channel 1. ``PackedByteArray`` if `(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is ``ArrayCustomFormat/rgba8Unorm``, ``ArrayCustomFormat/rgba8Snorm``, ``ArrayCustomFormat/rgHalf``, or ``ArrayCustomFormat/rgbaHalf``. ``PackedFloat32Array`` otherwise. + case custom1 = 7 // ARRAY_CUSTOM1 + /// Contains custom color channel 2. ``PackedByteArray`` if `(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is ``ArrayCustomFormat/rgba8Unorm``, ``ArrayCustomFormat/rgba8Snorm``, ``ArrayCustomFormat/rgHalf``, or ``ArrayCustomFormat/rgbaHalf``. ``PackedFloat32Array`` otherwise. + case custom2 = 8 // ARRAY_CUSTOM2 + /// Contains custom color channel 3. ``PackedByteArray`` if `(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is ``ArrayCustomFormat/rgba8Unorm``, ``ArrayCustomFormat/rgba8Snorm``, ``ArrayCustomFormat/rgHalf``, or ``ArrayCustomFormat/rgbaHalf``. ``PackedFloat32Array`` otherwise. + case custom3 = 9 // ARRAY_CUSTOM3 + /// ``PackedFloat32Array`` or ``PackedInt32Array`` of bone indices. Contains either 4 or 8 numbers per vertex depending on the presence of the ``ArrayFormat/flagUse8BoneWeights`` flag. + case bones = 10 // ARRAY_BONES + /// ``PackedFloat32Array`` or ``PackedFloat64Array`` of bone weights in the range `0.0` to `1.0` (inclusive). Contains either 4 or 8 numbers per vertex depending on the presence of the ``ArrayFormat/flagUse8BoneWeights`` flag. + case weights = 11 // ARRAY_WEIGHTS + /// ``PackedInt32Array`` of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the _i_'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + /// + /// For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. + /// + case index = 12 // ARRAY_INDEX + /// Represents the size of the ``Mesh/ArrayType`` enum. + case max = 13 // ARRAY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .vertex: return ".vertex" + case .normal: return ".normal" + case .tangent: return ".tangent" + case .color: return ".color" + case .texUv: return ".texUv" + case .texUv2: return ".texUv2" + case .custom0: return ".custom0" + case .custom1: return ".custom1" + case .custom2: return ".custom2" + case .custom3: return ".custom3" + case .bones: return ".bones" + case .weights: return ".weights" + case .index: return ".index" + case .max: return ".max" + } + + } + + } + + public enum ArrayCustomFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as ``PackedByteArray``. + case rgba8Unorm = 0 // ARRAY_CUSTOM_RGBA8_UNORM + /// Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as ``PackedByteArray``. + case rgba8Snorm = 1 // ARRAY_CUSTOM_RGBA8_SNORM + /// Indicates this custom channel contains half precision float colors, encoded as ``PackedByteArray``. Only red and green channels are used. + case rgHalf = 2 // ARRAY_CUSTOM_RG_HALF + /// Indicates this custom channel contains half precision float colors, encoded as ``PackedByteArray``. + case rgbaHalf = 3 // ARRAY_CUSTOM_RGBA_HALF + /// Indicates this custom channel contains full float colors, in a ``PackedFloat32Array``. Only the red channel is used. + case rFloat = 4 // ARRAY_CUSTOM_R_FLOAT + /// Indicates this custom channel contains full float colors, in a ``PackedFloat32Array``. Only red and green channels are used. + case rgFloat = 5 // ARRAY_CUSTOM_RG_FLOAT + /// Indicates this custom channel contains full float colors, in a ``PackedFloat32Array``. Only red, green and blue channels are used. + case rgbFloat = 6 // ARRAY_CUSTOM_RGB_FLOAT + /// Indicates this custom channel contains full float colors, in a ``PackedFloat32Array``. + case rgbaFloat = 7 // ARRAY_CUSTOM_RGBA_FLOAT + /// Represents the size of the ``Mesh/ArrayCustomFormat`` enum. + case max = 8 // ARRAY_CUSTOM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rgba8Unorm: return ".rgba8Unorm" + case .rgba8Snorm: return ".rgba8Snorm" + case .rgHalf: return ".rgHalf" + case .rgbaHalf: return ".rgbaHalf" + case .rFloat: return ".rFloat" + case .rgFloat: return ".rgFloat" + case .rgbFloat: return ".rgbFloat" + case .rgbaFloat: return ".rgbaFloat" + case .max: return ".max" + } + + } + + } + + public struct ArrayFormat: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Mesh array contains vertices. All meshes require a vertex array so this should always be present. + public static let formatVertex = ArrayFormat (rawValue: 1) + /// Mesh array contains normals. + public static let formatNormal = ArrayFormat (rawValue: 2) + /// Mesh array contains tangents. + public static let formatTangent = ArrayFormat (rawValue: 4) + /// Mesh array contains colors. + public static let formatColor = ArrayFormat (rawValue: 8) + /// Mesh array contains UVs. + public static let formatTexUv = ArrayFormat (rawValue: 16) + /// Mesh array contains second UV. + public static let formatTexUv2 = ArrayFormat (rawValue: 32) + /// Mesh array contains custom channel index 0. + public static let formatCustom0 = ArrayFormat (rawValue: 64) + /// Mesh array contains custom channel index 1. + public static let formatCustom1 = ArrayFormat (rawValue: 128) + /// Mesh array contains custom channel index 2. + public static let formatCustom2 = ArrayFormat (rawValue: 256) + /// Mesh array contains custom channel index 3. + public static let formatCustom3 = ArrayFormat (rawValue: 512) + /// Mesh array contains bones. + public static let formatBones = ArrayFormat (rawValue: 1024) + /// Mesh array contains bone weights. + public static let formatWeights = ArrayFormat (rawValue: 2048) + /// Mesh array uses indices. + public static let formatIndex = ArrayFormat (rawValue: 4096) + /// Mask of mesh channels permitted in blend shapes. + public static let formatBlendShapeMask = ArrayFormat (rawValue: 7) + /// Shift of first custom channel. + public static let formatCustomBase = ArrayFormat (rawValue: 13) + /// Number of format bits per custom channel. See ``Mesh/ArrayCustomFormat``. + public static let formatCustomBits = ArrayFormat (rawValue: 3) + /// Amount to shift ``Mesh/ArrayCustomFormat`` for custom channel index 0. + public static let formatCustom0Shift = ArrayFormat (rawValue: 13) + /// Amount to shift ``Mesh/ArrayCustomFormat`` for custom channel index 1. + public static let formatCustom1Shift = ArrayFormat (rawValue: 16) + /// Amount to shift ``Mesh/ArrayCustomFormat`` for custom channel index 2. + public static let formatCustom2Shift = ArrayFormat (rawValue: 19) + /// Amount to shift ``Mesh/ArrayCustomFormat`` for custom channel index 3. + public static let formatCustom3Shift = ArrayFormat (rawValue: 22) + /// Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See ``Mesh/ArrayCustomFormat``. + public static let formatCustomMask = ArrayFormat (rawValue: 7) + /// Shift of first compress flag. Compress flags should be passed to ``ArrayMesh/addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)`` and ``SurfaceTool/commit(existing:flags:)``. + public static let compressFlagsBase = ArrayFormat (rawValue: 25) + /// Flag used to mark that the array contains 2D vertices. + public static let flagUse2dVertices = ArrayFormat (rawValue: 33554432) + /// Flag indices that the mesh data will use `GL_DYNAMIC_DRAW` on GLES. Unused on Vulkan. + public static let flagUseDynamicUpdate = ArrayFormat (rawValue: 67108864) + /// Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that ``ArrayType/bones`` and ``ArrayType/weights`` elements will have double length. + public static let flagUse8BoneWeights = ArrayFormat (rawValue: 134217728) + /// Flag used to mark that the mesh intentionally contains no vertex array. + public static let flagUsesEmptyVertexArray = ArrayFormat (rawValue: 268435456) + /// Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. + public static let flagCompressAttributes = ArrayFormat (rawValue: 536870912) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.formatVertex) { result += "formatVertex, " } + if self.contains (.formatNormal) { result += "formatNormal, " } + if self.contains (.formatTangent) { result += "formatTangent, " } + if self.contains (.formatColor) { result += "formatColor, " } + if self.contains (.formatTexUv) { result += "formatTexUv, " } + if self.contains (.formatTexUv2) { result += "formatTexUv2, " } + if self.contains (.formatCustom0) { result += "formatCustom0, " } + if self.contains (.formatCustom1) { result += "formatCustom1, " } + if self.contains (.formatCustom2) { result += "formatCustom2, " } + if self.contains (.formatCustom3) { result += "formatCustom3, " } + if self.contains (.formatBones) { result += "formatBones, " } + if self.contains (.formatWeights) { result += "formatWeights, " } + if self.contains (.formatIndex) { result += "formatIndex, " } + if self.contains (.formatBlendShapeMask) { result += "formatBlendShapeMask, " } + if self.contains (.formatCustomBase) { result += "formatCustomBase, " } + if self.contains (.formatCustomBits) { result += "formatCustomBits, " } + if self.contains (.formatCustom0Shift) { result += "formatCustom0Shift, " } + if self.contains (.formatCustom1Shift) { result += "formatCustom1Shift, " } + if self.contains (.formatCustom2Shift) { result += "formatCustom2Shift, " } + if self.contains (.formatCustom3Shift) { result += "formatCustom3Shift, " } + if self.contains (.formatCustomMask) { result += "formatCustomMask, " } + if self.contains (.compressFlagsBase) { result += "compressFlagsBase, " } + if self.contains (.flagUse2dVertices) { result += "flagUse2dVertices, " } + if self.contains (.flagUseDynamicUpdate) { result += "flagUseDynamicUpdate, " } + if self.contains (.flagUse8BoneWeights) { result += "flagUse8BoneWeights, " } + if self.contains (.flagUsesEmptyVertexArray) { result += "flagUsesEmptyVertexArray, " } + if self.contains (.flagCompressAttributes) { result += "flagCompressAttributes, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum BlendShapeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Blend shapes are normalized. + case normalized = 0 // BLEND_SHAPE_MODE_NORMALIZED + /// Blend shapes are relative to base weight. + case relative = 1 // BLEND_SHAPE_MODE_RELATIVE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .normalized: return ".normalized" + case .relative: return ".relative" + } + + } + + } + + + /* Properties */ + + /// Sets a hint to be used for lightmap resolution. + final public var lightmapSizeHint: Vector2i { + get { + return get_lightmap_size_hint () + } + + set { + set_lightmap_size_hint (newValue) + } + + } + + /* Methods */ + /// Virtual method to override the surface count for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _getSurfaceCount() -> Int32 { + return 0 + } + + /// Virtual method to override the surface array length for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetArrayLen(index: Int32) -> Int32 { + return 0 + } + + /// Virtual method to override the surface array index length for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetArrayIndexLen(index: Int32) -> Int32 { + return 0 + } + + /// Virtual method to override the surface arrays for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetArrays(index: Int32) -> GArray { + return GArray () + } + + /// Virtual method to override the blend shape arrays for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetBlendShapeArrays(index: Int32) -> VariantCollection { + return VariantCollection() + } + + /// Virtual method to override the surface LODs for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetLods(index: Int32) -> GDictionary { + return GDictionary () + } + + /// Virtual method to override the surface format for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetFormat(index: Int32) -> UInt32 { + return 0 + } + + /// Virtual method to override the surface primitive type for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetPrimitiveType(index: Int32) -> UInt32 { + return 0 + } + + /// Virtual method to override the setting of a `material` at the given `index` for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceSetMaterial(index: Int32, material: Material?) { + } + + /// Virtual method to override the surface material for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _surfaceGetMaterial(index: Int32) -> Material? { + return Material () + } + + /// Virtual method to override the number of blend shapes for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _getBlendShapeCount() -> Int32 { + return 0 + } + + /// Virtual method to override the retrieval of blend shape names for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _getBlendShapeName(index: Int32) -> StringName { + return StringName () + } + + /// Virtual method to override the names of blend shapes for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _setBlendShapeName(index: Int32, name: StringName) { + } + + /// Virtual method to override the ``AABB`` for a custom class extending ``Mesh``. + @_documentation(visibility: public) + open func _getAabb() -> AABB { + return AABB () + } + + fileprivate static var method_set_lightmap_size_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lightmap_size_hint") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lightmap_size_hint(_ size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_set_lightmap_size_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lightmap_size_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lightmap_size_hint") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lightmap_size_hint() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(Mesh.method_get_lightmap_size_hint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_aabb") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + /// Returns the smallest ``AABB`` enclosing this mesh in local space. Not affected by `custom_aabb`. + /// + /// > Note: This is only implemented for ``ArrayMesh`` and ``PrimitiveMesh``. + /// + public final func getAabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(Mesh.method_get_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_faces") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + /// Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. + public final func getFaces() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(Mesh.method_get_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_surface_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_count") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of surfaces that the ``Mesh`` holds. This is equivalent to ``MeshInstance3D/getSurfaceOverrideMaterialCount()``. + public final func getSurfaceCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Mesh.method_get_surface_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_surface_get_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_arrays") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see ``ArrayMesh/addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)``). + public final func surfaceGetArrays(surfIdx: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_surface_get_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_surface_get_blend_shape_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_blend_shape_arrays") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns the blend shape arrays for the requested surface. + public final func surfaceGetBlendShapeArrays(surfIdx: Int32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_surface_get_blend_shape_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_surface_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_set_material") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3671737478)! + } + + } + + }() + + /// Sets a ``Material`` for a given surface. Surface will be rendered using this material. + /// + /// > Note: This assigns the material within the ``Mesh`` resource, not the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties. To set the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties, use ``MeshInstance3D/setSurfaceOverrideMaterial(surface:material:)`` instead. + /// + public final func surfaceSetMaterial(surfIdx: Int32, material: Material?) { + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_surface_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_surface_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("surface_get_material") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2897466400)! + } + + } + + }() + + /// Returns a ``Material`` in a given surface. Surface is rendered using this material. + /// + /// > Note: This returns the material within the ``Mesh`` resource, not the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties. To get the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties, use ``MeshInstance3D/getSurfaceOverrideMaterial(surface:)`` instead. + /// + public final func surfaceGetMaterial(surfIdx: Int32) -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: surfIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_surface_get_material, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("create_placeholder") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + /// Creates a placeholder version of this resource (``PlaceholderMesh``). + public final func createPlaceholder() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Mesh.method_create_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_trimesh_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("create_trimesh_shape") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4160111210)! + } + + } + + }() + + /// Calculate a ``ConcavePolygonShape3D`` from the mesh. + public final func createTrimeshShape() -> ConcavePolygonShape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Mesh.method_create_trimesh_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_convex_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("create_convex_shape") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2529984628)! + } + + } + + }() + + /// Calculate a ``ConvexPolygonShape3D`` from the mesh. + /// + /// If `clean` is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed. + /// + /// If `simplify` is `true`, the geometry can be further simplified to reduce the number of vertices. Disabled by default. + /// + public final func createConvexShape(clean: Bool = true, simplify: Bool = false) -> ConvexPolygonShape3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: clean) { pArg0 in + withUnsafePointer(to: simplify) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_create_convex_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("create_outline") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1208642001)! + } + + } + + }() + + /// Calculate an outline mesh at a defined offset (margin) from the original mesh. + /// + /// > Note: This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). + /// + public final func createOutline(margin: Double) -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Mesh.method_create_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_generate_triangle_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_triangle_mesh") + return withUnsafePointer(to: &Mesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3476533166)! + } + + } + + }() + + /// Generate a ``TriangleMesh`` from the mesh. Considers only surfaces using one of these primitive types: ``PrimitiveType/triangles``, ``PrimitiveType/triangleStrip``. + public final func generateTriangleMesh() -> TriangleMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Mesh.method_generate_triangle_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_aabb": + return _Mesh_proxy_get_aabb + case "_get_blend_shape_count": + return _Mesh_proxy_get_blend_shape_count + case "_get_blend_shape_name": + return _Mesh_proxy_get_blend_shape_name + case "_get_surface_count": + return _Mesh_proxy_get_surface_count + case "_set_blend_shape_name": + return _Mesh_proxy_set_blend_shape_name + case "_surface_get_array_index_len": + return _Mesh_proxy_surface_get_array_index_len + case "_surface_get_array_len": + return _Mesh_proxy_surface_get_array_len + case "_surface_get_arrays": + return _Mesh_proxy_surface_get_arrays + case "_surface_get_blend_shape_arrays": + return _Mesh_proxy_surface_get_blend_shape_arrays + case "_surface_get_format": + return _Mesh_proxy_surface_get_format + case "_surface_get_lods": + return _Mesh_proxy_surface_get_lods + case "_surface_get_material": + return _Mesh_proxy_surface_get_material + case "_surface_get_primitive_type": + return _Mesh_proxy_surface_get_primitive_type + case "_surface_set_material": + return _Mesh_proxy_surface_set_material + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _Mesh_proxy_get_aabb (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAabb () + retPtr!.storeBytes (of: ret, as: AABB.self) +} + +func _Mesh_proxy_get_blend_shape_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBlendShapeCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _Mesh_proxy_get_blend_shape_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getBlendShapeName (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // StringName + ret.content = StringName.zero +} + +func _Mesh_proxy_get_surface_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSurfaceCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _Mesh_proxy_set_blend_shape_name (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setBlendShapeName (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee, name: StringName (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _Mesh_proxy_surface_get_array_index_len (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetArrayIndexLen (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _Mesh_proxy_surface_get_array_len (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetArrayLen (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _Mesh_proxy_surface_get_arrays (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetArrays (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Array + ret.content = GArray.zero +} + +func _Mesh_proxy_surface_get_blend_shape_arrays (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetBlendShapeArrays (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Array +} + +func _Mesh_proxy_surface_get_format (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetFormat (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _Mesh_proxy_surface_get_lods (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetLods (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _Mesh_proxy_surface_get_material (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetMaterial (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Material +} + +func _Mesh_proxy_surface_get_primitive_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._surfaceGetPrimitiveType (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _Mesh_proxy_surface_set_material (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + swiftObject._surfaceSetMaterial (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee, material: lookupLiveObject (handleAddress: resolved_1) as? Material ?? lookupObject (nativeHandle: resolved_1)!) +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshConvexDecompositionSettings.swift b/Sources/SwiftGodot/Generated/Api/MeshConvexDecompositionSettings.swift new file mode 100644 index 000000000..a8a2e0104 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshConvexDecompositionSettings.swift @@ -0,0 +1,775 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Parameters to be used with a ``Mesh`` convex decomposition operation. +/// +/// Parameters to be used with a ``Mesh`` convex decomposition operation. +open class MeshConvexDecompositionSettings: RefCounted { + override open class var godotClassName: StringName { "MeshConvexDecompositionSettings" } + public enum Mode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant for voxel-based approximate convex decomposition. + case voxel = 0 // CONVEX_DECOMPOSITION_MODE_VOXEL + /// Constant for tetrahedron-based approximate convex decomposition. + case tetrahedron = 1 // CONVEX_DECOMPOSITION_MODE_TETRAHEDRON + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .voxel: return ".voxel" + case .tetrahedron: return ".tetrahedron" + } + + } + + } + + + /* Properties */ + + /// Maximum concavity. Ranges from `0.0` to `1.0`. + final public var maxConcavity: Double { + get { + return get_max_concavity () + } + + set { + set_max_concavity (newValue) + } + + } + + /// Controls the bias toward clipping along symmetry planes. Ranges from `0.0` to `1.0`. + final public var symmetryPlanesClippingBias: Double { + get { + return get_symmetry_planes_clipping_bias () + } + + set { + set_symmetry_planes_clipping_bias (newValue) + } + + } + + /// Controls the bias toward clipping along revolution axes. Ranges from `0.0` to `1.0`. + final public var revolutionAxesClippingBias: Double { + get { + return get_revolution_axes_clipping_bias () + } + + set { + set_revolution_axes_clipping_bias (newValue) + } + + } + + /// Controls the adaptive sampling of the generated convex-hulls. Ranges from `0.0` to `0.01`. + final public var minVolumePerConvexHull: Double { + get { + return get_min_volume_per_convex_hull () + } + + set { + set_min_volume_per_convex_hull (newValue) + } + + } + + /// Maximum number of voxels generated during the voxelization stage. + final public var resolution: UInt32 { + get { + return get_resolution () + } + + set { + set_resolution (newValue) + } + + } + + /// Controls the maximum number of triangles per convex-hull. Ranges from `4` to `1024`. + final public var maxNumVerticesPerConvexHull: UInt32 { + get { + return get_max_num_vertices_per_convex_hull () + } + + set { + set_max_num_vertices_per_convex_hull (newValue) + } + + } + + /// Controls the granularity of the search for the "best" clipping plane. Ranges from `1` to `16`. + final public var planeDownsampling: UInt32 { + get { + return get_plane_downsampling () + } + + set { + set_plane_downsampling (newValue) + } + + } + + /// Controls the precision of the convex-hull generation process during the clipping plane selection stage. Ranges from `1` to `16`. + final public var convexHullDownsampling: UInt32 { + get { + return get_convex_hull_downsampling () + } + + set { + set_convex_hull_downsampling (newValue) + } + + } + + /// If `true`, normalizes the mesh before applying the convex decomposition. + final public var normalizeMesh: Bool { + get { + return get_normalize_mesh () + } + + set { + set_normalize_mesh (newValue) + } + + } + + /// Mode for the approximate convex decomposition. + final public var mode: MeshConvexDecompositionSettings.Mode { + get { + return get_mode () + } + + set { + set_mode (newValue) + } + + } + + /// If `true`, uses approximation for computing convex hulls. + final public var convexHullApproximation: Bool { + get { + return get_convex_hull_approximation () + } + + set { + set_convex_hull_approximation (newValue) + } + + } + + /// The maximum number of convex hulls to produce from the merge operation. + final public var maxConvexHulls: UInt32 { + get { + return get_max_convex_hulls () + } + + set { + set_max_convex_hulls (newValue) + } + + } + + /// If `true`, projects output convex hull vertices onto the original source mesh to increase floating-point accuracy of the results. + final public var projectHullVertices: Bool { + get { + return get_project_hull_vertices () + } + + set { + set_project_hull_vertices (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_max_concavity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_concavity") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_concavity(_ maxConcavity: Double) { + withUnsafePointer(to: maxConcavity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_max_concavity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_concavity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_concavity") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_concavity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_max_concavity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_symmetry_planes_clipping_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_symmetry_planes_clipping_bias") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_symmetry_planes_clipping_bias(_ symmetryPlanesClippingBias: Double) { + withUnsafePointer(to: symmetryPlanesClippingBias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_symmetry_planes_clipping_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_symmetry_planes_clipping_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_symmetry_planes_clipping_bias") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_symmetry_planes_clipping_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_symmetry_planes_clipping_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_revolution_axes_clipping_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_revolution_axes_clipping_bias") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_revolution_axes_clipping_bias(_ revolutionAxesClippingBias: Double) { + withUnsafePointer(to: revolutionAxesClippingBias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_revolution_axes_clipping_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_revolution_axes_clipping_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_revolution_axes_clipping_bias") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_revolution_axes_clipping_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_revolution_axes_clipping_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_volume_per_convex_hull: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_volume_per_convex_hull") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_volume_per_convex_hull(_ minVolumePerConvexHull: Double) { + withUnsafePointer(to: minVolumePerConvexHull) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_min_volume_per_convex_hull, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_volume_per_convex_hull: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_volume_per_convex_hull") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_volume_per_convex_hull() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_min_volume_per_convex_hull, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resolution") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resolution(_ minVolumePerConvexHull: UInt32) { + withUnsafePointer(to: minVolumePerConvexHull) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_resolution, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolution") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_resolution() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_resolution, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_num_vertices_per_convex_hull: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_num_vertices_per_convex_hull") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_num_vertices_per_convex_hull(_ maxNumVerticesPerConvexHull: UInt32) { + withUnsafePointer(to: maxNumVerticesPerConvexHull) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_max_num_vertices_per_convex_hull, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_num_vertices_per_convex_hull: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_num_vertices_per_convex_hull") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_num_vertices_per_convex_hull() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_max_num_vertices_per_convex_hull, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_plane_downsampling: GDExtensionMethodBindPtr = { + let methodName = StringName("set_plane_downsampling") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_plane_downsampling(_ planeDownsampling: UInt32) { + withUnsafePointer(to: planeDownsampling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_plane_downsampling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_plane_downsampling: GDExtensionMethodBindPtr = { + let methodName = StringName("get_plane_downsampling") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_plane_downsampling() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_plane_downsampling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_convex_hull_downsampling: GDExtensionMethodBindPtr = { + let methodName = StringName("set_convex_hull_downsampling") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_convex_hull_downsampling(_ convexHullDownsampling: UInt32) { + withUnsafePointer(to: convexHullDownsampling) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_convex_hull_downsampling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_convex_hull_downsampling: GDExtensionMethodBindPtr = { + let methodName = StringName("get_convex_hull_downsampling") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_convex_hull_downsampling() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_convex_hull_downsampling, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normalize_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normalize_mesh") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normalize_mesh(_ normalizeMesh: Bool) { + withUnsafePointer(to: normalizeMesh) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_normalize_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_normalize_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_normalize_mesh") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_normalize_mesh() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_normalize_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mode") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1668072869)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mode(_ mode: MeshConvexDecompositionSettings.Mode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mode") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 23479454)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mode() -> MeshConvexDecompositionSettings.Mode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MeshConvexDecompositionSettings.Mode (rawValue: _result)! + } + + fileprivate static var method_set_convex_hull_approximation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_convex_hull_approximation") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_convex_hull_approximation(_ convexHullApproximation: Bool) { + withUnsafePointer(to: convexHullApproximation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_convex_hull_approximation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_convex_hull_approximation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_convex_hull_approximation") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_convex_hull_approximation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_convex_hull_approximation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_convex_hulls: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_convex_hulls") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_convex_hulls(_ maxConvexHulls: UInt32) { + withUnsafePointer(to: maxConvexHulls) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_max_convex_hulls, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_convex_hulls: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_convex_hulls") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_convex_hulls() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_max_convex_hulls, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_project_hull_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_project_hull_vertices") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_project_hull_vertices(_ projectHullVertices: Bool) { + withUnsafePointer(to: projectHullVertices) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_set_project_hull_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_project_hull_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_project_hull_vertices") + return withUnsafePointer(to: &MeshConvexDecompositionSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_project_hull_vertices() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MeshConvexDecompositionSettings.method_get_project_hull_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshDataTool.swift b/Sources/SwiftGodot/Generated/Api/MeshDataTool.swift new file mode 100644 index 000000000..18131b835 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshDataTool.swift @@ -0,0 +1,1058 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Helper tool to access and edit ``Mesh`` data. +/// +/// MeshDataTool provides access to individual vertices in a ``Mesh``. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. +/// +/// To use MeshDataTool, load a mesh with ``createFromSurface(mesh:surface:)``. When you are finished editing the data commit the data to a mesh with ``commitToSurface(mesh:compressionFlags:)``. +/// +/// Below is an example of how MeshDataTool may be used. +/// +/// See also ``ArrayMesh``, ``ImmediateMesh`` and ``SurfaceTool`` for procedural geometry generation. +/// +/// > Note: Godot uses clockwise winding order for front faces of triangle primitive modes. +/// +open class MeshDataTool: RefCounted { + override open class var godotClassName: StringName { "MeshDataTool" } + /* Methods */ + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all data currently in MeshDataTool. + public final func clear() { + gi.object_method_bind_ptrcall(MeshDataTool.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create_from_surface: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_surface") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2727020678)! + } + + } + + }() + + /// Uses specified surface of given ``Mesh`` to populate data for MeshDataTool. + /// + /// Requires ``Mesh`` with primitive type ``Mesh/PrimitiveType/triangles``. + /// + public final func createFromSurface(mesh: ArrayMesh?, surface: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_create_from_surface, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_commit_to_surface: GDExtensionMethodBindPtr = { + let methodName = StringName("commit_to_surface") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2021686445)! + } + + } + + }() + + /// Adds a new surface to specified ``Mesh`` with edited data. + public final func commitToSurface(mesh: ArrayMesh?, compressionFlags: UInt = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: compressionFlags) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_commit_to_surface, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ``Mesh``'s format as a combination of the ``Mesh.ArrayFormat`` flags. For example, a mesh containing both vertices and normals would return a format of `3` because ``Mesh/ArrayFormat/formatVertex`` is `1` and ``Mesh/ArrayFormat/formatNormal`` is `2`. + public final func getFormat() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(MeshDataTool.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_vertex_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_count") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of vertices in ``Mesh``. + public final func getVertexCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_edge_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_count") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of edges in this ``Mesh``. + public final func getEdgeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshDataTool.method_get_edge_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_face_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_count") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of faces in this ``Mesh``. + public final func getFaceCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshDataTool.method_get_face_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the position of the given vertex. + public final func setVertex(idx: Int32, vertex: Vector3) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: vertex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the given vertex. + public final func getVertex(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_normal") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the normal of the given vertex. + public final func setVertexNormal(idx: Int32, normal: Vector3) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: normal) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_normal") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the normal of the given vertex. + public final func getVertexNormal(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_tangent") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1104099133)! + } + + } + + }() + + /// Sets the tangent of the given vertex. + public final func setVertexTangent(idx: Int32, tangent: Plane) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: tangent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_tangent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_tangent") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1372055458)! + } + + } + + }() + + /// Returns the tangent of the given vertex. + public final func getVertexTangent(idx: Int32) -> Plane { + var _result: Plane = Plane () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_tangent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_uv") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the UV of the given vertex. + public final func setVertexUv(idx: Int32, uv: Vector2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: uv) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_uv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_uv") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the UV of the given vertex. + public final func getVertexUv(idx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_uv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_uv2") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 163021252)! + } + + } + + }() + + /// Sets the UV2 of the given vertex. + public final func setVertexUv2(idx: Int32, uv2: Vector2) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: uv2) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_uv2, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_uv2") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the UV2 of the given vertex. + public final func getVertexUv2(idx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_uv2, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_color") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the color of the given vertex. + public final func setVertexColor(idx: Int32, color: Color) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_color") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the color of the given vertex. + public final func getVertexColor(idx: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_bones: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_bones") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3500328261)! + } + + } + + }() + + /// Sets the bones of the given vertex. + public final func setVertexBones(idx: Int32, bones: PackedInt32Array) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: bones.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_bones, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_bones: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_bones") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706082319)! + } + + } + + }() + + /// Returns the bones of the given vertex. + public final func getVertexBones(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_bones, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_weights") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1345852415)! + } + + } + + }() + + /// Sets the bone weights of the given vertex. + public final func setVertexWeights(idx: Int32, weights: PackedFloat32Array) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: weights.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_weights, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_weights") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1542882410)! + } + + } + + }() + + /// Returns bone weights of the given vertex. + public final func getVertexWeights(idx: Int32) -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_weights, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_vertex_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets the metadata associated with the given vertex. + public final func setVertexMeta(idx: Int32, meta: Variant?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: meta.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_vertex_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_vertex_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Returns the metadata associated with the given vertex. + public final func getVertexMeta(idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_vertex_edges: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_edges") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706082319)! + } + + } + + }() + + /// Returns an array of edges that share the given vertex. + public final func getVertexEdges(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_edges, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_vertex_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_faces") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706082319)! + } + + } + + }() + + /// Returns an array of faces that share the given vertex. + public final func getVertexFaces(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_vertex_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_edge_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_vertex") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns index of specified vertex connected to given edge. + /// + /// Vertex argument can only be 0 or 1 because edges are comprised of two vertices. + /// + public final func getEdgeVertex(idx: Int32, vertex: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: vertex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_edge_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_edge_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_faces") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706082319)! + } + + } + + }() + + /// Returns array of faces that touch given edge. + public final func getEdgeFaces(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_edge_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_edge_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edge_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets the metadata of the given edge. + public final func setEdgeMeta(idx: Int32, meta: Variant?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: meta.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_edge_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_edge_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Returns meta information assigned to given edge. + public final func getEdgeMeta(idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_edge_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_face_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_vertex") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns the specified vertex index of the given face. + /// + /// Vertex argument must be either 0, 1, or 2 because faces contain three vertices. + /// + /// **Example:** + /// + public final func getFaceVertex(idx: Int32, vertex: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: vertex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_face_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_face_edge: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_edge") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175239445)! + } + + } + + }() + + /// Returns specified edge associated with given face. + /// + /// Edge argument must be either 0, 1, or 2 because a face only has three edges. + /// + public final func getFaceEdge(idx: Int32, edge: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: edge) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_face_edge, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_face_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_face_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets the metadata of the given face. + public final func setFaceMeta(idx: Int32, meta: Variant?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: meta.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_face_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_face_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_meta") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Returns the metadata associated with the given face. + public final func getFaceMeta(idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_face_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_face_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_face_normal") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Calculates and returns the face normal of the given face. + public final func getFaceNormal(idx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_get_face_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + /// Sets the material to be used by newly-constructed ``Mesh``. + public final func setMaterial(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshDataTool.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &MeshDataTool.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + /// Returns the material assigned to the ``Mesh``. + public final func getMaterial() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshDataTool.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshInstance2D.swift b/Sources/SwiftGodot/Generated/Api/MeshInstance2D.swift new file mode 100644 index 000000000..5217d42d3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshInstance2D.swift @@ -0,0 +1,165 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node used for displaying a ``Mesh`` in 2D. +/// +/// Node used for displaying a ``Mesh`` in 2D. A ``MeshInstance2D`` can be automatically created from an existing ``Sprite2D`` via a tool in the editor toolbar. Select the ``Sprite2D`` node, then choose **Sprite2D > Convert to MeshInstance2D** at the top of the 2D editor viewport. +/// +/// +/// This object emits the following signals: +/// +/// - ``textureChanged`` +open class MeshInstance2D: Node2D { + override open class var godotClassName: StringName { "MeshInstance2D" } + + /* Properties */ + + /// The ``Mesh`` that will be drawn by the ``MeshInstance2D``. + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// The ``Texture2D`` that will be used if using the default ``CanvasItemMaterial``. Can be accessed as `TEXTURE` in CanvasItem shader. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &MeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance2D.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &MeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808005922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshInstance2D.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &MeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &MeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshInstance2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Emitted when the ``texture`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textureChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var textureChanged: SimpleSignal { SimpleSignal (target: self, signalName: "texture_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshInstance3D.swift b/Sources/SwiftGodot/Generated/Api/MeshInstance3D.swift new file mode 100644 index 000000000..2d9376e75 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshInstance3D.swift @@ -0,0 +1,552 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node that instances meshes into a scenario. +/// +/// MeshInstance3D is a node that takes a ``Mesh`` resource and adds it to the current scenario by creating an instance of it. This is the class most often used render 3D geometry and can be used to instance a single ``Mesh`` in many places. This allows reusing geometry, which can save on resources. When a ``Mesh`` has to be instantiated more than thousands of times at close proximity, consider using a ``MultiMesh`` in a ``MultiMeshInstance3D`` instead. +open class MeshInstance3D: GeometryInstance3D { + override open class var godotClassName: StringName { "MeshInstance3D" } + + /* Properties */ + + /// The ``Mesh`` resource for the instance. + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// The ``Skin`` to be used by this instance. + final public var skin: Skin? { + get { + return get_skin () + } + + set { + set_skin (newValue) + } + + } + + /// ``NodePath`` to the ``Skeleton3D`` associated with the instance. + final public var skeleton: NodePath { + get { + return get_skeleton_path () + } + + set { + set_skeleton_path (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808005922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_skeleton_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton_path") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton_path(_ skeletonPath: NodePath) { + withUnsafePointer(to: skeletonPath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_set_skeleton_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton_path") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 277076166)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_skeleton_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skin") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3971435618)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skin(_ skin: Skin?) { + withUnsafePointer(to: skin?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_set_skin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2074563878)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skin() -> Skin? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_skin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_skin_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skin_reference") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2060603409)! + } + + } + + }() + + /// Returns the internal ``SkinReference`` containing the skeleton's ``RID`` attached to this RID. See also ``Resource/getRid()``, ``SkinReference/getSkeleton()``, and ``RenderingServer/instanceAttachSkeleton(instance:skeleton:)``. + public final func getSkinReference() -> SkinReference? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_skin_reference, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_surface_override_material_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_override_material_count") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of surface override materials. This is equivalent to ``Mesh/getSurfaceCount()``. See also ``getSurfaceOverrideMaterial(surface:)``. + public final func getSurfaceOverrideMaterialCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_surface_override_material_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_surface_override_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_surface_override_material") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3671737478)! + } + + } + + }() + + /// Sets the override `material` for the specified `surface` of the ``Mesh`` resource. This material is associated with this ``MeshInstance3D`` rather than with ``mesh``. + /// + /// > Note: This assigns the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties, not the material within the ``Mesh`` resource. To set the material within the ``Mesh`` resource, use ``Mesh/surfaceGetMaterial(surfIdx:)`` instead. + /// + public final func setSurfaceOverrideMaterial(surface: Int32, material: Material?) { + withUnsafePointer(to: surface) { pArg0 in + withUnsafePointer(to: material?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_set_surface_override_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_surface_override_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_surface_override_material") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2897466400)! + } + + } + + }() + + /// Returns the override ``Material`` for the specified `surface` of the ``Mesh`` resource. See also ``getSurfaceOverrideMaterialCount()``. + /// + /// > Note: This returns the ``Material`` associated to the ``MeshInstance3D``'s Surface Material Override properties, not the material within the ``Mesh`` resource. To get the material within the ``Mesh`` resource, use ``Mesh/surfaceGetMaterial(surfIdx:)`` instead. + /// + public final func getSurfaceOverrideMaterial(surface: Int32) -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: surface) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_surface_override_material, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_active_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_active_material") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2897466400)! + } + + } + + }() + + /// Returns the ``Material`` that will be used by the ``Mesh`` when drawing. This can return the ``GeometryInstance3D/materialOverride``, the surface override ``Material`` defined in this ``MeshInstance3D``, or the surface ``Material`` defined in the ``mesh``. For example, if ``GeometryInstance3D/materialOverride`` is used, all surfaces will return the override material. + /// + /// Returns `null` if no material is active, including when ``mesh`` is `null`. + /// + public final func getActiveMaterial(surface: Int32) -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: surface) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_active_material, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_trimesh_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("create_trimesh_collision") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// This helper creates a ``StaticBody3D`` child node with a ``ConcavePolygonShape3D`` collision shape calculated from the mesh geometry. It's mainly used for testing. + public final func createTrimeshCollision() { + gi.object_method_bind_ptrcall(MeshInstance3D.method_create_trimesh_collision, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create_convex_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("create_convex_collision") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2751962654)! + } + + } + + }() + + /// This helper creates a ``StaticBody3D`` child node with a ``ConvexPolygonShape3D`` collision shape calculated from the mesh geometry. It's mainly used for testing. + /// + /// If `clean` is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed. + /// + /// If `simplify` is `true`, the geometry can be further simplified to reduce the number of vertices. Disabled by default. + /// + public final func createConvexCollision(clean: Bool = true, simplify: Bool = false) { + withUnsafePointer(to: clean) { pArg0 in + withUnsafePointer(to: simplify) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_create_convex_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_create_multiple_convex_collisions: GDExtensionMethodBindPtr = { + let methodName = StringName("create_multiple_convex_collisions") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 628789669)! + } + + } + + }() + + /// This helper creates a ``StaticBody3D`` child node with multiple ``ConvexPolygonShape3D`` collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional `settings`. + public final func createMultipleConvexCollisions(settings: MeshConvexDecompositionSettings? = nil) { + withUnsafePointer(to: settings?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_create_multiple_convex_collisions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_count") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of blend shapes available. Produces an error if ``mesh`` is `null`. + public final func getBlendShapeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_blend_shape_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_find_blend_shape_by_name: GDExtensionMethodBindPtr = { + let methodName = StringName("find_blend_shape_by_name") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4150868206)! + } + + } + + }() + + /// Returns the index of the blend shape with the given `name`. Returns `-1` if no blend shape with this name exists, including when ``mesh`` is `null`. + public final func findBlendShapeByName(_ name: StringName) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_find_blend_shape_by_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_blend_shape_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_shape_value") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// Returns the value of the blend shape at the given `blendShapeIdx`. Returns `0.0` and produces an error if ``mesh`` is `null` or doesn't have a blend shape at that index. + public final func getBlendShapeValue(blendShapeIdx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: blendShapeIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_get_blend_shape_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_blend_shape_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_shape_value") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// Sets the value of the blend shape at `blendShapeIdx` to `value`. Produces an error if ``mesh`` is `null` or doesn't have a blend shape at that index. + public final func setBlendShapeValue(blendShapeIdx: Int32, value: Double) { + withUnsafePointer(to: blendShapeIdx) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_set_blend_shape_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_create_debug_tangents: GDExtensionMethodBindPtr = { + let methodName = StringName("create_debug_tangents") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// This helper creates a ``MeshInstance3D`` child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. + public final func createDebugTangents() { + gi.object_method_bind_ptrcall(MeshInstance3D.method_create_debug_tangents, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_bake_mesh_from_current_blend_shape_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_mesh_from_current_blend_shape_mix") + return withUnsafePointer(to: &MeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1457573577)! + } + + } + + }() + + /// Takes a snapshot from the current ``ArrayMesh`` with all blend shapes applied according to their current weights and bakes it to the provided `existing` mesh. If no `existing` mesh is provided a new ``ArrayMesh`` is created, baked and returned. Mesh surface materials are not copied. + /// + /// **Performance:** ``Mesh`` data needs to be received from the GPU, stalling the ``RenderingServer`` in the process. + /// + public final func bakeMeshFromCurrentBlendShapeMix(existing: ArrayMesh? = nil) -> ArrayMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: existing?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshInstance3D.method_bake_mesh_from_current_blend_shape_mix, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshLibrary.swift b/Sources/SwiftGodot/Generated/Api/MeshLibrary.swift new file mode 100644 index 000000000..0cffb44e6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshLibrary.swift @@ -0,0 +1,622 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Library of meshes. +/// +/// A library of meshes. Contains a list of ``Mesh`` resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in ``GridMap``. +open class MeshLibrary: Resource { + override open class var godotClassName: StringName { "MeshLibrary" } + /* Methods */ + fileprivate static var method_create_item: GDExtensionMethodBindPtr = { + let methodName = StringName("create_item") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Creates a new item in the library with the given ID. + /// + /// You can get an unused ID from ``getLastUnusedItemId()``. + /// + public final func createItem(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_create_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_item_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_name") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the item's name. + /// + /// This name is shown in the editor. It can also be used to look up the item later using ``findItemByName(_:)``. + /// + public final func setItemName(id: Int32, name: String) { + withUnsafePointer(to: id) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_mesh") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969122797)! + } + + } + + }() + + /// Sets the item's mesh. + public final func setItemMesh(id: Int32, mesh: Mesh?) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: mesh?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_mesh_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_mesh_transform") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3616898986)! + } + + } + + }() + + /// Sets the transform to apply to the item's mesh. + public final func setItemMeshTransform(id: Int32, meshTransform: Transform3D) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: meshTransform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_mesh_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_navigation_mesh") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3483353960)! + } + + } + + }() + + /// Sets the item's navigation mesh. + public final func setItemNavigationMesh(id: Int32, navigationMesh: NavigationMesh?) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: navigationMesh?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_navigation_mesh_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_navigation_mesh_transform") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3616898986)! + } + + } + + }() + + /// Sets the transform to apply to the item's navigation mesh. + public final func setItemNavigationMeshTransform(id: Int32, navigationMesh: Transform3D) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: navigationMesh) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_navigation_mesh_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_navigation_layers") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the item's navigation layers bitmask. + public final func setItemNavigationLayers(id: Int32, navigationLayers: UInt32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_shapes") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 537221740)! + } + + } + + }() + + /// Sets an item's collision shapes. + /// + /// The array should consist of ``Shape3D`` objects, each followed by a ``Transform3D`` that will be applied to it. For shapes that should not have a transform, use ``Transform3D/identity``. + /// + public final func setItemShapes(id: Int32, shapes: GArray) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: shapes.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_shapes, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_preview: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_preview") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets a texture to use as the item's preview icon in the editor. + public final func setItemPreview(id: Int32, texture: Texture2D?) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_set_item_preview, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_name") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the item's name. + public final func getItemName(id: Int32) -> String { + let _result = GString () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_mesh") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1576363275)! + } + + } + + }() + + /// Returns the item's mesh. + public final func getItemMesh(id: Int32) -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_mesh_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_mesh_transform") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965739696)! + } + + } + + }() + + /// Returns the transform applied to the item's mesh. + public final func getItemMeshTransform(id: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_mesh_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_navigation_mesh") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2729647406)! + } + + } + + }() + + /// Returns the item's navigation mesh. + public final func getItemNavigationMesh(id: Int32) -> NavigationMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_navigation_mesh_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_navigation_mesh_transform") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965739696)! + } + + } + + }() + + /// Returns the transform applied to the item's navigation mesh. + public final func getItemNavigationMeshTransform(id: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_navigation_mesh_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_navigation_layers") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the item's navigation layers bitmask. + public final func getItemNavigationLayers(id: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_shapes") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns an item's collision shapes. + /// + /// The array consists of each ``Shape3D`` followed by its ``Transform3D``. + /// + public final func getItemShapes(id: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_shapes, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_preview: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_preview") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using ``setItemPreview(id:texture:)``. Returns an empty ``Texture2D`` if no preview was manually set in a running project. + public final func getItemPreview(id: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_preview, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_item") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the item. + public final func removeItem(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_remove_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_find_item_by_name: GDExtensionMethodBindPtr = { + let methodName = StringName("find_item_by_name") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the first item with the given name, or `-1` if no item is found. + public final func findItemByName(_ name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshLibrary.method_find_item_by_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the library. + public final func clear() { + gi.object_method_bind_ptrcall(MeshLibrary.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_item_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_list") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Returns the list of item IDs in use. + public final func getItemList() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(MeshLibrary.method_get_item_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_last_unused_item_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_unused_item_id") + return withUnsafePointer(to: &MeshLibrary.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Gets an unused ID for a new item. + public final func getLastUnusedItemId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MeshLibrary.method_get_last_unused_item_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MeshTexture.swift b/Sources/SwiftGodot/Generated/Api/MeshTexture.swift new file mode 100644 index 000000000..eb27180df --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MeshTexture.swift @@ -0,0 +1,199 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Simple texture that uses a mesh to draw itself. +/// +/// Simple texture that uses a mesh to draw itself. It's limited because flags can't be changed and region drawing is not supported. +open class MeshTexture: Texture2D { + override open class var godotClassName: StringName { "MeshTexture" } + + /* Properties */ + + /// Sets the mesh used to draw. It must be a mesh using 2D vertices. + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + /// Sets the base texture that the Mesh will use to draw. + final public var baseTexture: Texture2D? { + get { + return get_base_texture () + } + + set { + set_base_texture (newValue) + } + + } + + /// Sets the size of the image, needed for reference. + final public var imageSize: Vector2 { + get { + return get_image_size () + } + + set { + set_image_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshTexture.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808005922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshTexture.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_image_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_image_size") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_image_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshTexture.method_set_image_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_image_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_image_size") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_image_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(MeshTexture.method_get_image_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_base_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_base_texture") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_base_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MeshTexture.method_set_base_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_base_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_texture") + return withUnsafePointer(to: &MeshTexture.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_base_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MeshTexture.method_get_base_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MethodTweener.swift b/Sources/SwiftGodot/Generated/Api/MethodTweener.swift new file mode 100644 index 000000000..8ff02e25e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MethodTweener.swift @@ -0,0 +1,114 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Interpolates an abstract value and supplies it to a method called over time. +/// +/// ``MethodTweener`` is similar to a combination of ``CallbackTweener`` and ``PropertyTweener``. It calls a method providing an interpolated value as a parameter. See ``Tween/tweenMethod(_:from:to:duration:)`` for more usage information. +/// +/// The tweener will finish automatically if the callback's target object is freed. +/// +/// > Note: ``Tween/tweenMethod(_:from:to:duration:)`` is the only correct way to create ``MethodTweener``. Any ``MethodTweener`` created manually will not function correctly. +/// +open class MethodTweener: Tweener { + override open class var godotClassName: StringName { "MethodTweener" } + /* Methods */ + fileprivate static var method_set_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delay") + return withUnsafePointer(to: &MethodTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 266477812)! + } + + } + + }() + + /// Sets the time in seconds after which the ``MethodTweener`` will start interpolating. By default there's no delay. + public final func setDelay(_ delay: Double) -> MethodTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: delay) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MethodTweener.method_set_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_trans: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trans") + return withUnsafePointer(to: &MethodTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740975367)! + } + + } + + }() + + /// Sets the type of used transition from ``Tween.TransitionType``. If not set, the default transition is used from the ``Tween`` that contains this Tweener. + public final func setTrans(_ trans: Tween.TransitionType) -> MethodTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: trans.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MethodTweener.method_set_trans, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_ease: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ease") + return withUnsafePointer(to: &MethodTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 315540545)! + } + + } + + }() + + /// Sets the type of used easing from ``Tween.EaseType``. If not set, the default easing is used from the ``Tween`` that contains this Tweener. + public final func setEase(_ ease: Tween.EaseType) -> MethodTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ease.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MethodTweener.method_set_ease, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MissingNode.swift b/Sources/SwiftGodot/Generated/Api/MissingNode.swift new file mode 100644 index 000000000..8c9cc59c9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MissingNode.swift @@ -0,0 +1,204 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An internal editor class intended for keeping the data of unrecognized nodes. +/// +/// This is an internal editor class intended for keeping data of nodes of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in a scene. +/// +/// > Warning: Ignore missing nodes unless you know what you are doing. Existing properties on a missing node can be freely modified in code, regardless of the type they are intended to be. +/// +open class MissingNode: Node { + override open class var godotClassName: StringName { "MissingNode" } + + /* Properties */ + + /// The name of the class this node was supposed to be (see ``Object/getClass()``). + final public var originalClass: String { + get { + return get_original_class () + } + + set { + set_original_class (newValue) + } + + } + + /// Returns the path of the scene this node was instance of originally. + final public var originalScene: String { + get { + return get_original_scene () + } + + set { + set_original_scene (newValue) + } + + } + + /// If `true`, allows new properties to be set along with existing ones. If `false`, only existing properties' values can be set, and new properties cannot be added. + final public var recordingProperties: Bool { + get { + return is_recording_properties () + } + + set { + set_recording_properties (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_original_class: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_class") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_class(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MissingNode.method_set_original_class, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_original_class: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_class") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_class() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(MissingNode.method_get_original_class, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_original_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_scene") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_scene(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MissingNode.method_set_original_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_original_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_scene") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_scene() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(MissingNode.method_get_original_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_recording_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recording_properties") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_recording_properties(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MissingNode.method_set_recording_properties, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_recording_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("is_recording_properties") + return withUnsafePointer(to: &MissingNode.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_recording_properties() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MissingNode.method_is_recording_properties, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MissingResource.swift b/Sources/SwiftGodot/Generated/Api/MissingResource.swift new file mode 100644 index 000000000..ad92ad373 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MissingResource.swift @@ -0,0 +1,147 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An internal editor class intended for keeping the data of unrecognized resources. +/// +/// This is an internal editor class intended for keeping data of resources of unknown type (most likely this type was supplied by an extension that is no longer loaded). It can't be manually instantiated or placed in a scene. +/// +/// > Warning: Ignore missing resources unless you know what you are doing. Existing properties on a missing resource can be freely modified in code, regardless of the type they are intended to be. +/// +open class MissingResource: Resource { + override open class var godotClassName: StringName { "MissingResource" } + + /* Properties */ + + /// The name of the class this resource was supposed to be (see ``Object/getClass()``). + final public var originalClass: String { + get { + return get_original_class () + } + + set { + set_original_class (newValue) + } + + } + + /// If set to `true`, allows new properties to be added on top of the existing ones with ``Object/set(property:value:)``. + final public var recordingProperties: Bool { + get { + return is_recording_properties () + } + + set { + set_recording_properties (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_original_class: GDExtensionMethodBindPtr = { + let methodName = StringName("set_original_class") + return withUnsafePointer(to: &MissingResource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_original_class(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MissingResource.method_set_original_class, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_original_class: GDExtensionMethodBindPtr = { + let methodName = StringName("get_original_class") + return withUnsafePointer(to: &MissingResource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_original_class() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(MissingResource.method_get_original_class, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_recording_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recording_properties") + return withUnsafePointer(to: &MissingResource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_recording_properties(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MissingResource.method_set_recording_properties, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_recording_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("is_recording_properties") + return withUnsafePointer(to: &MissingResource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_recording_properties() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MissingResource.method_is_recording_properties, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MobileVRInterface.swift b/Sources/SwiftGodot/Generated/Api/MobileVRInterface.swift new file mode 100644 index 000000000..bd0fabfbe --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MobileVRInterface.swift @@ -0,0 +1,602 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Generic mobile VR implementation. +/// +/// This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. +/// +/// Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting ``eyeHeight``. +/// +/// You can initialize this interface as follows: +/// +open class MobileVRInterface: XRInterface { + override open class var godotClassName: StringName { "MobileVRInterface" } + + /* Properties */ + + /// The height at which the camera is placed in relation to the ground (i.e. ``XROrigin3D`` node). + final public var eyeHeight: Double { + get { + return get_eye_height () + } + + set { + set_eye_height (newValue) + } + + } + + /// The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye. + final public var iod: Double { + get { + return get_iod () + } + + set { + set_iod (newValue) + } + + } + + /// The width of the display in centimeters. + final public var displayWidth: Double { + get { + return get_display_width () + } + + set { + set_display_width (newValue) + } + + } + + /// The distance between the display and the lenses inside of the device in centimeters. + final public var displayToLens: Double { + get { + return get_display_to_lens () + } + + set { + set_display_to_lens (newValue) + } + + } + + /// Set the offset rect relative to the area being rendered. A length of 1 represents the whole rendering area on that axis. + final public var offsetRect: Rect2 { + get { + return get_offset_rect () + } + + set { + set_offset_rect (newValue) + } + + } + + /// The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance. + final public var oversample: Double { + get { + return get_oversample () + } + + set { + set_oversample (newValue) + } + + } + + /// The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect. + final public var k1: Double { + get { + return get_k1 () + } + + set { + set_k1 (newValue) + } + + } + + /// The k2 lens factor, see k1. + final public var k2: Double { + get { + return get_k2 () + } + + set { + set_k2 (newValue) + } + + } + + /// The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + /// + /// > Note: Mobile and Forward+ renderers only. Requires ``Viewport/vrsMode`` to be set to ``Viewport/VRSMode/xr``. + /// + final public var vrsMinRadius: Double { + get { + return get_vrs_min_radius () + } + + set { + set_vrs_min_radius (newValue) + } + + } + + /// The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + /// + /// > Note: Mobile and Forward+ renderers only. Requires ``Viewport/vrsMode`` to be set to ``Viewport/VRSMode/xr``. + /// + final public var vrsStrength: Double { + get { + return get_vrs_strength () + } + + set { + set_vrs_strength (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_eye_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_eye_height") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_eye_height(_ eyeHeight: Double) { + withUnsafePointer(to: eyeHeight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_eye_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_eye_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_eye_height") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_eye_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_eye_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_iod: GDExtensionMethodBindPtr = { + let methodName = StringName("set_iod") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_iod(_ iod: Double) { + withUnsafePointer(to: iod) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_iod, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_iod: GDExtensionMethodBindPtr = { + let methodName = StringName("get_iod") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_iod() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_iod, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_display_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_display_width") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_display_width(_ displayWidth: Double) { + withUnsafePointer(to: displayWidth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_display_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_display_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_width") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_display_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_display_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_display_to_lens: GDExtensionMethodBindPtr = { + let methodName = StringName("set_display_to_lens") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_display_to_lens(_ displayToLens: Double) { + withUnsafePointer(to: displayToLens) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_display_to_lens, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_display_to_lens: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_to_lens") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_display_to_lens() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_display_to_lens, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset_rect") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset_rect(_ offsetRect: Rect2) { + withUnsafePointer(to: offsetRect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_offset_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset_rect") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset_rect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_offset_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_oversample: GDExtensionMethodBindPtr = { + let methodName = StringName("set_oversample") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_oversample(_ oversample: Double) { + withUnsafePointer(to: oversample) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_oversample, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_oversample: GDExtensionMethodBindPtr = { + let methodName = StringName("get_oversample") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_oversample() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_oversample, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_k1: GDExtensionMethodBindPtr = { + let methodName = StringName("set_k1") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_k1(_ k: Double) { + withUnsafePointer(to: k) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_k1, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_k1: GDExtensionMethodBindPtr = { + let methodName = StringName("get_k1") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_k1() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_k1, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_k2: GDExtensionMethodBindPtr = { + let methodName = StringName("set_k2") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_k2(_ k: Double) { + withUnsafePointer(to: k) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_k2, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_k2: GDExtensionMethodBindPtr = { + let methodName = StringName("get_k2") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_k2() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_k2, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_vrs_min_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vrs_min_radius") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vrs_min_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_vrs_min_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vrs_min_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vrs_min_radius") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vrs_min_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_vrs_min_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vrs_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vrs_strength") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vrs_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MobileVRInterface.method_get_vrs_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vrs_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vrs_strength") + return withUnsafePointer(to: &MobileVRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vrs_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MobileVRInterface.method_set_vrs_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MovieWriter.swift b/Sources/SwiftGodot/Generated/Api/MovieWriter.swift new file mode 100644 index 000000000..a468be4c4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MovieWriter.swift @@ -0,0 +1,177 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract class for non-real-time video recording encoders. +/// +/// Godot can record videos with non-real-time simulation. Like the `--fixed-fps` command line argument, this forces the reported `delta` in ``Node/_process(delta:)`` functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. +/// +/// Godot has 2 built-in ``MovieWriter``s: +/// +/// - AVI container with MJPEG for video and uncompressed audio (`.avi` file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing ``ProjectSettings/editor/movieWriter/mjpegQuality``. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with ``VideoStreamPlayer``. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most. +/// +/// - PNG image sequence for video and WAV for audio (`.png` file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as FFmpeg after recording. Transparency is currently not supported, even if the root viewport is set to be transparent. +/// +/// If you need to encode to a different format or pipe a stream through third-party software, you can extend the ``MovieWriter`` class to create your own movie writers. This should typically be done using GDExtension for performance reasons. +/// +/// **Editor usage:** A default movie file path can be specified in ``ProjectSettings/editor/movieWriter/movieFile``. Alternatively, for running single scenes, a `movie_file` metadata can be added to the root node, specifying the path to a movie file that will be used when recording that scene. Once a path is set, click the video reel icon in the top-right corner of the editor to enable Movie Maker mode, then run any scene as usual. The engine will start recording as soon as the splash screen is finished, and it will only stop recording when the engine quits. Click the video reel icon again to disable Movie Maker mode. Note that toggling Movie Maker mode does not affect project instances that are already running. +/// +/// > Note: MovieWriter is available for use in both the editor and exported projects, but it is _not_ designed for use by end users to record videos while playing. Players wishing to record gameplay videos should install tools such as OBS Studio or SimpleScreenRecorder instead. +/// +open class MovieWriter: Object { + override open class var godotClassName: StringName { "MovieWriter" } + /* Methods */ + /// Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if ``_getAudioMixRate()`` is not overridden. + @_documentation(visibility: public) + open func _getAudioMixRate() -> UInt32 { + return 0 + } + + /// Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to ``AudioServer/SpeakerMode/modeStereo`` if ``_getAudioSpeakerMode()`` is not overridden. + @_documentation(visibility: public) + open func _getAudioSpeakerMode() -> AudioServer.SpeakerMode { + return AudioServer.SpeakerMode(rawValue: 0)! + } + + /// Called when the engine determines whether this ``MovieWriter`` is able to handle the file at `path`. Must return `true` if this ``MovieWriter`` is able to handle the given file path, `false` otherwise. Typically, ``_handlesFile(path:)`` is overridden as follows to allow the user to record a file at any path with a given file extension: + /// + @_documentation(visibility: public) + open func _handlesFile(path: String) -> Bool { + return false + } + + /// Called once before the engine starts writing video and audio data. `movieSize` is the width and height of the video to save. `fps` is the number of frames per second specified in the project settings or using the `--fixed-fps ` command line argument. + @_documentation(visibility: public) + open func _writeBegin(movieSize: Vector2i, fps: UInt32, basePath: String) -> GodotError { + return .ok + } + + /// Called at the end of every rendered frame. The `frameImage` and `audioFrameBlock` function arguments should be written to. + @_documentation(visibility: public) + open func _writeFrame(frameImage: Image?, audioFrameBlock: OpaquePointer?) -> GodotError { + return .ok + } + + /// Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when ``SceneTree/quit(exitCode:)`` is called. + /// + /// > Note: Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does _not_ result in ``_writeEnd()`` being called. + /// + @_documentation(visibility: public) + open func _writeEnd() { + } + + fileprivate static var method_add_writer: GDExtensionMethodBindPtr = { + let methodName = StringName("add_writer") + return withUnsafePointer(to: &MovieWriter.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4023702871)! + } + + } + + }() + + /// Adds a writer to be usable by the engine. The supported file extensions can be set by overriding ``_handlesFile(path:)``. + /// + /// > Note: ``addWriter(_:)`` must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. + /// + public static func addWriter(_ writer: MovieWriter?) { + withUnsafePointer(to: writer?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_add_writer, nil, pArgs, nil) + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_audio_mix_rate": + return _MovieWriter_proxy_get_audio_mix_rate + case "_get_audio_speaker_mode": + return _MovieWriter_proxy_get_audio_speaker_mode + case "_handles_file": + return _MovieWriter_proxy_handles_file + case "_write_begin": + return _MovieWriter_proxy_write_begin + case "_write_end": + return _MovieWriter_proxy_write_end + case "_write_frame": + return _MovieWriter_proxy_write_frame + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _MovieWriter_proxy_get_audio_mix_rate (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAudioMixRate () + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _MovieWriter_proxy_get_audio_speaker_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAudioSpeakerMode () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MovieWriter_proxy_handles_file (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._handlesFile (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _MovieWriter_proxy_write_begin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._writeBegin (movieSize: args [0]!.assumingMemoryBound (to: Vector2i.self).pointee, fps: args [1]!.assumingMemoryBound (to: UInt32.self).pointee, basePath: GString.stringFromGStringPtr (ptr: args [2]!) ?? "") + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MovieWriter_proxy_write_end (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._writeEnd () +} + +func _MovieWriter_proxy_write_frame (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._writeFrame (frameImage: lookupLiveObject (handleAddress: resolved_0) as? Image ?? Image (nativeHandle: resolved_0), audioFrameBlock: args [1]!.assumingMemoryBound (to: OpaquePointer?.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiMesh.swift b/Sources/SwiftGodot/Generated/Api/MultiMesh.swift new file mode 100644 index 000000000..a107a29e6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiMesh.swift @@ -0,0 +1,761 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides high-performance drawing of a mesh multiple times using GPU instancing. +/// +/// MultiMesh provides low-level mesh instancing. Drawing thousands of ``MeshInstance3D`` nodes can be slow, since each object is submitted to the GPU then drawn individually. +/// +/// MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. +/// +/// As a drawback, if the instances are too far away from each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object). +/// +/// Since instances may have any behavior, the AABB used for visibility must be provided by the user. +/// +/// > Note: A MultiMesh is a single object, therefore the same maximum lights per object restriction applies. This means, that once the maximum lights are consumed by one or more instances, the rest of the MultiMesh instances will **not** receive any lighting. +/// +/// > Note: Blend Shapes will be ignored if used in a MultiMesh. +/// +open class MultiMesh: Resource { + override open class var godotClassName: StringName { "MultiMesh" } + public enum TransformFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use this when using 2D transforms. + case transform2d = 0 // TRANSFORM_2D + /// Use this when using 3D transforms. + case transform3d = 1 // TRANSFORM_3D + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .transform2d: return ".transform2d" + case .transform3d: return ".transform3d" + } + + } + + } + + + /* Properties */ + + /// Format of transform used to transform mesh, either 2D or 3D. + final public var transformFormat: MultiMesh.TransformFormat { + get { + return get_transform_format () + } + + set { + set_transform_format (newValue) + } + + } + + /// If `true`, the ``MultiMesh`` will use color data (see ``setInstanceColor(instance:color:)``). Can only be set when ``instanceCount`` is `0` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to `0`. + final public var useColors: Bool { + get { + return is_using_colors () + } + + set { + set_use_colors (newValue) + } + + } + + /// If `true`, the ``MultiMesh`` will use custom data (see ``setInstanceCustomData(instance:customData:)``). Can only be set when ``instanceCount`` is `0` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to `0`. + final public var useCustomData: Bool { + get { + return is_using_custom_data () + } + + set { + set_use_custom_data (newValue) + } + + } + + /// Custom AABB for this MultiMesh resource. Setting this manually prevents costly runtime AABB recalculations. + final public var customAabb: AABB { + get { + return get_custom_aabb () + } + + set { + set_custom_aabb (newValue) + } + + } + + /// Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect. + /// + /// By default, all instances are drawn but you can limit this with ``visibleInstanceCount``. + /// + final public var instanceCount: Int32 { + get { + return get_instance_count () + } + + set { + set_instance_count (newValue) + } + + } + + /// Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. + final public var visibleInstanceCount: Int32 { + get { + return get_visible_instance_count () + } + + set { + set_visible_instance_count (newValue) + } + + } + + /// ``Mesh`` resource to be instanced. + /// + /// The looks of the individual instances can be modified using ``setInstanceColor(instance:color:)`` and ``setInstanceCustomData(instance:customData:)``. + /// + final public var mesh: Mesh? { + get { + return get_mesh () + } + + set { + set_mesh (newValue) + } + + } + + final public var buffer: PackedFloat32Array { + get { + return get_buffer () + } + + set { + set_buffer (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808005922)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh() -> Mesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiMesh.method_get_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_use_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_colors") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_colors(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_use_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_colors") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_colors() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiMesh.method_is_using_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_custom_data") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_custom_data(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_use_custom_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_custom_data") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_custom_data() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiMesh.method_is_using_custom_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform_format") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2404750322)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform_format(_ format: MultiMesh.TransformFormat) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_transform_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform_format") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2444156481)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform_format() -> MultiMesh.TransformFormat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiMesh.method_get_transform_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MultiMesh.TransformFormat (rawValue: _result)! + } + + fileprivate static var method_set_instance_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_count") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_instance_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_instance_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_instance_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_count") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_instance_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiMesh.method_get_instance_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visible_instance_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_instance_count") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_instance_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_visible_instance_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visible_instance_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_instance_count") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_instance_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiMesh.method_get_visible_instance_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_instance_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_transform") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3616898986)! + } + + } + + }() + + /// Sets the ``Transform3D`` for a specific instance. + public final func setInstanceTransform(instance: Int32, transform: Transform3D) { + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_instance_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_instance_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_transform_2d") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 30160968)! + } + + } + + }() + + /// Sets the ``Transform2D`` for a specific instance. + public final func setInstanceTransform2d(instance: Int32, transform: Transform2D) { + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_instance_transform_2d, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_instance_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_transform") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1965739696)! + } + + } + + }() + + /// Returns the ``Transform3D`` of a specific instance. + public final func getInstanceTransform(instance: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_get_instance_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_instance_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_transform_2d") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3836996910)! + } + + } + + }() + + /// Returns the ``Transform2D`` of a specific instance. + public final func getInstanceTransform2d(instance: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_get_instance_transform_2d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_instance_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_color") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets the color of a specific instance by _multiplying_ the mesh's existing vertex colors. This allows for different color tinting per instance. + /// + /// For the color to take effect, ensure that ``useColors`` is `true` on the ``MultiMesh`` and ``BaseMaterial3D/vertexColorUseAsAlbedo`` is `true` on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (`Color(1, 1, 1)`). + /// + public final func setInstanceColor(instance: Int32, color: Color) { + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_instance_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_instance_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_color") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Gets a specific instance's color multiplier. + public final func getInstanceColor(instance: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_get_instance_color, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_instance_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_instance_custom_data") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets custom data for a specific instance. `customData` is a ``Color`` type only to contain 4 floating-point numbers. + /// + /// For the custom data to be used, ensure that ``useCustomData`` is `true`. + /// + /// This custom instance data has to be manually accessed in your custom shader using `INSTANCE_CUSTOM`. + /// + public final func setInstanceCustomData(instance: Int32, customData: Color) { + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: customData) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_instance_custom_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_instance_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_custom_data") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns the custom data that has been set for a specific instance. + public final func getInstanceCustomData(instance: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: instance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_get_instance_custom_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_aabb") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_custom_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_aabb") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(MultiMesh.method_get_custom_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_aabb") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + /// Returns the visibility axis-aligned bounding box in local space. + public final func getAabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(MultiMesh.method_get_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_buffer") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_buffer() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(MultiMesh.method_get_buffer, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_buffer") + return withUnsafePointer(to: &MultiMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_buffer(_ buffer: PackedFloat32Array) { + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMesh.method_set_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiMeshInstance2D.swift b/Sources/SwiftGodot/Generated/Api/MultiMeshInstance2D.swift new file mode 100644 index 000000000..1991cf263 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiMeshInstance2D.swift @@ -0,0 +1,168 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node that instances a ``MultiMesh`` in 2D. +/// +/// ``MultiMeshInstance2D`` is a specialized node to instance a ``MultiMesh`` resource in 2D. +/// +/// Usage is the same as ``MultiMeshInstance3D``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``textureChanged`` +open class MultiMeshInstance2D: Node2D { + override open class var godotClassName: StringName { "MultiMeshInstance2D" } + + /* Properties */ + + /// The ``MultiMesh`` that will be drawn by the ``MultiMeshInstance2D``. + final public var multimesh: MultiMesh? { + get { + return get_multimesh () + } + + set { + set_multimesh (newValue) + } + + } + + /// The ``Texture2D`` that will be used if using the default ``CanvasItemMaterial``. Can be accessed as `TEXTURE` in CanvasItem shader. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multimesh") + return withUnsafePointer(to: &MultiMeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2246127404)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_multimesh(_ multimesh: MultiMesh?) { + withUnsafePointer(to: multimesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMeshInstance2D.method_set_multimesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multimesh") + return withUnsafePointer(to: &MultiMeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1385450523)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_multimesh() -> MultiMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiMeshInstance2D.method_get_multimesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &MultiMeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMeshInstance2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &MultiMeshInstance2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiMeshInstance2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Emitted when the ``texture`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textureChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var textureChanged: SimpleSignal { SimpleSignal (target: self, signalName: "texture_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiMeshInstance3D.swift b/Sources/SwiftGodot/Generated/Api/MultiMeshInstance3D.swift new file mode 100644 index 000000000..6c5f2d275 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiMeshInstance3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node that instances a ``MultiMesh``. +/// +/// ``MultiMeshInstance3D`` is a specialized node to instance ``GeometryInstance3D``s based on a ``MultiMesh`` resource. +/// +/// This is useful to optimize the rendering of a high number of instances of a given mesh (for example trees in a forest or grass strands). +/// +open class MultiMeshInstance3D: GeometryInstance3D { + override open class var godotClassName: StringName { "MultiMeshInstance3D" } + + /* Properties */ + + /// The ``MultiMesh`` resource that will be used and shared among all instances of the ``MultiMeshInstance3D``. + final public var multimesh: MultiMesh? { + get { + return get_multimesh () + } + + set { + set_multimesh (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multimesh") + return withUnsafePointer(to: &MultiMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2246127404)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_multimesh(_ multimesh: MultiMesh?) { + withUnsafePointer(to: multimesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiMeshInstance3D.method_set_multimesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multimesh") + return withUnsafePointer(to: &MultiMeshInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1385450523)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_multimesh() -> MultiMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiMeshInstance3D.method_get_multimesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerAPI.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerAPI.swift new file mode 100644 index 000000000..27ef9c91e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerAPI.swift @@ -0,0 +1,614 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// High-level multiplayer API interface. +/// +/// Base class for high-level multiplayer API implementations. See also ``MultiplayerPeer``. +/// +/// By default, ``SceneTree`` has a reference to an implementation of this class and uses it to provide multiplayer capabilities (i.e. RPCs) across the whole scene. +/// +/// It is possible to override the MultiplayerAPI instance used by specific tree branches by calling the ``SceneTree/setMultiplayer(_:rootPath:)`` method, effectively allowing to run both client and server in the same scene. +/// +/// It is also possible to extend or replace the default implementation via scripting or native extensions. See ``MultiplayerAPIExtension`` for details about extensions, ``SceneMultiplayer`` for the details about the default implementation. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``peerConnected`` +/// - ``peerDisconnected`` +/// - ``connectedToServer`` +/// - ``connectionFailed`` +/// - ``serverDisconnected`` +open class MultiplayerAPI: RefCounted { + override open class var godotClassName: StringName { "MultiplayerAPI" } + public enum RPCMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Used with ``Node/rpcConfig(method:config:)`` to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + case disabled = 0 // RPC_MODE_DISABLED + /// Used with ``Node/rpcConfig(method:config:)`` to set a method to be callable remotely by any peer. Analogous to the `@rpc("any_peer")` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. + case anyPeer = 1 // RPC_MODE_ANY_PEER + /// Used with ``Node/rpcConfig(method:config:)`` to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the `@rpc("authority")` annotation. See ``Node/setMultiplayerAuthority(id:recursive:)``. + case authority = 2 // RPC_MODE_AUTHORITY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .anyPeer: return ".anyPeer" + case .authority: return ".authority" + } + + } + + } + + + /* Properties */ + + /// The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with ``isServer()``) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + final public var multiplayerPeer: MultiplayerPeer? { + get { + return get_multiplayer_peer () + } + + set { + set_multiplayer_peer (newValue) + } + + } + + /* Methods */ + fileprivate static var method_has_multiplayer_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("has_multiplayer_peer") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if there is a ``multiplayerPeer`` set. + public final func hasMultiplayerPeer() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiplayerAPI.method_has_multiplayer_peer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_multiplayer_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multiplayer_peer") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3223692825)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_multiplayer_peer() -> MultiplayerPeer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiplayerAPI.method_get_multiplayer_peer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_multiplayer_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multiplayer_peer") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3694835298)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_multiplayer_peer(_ peer: MultiplayerPeer?) { + withUnsafePointer(to: peer?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerAPI.method_set_multiplayer_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_id") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the unique peer ID of this MultiplayerAPI's ``multiplayerPeer``. + public final func getUniqueId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerAPI.method_get_unique_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_server: GDExtensionMethodBindPtr = { + let methodName = StringName("is_server") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if this MultiplayerAPI's ``multiplayerPeer`` is valid and in server mode (listening for connections). + public final func isServer() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiplayerAPI.method_is_server, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_remote_sender_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remote_sender_id") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the sender's peer ID for the RPC currently being executed. + /// + /// > Note: This method returns `0` when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's `await` keyword). + /// + public final func getRemoteSenderId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerAPI.method_get_remote_sender_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_poll: GDExtensionMethodBindPtr = { + let methodName = StringName("poll") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Method used for polling the MultiplayerAPI. You only need to worry about this if you set ``SceneTree/multiplayerPoll`` to `false`. By default, ``SceneTree`` will poll its MultiplayerAPI(s) for you. + /// + /// > Note: This method results in RPCs being called, so they will be executed in the same context of this function (e.g. `_process`, `physics`, ``Thread``). + /// + public final func poll() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiplayerAPI.method_poll, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_rpc: GDExtensionMethodBindPtr = { + let methodName = StringName("rpc") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2077486355)! + } + + } + + }() + + /// Sends an RPC to the target `peer`. The given `method` will be called on the remote `object` with the provided `arguments`. The RPC may also be called locally depending on the implementation and RPC configuration. See ``Node/rpc(method:)`` and ``Node/rpcConfig(method:config:)``. + /// + /// > Note: Prefer using ``Node/rpc(method:)``, ``Node/rpcId(peerId:method:)``, or `my_method.rpc(peer, arg1, arg2, ...)` (in GDScript), since they are faster. This method is mostly useful in conjunction with ``MultiplayerAPIExtension`` when augmenting or replacing the multiplayer capabilities. + /// + public final func rpc(peer: Int32, object: Object?, method: StringName, arguments: GArray = GArray ()) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: peer) { pArg0 in + withUnsafePointer(to: object?.handle) { pArg1 in + withUnsafePointer(to: method.content) { pArg2 in + withUnsafePointer(to: arguments.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerAPI.method_rpc, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_object_configuration_add: GDExtensionMethodBindPtr = { + let methodName = StringName("object_configuration_add") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1171879464)! + } + + } + + }() + + /// Notifies the MultiplayerAPI of a new `configuration` for the given `object`. This method is used internally by ``SceneTree`` to configure the root path for this MultiplayerAPI (passing `null` and a valid ``NodePath`` as `configuration`). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. ``SceneMultiplayer``) for details on how they use it. + /// + /// > Note: This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via ``MultiplayerAPIExtension``. + /// + public final func objectConfigurationAdd(object: Object?, configuration: Variant?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: configuration.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerAPI.method_object_configuration_add, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_object_configuration_remove: GDExtensionMethodBindPtr = { + let methodName = StringName("object_configuration_remove") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1171879464)! + } + + } + + }() + + /// Notifies the MultiplayerAPI to remove a `configuration` for the given `object`. This method is used internally by ``SceneTree`` to configure the root path for this MultiplayerAPI (passing `null` and an empty ``NodePath`` as `configuration`). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. ``SceneMultiplayer``) for details on how they use it. + /// + /// > Note: This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via ``MultiplayerAPIExtension``. + /// + public final func objectConfigurationRemove(object: Object?, configuration: Variant?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: object?.handle) { pArg0 in + withUnsafePointer(to: configuration.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerAPI.method_object_configuration_remove, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_peers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_peers") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + /// Returns the peer IDs of all connected peers of this MultiplayerAPI's ``multiplayerPeer``. + public final func getPeers() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(MultiplayerAPI.method_get_peers, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_default_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_interface") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by ``SceneTree`` when the engine starts. + public static func setDefaultInterface(interfaceName: StringName) { + withUnsafePointer(to: interfaceName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_default_interface, nil, pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_default_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_interface") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2737447660)! + } + + } + + }() + + /// Returns the default MultiplayerAPI implementation class name. This is usually `"SceneMultiplayer"` when ``SceneMultiplayer`` is available. See ``setDefaultInterface(interfaceName:)``. + public static func getDefaultInterface() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(method_get_default_interface, nil, nil, &_result.content) + return _result + } + + fileprivate static var method_create_default_interface: GDExtensionMethodBindPtr = { + let methodName = StringName("create_default_interface") + return withUnsafePointer(to: &MultiplayerAPI.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3294156723)! + } + + } + + }() + + /// Returns a new instance of the default MultiplayerAPI. + public static func createDefaultInterface() -> MultiplayerAPI? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_create_default_interface, nil, nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this MultiplayerAPI's ``multiplayerPeer`` connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerConnected.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerConnected: Signal1 { Signal1 (target: self, signalName: "peer_connected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this MultiplayerAPI's ``multiplayerPeer`` disconnects from a peer. Clients get notified when other clients disconnect from the same server. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerDisconnected.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerDisconnected: Signal2 { Signal2 (target: self, signalName: "peer_disconnected") } + + /// Emitted when this MultiplayerAPI's ``multiplayerPeer`` successfully connected to a server. Only emitted on clients. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectedToServer.connect { + /// print ("caught signal") + /// } + /// ``` + public var connectedToServer: SimpleSignal { SimpleSignal (target: self, signalName: "connected_to_server") } + + /// Emitted when this MultiplayerAPI's ``multiplayerPeer`` fails to establish a connection to a server. Only emitted on clients. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.connectionFailed.connect { + /// print ("caught signal") + /// } + /// ``` + public var connectionFailed: SimpleSignal { SimpleSignal (target: self, signalName: "connection_failed") } + + /// Emitted when this MultiplayerAPI's ``multiplayerPeer`` disconnects from server. Only emitted on clients. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.serverDisconnected.connect { + /// print ("caught signal") + /// } + /// ``` + public var serverDisconnected: SimpleSignal { SimpleSignal (target: self, signalName: "server_disconnected") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerAPIExtension.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerAPIExtension.swift new file mode 100644 index 000000000..a3b9f96f2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerAPIExtension.swift @@ -0,0 +1,191 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class used for extending the ``MultiplayerAPI``. +/// +/// This class can be used to augment or replace the default ``MultiplayerAPI`` implementation via script or extensions. +/// +/// The following example augment the default implementation (``SceneMultiplayer``) by logging every RPC being made, and every object being configured for replication. +/// +/// Then in your main scene or in an autoload call ``SceneTree/setMultiplayer(_:rootPath:)`` to start using your custom ``MultiplayerAPI``: +/// +/// Native extensions can alternatively use the ``MultiplayerAPI/setDefaultInterface(interfaceName:)`` method during initialization to configure themselves as the default implementation. +/// +open class MultiplayerAPIExtension: MultiplayerAPI { + override open class var godotClassName: StringName { "MultiplayerAPIExtension" } + /* Methods */ + /// Callback for ``MultiplayerAPI/poll()``. + @_documentation(visibility: public) + open func _poll() -> GodotError { + return .ok + } + + /// Called when the ``MultiplayerAPI/multiplayerPeer`` is set. + @_documentation(visibility: public) + open func _setMultiplayerPeer(_ multiplayerPeer: MultiplayerPeer?) { + } + + /// Called when the ``MultiplayerAPI/multiplayerPeer`` is retrieved. + @_documentation(visibility: public) + open func _getMultiplayerPeer() -> MultiplayerPeer? { + return MultiplayerPeer () + } + + /// Callback for ``MultiplayerAPI/getUniqueId()``. + @_documentation(visibility: public) + open func _getUniqueId() -> Int32 { + return 0 + } + + /// Callback for ``MultiplayerAPI/getPeers()``. + @_documentation(visibility: public) + open func _getPeerIds() -> PackedInt32Array { + return PackedInt32Array () + } + + /// Callback for ``MultiplayerAPI/rpc(peer:object:method:arguments:)``. + @_documentation(visibility: public) + open func _rpc(peer: Int32, object: Object?, method: StringName, args: GArray) -> GodotError { + return .ok + } + + /// Callback for ``MultiplayerAPI/getRemoteSenderId()``. + @_documentation(visibility: public) + open func _getRemoteSenderId() -> Int32 { + return 0 + } + + /// Callback for ``MultiplayerAPI/objectConfigurationAdd(object:configuration:)``. + @_documentation(visibility: public) + open func _objectConfigurationAdd(object: Object?, configuration: Variant?) -> GodotError { + return .ok + } + + /// Callback for ``MultiplayerAPI/objectConfigurationRemove(object:configuration:)``. + @_documentation(visibility: public) + open func _objectConfigurationRemove(object: Object?, configuration: Variant?) -> GodotError { + return .ok + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_multiplayer_peer": + return _MultiplayerAPIExtension_proxy_get_multiplayer_peer + case "_get_peer_ids": + return _MultiplayerAPIExtension_proxy_get_peer_ids + case "_get_remote_sender_id": + return _MultiplayerAPIExtension_proxy_get_remote_sender_id + case "_get_unique_id": + return _MultiplayerAPIExtension_proxy_get_unique_id + case "_object_configuration_add": + return _MultiplayerAPIExtension_proxy_object_configuration_add + case "_object_configuration_remove": + return _MultiplayerAPIExtension_proxy_object_configuration_remove + case "_poll": + return _MultiplayerAPIExtension_proxy_poll + case "_rpc": + return _MultiplayerAPIExtension_proxy_rpc + case "_set_multiplayer_peer": + return _MultiplayerAPIExtension_proxy_set_multiplayer_peer + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _MultiplayerAPIExtension_proxy_get_multiplayer_peer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getMultiplayerPeer () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // MultiplayerPeer +} + +func _MultiplayerAPIExtension_proxy_get_peer_ids (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPeerIds () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedInt32Array + ret.content = PackedInt32Array.zero +} + +func _MultiplayerAPIExtension_proxy_get_remote_sender_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRemoteSenderId () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_get_unique_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getUniqueId () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_object_configuration_add (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._objectConfigurationAdd (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), configuration: args [1]!.assumingMemoryBound (to: Variant.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_object_configuration_remove (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._objectConfigurationRemove (object: lookupLiveObject (handleAddress: resolved_0) as? Object ?? Object (nativeHandle: resolved_0), configuration: args [1]!.assumingMemoryBound (to: Variant.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_poll (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._poll () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_rpc (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._rpc (peer: args [0]!.assumingMemoryBound (to: Int32.self).pointee, object: lookupLiveObject (handleAddress: resolved_1) as? Object ?? Object (nativeHandle: resolved_1), method: StringName (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), args: GArray (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerAPIExtension_proxy_set_multiplayer_peer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._setMultiplayerPeer (lookupLiveObject (handleAddress: resolved_0) as? MultiplayerPeer ?? MultiplayerPeer (nativeHandle: resolved_0)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerPeer.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerPeer.swift new file mode 100644 index 000000000..035261298 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerPeer.swift @@ -0,0 +1,637 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract class for specialized ``PacketPeer``s used by the ``MultiplayerAPI``. +/// +/// Manages the connection with one or more remote peers acting as server or client and assigning unique IDs to each of them. See also ``MultiplayerAPI``. +/// +/// > Note: The ``MultiplayerAPI`` protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``peerConnected`` +/// - ``peerDisconnected`` +open class MultiplayerPeer: PacketPeer { + override open class var godotClassName: StringName { "MultiplayerPeer" } + public enum ConnectionStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// The MultiplayerPeer is disconnected. + case disconnected = 0 // CONNECTION_DISCONNECTED + /// The MultiplayerPeer is currently connecting to a server. + case connecting = 1 // CONNECTION_CONNECTING + /// This MultiplayerPeer is connected. + case connected = 2 // CONNECTION_CONNECTED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disconnected: return ".disconnected" + case .connecting: return ".connecting" + case .connected: return ".connected" + } + + } + + } + + public enum TransferMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than ``TransferMode/unreliableOrdered``. Use for non-critical data, and always consider whether the order matters. + case unreliable = 0 // TRANSFER_MODE_UNRELIABLE + /// Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than ``TransferMode/reliable``. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + case unreliableOrdered = 1 // TRANSFER_MODE_UNRELIABLE_ORDERED + /// Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + case reliable = 2 // TRANSFER_MODE_RELIABLE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unreliable: return ".unreliable" + case .unreliableOrdered: return ".unreliableOrdered" + case .reliable: return ".reliable" + } + + } + + } + + /* Constants */ + /// Packets are sent to all connected peers. + public static let targetPeerBroadcast = 0 + /// Packets are sent to the remote peer acting as server. + public static let targetPeerServer = 1 + + /* Properties */ + + /// If `true`, this ``MultiplayerPeer`` refuses new connections. + final public var refuseNewConnections: Bool { + get { + return is_refusing_new_connections () + } + + set { + set_refuse_new_connections (newValue) + } + + } + + /// The manner in which to send packets to the target peer. See ``MultiplayerPeer/TransferMode``, and the ``setTargetPeer(id:)`` method. + final public var transferMode: MultiplayerPeer.TransferMode { + get { + return get_transfer_mode () + } + + set { + set_transfer_mode (newValue) + } + + } + + /// The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send **different and independent** state updates is a common way to optimize network usage and decrease latency in fast-paced games. + /// + /// > Note: The default channel (`0`) actually works as 3 separate channels (one for each ``MultiplayerPeer/TransferMode``) so that ``TransferMode/reliable`` and ``TransferMode/unreliableOrdered`` does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. + /// + final public var transferChannel: Int32 { + get { + return get_transfer_channel () + } + + set { + set_transfer_channel (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_transfer_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transfer_channel") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transfer_channel(_ channel: Int32) { + withUnsafePointer(to: channel) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerPeer.method_set_transfer_channel, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transfer_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transfer_channel") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transfer_channel() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_transfer_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transfer_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transfer_mode") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 950411049)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transfer_mode(_ mode: MultiplayerPeer.TransferMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerPeer.method_set_transfer_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transfer_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transfer_mode") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3369852622)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transfer_mode() -> MultiplayerPeer.TransferMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_transfer_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MultiplayerPeer.TransferMode (rawValue: _result)! + } + + fileprivate static var method_set_target_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_peer") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the peer to which packets will be sent. + /// + /// The `id` can be one of: ``targetPeerBroadcast`` to send to all connected peers, ``targetPeerServer`` to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is ``targetPeerBroadcast``. + /// + public final func setTargetPeer(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerPeer.method_set_target_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_packet_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_peer") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ID of the ``MultiplayerPeer`` who sent the next available packet. See ``PacketPeer/getAvailablePacketCount()``. + public final func getPacketPeer() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_packet_peer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_packet_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_channel") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the channel over which the next available packet was received. See ``PacketPeer/getAvailablePacketCount()``. + public final func getPacketChannel() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_packet_channel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_packet_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_mode") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3369852622)! + } + + } + + }() + + /// Returns the transfer mode the remote peer used to send the next available packet. See ``PacketPeer/getAvailablePacketCount()``. + public final func getPacketMode() -> MultiplayerPeer.TransferMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_packet_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MultiplayerPeer.TransferMode (rawValue: _result)! + } + + fileprivate static var method_poll: GDExtensionMethodBindPtr = { + let methodName = StringName("poll") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Waits up to 1 second to receive a new network event. + public final func poll() { + gi.object_method_bind_ptrcall(MultiplayerPeer.method_poll, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_close: GDExtensionMethodBindPtr = { + let methodName = StringName("close") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Immediately close the multiplayer peer returning to the state ``ConnectionStatus/disconnected``. Connected peers will be dropped without emitting [signal peer_disconnected]. + public final func close() { + gi.object_method_bind_ptrcall(MultiplayerPeer.method_close, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_disconnect_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_peer") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4023243586)! + } + + } + + }() + + /// Disconnects the given `peer` from this host. If `force` is `true` the [signal peer_disconnected] signal will not be emitted for this peer. + public final func disconnectPeer(_ peer: Int32, force: Bool = false) { + withUnsafePointer(to: peer) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerPeer.method_disconnect_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_connection_status: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_status") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2147374275)! + } + + } + + }() + + /// Returns the current state of the connection. See ``MultiplayerPeer/ConnectionStatus``. + public final func getConnectionStatus() -> MultiplayerPeer.ConnectionStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_connection_status, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MultiplayerPeer.ConnectionStatus (rawValue: _result)! + } + + fileprivate static var method_get_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_id") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ID of this ``MultiplayerPeer``. + public final func getUniqueId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerPeer.method_get_unique_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_generate_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_unique_id") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns a randomly generated integer that can be used as a network unique ID. + public final func generateUniqueId() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MultiplayerPeer.method_generate_unique_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_refuse_new_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_refuse_new_connections") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_refuse_new_connections(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerPeer.method_set_refuse_new_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_refusing_new_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("is_refusing_new_connections") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_refusing_new_connections() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiplayerPeer.method_is_refusing_new_connections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_server_relay_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_server_relay_supported") + return withUnsafePointer(to: &MultiplayerPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns true if the server can act as a relay in the current configuration (i.e. if the higher level ``MultiplayerAPI`` should notify connected clients of other peers, and implement a relay protocol to allow communication between them). + public final func isServerRelaySupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiplayerPeer.method_is_server_relay_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a remote peer connects. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerConnected.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerConnected: Signal1 { Signal1 (target: self, signalName: "peer_connected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a remote peer has disconnected. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerDisconnected.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerDisconnected: Signal2 { Signal2 (target: self, signalName: "peer_disconnected") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerPeerExtension.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerPeerExtension.swift new file mode 100644 index 000000000..5e9bb4c11 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerPeerExtension.swift @@ -0,0 +1,346 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class that can be inherited to implement custom multiplayer API networking layers via GDExtension. +/// +/// This class is designed to be inherited from a GDExtension plugin to implement custom networking layers for the multiplayer API (such as WebRTC). All the methods below **must** be implemented to have a working custom multiplayer implementation. See also ``MultiplayerAPI``. +open class MultiplayerPeerExtension: MultiplayerPeer { + override open class var godotClassName: StringName { "MultiplayerPeerExtension" } + /* Methods */ + /// Called when the available packet count is internally requested by the ``MultiplayerAPI``. + @_documentation(visibility: public) + open func _getAvailablePacketCount() -> Int32 { + return 0 + } + + /// Called when the maximum allowed packet size (in bytes) is requested by the ``MultiplayerAPI``. + @_documentation(visibility: public) + open func _getMaxPacketSize() -> Int32 { + return 0 + } + + /// Called when a packet needs to be received by the ``MultiplayerAPI``, if ``_getPacket(rBuffer:rBufferSize:)`` isn't implemented. Use this when extending this class via GDScript. + @_documentation(visibility: public) + open func _getPacketScript() -> PackedByteArray { + return PackedByteArray () + } + + /// Called when a packet needs to be sent by the ``MultiplayerAPI``, if ``_putPacket(pBuffer:pBufferSize:)`` isn't implemented. Use this when extending this class via GDScript. + @_documentation(visibility: public) + open func _putPacketScript(pBuffer: PackedByteArray) -> GodotError { + return .ok + } + + /// Called to get the channel over which the next available packet was received. See ``MultiplayerPeer/getPacketChannel()``. + @_documentation(visibility: public) + open func _getPacketChannel() -> Int32 { + return 0 + } + + /// Called to get the transfer mode the remote peer used to send the next available packet. See ``MultiplayerPeer/getPacketMode()``. + @_documentation(visibility: public) + open func _getPacketMode() -> MultiplayerPeer.TransferMode { + return MultiplayerPeer.TransferMode(rawValue: 0)! + } + + /// Called when the channel to use is set for this ``MultiplayerPeer`` (see ``MultiplayerPeer/transferChannel``). + @_documentation(visibility: public) + open func _setTransferChannel(pChannel: Int32) { + } + + /// Called when the transfer channel to use is read on this ``MultiplayerPeer`` (see ``MultiplayerPeer/transferChannel``). + @_documentation(visibility: public) + open func _getTransferChannel() -> Int32 { + return 0 + } + + /// Called when the transfer mode is set on this ``MultiplayerPeer`` (see ``MultiplayerPeer/transferMode``). + @_documentation(visibility: public) + open func _setTransferMode(pMode: MultiplayerPeer.TransferMode) { + } + + /// Called when the transfer mode to use is read on this ``MultiplayerPeer`` (see ``MultiplayerPeer/transferMode``). + @_documentation(visibility: public) + open func _getTransferMode() -> MultiplayerPeer.TransferMode { + return MultiplayerPeer.TransferMode(rawValue: 0)! + } + + /// Called when the target peer to use is set for this ``MultiplayerPeer`` (see ``MultiplayerPeer/setTargetPeer(id:)``). + @_documentation(visibility: public) + open func _setTargetPeer(pPeer: Int32) { + } + + /// Called when the ID of the ``MultiplayerPeer`` who sent the most recent packet is requested (see ``MultiplayerPeer/getPacketPeer()``). + @_documentation(visibility: public) + open func _getPacketPeer() -> Int32 { + return 0 + } + + /// Called when the "is server" status is requested on the ``MultiplayerAPI``. See ``MultiplayerAPI/isServer()``. + @_documentation(visibility: public) + open func _isServer() -> Bool { + return false + } + + /// Called when the ``MultiplayerAPI`` is polled. See ``MultiplayerAPI/poll()``. + @_documentation(visibility: public) + open func _poll() { + } + + /// Called when the multiplayer peer should be immediately closed (see ``MultiplayerPeer/close()``). + @_documentation(visibility: public) + open func _close() { + } + + /// Called when the connected `pPeer` should be forcibly disconnected (see ``MultiplayerPeer/disconnectPeer(_:force:)``). + @_documentation(visibility: public) + open func _disconnectPeer(pPeer: Int32, pForce: Bool) { + } + + /// Called when the unique ID of this ``MultiplayerPeer`` is requested (see ``MultiplayerPeer/getUniqueId()``). The value must be between `1` and `2147483647`. + @_documentation(visibility: public) + open func _getUniqueId() -> Int32 { + return 0 + } + + /// Called when the "refuse new connections" status is set on this ``MultiplayerPeer`` (see ``MultiplayerPeer/refuseNewConnections``). + @_documentation(visibility: public) + open func _setRefuseNewConnections(pEnable: Bool) { + } + + /// Called when the "refuse new connections" status is requested on this ``MultiplayerPeer`` (see ``MultiplayerPeer/refuseNewConnections``). + @_documentation(visibility: public) + open func _isRefusingNewConnections() -> Bool { + return false + } + + /// Called to check if the server can act as a relay in the current configuration. See ``MultiplayerPeer/isServerRelaySupported()``. + @_documentation(visibility: public) + open func _isServerRelaySupported() -> Bool { + return false + } + + /// Called when the connection status is requested on the ``MultiplayerPeer`` (see ``MultiplayerPeer/getConnectionStatus()``). + @_documentation(visibility: public) + open func _getConnectionStatus() -> MultiplayerPeer.ConnectionStatus { + return MultiplayerPeer.ConnectionStatus(rawValue: 0)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_close": + return _MultiplayerPeerExtension_proxy_close + case "_disconnect_peer": + return _MultiplayerPeerExtension_proxy_disconnect_peer + case "_get_available_packet_count": + return _MultiplayerPeerExtension_proxy_get_available_packet_count + case "_get_connection_status": + return _MultiplayerPeerExtension_proxy_get_connection_status + case "_get_max_packet_size": + return _MultiplayerPeerExtension_proxy_get_max_packet_size + case "_get_packet_channel": + return _MultiplayerPeerExtension_proxy_get_packet_channel + case "_get_packet_mode": + return _MultiplayerPeerExtension_proxy_get_packet_mode + case "_get_packet_peer": + return _MultiplayerPeerExtension_proxy_get_packet_peer + case "_get_packet_script": + return _MultiplayerPeerExtension_proxy_get_packet_script + case "_get_transfer_channel": + return _MultiplayerPeerExtension_proxy_get_transfer_channel + case "_get_transfer_mode": + return _MultiplayerPeerExtension_proxy_get_transfer_mode + case "_get_unique_id": + return _MultiplayerPeerExtension_proxy_get_unique_id + case "_is_refusing_new_connections": + return _MultiplayerPeerExtension_proxy_is_refusing_new_connections + case "_is_server": + return _MultiplayerPeerExtension_proxy_is_server + case "_is_server_relay_supported": + return _MultiplayerPeerExtension_proxy_is_server_relay_supported + case "_poll": + return _MultiplayerPeerExtension_proxy_poll + case "_put_packet_script": + return _MultiplayerPeerExtension_proxy_put_packet_script + case "_set_refuse_new_connections": + return _MultiplayerPeerExtension_proxy_set_refuse_new_connections + case "_set_target_peer": + return _MultiplayerPeerExtension_proxy_set_target_peer + case "_set_transfer_channel": + return _MultiplayerPeerExtension_proxy_set_transfer_channel + case "_set_transfer_mode": + return _MultiplayerPeerExtension_proxy_set_transfer_mode + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _MultiplayerPeerExtension_proxy_close (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._close () +} + +func _MultiplayerPeerExtension_proxy_disconnect_peer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._disconnectPeer (pPeer: args [0]!.assumingMemoryBound (to: Int32.self).pointee, pForce: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _MultiplayerPeerExtension_proxy_get_available_packet_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAvailablePacketCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_connection_status (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConnectionStatus () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_max_packet_size (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getMaxPacketSize () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_packet_channel (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPacketChannel () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_packet_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPacketMode () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_packet_peer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPacketPeer () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_packet_script (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPacketScript () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedByteArray + ret.content = PackedByteArray.zero +} + +func _MultiplayerPeerExtension_proxy_get_transfer_channel (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTransferChannel () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_transfer_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTransferMode () + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_get_unique_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getUniqueId () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_is_refusing_new_connections (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isRefusingNewConnections () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _MultiplayerPeerExtension_proxy_is_server (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isServer () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _MultiplayerPeerExtension_proxy_is_server_relay_supported (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isServerRelaySupported () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _MultiplayerPeerExtension_proxy_poll (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._poll () +} + +func _MultiplayerPeerExtension_proxy_put_packet_script (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._putPacketScript (pBuffer: PackedByteArray (content: args [0]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _MultiplayerPeerExtension_proxy_set_refuse_new_connections (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setRefuseNewConnections (pEnable: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _MultiplayerPeerExtension_proxy_set_target_peer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTargetPeer (pPeer: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _MultiplayerPeerExtension_proxy_set_transfer_channel (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTransferChannel (pChannel: args [0]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _MultiplayerPeerExtension_proxy_set_transfer_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTransferMode (pMode: args [0]!.assumingMemoryBound (to: MultiplayerPeer.TransferMode.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerSpawner.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerSpawner.swift new file mode 100644 index 000000000..92e496099 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerSpawner.swift @@ -0,0 +1,502 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Automatically replicates spawnable nodes from the authority to other multiplayer peers. +/// +/// Spawnable scenes can be configured in the editor or through code (see ``addSpawnableScene(path:)``). +/// +/// Also supports custom node spawns through ``spawn(data:)``, calling ``spawnFunction`` on all peers. +/// +/// Internally, ``MultiplayerSpawner`` uses ``MultiplayerAPI/objectConfigurationAdd(object:configuration:)`` to notify spawns passing the spawned node as the `object` and itself as the `configuration`, and ``MultiplayerAPI/objectConfigurationRemove(object:configuration:)`` to notify despawns in a similar way. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``despawned`` +/// - ``spawned`` +open class MultiplayerSpawner: Node { + override open class var godotClassName: StringName { "MultiplayerSpawner" } + + /* Properties */ + + /// Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers. + final public var spawnPath: NodePath { + get { + return get_spawn_path () + } + + set { + set_spawn_path (newValue) + } + + } + + /// Maximum nodes that is allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. + /// + /// When set to `0` (the default), there is no limit. + /// + final public var spawnLimit: UInt32 { + get { + return get_spawn_limit () + } + + set { + set_spawn_limit (newValue) + } + + } + + /// Method called on all peers when for every custom ``spawn(data:)`` requested by the authority. Will receive the `data` parameter, and should return a ``Node`` that is not in the scene tree. + /// + /// > Note: The returned node should **not** be added to the scene with ``Node/addChild(node:forceReadableName:`internal`:)``. This is done automatically. + /// + final public var spawnFunction: Callable { + get { + return get_spawn_function () + } + + set { + set_spawn_function (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_spawnable_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("add_spawnable_scene") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by ``spawnPath``. + public final func addSpawnableScene(path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_add_spawnable_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spawnable_scene_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spawnable_scene_count") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the count of spawnable scene paths. + public final func getSpawnableSceneCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_get_spawnable_scene_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_spawnable_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spawnable_scene") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the spawnable scene path by index. + public final func getSpawnableScene(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_get_spawnable_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_clear_spawnable_scenes: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_spawnable_scenes") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all spawnable scenes. Does not despawn existing instances on remote peers. + public final func clearSpawnableScenes() { + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_clear_spawnable_scenes, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_spawn: GDExtensionMethodBindPtr = { + let methodName = StringName("spawn") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1991184589)! + } + + } + + }() + + /// Requests a custom spawn, with `data` passed to ``spawnFunction`` on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by ``spawnPath``. + /// + /// > Note: Spawnable scenes are spawned automatically. ``spawn(data:)`` is only needed for custom spawns. + /// + public final func spawn(data: Variant?) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_spawn, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_spawn_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spawn_path") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spawn_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_get_spawn_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_spawn_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spawn_path") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spawn_path(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_set_spawn_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spawn_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spawn_limit") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spawn_limit() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_get_spawn_limit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spawn_limit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spawn_limit") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spawn_limit(_ limit: UInt32) { + withUnsafePointer(to: limit) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_set_spawn_limit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spawn_function: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spawn_function") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1307783378)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spawn_function() -> Callable { + let _result: Callable = Callable () + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_get_spawn_function, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_spawn_function: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spawn_function") + return withUnsafePointer(to: &MultiplayerSpawner.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spawn_function(_ spawnFunction: Callable) { + withUnsafePointer(to: spawnFunction.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSpawner.method_set_spawn_function, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.despawned.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var despawned: Signal1 { Signal1 (target: self, signalName: "despawned") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.spawned.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var spawned: Signal2 { Signal2 (target: self, signalName: "spawned") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/MultiplayerSynchronizer.swift b/Sources/SwiftGodot/Generated/Api/MultiplayerSynchronizer.swift new file mode 100644 index 000000000..b07edd7ce --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/MultiplayerSynchronizer.swift @@ -0,0 +1,656 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Synchronizes properties from the multiplayer authority to the remote peers. +/// +/// By default, ``MultiplayerSynchronizer`` synchronizes configured properties to all peers. +/// +/// Visibility can be handled directly with ``setVisibilityFor(peer:visible:)`` or as-needed with ``addVisibilityFilter(_:)`` and ``updateVisibility(forPeer:)``. +/// +/// ``MultiplayerSpawner``s will handle nodes according to visibility of synchronizers as long as the node at ``rootPath`` was spawned by one. +/// +/// Internally, ``MultiplayerSynchronizer`` uses ``MultiplayerAPI/objectConfigurationAdd(object:configuration:)`` to notify synchronization start passing the ``Node`` at ``rootPath`` as the `object` and itself as the `configuration`, and uses ``MultiplayerAPI/objectConfigurationRemove(object:configuration:)`` to notify synchronization end in a similar way. +/// +/// > Note: Synchronization is not supported for ``Object`` type properties, like ``Resource``. Properties that are unique to each peer, like the instance IDs of ``Object``s (see ``Object/getInstanceId()``) or ``RID``s, will also not work in synchronization. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``synchronized`` +/// - ``deltaSynchronized`` +/// - ``visibilityChanged`` +open class MultiplayerSynchronizer: Node { + override open class var godotClassName: StringName { "MultiplayerSynchronizer" } + public enum VisibilityUpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Visibility filters are updated during process frames (see ``Node/notificationInternalProcess``). + case idle = 0 // VISIBILITY_PROCESS_IDLE + /// Visibility filters are updated during physics frames (see ``Node/notificationInternalPhysicsProcess``). + case physics = 1 // VISIBILITY_PROCESS_PHYSICS + /// Visibility filters are not updated automatically, and must be updated manually by calling ``updateVisibility(forPeer:)``. + case none = 2 // VISIBILITY_PROCESS_NONE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .idle: return ".idle" + case .physics: return ".physics" + case .none: return ".none" + } + + } + + } + + + /* Properties */ + + /// Node path that replicated properties are relative to. + /// + /// If ``rootPath`` was spawned by a ``MultiplayerSpawner``, the node will be also be spawned and despawned based on this synchronizer visibility options. + /// + final public var rootPath: NodePath { + get { + return get_root_path () + } + + set { + set_root_path (newValue) + } + + } + + /// Time interval between synchronizations. When set to `0.0` (the default), synchronizations happen every network process frame. + final public var replicationInterval: Double { + get { + return get_replication_interval () + } + + set { + set_replication_interval (newValue) + } + + } + + /// Time interval between delta synchronizations. When set to `0.0` (the default), delta synchronizations happen every network process frame. + final public var deltaInterval: Double { + get { + return get_delta_interval () + } + + set { + set_delta_interval (newValue) + } + + } + + /// Resource containing which properties to synchronize. + final public var replicationConfig: SceneReplicationConfig? { + get { + return get_replication_config () + } + + set { + set_replication_config (newValue) + } + + } + + /// Specifies when visibility filters are updated (see ``MultiplayerSynchronizer/VisibilityUpdateMode`` for options). + final public var visibilityUpdateMode: MultiplayerSynchronizer.VisibilityUpdateMode { + get { + return get_visibility_update_mode () + } + + set { + set_visibility_update_mode (newValue) + } + + } + + /// Whether synchronization should be visible to all peers by default. See ``setVisibilityFor(peer:visible:)`` and ``addVisibilityFilter(_:)`` for ways of configuring fine-grained visibility options. + final public var publicVisibility: Bool { + get { + return is_visibility_public () + } + + set { + set_visibility_public (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_root_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_path") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_path(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_root_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_path") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_root_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_replication_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_replication_interval") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_replication_interval(_ milliseconds: Double) { + withUnsafePointer(to: milliseconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_replication_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_replication_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_replication_interval") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_replication_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_replication_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_delta_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delta_interval") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_delta_interval(_ milliseconds: Double) { + withUnsafePointer(to: milliseconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_delta_interval, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_delta_interval: GDExtensionMethodBindPtr = { + let methodName = StringName("get_delta_interval") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_delta_interval() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_delta_interval, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_replication_config: GDExtensionMethodBindPtr = { + let methodName = StringName("set_replication_config") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3889206742)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_replication_config(_ config: SceneReplicationConfig?) { + withUnsafePointer(to: config?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_replication_config, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_replication_config: GDExtensionMethodBindPtr = { + let methodName = StringName("get_replication_config") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200254614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_replication_config() -> SceneReplicationConfig? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_replication_config, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_visibility_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_update_mode") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3494860300)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_update_mode(_ mode: MultiplayerSynchronizer.VisibilityUpdateMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_visibility_update_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_update_mode") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3352241418)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_update_mode() -> MultiplayerSynchronizer.VisibilityUpdateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_visibility_update_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return MultiplayerSynchronizer.VisibilityUpdateMode (rawValue: _result)! + } + + fileprivate static var method_update_visibility: GDExtensionMethodBindPtr = { + let methodName = StringName("update_visibility") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Updates the visibility of `forPeer` according to visibility filters. If `forPeer` is `0` (the default), all peers' visibilties are updated. + public final func updateVisibility(forPeer: Int32 = 0) { + withUnsafePointer(to: forPeer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_update_visibility, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visibility_public: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_public") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_public(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_visibility_public, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_visibility_public: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visibility_public") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_visibility_public() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_is_visibility_public, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_visibility_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("add_visibility_filter") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Adds a peer visibility filter for this synchronizer. + /// + /// `filter` should take a peer ID integer and return a [bool]. + /// + public final func addVisibilityFilter(_ filter: Callable) { + withUnsafePointer(to: filter.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_add_visibility_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_visibility_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_visibility_filter") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Removes a peer visibility filter from this synchronizer. + public final func removeVisibilityFilter(_ filter: Callable) { + withUnsafePointer(to: filter.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_remove_visibility_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visibility_for: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_for") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the visibility of `peer` to `visible`. If `peer` is `0`, the value of ``publicVisibility`` will be updated instead. + public final func setVisibilityFor(peer: Int32, visible: Bool) { + withUnsafePointer(to: peer) { pArg0 in + withUnsafePointer(to: visible) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_set_visibility_for, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_visibility_for: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_for") + return withUnsafePointer(to: &MultiplayerSynchronizer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Queries the current visibility for peer `peer`. + public final func getVisibilityFor(peer: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: peer) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(MultiplayerSynchronizer.method_get_visibility_for, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + // Signals + /// Emitted when a new synchronization state is received by this synchronizer after the properties have been updated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.synchronized.connect { + /// print ("caught signal") + /// } + /// ``` + public var synchronized: SimpleSignal { SimpleSignal (target: self, signalName: "synchronized") } + + /// Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.deltaSynchronized.connect { + /// print ("caught signal") + /// } + /// ``` + public var deltaSynchronized: SimpleSignal { SimpleSignal (target: self, signalName: "delta_synchronized") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ forPeer: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when visibility of `forPeer` is updated. See ``updateVisibility(forPeer:)``. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.visibilityChanged.connect { forPeer in + /// print ("caught signal") + /// } + /// ``` + public var visibilityChanged: Signal1 { Signal1 (target: self, signalName: "visibility_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Mutex.swift b/Sources/SwiftGodot/Generated/Api/Mutex.swift new file mode 100644 index 000000000..8363f02c9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Mutex.swift @@ -0,0 +1,102 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A binary ``Semaphore`` for synchronization of multiple ``Thread``s. +/// +/// A synchronization mutex (mutual exclusion). This is used to synchronize multiple ``Thread``s, and is equivalent to a binary ``Semaphore``. It guarantees that only one thread can access a critical section at a time. +/// +/// This is a reentrant mutex, meaning that it can be locked multiple times by one thread, provided it also unlocks it as many times. +/// +/// > Warning: Mutexes must be used carefully to avoid deadlocks. +/// +/// > Warning: To ensure proper cleanup without crashes or deadlocks, the following conditions must be met: +/// +/// - When a ``Mutex``'s reference count reaches zero and it is therefore destroyed, no threads (including the one on which the destruction will happen) must have it locked. +/// +/// - When a ``Thread``'s reference count reaches zero and it is therefore destroyed, it must not have any mutex locked. +/// +open class Mutex: RefCounted { + override open class var godotClassName: StringName { "Mutex" } + /* Methods */ + fileprivate static var method_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("lock") + return withUnsafePointer(to: &Mutex.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Locks this ``Mutex``, blocks until it is unlocked by the current owner. + /// + /// > Note: This function returns without blocking if the thread already has ownership of the mutex. + /// + public final func lock() { + gi.object_method_bind_ptrcall(Mutex.method_lock, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_try_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("try_lock") + return withUnsafePointer(to: &Mutex.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Tries locking this ``Mutex``, but does not block. Returns `true` on success, `false` otherwise. + /// + /// > Note: This function returns `true` if the thread already has ownership of the mutex. + /// + public final func tryLock() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Mutex.method_try_lock, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_unlock: GDExtensionMethodBindPtr = { + let methodName = StringName("unlock") + return withUnsafePointer(to: &Mutex.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Unlocks this ``Mutex``, leaving it to other threads. + /// + /// > Note: If a thread called ``lock()`` or ``tryLock()`` multiple times while already having ownership of the mutex, it must also call ``unlock()`` the same number of times in order to unlock it correctly. + /// + /// > Warning: Calling ``unlock()`` more times that ``lock()`` on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks. + /// + public final func unlock() { + gi.object_method_bind_ptrcall(Mutex.method_unlock, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NativeMenu.swift b/Sources/SwiftGodot/Generated/Api/NativeMenu.swift new file mode 100644 index 000000000..1a21e2be9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NativeMenu.swift @@ -0,0 +1,2472 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for OS native menus. +/// +/// ``NativeMenu`` handles low-level access to the OS native global menu bar and popup menus. +/// +/// > Note: This is low-level API, consider using ``MenuBar`` with ``MenuBar/preferGlobalMenu`` set to `true`, and ``PopupMenu`` with ``PopupMenu/preferNativeMenu`` set to `true`. +/// +/// To create a menu, use ``createMenu()``, add menu items using `add_*_item` methods. To remove a menu, use ``freeMenu(rid:)``. +/// +open class NativeMenu: Object { + /// The shared instance of this class + public static var shared: NativeMenu = { + return withUnsafePointer (to: &NativeMenu.godotClassName.content) { ptr in + NativeMenu (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "NativeMenu" } + public enum Feature: Int64, CaseIterable, CustomDebugStringConvertible { + /// ``NativeMenu`` supports native global main menu. + case globalMenu = 0 // FEATURE_GLOBAL_MENU + /// ``NativeMenu`` supports native popup menus. + case popupMenu = 1 // FEATURE_POPUP_MENU + /// ``NativeMenu`` supports menu open and close callbacks. + case openCloseCallback = 2 // FEATURE_OPEN_CLOSE_CALLBACK + /// ``NativeMenu`` supports menu item hover callback. + case hoverCallback = 3 // FEATURE_HOVER_CALLBACK + /// ``NativeMenu`` supports menu item accelerator/key callback. + case keyCallback = 4 // FEATURE_KEY_CALLBACK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .globalMenu: return ".globalMenu" + case .popupMenu: return ".popupMenu" + case .openCloseCallback: return ".openCloseCallback" + case .hoverCallback: return ".hoverCallback" + case .keyCallback: return ".keyCallback" + } + + } + + } + + public enum SystemMenus: Int64, CaseIterable, CustomDebugStringConvertible { + /// Invalid special system menu ID. + case invalidMenuId = 0 // INVALID_MENU_ID + /// Global main menu ID. + case mainMenuId = 1 // MAIN_MENU_ID + /// Application (first menu after "Apple" menu on macOS) menu ID. + case applicationMenuId = 2 // APPLICATION_MENU_ID + /// "Window" menu ID (on macOS this menu includes standard window control items and a list of open windows). + case windowMenuId = 3 // WINDOW_MENU_ID + /// "Help" menu ID (on macOS this menu includes help search bar). + case helpMenuId = 4 // HELP_MENU_ID + /// Dock icon right-click menu ID (on macOS this menu include standard application control items and a list of open windows). + case dockMenuId = 5 // DOCK_MENU_ID + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .invalidMenuId: return ".invalidMenuId" + case .mainMenuId: return ".mainMenuId" + case .applicationMenuId: return ".applicationMenuId" + case .windowMenuId: return ".windowMenuId" + case .helpMenuId: return ".helpMenuId" + case .dockMenuId: return ".dockMenuId" + } + + } + + } + + /* Methods */ + fileprivate static var method_has_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("has_feature") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1708975490)! + } + + } + + }() + + /// Returns `true` if the specified `feature` is supported by the current ``NativeMenu``, `false` otherwise. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func hasFeature(_ feature: NativeMenu.Feature) -> Bool { + var _result: Bool = false + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_feature, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("has_system_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 718213027)! + } + + } + + }() + + /// Returns `true` if a special system menu is supported. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func hasSystemMenu(menuId: NativeMenu.SystemMenus) -> Bool { + var _result: Bool = false + withUnsafePointer(to: menuId.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_system_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 469707506)! + } + + } + + }() + + /// Returns RID of a special system menu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getSystemMenu(menuId: NativeMenu.SystemMenus) -> RID { + let _result: RID = RID () + withUnsafePointer(to: menuId.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_system_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_system_menu_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_menu_name") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1281499290)! + } + + } + + }() + + /// Returns readable name of a special system menu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getSystemMenuName(menuId: NativeMenu.SystemMenus) -> String { + let _result = GString () + withUnsafePointer(to: menuId.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_system_menu_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_create_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("create_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new global menu object. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func createMenu() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_create_menu, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_has_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("has_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if `rid` is valid global menu. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func hasMenu(rid: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_free_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("free_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Frees a global menu object created by this ``NativeMenu``. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func freeMenu(rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns global menu size. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getSize(rid: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("popup") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2450610377)! + } + + } + + }() + + /// Shows the global menu at `position` in the screen coordinates. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func popup(rid: RID, position: Vector2i) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_popup, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_interface_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interface_direction") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the menu text layout direction from right-to-left if `isRtl` is `true`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setInterfaceDirection(rid: RID, isRtl: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: isRtl) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_interface_direction, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_popup_open_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_popup_open_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Registers callable to emit after the menu is closed. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setPopupOpenCallback(rid: RID, callback: Callable) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_popup_open_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_popup_open_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_popup_open_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3170603026)! + } + + } + + }() + + /// Returns global menu open callback. + /// + /// b]Note:** This method is implemented only on macOS. + /// + public static func getPopupOpenCallback(rid: RID) -> Callable { + let _result: Callable = Callable () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_popup_open_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_popup_close_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_popup_close_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Registers callable to emit when the menu is about to show. + /// + /// > Note: The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use ``isOpened(rid:)`` to check if the menu is currently opened. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setPopupCloseCallback(rid: RID, callback: Callable) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_popup_close_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_popup_close_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_popup_close_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3170603026)! + } + + } + + }() + + /// Returns global menu close callback. + /// + /// b]Note:** This method is implemented only on macOS. + /// + public static func getPopupCloseCallback(rid: RID) -> Callable { + let _result: Callable = Callable () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_popup_close_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_minimum_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_minimum_width") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the minimum width of the global menu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setMinimumWidth(rid: RID, width: Double) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_minimum_width, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_minimum_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_minimum_width") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns global menu minimum width. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getMinimumWidth(rid: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_minimum_width, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_opened: GDExtensionMethodBindPtr = { + let methodName = StringName("is_opened") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the menu is currently opened. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func isOpened(rid: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_opened, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_submenu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_submenu_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1002030223)! + } + + } + + }() + + /// Adds an item that will act as a submenu of the global menu `rid`. The `submenuRid` argument is the RID of the global menu that will be shown when the item is clicked. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func addSubmenuItem(rid: RID, label: String, submenuRid: RID, tag: Variant?, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: submenuRid.content) { pArg2 in + withUnsafePointer(to: tag.content) { pArg3 in + withUnsafePointer(to: index) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_add_submenu_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2553375659)! + } + + } + + }() + + /// Adds a new item with text `label` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addItem(rid: RID, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_add_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_check_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2553375659)! + } + + } + + }() + + /// Adds a new checkable item with text `label` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addCheckItem(rid: RID, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_add_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_icon_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2987595282)! + } + + } + + }() + + /// Adds a new item with text `label` and icon `icon` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addIconItem(rid: RID, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_add_icon_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_icon_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_check_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2987595282)! + } + + } + + }() + + /// Adds a new checkable item with text `label` and icon `icon` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addIconCheckItem(rid: RID, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_add_icon_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_radio_check_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2553375659)! + } + + } + + }() + + /// Adds a new radio-checkable item with text `label` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(rid:idx:checked:)`` for more info on how to control it. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addRadioCheckItem(rid: RID, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: keyCallback.content) { pArg3 in + withUnsafePointer(to: tag.content) { pArg4 in + withUnsafePointer(to: accelerator.rawValue) { pArg5 in + withUnsafePointer(to: index) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_add_radio_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_icon_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_radio_check_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2987595282)! + } + + } + + }() + + /// Adds a new radio-checkable item with text `label` and icon `icon` to the global menu `rid`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(rid:idx:checked:)`` for more info on how to control it. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addIconRadioCheckItem(rid: RID, icon: Texture2D?, label: String, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: keyCallback.content) { pArg4 in + withUnsafePointer(to: tag.content) { pArg5 in + withUnsafePointer(to: accelerator.rawValue) { pArg6 in + withUnsafePointer(to: index) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_add_icon_radio_check_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_multistate_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_multistate_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558592568)! + } + + } + + }() + + /// Adds a new item with text `label` to the global menu `rid`. + /// + /// Contrarily to normal binary items, multistate items can have more than two states, as defined by `maxStates`. Each press or activate of the item will increase the state by one. The default value is defined by `defaultState`. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// An `accelerator` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The `accelerator` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: By default, there's no indication of the current item state, it should be changed manually. + /// + /// > Note: The `callback` and `keyCallback` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to `tag`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: On Windows, `accelerator` and `keyCallback` are ignored. + /// + public static func addMultistateItem(rid: RID, label: String, maxStates: Int32, defaultState: Int32, callback: Callable = Callable(), keyCallback: Callable = Callable(), tag: Variant?, accelerator: Key = .none, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: maxStates) { pArg2 in + withUnsafePointer(to: defaultState) { pArg3 in + withUnsafePointer(to: callback.content) { pArg4 in + withUnsafePointer(to: keyCallback.content) { pArg5 in + withUnsafePointer(to: tag.content) { pArg6 in + withUnsafePointer(to: accelerator.rawValue) { pArg7 in + withUnsafePointer(to: index) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(method_add_multistate_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("add_separator") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 448810126)! + } + + } + + }() + + /// Adds a separator between items to the global menu `rid`. Separators also occupy an index. + /// + /// Returns index of the inserted item, it's not guaranteed to be the same as `index` value. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func addSeparator(rid: RID, index: Int32 = -1) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_separator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_find_item_index_with_text: GDExtensionMethodBindPtr = { + let methodName = StringName("find_item_index_with_text") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1362438794)! + } + + } + + }() + + /// Returns the index of the item with the specified `text`. Indices are automatically assigned to each item by the engine, and cannot be set manually. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func findItemIndexWithText(rid: RID, text: String) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_find_item_index_with_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_find_item_index_with_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("find_item_index_with_tag") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1260085030)! + } + + } + + }() + + /// Returns the index of the item with the specified `tag`. Indices are automatically assigned to each item by the engine, and cannot be set manually. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func findItemIndexWithTag(rid: RID, tag: Variant?) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: tag.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_find_item_index_with_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_find_item_index_with_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("find_item_index_with_submenu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 893635918)! + } + + } + + }() + + /// Returns the index of the item with the submenu specified by `submenuRid`. Indices are automatically assigned to each item by the engine, and cannot be set manually. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func findItemIndexWithSubmenu(rid: RID, submenuRid: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: submenuRid.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_find_item_index_with_submenu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_checked") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is checked. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func isItemChecked(rid: RID, idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_item_checked, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_checkable") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is checkable in some way, i.e. if it has a checkbox or radio button. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func isItemCheckable(rid: RID, idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_item_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_radio_checkable") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` has radio button-style checkability. + /// + /// > Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func isItemRadioCheckable(rid: RID, idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_item_radio_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639989698)! + } + + } + + }() + + /// Returns the callback of the item at index `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemCallback(rid: RID, idx: Int32) -> Callable { + let _result: Callable = Callable () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_key_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_key_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639989698)! + } + + } + + }() + + /// Returns the callback of the item accelerator at index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getItemKeyCallback(rid: RID, idx: Int32) -> Callable { + let _result: Callable = Callable () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_key_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_tag") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4069510997)! + } + + } + + }() + + /// Returns the metadata of the specified item, which might be of any type. You can set it with ``setItemTag(rid:idx:tag:)``, which provides a simple way of assigning context data to items. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemTag(rid: RID, idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1464764419)! + } + + } + + }() + + /// Returns the text of the item at index `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemText(rid: RID, idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_submenu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns the submenu ID of the item at index `idx`. See ``addSubmenuItem(rid:label:submenuRid:tag:index:)`` for more info on how to add a submenu. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemSubmenu(rid: RID, idx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_submenu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_accelerator") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 316800700)! + } + + } + + }() + + /// Returns the accelerator of the item at index `idx`. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getItemAccelerator(rid: RID, idx: Int32) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_accelerator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_is_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_disabled") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is disabled. When it is disabled it can't be selected, or its action invoked. + /// + /// See ``setItemDisabled(rid:idx:disabled:)`` for more info on how to disable an item. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func isItemDisabled(rid: RID, idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_item_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_hidden") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is hidden. + /// + /// See ``setItemHidden(rid:idx:hidden:)`` for more info on how to hide an item. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func isItemHidden(rid: RID, idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_is_item_hidden, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_tooltip") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1464764419)! + } + + } + + }() + + /// Returns the tooltip associated with the specified index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getItemTooltip(rid: RID, idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_tooltip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_state") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1120910005)! + } + + } + + }() + + /// Returns the state of a multistate item. See ``addMultistateItem(rid:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemState(rid: RID, idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_max_states: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_max_states") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1120910005)! + } + + } + + }() + + /// Returns number of states of a multistate item. See ``addMultistateItem(rid:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemMaxStates(rid: RID, idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_max_states, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3391850701)! + } + + } + + }() + + /// Returns the icon of the item at index `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemIcon(rid: RID, idx: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_indentation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_indentation_level") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1120910005)! + } + + } + + }() + + /// Returns the horizontal offset of the item at the given `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func getItemIndentationLevel(rid: RID, idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_indentation_level, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_checked") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Sets the checkstate status of the item at index `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemChecked(rid: RID, idx: Int32, checked: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checked) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_checked, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_checkable") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Sets whether the item at index `idx` has a checkbox. If `false`, sets the type of the item to plain text. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemCheckable(rid: RID, idx: Int32, checkable: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checkable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_radio_checkable") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Sets the type of the item at the specified index `idx` to radio button. If `false`, sets the type of the item to plain text. + /// + /// > Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemRadioCheckable(rid: RID, idx: Int32, checkable: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: checkable) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_radio_checkable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2779810226)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. Callback is emitted when an item is pressed. + /// + /// > Note: The `callback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemCallback(rid: RID, idx: Int32, callback: Callable) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_hover_callbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_hover_callbacks") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2779810226)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. The callback is emitted when an item is hovered. + /// + /// > Note: The `callback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemHoverCallbacks(rid: RID, idx: Int32, callback: Callable) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_hover_callbacks, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_key_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_key_callback") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2779810226)! + } + + } + + }() + + /// Sets the callback of the item at index `idx`. Callback is emitted when its accelerator is activated. + /// + /// > Note: The `keyCallback` Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemKeyCallback(rid: RID, idx: Int32, keyCallback: Callable) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: keyCallback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_key_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_tag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tag") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2706844827)! + } + + } + + }() + + /// Sets the metadata of an item, which may be of any type. You can later get it with ``getItemTag(rid:idx:)``, which provides a simple way of assigning context data to items. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemTag(rid: RID, idx: Int32, tag: Variant?) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: tag.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_tag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4153150897)! + } + + } + + }() + + /// Sets the text of the item at index `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemText(rid: RID, idx: Int32, text: String) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_submenu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Sets the submenu RID of the item at index `idx`. The submenu is a global menu that would be shown when the item is clicked. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemSubmenu(rid: RID, idx: Int32, submenuRid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: submenuRid.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_submenu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_accelerator") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 786300043)! + } + + } + + }() + + /// Sets the accelerator of the item at index `idx`. `keycode` can be a single ``Key``, or a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemAccelerator(rid: RID, idx: Int32, keycode: Key) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: keycode.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_accelerator, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_disabled") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Enables/disables the item at index `idx`. When it is disabled, it can't be selected and its action can't be invoked. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemDisabled(rid: RID, idx: Int32, disabled: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_hidden: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_hidden") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Hides/shows the item at index `idx`. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemHidden(rid: RID, idx: Int32, hidden: Bool) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: hidden) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_hidden, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tooltip") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4153150897)! + } + + } + + }() + + /// Sets the ``String`` tooltip of the item at the specified index `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemTooltip(rid: RID, idx: Int32, tooltip: String) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_tooltip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_state: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_state") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets the state of a multistate item. See ``addMultistateItem(rid:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemState(rid: RID, idx: Int32, state: Int32) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: state) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_max_states: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_max_states") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets number of state of a multistate item. See ``addMultistateItem(rid:label:maxStates:defaultState:callback:keyCallback:tag:accelerator:index:)`` for details. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func setItemMaxStates(rid: RID, idx: Int32, maxStates: Int32) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: maxStates) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_max_states, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1388763257)! + } + + } + + }() + + /// Replaces the ``Texture2D`` icon of the specified `idx`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + /// > Note: This method is not supported by macOS Dock menu items. + /// + public static func setItemIcon(rid: RID, idx: Int32, icon: Texture2D?) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: icon?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_icon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_indentation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_indentation_level") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets the horizontal offset of the item at the given `idx`. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func setItemIndentationLevel(rid: RID, idx: Int32, level: Int32) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: level) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_set_item_indentation_level, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_count") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns number of items in the global menu `rid`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func getItemCount(rid: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_item_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_system_menu") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Return `true` is global menu is a special system menu. + /// + /// > Note: This method is implemented only on macOS. + /// + public static func isSystemMenu(rid: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_system_menu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_item") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Removes the item at index `idx` from the global menu `rid`. + /// + /// > Note: The indices of items after the removed item will be shifted by one. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func removeItem(rid: RID, idx: Int32) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: idx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_remove_item, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NativeMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all items from the global menu `rid`. + /// + /// > Note: This method is implemented on macOS and Windows. + /// + public static func clear(rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationAgent2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationAgent2D.swift new file mode 100644 index 000000000..164fc5c96 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationAgent2D.swift @@ -0,0 +1,2267 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D agent used to pathfind to a position while avoiding obstacles. +/// +/// A 2D agent used to pathfind to a position while avoiding static and dynamic obstacles. The calculation can be used by the parent node to dynamically move it along the path. Requires navigation data to work correctly. +/// +/// Dynamic obstacles are avoided using RVO collision avoidance. Avoidance is computed before physics, so the pathfinding information can be used safely in the physics step. +/// +/// > Note: After setting the ``targetPosition`` property, the ``getNextPathPosition()`` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``pathChanged`` +/// - ``targetReached`` +/// - ``waypointReached`` +/// - ``linkReached`` +/// - ``navigationFinished`` +/// - ``velocityComputed`` +open class NavigationAgent2D: Node { + override open class var godotClassName: StringName { "NavigationAgent2D" } + + /* Properties */ + + /// If set, a new navigation path from the current agent position to the ``targetPosition`` is requested from the NavigationServer. + final public var targetPosition: Vector2 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. + final public var pathDesiredDistance: Double { + get { + return get_path_desired_distance () + } + + set { + set_path_desired_distance (newValue) + } + + } + + /// The distance threshold before the target is considered to be reached. On reaching the target, [signal target_reached] is emitted and navigation ends (see ``isNavigationFinished()`` and [signal navigation_finished]). + /// + /// You can make navigation end early by setting this property to a value greater than ``pathDesiredDistance`` (navigation will end before reaching the last waypoint). + /// + /// You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than ``pathDesiredDistance`` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. + /// + final public var targetDesiredDistance: Double { + get { + return get_target_desired_distance () + } + + set { + set_target_desired_distance (newValue) + } + + } + + /// The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. + final public var pathMaxDistance: Double { + get { + return get_path_max_distance () + } + + set { + set_path_max_distance (newValue) + } + + } + + /// A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// The pathfinding algorithm used in the path query. + final public var pathfindingAlgorithm: NavigationPathQueryParameters2D.PathfindingAlgorithm { + get { + return get_pathfinding_algorithm () + } + + set { + set_pathfinding_algorithm (newValue) + } + + } + + /// The path postprocessing applied to the raw path corridor found by the ``pathfindingAlgorithm``. + final public var pathPostprocessing: NavigationPathQueryParameters2D.PathPostProcessing { + get { + return get_path_postprocessing () + } + + set { + set_path_postprocessing (newValue) + } + + } + + /// Additional information to return with the navigation path. + final public var pathMetadataFlags: NavigationPathQueryParameters2D.PathMetadataFlags { + get { + return get_path_metadata_flags () + } + + set { + set_path_metadata_flags (newValue) + } + + } + + /// If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by ``simplifyEpsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + final public var simplifyPath: Bool { + get { + return get_simplify_path () + } + + set { + set_simplify_path (newValue) + } + + } + + /// The path simplification amount in worlds units. + final public var simplifyEpsilon: Double { + get { + return get_simplify_epsilon () + } + + set { + set_simplify_epsilon (newValue) + } + + } + + /// If `true` the agent is registered for an RVO avoidance callback on the ``NavigationServer2D``. When ``velocity`` is used and the processing is completed a `safe_velocity` Vector2 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. + final public var avoidanceEnabled: Bool { + get { + return get_avoidance_enabled () + } + + set { + set_avoidance_enabled (newValue) + } + + } + + /// Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use ``setVelocityForced(velocity:)`` as well to reset the internal simulation velocity. + final public var velocity: Vector2 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by ``neighborDistance``). + /// + /// Does not affect normal pathfinding. To change an actor's pathfinding radius bake ``NavigationMesh`` resources with a different ``NavigationMesh/agentRadius`` property and use different navigation maps for each actor size. + /// + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The distance to search for other agents. + final public var neighborDistance: Double { + get { + return get_neighbor_distance () + } + + set { + set_neighbor_distance (newValue) + } + + } + + /// The maximum number of neighbors for the agent to consider. + final public var maxNeighbors: Int32 { + get { + return get_max_neighbors () + } + + set { + set_max_neighbors (newValue) + } + + } + + /// The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + final public var timeHorizonAgents: Double { + get { + return get_time_horizon_agents () + } + + set { + set_time_horizon_agents (newValue) + } + + } + + /// The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + final public var timeHorizonObstacles: Double { + get { + return get_time_horizon_obstacles () + } + + set { + set_time_horizon_obstacles (newValue) + } + + } + + /// The maximum speed that an agent can move. + final public var maxSpeed: Double { + get { + return get_max_speed () + } + + set { + set_max_speed (newValue) + } + + } + + /// A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the ``avoidanceMask`` will avoid this agent. + final public var avoidanceLayers: UInt32 { + get { + return get_avoidance_layers () + } + + set { + set_avoidance_layers (newValue) + } + + } + + /// A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their ``avoidanceLayers``. + final public var avoidanceMask: UInt32 { + get { + return get_avoidance_mask () + } + + set { + set_avoidance_mask (newValue) + } + + } + + /// The agent does not adjust the velocity for other agents that would match the ``avoidanceMask`` but have a lower ``avoidancePriority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + final public var avoidancePriority: Double { + get { + return get_avoidance_priority () + } + + set { + set_avoidance_priority (newValue) + } + + } + + /// If `true` shows debug visuals for this agent. + final public var debugEnabled: Bool { + get { + return get_debug_enabled () + } + + set { + set_debug_enabled (newValue) + } + + } + + /// If `true` uses the defined ``debugPathCustomColor`` for this agent instead of global color. + final public var debugUseCustom: Bool { + get { + return get_debug_use_custom () + } + + set { + set_debug_use_custom (newValue) + } + + } + + /// If ``debugUseCustom`` is `true` uses this color for this agent instead of global color. + final public var debugPathCustomColor: Color { + get { + return get_debug_path_custom_color () + } + + set { + set_debug_path_custom_color (newValue) + } + + } + + /// If ``debugUseCustom`` is `true` uses this rasterized point size for rendering path points for this agent instead of global point size. + final public var debugPathCustomPointSize: Double { + get { + return get_debug_path_custom_point_size () + } + + set { + set_debug_path_custom_point_size (newValue) + } + + } + + /// If ``debugUseCustom`` is `true` uses this line width for rendering paths for this agent instead of global line width. + final public var debugPathCustomLineWidth: Double { + get { + return get_debug_path_custom_line_width () + } + + set { + set_debug_path_custom_line_width (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this agent on the ``NavigationServer2D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_enabled") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_enabled") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_desired_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_desired_distance(_ desiredDistance: Double) { + withUnsafePointer(to: desiredDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_path_desired_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_desired_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_desired_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_path_desired_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_desired_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_desired_distance(_ desiredDistance: Double) { + withUnsafePointer(to: desiredDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_target_desired_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_desired_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_desired_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_target_desired_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_neighbor_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_neighbor_distance(_ neighborDistance: Double) { + withUnsafePointer(to: neighborDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_neighbor_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_neighbor_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_neighbor_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_neighbor_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_neighbors") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_neighbors(_ maxNeighbors: Int32) { + withUnsafePointer(to: maxNeighbors) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_max_neighbors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_neighbors") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_neighbors() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_max_neighbors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_horizon_agents") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_horizon_agents(_ timeHorizon: Double) { + withUnsafePointer(to: timeHorizon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_time_horizon_agents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_horizon_agents") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_horizon_agents() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_time_horizon_agents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_horizon_obstacles(_ timeHorizon: Double) { + withUnsafePointer(to: timeHorizon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_horizon_obstacles() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_speed") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_speed(_ maxSpeed: Double) { + withUnsafePointer(to: maxSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_max_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_speed") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_max_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_max_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_max_distance(_ maxSpeed: Double) { + withUnsafePointer(to: maxSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_path_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_max_distance") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_path_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783519915)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pathfinding_algorithm(_ pathfindingAlgorithm: NavigationPathQueryParameters2D.PathfindingAlgorithm) { + withUnsafePointer(to: pathfindingAlgorithm.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3000421146)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pathfinding_algorithm() -> NavigationPathQueryParameters2D.PathfindingAlgorithm { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters2D.PathfindingAlgorithm (rawValue: _result)! + } + + fileprivate static var method_set_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_postprocessing") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2864409082)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_postprocessing(_ pathPostprocessing: NavigationPathQueryParameters2D.PathPostProcessing) { + withUnsafePointer(to: pathPostprocessing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_postprocessing") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3798118993)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_postprocessing() -> NavigationPathQueryParameters2D.PathPostProcessing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters2D.PathPostProcessing (rawValue: _result)! + } + + fileprivate static var method_set_path_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_metadata_flags") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 24274129)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_metadata_flags(_ flags: NavigationPathQueryParameters2D.PathMetadataFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_path_metadata_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_metadata_flags") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 488152976)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_metadata_flags() -> NavigationPathQueryParameters2D.PathMetadataFlags { + var _result: NavigationPathQueryParameters2D.PathMetadataFlags = NavigationPathQueryParameters2D.PathMetadataFlags () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_path_metadata_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use ``setNavigationMap(_:)`` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_path") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_path(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_simplify_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_path") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_path() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_simplify_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_epsilon") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_epsilon(_ epsilon: Double) { + withUnsafePointer(to: epsilon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_epsilon") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_epsilon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_next_path_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_next_path_position") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + /// Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. + public final func getNextPathPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_next_path_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity_forced: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity_forced") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Replaces the internal velocity in the collision avoidance simulation with `velocity`. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. + public final func setVelocityForced(velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_velocity_forced, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_distance_to_target: GDExtensionMethodBindPtr = { + let methodName = StringName("distance_to_target") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the distance to the target position, using the agent's global position. The user must set ``targetPosition`` in order for this to be accurate. + public final func distanceToTarget() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_distance_to_target, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_navigation_result: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_result") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166799483)! + } + + } + + }() + + /// Returns the path query result for the path the agent is currently following. + public final func getCurrentNavigationResult() -> NavigationPathQueryResult2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_current_navigation_result, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_current_navigation_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_path") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + /// Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended ``getNextPathPosition()`` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. + public final func getCurrentNavigationPath() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_current_navigation_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_navigation_path_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_path_index") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns which index the agent is currently on in the navigation path's ``PackedVector2Array``. + public final func getCurrentNavigationPathIndex() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_current_navigation_path_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_target_reached: GDExtensionMethodBindPtr = { + let methodName = StringName("is_target_reached") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the agent reached the target, i.e. the agent moved within ``targetDesiredDistance`` of the ``targetPosition``. It may not always be possible to reach the target but it should always be possible to reach the final position. See ``getFinalPosition()``. + public final func isTargetReached() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_is_target_reached, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_target_reachable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_target_reachable") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if ``getFinalPosition()`` is within ``targetDesiredDistance`` of the ``targetPosition``. + public final func isTargetReachable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_is_target_reachable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_navigation_finished: GDExtensionMethodBindPtr = { + let methodName = StringName("is_navigation_finished") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. + /// + /// > Note: While `true` prefer to stop calling update functions like ``getNextPathPosition()``. This avoids jittering the standing agent due to calling repeated path updates. + /// + public final func isNavigationFinished() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_is_navigation_finished, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_final_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_final_position") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497962370)! + } + + } + + }() + + /// Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal. + public final func getFinalPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_final_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layers") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_layers(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layers") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_mask") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_mask") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layer_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``avoidanceLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setAvoidanceLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layer_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``avoidanceLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getAvoidanceLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_avoidance_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_mask_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified mask in the ``avoidanceMask`` bitmask, given a `maskNumber` between 1 and 32. + public final func setAvoidanceMaskValue(maskNumber: Int32, value: Bool) { + withUnsafePointer(to: maskNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_mask_value") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified mask of the ``avoidanceMask`` bitmask is enabled, given a `maskNumber` between 1 and 32. + public final func getAvoidanceMaskValue(maskNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: maskNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_priority") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_avoidance_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_priority") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_avoidance_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_enabled") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_debug_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_enabled") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_debug_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_use_custom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_use_custom") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_use_custom(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_debug_use_custom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_use_custom: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_use_custom") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_use_custom() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_debug_use_custom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_path_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_path_custom_color") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_path_custom_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_debug_path_custom_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_path_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_path_custom_color") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_path_custom_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_debug_path_custom_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_path_custom_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_path_custom_point_size") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_path_custom_point_size(_ pointSize: Double) { + withUnsafePointer(to: pointSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_debug_path_custom_point_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_path_custom_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_path_custom_point_size") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_path_custom_point_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_debug_path_custom_point_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_path_custom_line_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_path_custom_line_width") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_path_custom_line_width(_ lineWidth: Double) { + withUnsafePointer(to: lineWidth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent2D.method_set_debug_path_custom_line_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_path_custom_line_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_path_custom_line_width") + return withUnsafePointer(to: &NavigationAgent2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_path_custom_line_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent2D.method_get_debug_path_custom_line_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the agent had to update the loaded path: + /// + /// - because path was previously empty. + /// + /// - because navigation map has changed. + /// + /// - because agent pushed further away from the current path segment than the ``pathMaxDistance``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pathChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var pathChanged: SimpleSignal { SimpleSignal (target: self, signalName: "path_changed") } + + /// Signals that the agent reached the target, i.e. the agent moved within ``targetDesiredDistance`` of the ``targetPosition``. This signal is emitted only once per loaded path. + /// + /// This signal will be emitted just before [signal navigation_finished] when the target is reachable. + /// + /// It may not always be possible to reach the target but it should always be possible to reach the final position. See ``getFinalPosition()``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.targetReached.connect { + /// print ("caught signal") + /// } + /// ``` + public var targetReached: SimpleSignal { SimpleSignal (target: self, signalName: "target_reached") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ details: GDictionary) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GDictionary (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Signals that the agent reached a waypoint. Emitted when the agent moves within ``pathDesiredDistance`` of the next position of the path. + /// + /// The details dictionary may contain the following keys depending on the value of ``pathMetadataFlags``: + /// + /// - `position`: The position of the waypoint that was reached. + /// + /// - `type`: The type of navigation primitive (region or link) that contains this waypoint. + /// + /// - `rid`: The ``RID`` of the containing navigation primitive (region or link). + /// + /// - `owner`: The object which manages the containing navigation primitive (region or link). + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.waypointReached.connect { details in + /// print ("caught signal") + /// } + /// ``` + public var waypointReached: Signal1 { Signal1 (target: self, signalName: "waypoint_reached") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ details: GDictionary) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GDictionary (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Signals that the agent reached a navigation link. Emitted when the agent moves within ``pathDesiredDistance`` of the next position of the path when that position is a navigation link. + /// + /// The details dictionary may contain the following keys depending on the value of ``pathMetadataFlags``: + /// + /// - `position`: The start position of the link that was reached. + /// + /// - `type`: Always ``NavigationPathQueryResult2D/PathSegmentType/link``. + /// + /// - `rid`: The ``RID`` of the link. + /// + /// - `owner`: The object which manages the link (usually ``NavigationLink2D``). + /// + /// - `link_entry_position`: If `owner` is available and the owner is a ``NavigationLink2D``, it will contain the global position of the link's point the agent is entering. + /// + /// - `link_exit_position`: If `owner` is available and the owner is a ``NavigationLink2D``, it will contain the global position of the link's point which the agent is exiting. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.linkReached.connect { details in + /// print ("caught signal") + /// } + /// ``` + public var linkReached: Signal2 { Signal2 (target: self, signalName: "link_reached") } + + /// Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + /// + /// This signal will be emitted just after [signal target_reached] when the target is reachable. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationFinished: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_finished") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ safeVelocity: Vector2) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector2 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Notifies when the collision avoidance velocity is calculated. Emitted every update as long as ``avoidanceEnabled`` is `true` and the agent has a navigation map. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.velocityComputed.connect { safeVelocity in + /// print ("caught signal") + /// } + /// ``` + public var velocityComputed: Signal3 { Signal3 (target: self, signalName: "velocity_computed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationAgent3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationAgent3D.swift new file mode 100644 index 000000000..8cd192ba6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationAgent3D.swift @@ -0,0 +1,2438 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D agent used to pathfind to a position while avoiding obstacles. +/// +/// A 3D agent used to pathfind to a position while avoiding static and dynamic obstacles. The calculation can be used by the parent node to dynamically move it along the path. Requires navigation data to work correctly. +/// +/// Dynamic obstacles are avoided using RVO collision avoidance. Avoidance is computed before physics, so the pathfinding information can be used safely in the physics step. +/// +/// > Note: After setting the ``targetPosition`` property, the ``getNextPathPosition()`` method must be used once every physics frame to update the internal path logic of the navigation agent. The vector position it returns should be used as the next movement position for the agent's parent node. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``pathChanged`` +/// - ``targetReached`` +/// - ``waypointReached`` +/// - ``linkReached`` +/// - ``navigationFinished`` +/// - ``velocityComputed`` +open class NavigationAgent3D: Node { + override open class var godotClassName: StringName { "NavigationAgent3D" } + + /* Properties */ + + /// If set, a new navigation path from the current agent position to the ``targetPosition`` is requested from the NavigationServer. + final public var targetPosition: Vector3 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. + final public var pathDesiredDistance: Double { + get { + return get_path_desired_distance () + } + + set { + set_path_desired_distance (newValue) + } + + } + + /// The distance threshold before the target is considered to be reached. On reaching the target, [signal target_reached] is emitted and navigation ends (see ``isNavigationFinished()`` and [signal navigation_finished]). + /// + /// You can make navigation end early by setting this property to a value greater than ``pathDesiredDistance`` (navigation will end before reaching the last waypoint). + /// + /// You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than ``pathDesiredDistance`` (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. + /// + final public var targetDesiredDistance: Double { + get { + return get_target_desired_distance () + } + + set { + set_target_desired_distance (newValue) + } + + } + + /// The height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. + final public var pathHeightOffset: Double { + get { + return get_path_height_offset () + } + + set { + set_path_height_offset (newValue) + } + + } + + /// The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. + final public var pathMaxDistance: Double { + get { + return get_path_max_distance () + } + + set { + set_path_max_distance (newValue) + } + + } + + /// A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// The pathfinding algorithm used in the path query. + final public var pathfindingAlgorithm: NavigationPathQueryParameters3D.PathfindingAlgorithm { + get { + return get_pathfinding_algorithm () + } + + set { + set_pathfinding_algorithm (newValue) + } + + } + + /// The path postprocessing applied to the raw path corridor found by the ``pathfindingAlgorithm``. + final public var pathPostprocessing: NavigationPathQueryParameters3D.PathPostProcessing { + get { + return get_path_postprocessing () + } + + set { + set_path_postprocessing (newValue) + } + + } + + /// Additional information to return with the navigation path. + final public var pathMetadataFlags: NavigationPathQueryParameters3D.PathMetadataFlags { + get { + return get_path_metadata_flags () + } + + set { + set_path_metadata_flags (newValue) + } + + } + + /// If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by ``simplifyEpsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + final public var simplifyPath: Bool { + get { + return get_simplify_path () + } + + set { + set_simplify_path (newValue) + } + + } + + /// The path simplification amount in worlds units. + final public var simplifyEpsilon: Double { + get { + return get_simplify_epsilon () + } + + set { + set_simplify_epsilon (newValue) + } + + } + + /// If `true` the agent is registered for an RVO avoidance callback on the ``NavigationServer3D``. When ``velocity`` is set and the processing is completed a `safe_velocity` Vector3 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. + final public var avoidanceEnabled: Bool { + get { + return get_avoidance_enabled () + } + + set { + set_avoidance_enabled (newValue) + } + + } + + /// Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use ``setVelocityForced(velocity:)`` as well to reset the internal simulation velocity. + final public var velocity: Vector3 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// The height of the avoidance agent. Agents will ignore other agents or obstacles that are above or below their current position + height in 2D avoidance. Does nothing in 3D avoidance which uses radius spheres alone. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by ``neighborDistance``). + /// + /// Does not affect normal pathfinding. To change an actor's pathfinding radius bake ``NavigationMesh`` resources with a different ``NavigationMesh/agentRadius`` property and use different navigation maps for each actor size. + /// + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The distance to search for other agents. + final public var neighborDistance: Double { + get { + return get_neighbor_distance () + } + + set { + set_neighbor_distance (newValue) + } + + } + + /// The maximum number of neighbors for the agent to consider. + final public var maxNeighbors: Int32 { + get { + return get_max_neighbors () + } + + set { + set_max_neighbors (newValue) + } + + } + + /// The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + final public var timeHorizonAgents: Double { + get { + return get_time_horizon_agents () + } + + set { + set_time_horizon_agents (newValue) + } + + } + + /// The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + final public var timeHorizonObstacles: Double { + get { + return get_time_horizon_obstacles () + } + + set { + set_time_horizon_obstacles (newValue) + } + + } + + /// The maximum speed that an agent can move. + final public var maxSpeed: Double { + get { + return get_max_speed () + } + + set { + set_max_speed (newValue) + } + + } + + /// If `true`, the agent calculates avoidance velocities in 3D omnidirectionally, e.g. for games that take place in air, underwater or space. Agents using 3D avoidance only avoid other agents using 3D avoidance, and react to radius-based avoidance obstacles. They ignore any vertex-based obstacles. + /// + /// If `false`, the agent calculates avoidance velocities in 2D along the x and z-axes, ignoring the y-axis. Agents using 2D avoidance only avoid other agents using 2D avoidance, and react to radius-based avoidance obstacles or vertex-based avoidance obstacles. Other agents using 2D avoidance that are below or above their current position including ``height`` are ignored. + /// + final public var use3dAvoidance: Bool { + get { + return get_use_3d_avoidance () + } + + set { + set_use_3d_avoidance (newValue) + } + + } + + /// If `true`, and the agent uses 2D avoidance, it will remember the set y-axis velocity and reapply it after the avoidance step. While 2D avoidance has no y-axis and simulates on a flat plane this setting can help to soften the most obvious clipping on uneven 3D geometry. + final public var keepYVelocity: Bool { + get { + return get_keep_y_velocity () + } + + set { + set_keep_y_velocity (newValue) + } + + } + + /// A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the ``avoidanceMask`` will avoid this agent. + final public var avoidanceLayers: UInt32 { + get { + return get_avoidance_layers () + } + + set { + set_avoidance_layers (newValue) + } + + } + + /// A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their ``avoidanceLayers``. + final public var avoidanceMask: UInt32 { + get { + return get_avoidance_mask () + } + + set { + set_avoidance_mask (newValue) + } + + } + + /// The agent does not adjust the velocity for other agents that would match the ``avoidanceMask`` but have a lower ``avoidancePriority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + final public var avoidancePriority: Double { + get { + return get_avoidance_priority () + } + + set { + set_avoidance_priority (newValue) + } + + } + + /// If `true` shows debug visuals for this agent. + final public var debugEnabled: Bool { + get { + return get_debug_enabled () + } + + set { + set_debug_enabled (newValue) + } + + } + + /// If `true` uses the defined ``debugPathCustomColor`` for this agent instead of global color. + final public var debugUseCustom: Bool { + get { + return get_debug_use_custom () + } + + set { + set_debug_use_custom (newValue) + } + + } + + /// If ``debugUseCustom`` is `true` uses this color for this agent instead of global color. + final public var debugPathCustomColor: Color { + get { + return get_debug_path_custom_color () + } + + set { + set_debug_path_custom_color (newValue) + } + + } + + /// If ``debugUseCustom`` is `true` uses this rasterized point size for rendering path points for this agent instead of global point size. + final public var debugPathCustomPointSize: Double { + get { + return get_debug_path_custom_point_size () + } + + set { + set_debug_path_custom_point_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this agent on the ``NavigationServer3D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_enabled") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_enabled") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_desired_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_desired_distance(_ desiredDistance: Double) { + withUnsafePointer(to: desiredDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_path_desired_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_desired_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_desired_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_path_desired_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_desired_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_desired_distance(_ desiredDistance: Double) { + withUnsafePointer(to: desiredDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_target_desired_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_desired_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_desired_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_desired_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_target_desired_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_height_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_height_offset") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_height_offset(_ pathHeightOffset: Double) { + withUnsafePointer(to: pathHeightOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_path_height_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_height_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_height_offset") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_height_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_path_height_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_3d_avoidance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_3d_avoidance(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_use_3d_avoidance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_3d_avoidance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_3d_avoidance() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_use_3d_avoidance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_keep_y_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_y_velocity") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keep_y_velocity(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_keep_y_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_keep_y_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keep_y_velocity") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_keep_y_velocity() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_keep_y_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_neighbor_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_neighbor_distance(_ neighborDistance: Double) { + withUnsafePointer(to: neighborDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_neighbor_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_neighbor_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_neighbor_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_neighbor_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_neighbors") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_neighbors(_ maxNeighbors: Int32) { + withUnsafePointer(to: maxNeighbors) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_max_neighbors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_neighbors") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_neighbors() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_max_neighbors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_horizon_agents") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_horizon_agents(_ timeHorizon: Double) { + withUnsafePointer(to: timeHorizon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_time_horizon_agents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_horizon_agents") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_horizon_agents() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_time_horizon_agents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_horizon_obstacles(_ timeHorizon: Double) { + withUnsafePointer(to: timeHorizon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_horizon_obstacles() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_speed") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_speed(_ maxSpeed: Double) { + withUnsafePointer(to: maxSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_max_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_speed") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_speed() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_max_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_path_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_max_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_max_distance(_ maxSpeed: Double) { + withUnsafePointer(to: maxSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_path_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_max_distance") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_path_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 394560454)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pathfinding_algorithm(_ pathfindingAlgorithm: NavigationPathQueryParameters3D.PathfindingAlgorithm) { + withUnsafePointer(to: pathfindingAlgorithm.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3398491350)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pathfinding_algorithm() -> NavigationPathQueryParameters3D.PathfindingAlgorithm { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters3D.PathfindingAlgorithm (rawValue: _result)! + } + + fileprivate static var method_set_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_postprocessing") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2267362344)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_postprocessing(_ pathPostprocessing: NavigationPathQueryParameters3D.PathPostProcessing) { + withUnsafePointer(to: pathPostprocessing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_postprocessing") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3883858360)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_postprocessing() -> NavigationPathQueryParameters3D.PathPostProcessing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters3D.PathPostProcessing (rawValue: _result)! + } + + fileprivate static var method_set_path_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_metadata_flags") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2713846708)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_metadata_flags(_ flags: NavigationPathQueryParameters3D.PathMetadataFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_path_metadata_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_metadata_flags") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1582332802)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_metadata_flags() -> NavigationPathQueryParameters3D.PathMetadataFlags { + var _result: NavigationPathQueryParameters3D.PathMetadataFlags = NavigationPathQueryParameters3D.PathMetadataFlags () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_path_metadata_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use ``setNavigationMap(_:)`` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_path") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_path(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_simplify_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_path") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_path() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_simplify_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_epsilon") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_epsilon(_ epsilon: Double) { + withUnsafePointer(to: epsilon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_epsilon") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_epsilon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_next_path_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_next_path_position") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + /// Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. + public final func getNextPathPosition() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_next_path_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity_forced: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity_forced") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Replaces the internal velocity in the collision avoidance simulation with `velocity`. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. + public final func setVelocityForced(velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_velocity_forced, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_distance_to_target: GDExtensionMethodBindPtr = { + let methodName = StringName("distance_to_target") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the distance to the target position, using the agent's global position. The user must set ``targetPosition`` in order for this to be accurate. + public final func distanceToTarget() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_distance_to_target, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_current_navigation_result: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_result") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 728825684)! + } + + } + + }() + + /// Returns the path query result for the path the agent is currently following. + public final func getCurrentNavigationResult() -> NavigationPathQueryResult3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_current_navigation_result, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_current_navigation_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_path") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + /// Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended ``getNextPathPosition()`` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. + public final func getCurrentNavigationPath() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_current_navigation_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_current_navigation_path_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_navigation_path_index") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns which index the agent is currently on in the navigation path's ``PackedVector3Array``. + public final func getCurrentNavigationPathIndex() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_current_navigation_path_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_target_reached: GDExtensionMethodBindPtr = { + let methodName = StringName("is_target_reached") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the agent reached the target, i.e. the agent moved within ``targetDesiredDistance`` of the ``targetPosition``. It may not always be possible to reach the target but it should always be possible to reach the final position. See ``getFinalPosition()``. + public final func isTargetReached() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_is_target_reached, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_target_reachable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_target_reachable") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if ``getFinalPosition()`` is within ``targetDesiredDistance`` of the ``targetPosition``. + public final func isTargetReachable() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_is_target_reachable, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_navigation_finished: GDExtensionMethodBindPtr = { + let methodName = StringName("is_navigation_finished") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. + /// + /// > Note: While `true` prefer to stop calling update functions like ``getNextPathPosition()``. This avoids jittering the standing agent due to calling repeated path updates. + /// + public final func isNavigationFinished() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_is_navigation_finished, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_final_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_final_position") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + /// Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal. + public final func getFinalPosition() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_final_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layers") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_layers(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layers") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_mask") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_mask") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layer_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``avoidanceLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setAvoidanceLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layer_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``avoidanceLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getAvoidanceLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_avoidance_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_mask_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified mask in the ``avoidanceMask`` bitmask, given a `maskNumber` between 1 and 32. + public final func setAvoidanceMaskValue(maskNumber: Int32, value: Bool) { + withUnsafePointer(to: maskNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_mask_value") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified mask of the ``avoidanceMask`` bitmask is enabled, given a `maskNumber` between 1 and 32. + public final func getAvoidanceMaskValue(maskNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: maskNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_priority") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_priority(_ priority: Double) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_avoidance_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_priority") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_priority() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_avoidance_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_enabled") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_debug_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_enabled") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_debug_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_use_custom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_use_custom") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_use_custom(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_debug_use_custom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_use_custom: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_use_custom") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_use_custom() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_debug_use_custom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_path_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_path_custom_color") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_path_custom_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_debug_path_custom_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_path_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_path_custom_color") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_path_custom_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_debug_path_custom_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_path_custom_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_path_custom_point_size") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_path_custom_point_size(_ pointSize: Double) { + withUnsafePointer(to: pointSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationAgent3D.method_set_debug_path_custom_point_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_path_custom_point_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_path_custom_point_size") + return withUnsafePointer(to: &NavigationAgent3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_path_custom_point_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationAgent3D.method_get_debug_path_custom_point_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the agent had to update the loaded path: + /// + /// - because path was previously empty. + /// + /// - because navigation map has changed. + /// + /// - because agent pushed further away from the current path segment than the ``pathMaxDistance``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.pathChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var pathChanged: SimpleSignal { SimpleSignal (target: self, signalName: "path_changed") } + + /// Signals that the agent reached the target, i.e. the agent moved within ``targetDesiredDistance`` of the ``targetPosition``. This signal is emitted only once per loaded path. + /// + /// This signal will be emitted just before [signal navigation_finished] when the target is reachable. + /// + /// It may not always be possible to reach the target but it should always be possible to reach the final position. See ``getFinalPosition()``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.targetReached.connect { + /// print ("caught signal") + /// } + /// ``` + public var targetReached: SimpleSignal { SimpleSignal (target: self, signalName: "target_reached") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ details: GDictionary) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GDictionary (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Signals that the agent reached a waypoint. Emitted when the agent moves within ``pathDesiredDistance`` of the next position of the path. + /// + /// The details dictionary may contain the following keys depending on the value of ``pathMetadataFlags``: + /// + /// - `position`: The position of the waypoint that was reached. + /// + /// - `type`: The type of navigation primitive (region or link) that contains this waypoint. + /// + /// - `rid`: The ``RID`` of the containing navigation primitive (region or link). + /// + /// - `owner`: The object which manages the containing navigation primitive (region or link). + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.waypointReached.connect { details in + /// print ("caught signal") + /// } + /// ``` + public var waypointReached: Signal1 { Signal1 (target: self, signalName: "waypoint_reached") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ details: GDictionary) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = GDictionary (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Signals that the agent reached a navigation link. Emitted when the agent moves within ``pathDesiredDistance`` of the next position of the path when that position is a navigation link. + /// + /// The details dictionary may contain the following keys depending on the value of ``pathMetadataFlags``: + /// + /// - `position`: The start position of the link that was reached. + /// + /// - `type`: Always ``NavigationPathQueryResult3D/PathSegmentType/link``. + /// + /// - `rid`: The ``RID`` of the link. + /// + /// - `owner`: The object which manages the link (usually ``NavigationLink3D``). + /// + /// - `link_entry_position`: If `owner` is available and the owner is a ``NavigationLink3D``, it will contain the global position of the link's point the agent is entering. + /// + /// - `link_exit_position`: If `owner` is available and the owner is a ``NavigationLink3D``, it will contain the global position of the link's point which the agent is exiting. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.linkReached.connect { details in + /// print ("caught signal") + /// } + /// ``` + public var linkReached: Signal2 { Signal2 (target: self, signalName: "link_reached") } + + /// Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + /// + /// This signal will be emitted just after [signal target_reached] when the target is reachable. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationFinished: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_finished") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ safeVelocity: Vector3) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Vector3 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Notifies when the collision avoidance velocity is calculated. Emitted every update as long as ``avoidanceEnabled`` is `true` and the agent has a navigation map. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.velocityComputed.connect { safeVelocity in + /// print ("caught signal") + /// } + /// ``` + public var velocityComputed: Signal3 { Signal3 (target: self, signalName: "velocity_computed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationLink2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationLink2D.swift new file mode 100644 index 000000000..51ef1b6a4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationLink2D.swift @@ -0,0 +1,595 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A link between two positions on ``NavigationRegion2D``s that agents can be routed through. +/// +/// A link between two positions on ``NavigationRegion2D``s that agents can be routed through. These positions can be on the same ``NavigationRegion2D`` or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation polygon, such as ziplines, teleporters, or gaps that can be jumped across. +open class NavigationLink2D: Node2D { + override open class var godotClassName: StringName { "NavigationLink2D" } + + /* Properties */ + + /// Whether this link is currently active. If `false`, ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)`` will ignore this link. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// Whether this link can be traveled in both directions or only from ``startPosition`` to ``endPosition``. + final public var bidirectional: Bool { + get { + return is_bidirectional () + } + + set { + set_bidirectional (newValue) + } + + } + + /// A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// Starting position of the link. + /// + /// This position will search out the nearest polygon in the navigation mesh to attach to. + /// + /// The distance the link will search is controlled by ``NavigationServer2D/mapSetLinkConnectionRadius(map:radius:)``. + /// + final public var startPosition: Vector2 { + get { + return get_start_position () + } + + set { + set_start_position (newValue) + } + + } + + /// Ending position of the link. + /// + /// This position will search out the nearest polygon in the navigation mesh to attach to. + /// + /// The distance the link will search is controlled by ``NavigationServer2D/mapSetLinkConnectionRadius(map:radius:)``. + /// + final public var endPosition: Vector2 { + get { + return get_end_position () + } + + set { + set_end_position (newValue) + } + + } + + /// When pathfinding enters this link from another regions navigation mesh the ``enterCost`` value is added to the path distance for determining the shortest path. + final public var enterCost: Double { + get { + return get_enter_cost () + } + + set { + set_enter_cost (newValue) + } + + } + + /// When pathfinding moves along the link the traveled distance is multiplied with ``travelCost`` for determining the shortest path. + final public var travelCost: Double { + get { + return get_travel_cost () + } + + set { + set_travel_cost (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this link on the ``NavigationServer2D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationLink2D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bidirectional") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bidirectional(_ bidirectional: Bool) { + withUnsafePointer(to: bidirectional) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_bidirectional, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bidirectional") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_bidirectional() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationLink2D.method_is_bidirectional, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_end_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_end_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_end_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_end_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_end_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_end_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_start_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the ``startPosition`` that is relative to the link from a global `position`. + public final func setGlobalStartPosition(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_global_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_start_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the ``startPosition`` that is relative to the link as a global position. + public final func getGlobalStartPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_global_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_end_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the ``endPosition`` that is relative to the link from a global `position`. + public final func setGlobalEndPosition(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_global_end_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_end_position") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the ``endPosition`` that is relative to the link as a global position. + public final func getGlobalEndPosition() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_global_end_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enter_cost") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enter_cost(_ enterCost: Double) { + withUnsafePointer(to: enterCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_enter_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enter_cost") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enter_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_enter_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_travel_cost") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_travel_cost(_ travelCost: Double) { + withUnsafePointer(to: travelCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink2D.method_set_travel_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel_cost") + return withUnsafePointer(to: &NavigationLink2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_travel_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationLink2D.method_get_travel_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationLink3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationLink3D.swift new file mode 100644 index 000000000..066ef9609 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationLink3D.swift @@ -0,0 +1,595 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A link between two positions on ``NavigationRegion3D``s that agents can be routed through. +/// +/// A link between two positions on ``NavigationRegion3D``s that agents can be routed through. These positions can be on the same ``NavigationRegion3D`` or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation mesh, such as ziplines, teleporters, or gaps that can be jumped across. +open class NavigationLink3D: Node3D { + override open class var godotClassName: StringName { "NavigationLink3D" } + + /* Properties */ + + /// Whether this link is currently active. If `false`, ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)`` will ignore this link. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// Whether this link can be traveled in both directions or only from ``startPosition`` to ``endPosition``. + final public var bidirectional: Bool { + get { + return is_bidirectional () + } + + set { + set_bidirectional (newValue) + } + + } + + /// A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// Starting position of the link. + /// + /// This position will search out the nearest polygon in the navigation mesh to attach to. + /// + /// The distance the link will search is controlled by ``NavigationServer3D/mapSetLinkConnectionRadius(map:radius:)``. + /// + final public var startPosition: Vector3 { + get { + return get_start_position () + } + + set { + set_start_position (newValue) + } + + } + + /// Ending position of the link. + /// + /// This position will search out the nearest polygon in the navigation mesh to attach to. + /// + /// The distance the link will search is controlled by ``NavigationServer3D/mapSetLinkConnectionRadius(map:radius:)``. + /// + final public var endPosition: Vector3 { + get { + return get_end_position () + } + + set { + set_end_position (newValue) + } + + } + + /// When pathfinding enters this link from another regions navigation mesh the ``enterCost`` value is added to the path distance for determining the shortest path. + final public var enterCost: Double { + get { + return get_enter_cost () + } + + set { + set_enter_cost (newValue) + } + + } + + /// When pathfinding moves along the link the traveled distance is multiplied with ``travelCost`` for determining the shortest path. + final public var travelCost: Double { + get { + return get_travel_cost () + } + + set { + set_travel_cost (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this link on the ``NavigationServer3D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationLink3D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bidirectional") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bidirectional(_ bidirectional: Bool) { + withUnsafePointer(to: bidirectional) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_bidirectional, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bidirectional") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_bidirectional() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationLink3D.method_is_bidirectional, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_end_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_end_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_end_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_end_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_end_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_end_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_start_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the ``startPosition`` that is relative to the link from a global `position`. + public final func setGlobalStartPosition(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_global_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_start_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the ``startPosition`` that is relative to the link as a global position. + public final func getGlobalStartPosition() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_global_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_end_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the ``endPosition`` that is relative to the link from a global `position`. + public final func setGlobalEndPosition(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_global_end_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_end_position") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the ``endPosition`` that is relative to the link as a global position. + public final func getGlobalEndPosition() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_global_end_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enter_cost") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enter_cost(_ enterCost: Double) { + withUnsafePointer(to: enterCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_enter_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enter_cost") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enter_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_enter_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_travel_cost") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_travel_cost(_ travelCost: Double) { + withUnsafePointer(to: travelCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationLink3D.method_set_travel_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel_cost") + return withUnsafePointer(to: &NavigationLink3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_travel_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationLink3D.method_get_travel_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationMesh.swift b/Sources/SwiftGodot/Generated/Api/NavigationMesh.swift new file mode 100644 index 000000000..9184415f1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationMesh.swift @@ -0,0 +1,1717 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A navigation mesh that defines traversable areas and obstacles. +/// +/// A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces. +open class NavigationMesh: Resource { + override open class var godotClassName: StringName { "NavigationMesh" } + public enum SamplePartitionType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. + case watershed = 0 // SAMPLE_PARTITION_WATERSHED + /// Monotone partitioning. Use this if you want fast navigation mesh generation. + case monotone = 1 // SAMPLE_PARTITION_MONOTONE + /// Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. + case layers = 2 // SAMPLE_PARTITION_LAYERS + /// Represents the size of the ``NavigationMesh/SamplePartitionType`` enum. + case max = 3 // SAMPLE_PARTITION_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .watershed: return ".watershed" + case .monotone: return ".monotone" + case .layers: return ".layers" + case .max: return ".max" + } + + } + + } + + public enum ParsedGeometryType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Parses mesh instances as geometry. This includes ``MeshInstance3D``, ``CSGShape3D``, and ``GridMap`` nodes. + case meshInstances = 0 // PARSED_GEOMETRY_MESH_INSTANCES + /// Parses ``StaticBody3D`` colliders as geometry. The collider should be in any of the layers specified by ``geometryCollisionMask``. + case staticColliders = 1 // PARSED_GEOMETRY_STATIC_COLLIDERS + /// Both ``ParsedGeometryType/meshInstances`` and ``ParsedGeometryType/staticColliders``. + case both = 2 // PARSED_GEOMETRY_BOTH + /// Represents the size of the ``NavigationMesh/ParsedGeometryType`` enum. + case max = 3 // PARSED_GEOMETRY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .meshInstances: return ".meshInstances" + case .staticColliders: return ".staticColliders" + case .both: return ".both" + case .max: return ".max" + } + + } + + } + + public enum SourceGeometryMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Scans the child nodes of the root node recursively for geometry. + case rootNodeChildren = 0 // SOURCE_GEOMETRY_ROOT_NODE_CHILDREN + /// Scans nodes in a group and their child nodes recursively for geometry. The group is specified by ``geometrySourceGroupName``. + case groupsWithChildren = 1 // SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN + /// Uses nodes in a group for geometry. The group is specified by ``geometrySourceGroupName``. + case groupsExplicit = 2 // SOURCE_GEOMETRY_GROUPS_EXPLICIT + /// Represents the size of the ``NavigationMesh/SourceGeometryMode`` enum. + case max = 3 // SOURCE_GEOMETRY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rootNodeChildren: return ".rootNodeChildren" + case .groupsWithChildren: return ".groupsWithChildren" + case .groupsExplicit: return ".groupsExplicit" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + final public var vertices: PackedVector3Array { + get { + return get_vertices () + } + + set { + set_vertices (newValue) + } + + } + + /// Partitioning algorithm for creating the navigation mesh polys. See ``NavigationMesh/SamplePartitionType`` for possible values. + final public var samplePartitionType: NavigationMesh.SamplePartitionType { + get { + return get_sample_partition_type () + } + + set { + set_sample_partition_type (newValue) + } + + } + + /// Determines which type of nodes will be parsed as geometry. See ``NavigationMesh/ParsedGeometryType`` for possible values. + final public var geometryParsedGeometryType: NavigationMesh.ParsedGeometryType { + get { + return get_parsed_geometry_type () + } + + set { + set_parsed_geometry_type (newValue) + } + + } + + /// The physics layers to scan for static colliders. + /// + /// Only used when ``geometryParsedGeometryType`` is ``ParsedGeometryType/staticColliders`` or ``ParsedGeometryType/both``. + /// + final public var geometryCollisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The source of the geometry used when baking. See ``NavigationMesh/SourceGeometryMode`` for possible values. + final public var geometrySourceGeometryMode: NavigationMesh.SourceGeometryMode { + get { + return get_source_geometry_mode () + } + + set { + set_source_geometry_mode (newValue) + } + + } + + /// The name of the group to scan for geometry. + /// + /// Only used when ``geometrySourceGeometryMode`` is ``SourceGeometryMode/groupsWithChildren`` or ``SourceGeometryMode/groupsExplicit``. + /// + final public var geometrySourceGroupName: StringName { + get { + return get_source_group_name () + } + + set { + set_source_group_name (newValue) + } + + } + + /// The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map. + final public var cellSize: Double { + get { + return get_cell_size () + } + + set { + set_cell_size (newValue) + } + + } + + /// The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map. + final public var cellHeight: Double { + get { + return get_cell_height () + } + + set { + set_cell_height (newValue) + } + + } + + /// The size of the non-navigable border around the bake bounding area. + /// + /// In conjunction with the ``filterBakingAabb`` and a ``edgeMaxError`` value at `1.0` or below the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by ``agentRadius``. + /// + /// > Note: While baking and not zero, this value will be rounded up to the nearest multiple of ``cellSize``. + /// + final public var borderSize: Double { + get { + return get_border_size () + } + + set { + set_border_size (newValue) + } + + } + + /// The minimum floor to ceiling height that will still allow the floor area to be considered walkable. + /// + /// > Note: While baking, this value will be rounded up to the nearest multiple of ``cellHeight``. + /// + final public var agentHeight: Double { + get { + return get_agent_height () + } + + set { + set_agent_height (newValue) + } + + } + + /// The distance to erode/shrink the walkable area of the heightfield away from obstructions. + /// + /// > Note: While baking, this value will be rounded up to the nearest multiple of ``cellSize``. + /// + final public var agentRadius: Double { + get { + return get_agent_radius () + } + + set { + set_agent_radius (newValue) + } + + } + + /// The minimum ledge height that is considered to still be traversable. + /// + /// > Note: While baking, this value will be rounded down to the nearest multiple of ``cellHeight``. + /// + final public var agentMaxClimb: Double { + get { + return get_agent_max_climb () + } + + set { + set_agent_max_climb (newValue) + } + + } + + /// The maximum slope that is considered walkable, in degrees. + final public var agentMaxSlope: Double { + get { + return get_agent_max_slope () + } + + set { + set_agent_max_slope (newValue) + } + + } + + /// The minimum size of a region for it to be created. + /// + /// > Note: This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. + /// + final public var regionMinSize: Double { + get { + return get_region_min_size () + } + + set { + set_region_min_size (newValue) + } + + } + + /// Any regions with a size smaller than this will be merged with larger regions if possible. + /// + /// > Note: This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. + /// + final public var regionMergeSize: Double { + get { + return get_region_merge_size () + } + + set { + set_region_merge_size (newValue) + } + + } + + /// The maximum allowed length for contour edges along the border of the mesh. A value of `0.0` disables this feature. + /// + /// > Note: While baking, this value will be rounded up to the nearest multiple of ``cellSize``. + /// + final public var edgeMaxLength: Double { + get { + return get_edge_max_length () + } + + set { + set_edge_max_length (newValue) + } + + } + + /// The maximum distance a simplified contour's border edges should deviate the original raw contour. + final public var edgeMaxError: Double { + get { + return get_edge_max_error () + } + + set { + set_edge_max_error (newValue) + } + + } + + /// The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. + final public var verticesPerPolygon: Double { + get { + return get_vertices_per_polygon () + } + + set { + set_vertices_per_polygon (newValue) + } + + } + + /// The sampling distance to use when generating the detail mesh, in cell unit. + final public var detailSampleDistance: Double { + get { + return get_detail_sample_distance () + } + + set { + set_detail_sample_distance (newValue) + } + + } + + /// The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. + final public var detailSampleMaxError: Double { + get { + return get_detail_sample_max_error () + } + + set { + set_detail_sample_max_error (newValue) + } + + } + + /// If `true`, marks non-walkable spans as walkable if their maximum is within ``agentMaxClimb`` of a walkable neighbor. + final public var filterLowHangingObstacles: Bool { + get { + return get_filter_low_hanging_obstacles () + } + + set { + set_filter_low_hanging_obstacles (newValue) + } + + } + + /// If `true`, marks spans that are ledges as non-walkable. + final public var filterLedgeSpans: Bool { + get { + return get_filter_ledge_spans () + } + + set { + set_filter_ledge_spans (newValue) + } + + } + + /// If `true`, marks walkable spans as not walkable if the clearance above the span is less than ``agentHeight``. + final public var filterWalkableLowHeightSpans: Bool { + get { + return get_filter_walkable_low_height_spans () + } + + set { + set_filter_walkable_low_height_spans (newValue) + } + + } + + /// If the baking ``AABB`` has a volume the navigation mesh baking will be restricted to its enclosing area. + final public var filterBakingAabb: AABB { + get { + return get_filter_baking_aabb () + } + + set { + set_filter_baking_aabb (newValue) + } + + } + + /// The position offset applied to the ``filterBakingAabb`` ``AABB``. + final public var filterBakingAabbOffset: Vector3 { + get { + return get_filter_baking_aabb_offset () + } + + set { + set_filter_baking_aabb_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sample_partition_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sample_partition_type") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2472437533)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sample_partition_type(_ samplePartitionType: NavigationMesh.SamplePartitionType) { + withUnsafePointer(to: samplePartitionType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_sample_partition_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sample_partition_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sample_partition_type") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 833513918)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sample_partition_type() -> NavigationMesh.SamplePartitionType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationMesh.method_get_sample_partition_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationMesh.SamplePartitionType (rawValue: _result)! + } + + fileprivate static var method_set_parsed_geometry_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parsed_geometry_type") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3064713163)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_parsed_geometry_type(_ geometryType: NavigationMesh.ParsedGeometryType) { + withUnsafePointer(to: geometryType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_parsed_geometry_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_parsed_geometry_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_geometry_type") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3928011953)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_parsed_geometry_type() -> NavigationMesh.ParsedGeometryType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationMesh.method_get_parsed_geometry_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationMesh.ParsedGeometryType (rawValue: _result)! + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``geometryCollisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``geometryCollisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_source_geometry_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_source_geometry_mode") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2700825194)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_source_geometry_mode(_ mask: NavigationMesh.SourceGeometryMode) { + withUnsafePointer(to: mask.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_source_geometry_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_source_geometry_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_geometry_mode") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2770484141)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_source_geometry_mode() -> NavigationMesh.SourceGeometryMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationMesh.method_get_source_geometry_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationMesh.SourceGeometryMode (rawValue: _result)! + } + + fileprivate static var method_set_source_group_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_source_group_name") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_source_group_name(_ mask: StringName) { + withUnsafePointer(to: mask.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_source_group_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_source_group_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_group_name") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_source_group_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(NavigationMesh.method_get_source_group_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_size(_ cellSize: Double) { + withUnsafePointer(to: cellSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_height") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_height(_ cellHeight: Double) { + withUnsafePointer(to: cellHeight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_cell_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_height") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_cell_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_border_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_border_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_border_size(_ borderSize: Double) { + withUnsafePointer(to: borderSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_border_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_border_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_border_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_border_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_border_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_agent_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_agent_height") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_agent_height(_ agentHeight: Double) { + withUnsafePointer(to: agentHeight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_agent_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_agent_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_agent_height") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_agent_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_agent_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_agent_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_agent_radius") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_agent_radius(_ agentRadius: Double) { + withUnsafePointer(to: agentRadius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_agent_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_agent_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_agent_radius") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_agent_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_agent_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_agent_max_climb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_agent_max_climb") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_agent_max_climb(_ agentMaxClimb: Double) { + withUnsafePointer(to: agentMaxClimb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_agent_max_climb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_agent_max_climb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_agent_max_climb") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_agent_max_climb() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_agent_max_climb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_agent_max_slope: GDExtensionMethodBindPtr = { + let methodName = StringName("set_agent_max_slope") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_agent_max_slope(_ agentMaxSlope: Double) { + withUnsafePointer(to: agentMaxSlope) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_agent_max_slope, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_agent_max_slope: GDExtensionMethodBindPtr = { + let methodName = StringName("get_agent_max_slope") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_agent_max_slope() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_agent_max_slope, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_region_min_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_region_min_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_region_min_size(_ regionMinSize: Double) { + withUnsafePointer(to: regionMinSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_region_min_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_region_min_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region_min_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_region_min_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_region_min_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_region_merge_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_region_merge_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_region_merge_size(_ regionMergeSize: Double) { + withUnsafePointer(to: regionMergeSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_region_merge_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_region_merge_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region_merge_size") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_region_merge_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_region_merge_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_edge_max_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edge_max_length") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edge_max_length(_ edgeMaxLength: Double) { + withUnsafePointer(to: edgeMaxLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_edge_max_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_edge_max_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_max_length") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_edge_max_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_edge_max_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_edge_max_error: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edge_max_error") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edge_max_error(_ edgeMaxError: Double) { + withUnsafePointer(to: edgeMaxError) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_edge_max_error, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_edge_max_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edge_max_error") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_edge_max_error() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_edge_max_error, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertices_per_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices_per_polygon") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertices_per_polygon(_ verticesPerPolygon: Double) { + withUnsafePointer(to: verticesPerPolygon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_vertices_per_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices_per_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices_per_polygon") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertices_per_polygon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_vertices_per_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_detail_sample_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_detail_sample_distance") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_detail_sample_distance(_ detailSampleDist: Double) { + withUnsafePointer(to: detailSampleDist) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_detail_sample_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_detail_sample_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_detail_sample_distance") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_detail_sample_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_detail_sample_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_detail_sample_max_error: GDExtensionMethodBindPtr = { + let methodName = StringName("set_detail_sample_max_error") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_detail_sample_max_error(_ detailSampleMaxError: Double) { + withUnsafePointer(to: detailSampleMaxError) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_detail_sample_max_error, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_detail_sample_max_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_detail_sample_max_error") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_detail_sample_max_error() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_detail_sample_max_error, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_low_hanging_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_low_hanging_obstacles") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_low_hanging_obstacles(_ filterLowHangingObstacles: Bool) { + withUnsafePointer(to: filterLowHangingObstacles) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_filter_low_hanging_obstacles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filter_low_hanging_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filter_low_hanging_obstacles") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filter_low_hanging_obstacles() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationMesh.method_get_filter_low_hanging_obstacles, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_ledge_spans: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_ledge_spans") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_ledge_spans(_ filterLedgeSpans: Bool) { + withUnsafePointer(to: filterLedgeSpans) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_filter_ledge_spans, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filter_ledge_spans: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filter_ledge_spans") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filter_ledge_spans() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationMesh.method_get_filter_ledge_spans, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_walkable_low_height_spans: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_walkable_low_height_spans") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_walkable_low_height_spans(_ filterWalkableLowHeightSpans: Bool) { + withUnsafePointer(to: filterWalkableLowHeightSpans) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_filter_walkable_low_height_spans, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filter_walkable_low_height_spans: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filter_walkable_low_height_spans") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filter_walkable_low_height_spans() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationMesh.method_get_filter_walkable_low_height_spans, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_baking_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_baking_aabb") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_baking_aabb(_ bakingAabb: AABB) { + withUnsafePointer(to: bakingAabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_filter_baking_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filter_baking_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filter_baking_aabb") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filter_baking_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(NavigationMesh.method_get_filter_baking_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_filter_baking_aabb_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filter_baking_aabb_offset") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filter_baking_aabb_offset(_ bakingAabbOffset: Vector3) { + withUnsafePointer(to: bakingAabbOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_filter_baking_aabb_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_filter_baking_aabb_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_filter_baking_aabb_offset") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_filter_baking_aabb_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationMesh.method_get_filter_baking_aabb_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + /// Sets the vertices that can be then indexed to create polygons with the ``addPolygon(_:)`` method. + fileprivate final func set_vertices(_ vertices: PackedVector3Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + /// Returns a ``PackedVector3Array`` containing all the vertices being used to create the polygons. + fileprivate final func get_vertices() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(NavigationMesh.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("add_polygon") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + /// Adds a polygon using the indices of the vertices you get when calling ``getVertices()``. + public final func addPolygon(_ polygon: PackedInt32Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_add_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon_count") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of polygons in the navigation mesh. + public final func getPolygonCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationMesh.method_get_polygon_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3668444399)! + } + + } + + }() + + /// Returns a ``PackedInt32Array`` containing the indices of the vertices of a created polygon. + public final func getPolygon(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_polygons") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the array of polygons, but it doesn't clear the array of vertices. + public final func clearPolygons() { + gi.object_method_bind_ptrcall(NavigationMesh.method_clear_polygons, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create_from_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_mesh") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 194775623)! + } + + } + + }() + + /// Initializes the navigation mesh by setting the vertices and indices according to a ``Mesh``. + /// + /// > Note: The given `mesh` must be of type ``Mesh/PrimitiveType/triangles`` and have an index array. + /// + public final func createFromMesh(_ mesh: Mesh?) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMesh.method_create_from_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NavigationMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the internal arrays for vertices and polygon indices. + public final func clear() { + gi.object_method_bind_ptrcall(NavigationMesh.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationMeshGenerator.swift b/Sources/SwiftGodot/Generated/Api/NavigationMeshGenerator.swift new file mode 100644 index 000000000..9061f341c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationMeshGenerator.swift @@ -0,0 +1,172 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Helper class for creating and clearing navigation meshes. +/// +/// This class is responsible for creating and clearing 3D navigation meshes used as ``NavigationMesh`` resources inside ``NavigationRegion3D``. The ``NavigationMeshGenerator`` has very limited to no use for 2D as the navigation mesh baking process expects 3D node types and 3D source geometry to parse. +/// +/// The entire navigation mesh baking is best done in a separate thread as the voxelization, collision tests and mesh optimization steps involved are very slow and performance-intensive operations. +/// +/// Navigation mesh baking happens in multiple steps and the result depends on 3D source geometry and properties of the ``NavigationMesh`` resource. In the first step, starting from a root node and depending on ``NavigationMesh`` properties all valid 3D source geometry nodes are collected from the ``SceneTree``. Second, all collected nodes are parsed for their relevant 3D geometry data and a combined 3D mesh is build. Due to the many different types of parsable objects, from normal ``MeshInstance3D``s to ``CSGShape3D``s or various ``CollisionObject3D``s, some operations to collect geometry data can trigger ``RenderingServer`` and ``PhysicsServer3D`` synchronizations. Server synchronization can have a negative effect on baking time or framerate as it often involves ``Mutex`` locking for thread security. Many parsable objects and the continuous synchronization with other threaded Servers can increase the baking time significantly. On the other hand only a few but very large and complex objects will take some time to prepare for the Servers which can noticeably stall the next frame render. As a general rule the total number of parsable objects and their individual size and complexity should be balanced to avoid framerate issues or very long baking times. The combined mesh is then passed to the Recast Navigation Object to test the source geometry for walkable terrain suitable to ``NavigationMesh`` agent properties by creating a voxel world around the meshes bounding area. +/// +/// The finalized navigation mesh is then returned and stored inside the ``NavigationMesh`` for use as a resource inside ``NavigationRegion3D`` nodes. +/// +/// > Note: Using meshes to not only define walkable surfaces but also obstruct navigation baking does not always work. The navigation baking has no concept of what is a geometry "inside" when dealing with mesh source geometry and this is intentional. Depending on current baking parameters, as soon as the obstructing mesh is large enough to fit a navigation mesh area inside, the baking will generate navigation mesh areas that are inside the obstructing source geometry mesh. +/// +open class NavigationMeshGenerator: Object { + /// The shared instance of this class + public static var shared: NavigationMeshGenerator = { + return withUnsafePointer (to: &NavigationMeshGenerator.godotClassName.content) { ptr in + NavigationMeshGenerator (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "NavigationMeshGenerator" } + /* Methods */ + fileprivate static var method_bake: GDExtensionMethodBindPtr = { + let methodName = StringName("bake") + return withUnsafePointer(to: &NavigationMeshGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1401173477)! + } + + } + + }() + + /// Bakes the `navigationMesh` with source geometry collected starting from the `rootNode`. + public static func bake(navigationMesh: NavigationMesh?, rootNode: Node?) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: rootNode?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_bake, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NavigationMeshGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2923361153)! + } + + } + + }() + + /// Removes all polygons and vertices from the provided `navigationMesh` resource. + public static func clear(navigationMesh: NavigationMesh?) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_parse_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_source_geometry_data") + return withUnsafePointer(to: &NavigationMeshGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 685862123)! + } + + } + + }() + + /// Parses the ``SceneTree`` for source geometry according to the properties of `navigationMesh`. Updates the provided `sourceGeometryData` resource with the resulting data. The resource can then be used to bake a navigation mesh with ``bakeFromSourceGeometryData(navigationMesh:sourceGeometryData:callback:)``. After the process is finished the optional `callback` will be called. + /// + /// > Note: This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + /// + /// **Performance:** While convenient, reading data arrays from ``Mesh`` resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the ``RenderingServer`` in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + /// + public static func parseSourceGeometryData(navigationMesh: NavigationMesh?, sourceGeometryData: NavigationMeshSourceGeometryData3D?, rootNode: Node?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: rootNode?.handle) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_parse_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bake_from_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_from_source_geometry_data") + return withUnsafePointer(to: &NavigationMeshGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2469318639)! + } + + } + + }() + + /// Bakes the provided `navigationMesh` with the data from the provided `sourceGeometryData`. After the process is finished the optional `callback` will be called. + public static func bakeFromSourceGeometryData(navigationMesh: NavigationMesh?, sourceGeometryData: NavigationMeshSourceGeometryData3D?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_from_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData2D.swift new file mode 100644 index 000000000..62ce5e15d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData2D.swift @@ -0,0 +1,419 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Container for parsed source geometry data used in navigation mesh baking. +/// +/// Container for parsed source geometry data used in navigation mesh baking. +open class NavigationMeshSourceGeometryData2D: Resource { + override open class var godotClassName: StringName { "NavigationMeshSourceGeometryData2D" } + + /* Properties */ + + final public var traversableOutlines: VariantCollection { + get { + return get_traversable_outlines () + } + + set { + set_traversable_outlines (newValue) + } + + } + + final public var obstructionOutlines: VariantCollection { + get { + return get_obstruction_outlines () + } + + set { + set_obstruction_outlines (newValue) + } + + } + + final public var projectedObstructions: GArray { + get { + return get_projected_obstructions () + } + + set { + set_projected_obstructions (newValue) + } + + } + + /* Methods */ + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the internal data. + public final func clear() { + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_has_data: GDExtensionMethodBindPtr = { + let methodName = StringName("has_data") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` when parsed source geometry data exists. + public final func hasData() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_has_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_traversable_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("set_traversable_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets all the traversable area outlines arrays. + fileprivate final func set_traversable_outlines(_ traversableOutlines: VariantCollection) { + withUnsafePointer(to: traversableOutlines.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_set_traversable_outlines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_traversable_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_traversable_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + /// Returns all the traversable area outlines arrays. + fileprivate final func get_traversable_outlines() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_get_traversable_outlines, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_obstruction_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("set_obstruction_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets all the obstructed area outlines arrays. + fileprivate final func set_obstruction_outlines(_ obstructionOutlines: VariantCollection) { + withUnsafePointer(to: obstructionOutlines.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_set_obstruction_outlines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_obstruction_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("get_obstruction_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + /// Returns all the obstructed area outlines arrays. + fileprivate final func get_obstruction_outlines() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_get_obstruction_outlines, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_append_traversable_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("append_traversable_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + /// Appends another array of `traversableOutlines` at the end of the existing traversable outlines array. + public final func appendTraversableOutlines(_ traversableOutlines: VariantCollection) { + withUnsafePointer(to: traversableOutlines.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_append_traversable_outlines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_append_obstruction_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("append_obstruction_outlines") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + /// Appends another array of `obstructionOutlines` at the end of the existing obstruction outlines array. + public final func appendObstructionOutlines(_ obstructionOutlines: VariantCollection) { + withUnsafePointer(to: obstructionOutlines.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_append_obstruction_outlines, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_traversable_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("add_traversable_outline") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + /// Adds the outline points of a shape as traversable area. + public final func addTraversableOutline(shapeOutline: PackedVector2Array) { + withUnsafePointer(to: shapeOutline.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_add_traversable_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_obstruction_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("add_obstruction_outline") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + /// Adds the outline points of a shape as obstructed area. + public final func addObstructionOutline(shapeOutline: PackedVector2Array) { + withUnsafePointer(to: shapeOutline.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_add_obstruction_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_merge: GDExtensionMethodBindPtr = { + let methodName = StringName("merge") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 742424872)! + } + + } + + }() + + /// Adds the geometry data of another ``NavigationMeshSourceGeometryData2D`` to the navigation mesh baking data. + public final func merge(otherGeometry: NavigationMeshSourceGeometryData2D?) { + withUnsafePointer(to: otherGeometry?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_merge, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_projected_obstruction: GDExtensionMethodBindPtr = { + let methodName = StringName("add_projected_obstruction") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3882407395)! + } + + } + + }() + + /// Adds a projected obstruction shape to the source geometry. If `carve` is `true` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + public final func addProjectedObstruction(vertices: PackedVector2Array, carve: Bool) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: carve) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_add_projected_obstruction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all projected obstructions. + public final func clearProjectedObstructions() { + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_clear_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + /// + fileprivate final func set_projected_obstructions(_ projectedObstructions: GArray) { + withUnsafePointer(to: projectedObstructions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_set_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + /// Returns the projected obstructions as an ``GArray`` of dictionaries. Each ``GDictionary`` contains the following entries: + /// + /// - `vertices` - A ``PackedFloat32Array`` that defines the outline points of the projected shape. + /// + /// - `carve` - A [bool] that defines how the projected shape affects the navigation mesh baking. If `true` the projected shape will not be affected by addition offsets, e.g. agent radius. + /// + fileprivate final func get_projected_obstructions() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData2D.method_get_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData3D.swift new file mode 100644 index 000000000..92bc81f78 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationMeshSourceGeometryData3D.swift @@ -0,0 +1,447 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Container for parsed source geometry data used in navigation mesh baking. +/// +/// Container for parsed source geometry data used in navigation mesh baking. +open class NavigationMeshSourceGeometryData3D: Resource { + override open class var godotClassName: StringName { "NavigationMeshSourceGeometryData3D" } + + /* Properties */ + + final public var vertices: PackedFloat32Array { + get { + return get_vertices () + } + + set { + set_vertices (newValue) + } + + } + + final public var indices: PackedInt32Array { + get { + return get_indices () + } + + set { + set_indices (newValue) + } + + } + + final public var projectedObstructions: GArray { + get { + return get_projected_obstructions () + } + + set { + set_projected_obstructions (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2899603908)! + } + + } + + }() + + @inline(__always) + /// Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices. + /// + /// > Warning: Inappropriate data can crash the baking process of the involved third-party libraries. + /// + fileprivate final func set_vertices(_ vertices: PackedFloat32Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675695659)! + } + + } + + }() + + @inline(__always) + /// Returns the parsed source geometry data vertices array. + fileprivate final func get_vertices() -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indices") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + /// Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices. + /// + /// > Warning: Inappropriate data can crash the baking process of the involved third-party libraries. + /// + fileprivate final func set_indices(_ indices: PackedInt32Array) { + withUnsafePointer(to: indices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_set_indices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_indices") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + /// Returns the parsed source geometry data indices array. + fileprivate final func get_indices() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_get_indices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_append_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("append_arrays") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3117535015)! + } + + } + + }() + + /// Appends arrays of `vertices` and `indices` at the end of the existing arrays. Adds the existing index as an offset to the appended indices. + public final func appendArrays(vertices: PackedFloat32Array, indices: PackedInt32Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: indices.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_append_arrays, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the internal data. + public final func clear() { + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_has_data: GDExtensionMethodBindPtr = { + let methodName = StringName("has_data") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` when parsed source geometry data exists. + public final func hasData() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_has_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("add_mesh") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 975462459)! + } + + } + + }() + + /// Adds the geometry data of a ``Mesh`` resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since ``NavigationMesh`` resources have no transform, all vertex positions need to be offset by the node's transform using `xform`. + public final func addMesh(_ mesh: Mesh?, xform: Transform3D) { + withUnsafePointer(to: mesh?.handle) { pArg0 in + withUnsafePointer(to: xform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_add_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_mesh_array: GDExtensionMethodBindPtr = { + let methodName = StringName("add_mesh_array") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4235710913)! + } + + } + + }() + + /// Adds an ``GArray`` the size of ``Mesh/ArrayType/max`` and with vertices at index ``Mesh/ArrayType/vertex`` and indices at index ``Mesh/ArrayType/index`` to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since ``NavigationMesh`` resources have no transform, all vertex positions need to be offset by the node's transform using `xform`. + public final func addMeshArray(_ meshArray: GArray, xform: Transform3D) { + withUnsafePointer(to: meshArray.content) { pArg0 in + withUnsafePointer(to: xform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_add_mesh_array, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("add_faces") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1440358797)! + } + + } + + }() + + /// Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since ``NavigationMesh`` resources have no transform, all vertex positions need to be offset by the node's transform using `xform`. + public final func addFaces(_ faces: PackedVector3Array, xform: Transform3D) { + withUnsafePointer(to: faces.content) { pArg0 in + withUnsafePointer(to: xform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_add_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_merge: GDExtensionMethodBindPtr = { + let methodName = StringName("merge") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 655828145)! + } + + } + + }() + + /// Adds the geometry data of another ``NavigationMeshSourceGeometryData3D`` to the navigation mesh baking data. + public final func merge(otherGeometry: NavigationMeshSourceGeometryData3D?) { + withUnsafePointer(to: otherGeometry?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_merge, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_projected_obstruction: GDExtensionMethodBindPtr = { + let methodName = StringName("add_projected_obstruction") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3351846707)! + } + + } + + }() + + /// Adds a projected obstruction shape to the source geometry. The `vertices` are considered projected on a xz-axes plane, placed at the global y-axis `elevation` and extruded by `height`. If `carve` is `true` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. + public final func addProjectedObstruction(vertices: PackedVector3Array, elevation: Double, height: Double, carve: Bool) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: elevation) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: carve) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_add_projected_obstruction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_clear_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all projected obstructions. + public final func clearProjectedObstructions() { + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_clear_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + /// Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: + /// + fileprivate final func set_projected_obstructions(_ projectedObstructions: GArray) { + withUnsafePointer(to: projectedObstructions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_set_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_projected_obstructions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_projected_obstructions") + return withUnsafePointer(to: &NavigationMeshSourceGeometryData3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + /// Returns the projected obstructions as an ``GArray`` of dictionaries. Each ``GDictionary`` contains the following entries: + /// + /// - `vertices` - A ``PackedFloat32Array`` that defines the outline points of the projected shape. + /// + /// - `elevation` - A float that defines the projected shape placement on the y-axis. + /// + /// - `height` - A float that defines how much the projected shape is extruded along the y-axis. + /// + /// - `carve` - A [bool] that defines how the obstacle affects the navigation mesh baking. If `true` the projected shape will not be affected by addition offsets, e.g. agent radius. + /// + fileprivate final func get_projected_obstructions() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(NavigationMeshSourceGeometryData3D.method_get_projected_obstructions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationObstacle2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationObstacle2D.swift new file mode 100644 index 000000000..f56331193 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationObstacle2D.swift @@ -0,0 +1,551 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// 2D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. +/// +/// An obstacle needs a navigation map and outline ``vertices`` defined to work correctly. The outlines can not cross or overlap. +/// +/// Obstacles can be included in the navigation mesh baking process when ``affectNavigationMesh`` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places. If ``carveNavigationMesh`` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. +/// +/// With ``avoidanceEnabled`` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. +/// +open class NavigationObstacle2D: Node2D { + override open class var godotClassName: StringName { "NavigationObstacle2D" } + + /* Properties */ + + /// Sets the avoidance radius for the obstacle. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. + final public var vertices: PackedVector2Array { + get { + return get_vertices () + } + + set { + set_vertices (newValue) + } + + } + + /// If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its ``vertices`` defined shape. + final public var affectNavigationMesh: Bool { + get { + return get_affect_navigation_mesh () + } + + set { + set_affect_navigation_mesh (newValue) + } + + } + + /// If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + /// + /// It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + /// + /// Requires ``affectNavigationMesh`` to be enabled. + /// + final public var carveNavigationMesh: Bool { + get { + return get_carve_navigation_mesh () + } + + set { + set_carve_navigation_mesh (newValue) + } + + } + + /// If `true` the obstacle affects avoidance using agents. + final public var avoidanceEnabled: Bool { + get { + return get_avoidance_enabled () + } + + set { + set_avoidance_enabled (newValue) + } + + } + + /// Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles ``radius``. Does nothing for the obstacles static vertices. + final public var velocity: Vector2 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. + final public var avoidanceLayers: UInt32 { + get { + return get_avoidance_layers () + } + + set { + set_avoidance_layers (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this obstacle on the ``NavigationServer2D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_enabled") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_enabled") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this NavigationObstacle node should use and also updates the `obstacle` on the NavigationServer. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use ``setNavigationMap(_:)`` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertices(_ vertices: PackedVector2Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertices() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layers") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_layers(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layers") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layer_value") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``avoidanceLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setAvoidanceLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layer_value") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``avoidanceLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getAvoidanceLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_affect_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_affect_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_affect_navigation_mesh(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_affect_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_affect_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_affect_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_affect_navigation_mesh() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_affect_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_carve_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_carve_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_carve_navigation_mesh(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_set_carve_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_carve_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_carve_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_carve_navigation_mesh() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle2D.method_get_carve_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationObstacle3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationObstacle3D.swift new file mode 100644 index 000000000..d72919333 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationObstacle3D.swift @@ -0,0 +1,666 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// 3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. +/// +/// An obstacle needs a navigation map and outline ``vertices`` defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis. +/// +/// Obstacles can be included in the navigation mesh baking process when ``affectNavigationMesh`` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places, e.g. inside "solid" geometry or on top of it. If ``carveNavigationMesh`` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius. +/// +/// With ``avoidanceEnabled`` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map. +/// +open class NavigationObstacle3D: Node3D { + override open class var godotClassName: StringName { "NavigationObstacle3D" } + + /* Properties */ + + /// Sets the avoidance radius for the obstacle. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore obstacles that are below or above them. + final public var height: Double { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. + final public var vertices: PackedVector3Array { + get { + return get_vertices () + } + + set { + set_vertices (newValue) + } + + } + + /// If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its ``vertices`` and ``height`` defined shape. + final public var affectNavigationMesh: Bool { + get { + return get_affect_navigation_mesh () + } + + set { + set_affect_navigation_mesh (newValue) + } + + } + + /// If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + /// + /// It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + /// + /// Requires ``affectNavigationMesh`` to be enabled. + /// + final public var carveNavigationMesh: Bool { + get { + return get_carve_navigation_mesh () + } + + set { + set_carve_navigation_mesh (newValue) + } + + } + + /// If `true` the obstacle affects avoidance using agents. + final public var avoidanceEnabled: Bool { + get { + return get_avoidance_enabled () + } + + set { + set_avoidance_enabled (newValue) + } + + } + + /// Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles ``radius``. Does nothing for the obstacles static vertices. + final public var velocity: Vector3 { + get { + return get_velocity () + } + + set { + set_velocity (newValue) + } + + } + + /// A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. + final public var avoidanceLayers: UInt32 { + get { + return get_avoidance_layers () + } + + set { + set_avoidance_layers (newValue) + } + + } + + /// If `true` the obstacle affects 3D avoidance using agent's with obstacle ``radius``. + /// + /// If `false` the obstacle affects 2D avoidance using agent's with both obstacle ``vertices`` as well as obstacle ``radius``. + /// + final public var use3dAvoidance: Bool { + get { + return get_use_3d_avoidance () + } + + set { + set_use_3d_avoidance (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this obstacle on the ``NavigationServer3D``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_enabled") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_enabled") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this NavigationObstacle node should use and also updates the `obstacle` on the NavigationServer. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use ``setNavigationMap(_:)`` to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity(_ velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertices(_ vertices: PackedVector3Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertices() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layers") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_avoidance_layers(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layers") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_avoidance_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_avoidance_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_avoidance_layer_value") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``avoidanceLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setAvoidanceLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_avoidance_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_avoidance_layer_value") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``avoidanceLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getAvoidanceLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_avoidance_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_3d_avoidance") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_3d_avoidance(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_use_3d_avoidance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_3d_avoidance") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_3d_avoidance() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_use_3d_avoidance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_affect_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_affect_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_affect_navigation_mesh(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_affect_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_affect_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_affect_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_affect_navigation_mesh() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_affect_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_carve_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_carve_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_carve_navigation_mesh(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_set_carve_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_carve_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_carve_navigation_mesh") + return withUnsafePointer(to: &NavigationObstacle3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_carve_navigation_mesh() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationObstacle3D.method_get_carve_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters2D.swift new file mode 100644 index 000000000..f28d93528 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters2D.swift @@ -0,0 +1,594 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for 2D navigation path queries. +/// +/// By changing various properties of this object, such as the start and target position, you can configure path queries to the ``NavigationServer2D``. +open class NavigationPathQueryParameters2D: RefCounted { + override open class var godotClassName: StringName { "NavigationPathQueryParameters2D" } + public enum PathfindingAlgorithm: Int64, CaseIterable, CustomDebugStringConvertible { + /// The path query uses the default A* pathfinding algorithm. + case pathfindingAlgorithmAstar = 0 // PATHFINDING_ALGORITHM_ASTAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .pathfindingAlgorithmAstar: return ".pathfindingAlgorithmAstar" + } + + } + + } + + public enum PathPostProcessing: Int64, CaseIterable, CustomDebugStringConvertible { + /// Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + case corridorfunnel = 0 // PATH_POSTPROCESSING_CORRIDORFUNNEL + /// Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + case edgecentered = 1 // PATH_POSTPROCESSING_EDGECENTERED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .corridorfunnel: return ".corridorfunnel" + case .edgecentered: return ".edgecentered" + } + + } + + } + + public struct PathMetadataFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Include the type of navigation primitive (region or link) that each point of the path goes through. + public static let types = PathMetadataFlags (rawValue: 1) + /// Include the ``RID``s of the regions and links that each point of the path goes through. + public static let rids = PathMetadataFlags (rawValue: 2) + /// Include the `ObjectID`s of the ``Object``s which manage the regions and links each point of the path goes through. + public static let owners = PathMetadataFlags (rawValue: 4) + /// Include all available metadata about the returned path. + public static let all = PathMetadataFlags (rawValue: 7) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.types) { result += "types, " } + if self.contains (.rids) { result += "rids, " } + if self.contains (.owners) { result += "owners, " } + if self.contains (.all) { result += "all, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + + /* Properties */ + + /// The navigation map ``RID`` used in the path query. + final public var map: RID { + get { + return get_map () + } + + set { + set_map (newValue) + } + + } + + /// The pathfinding start position in global coordinates. + final public var startPosition: Vector2 { + get { + return get_start_position () + } + + set { + set_start_position (newValue) + } + + } + + /// The pathfinding target position in global coordinates. + final public var targetPosition: Vector2 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The navigation layers the query will use (as a bitmask). + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// The pathfinding algorithm used in the path query. + final public var pathfindingAlgorithm: NavigationPathQueryParameters2D.PathfindingAlgorithm { + get { + return get_pathfinding_algorithm () + } + + set { + set_pathfinding_algorithm (newValue) + } + + } + + /// The path postprocessing applied to the raw path corridor found by the ``pathfindingAlgorithm``. + final public var pathPostprocessing: NavigationPathQueryParameters2D.PathPostProcessing { + get { + return get_path_postprocessing () + } + + set { + set_path_postprocessing (newValue) + } + + } + + /// Additional information to include with the navigation path. + final public var metadataFlags: NavigationPathQueryParameters2D.PathMetadataFlags { + get { + return get_metadata_flags () + } + + set { + set_metadata_flags (newValue) + } + + } + + /// If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by ``simplifyEpsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + final public var simplifyPath: Bool { + get { + return get_simplify_path () + } + + set { + set_simplify_path (newValue) + } + + } + + /// The path simplification amount in worlds units. + final public var simplifyEpsilon: Double { + get { + return get_simplify_epsilon () + } + + set { + set_simplify_epsilon (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2783519915)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pathfinding_algorithm(_ pathfindingAlgorithm: NavigationPathQueryParameters2D.PathfindingAlgorithm) { + withUnsafePointer(to: pathfindingAlgorithm.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3000421146)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pathfinding_algorithm() -> NavigationPathQueryParameters2D.PathfindingAlgorithm { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters2D.PathfindingAlgorithm (rawValue: _result)! + } + + fileprivate static var method_set_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_postprocessing") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2864409082)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_postprocessing(_ pathPostprocessing: NavigationPathQueryParameters2D.PathPostProcessing) { + withUnsafePointer(to: pathPostprocessing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_postprocessing") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3798118993)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_postprocessing() -> NavigationPathQueryParameters2D.PathPostProcessing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters2D.PathPostProcessing (rawValue: _result)! + } + + fileprivate static var method_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_map") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_map(_ map: RID) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_map") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_map() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_position") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_position(_ startPosition: Vector2) { + withUnsafePointer(to: startPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_position") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ targetPosition: Vector2) { + withUnsafePointer(to: targetPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_metadata_flags") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 24274129)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_metadata_flags(_ flags: NavigationPathQueryParameters2D.PathMetadataFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_metadata_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_metadata_flags") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 488152976)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_metadata_flags() -> NavigationPathQueryParameters2D.PathMetadataFlags { + var _result: NavigationPathQueryParameters2D.PathMetadataFlags = NavigationPathQueryParameters2D.PathMetadataFlags () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_metadata_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_path") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_path(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_simplify_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_path") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_path() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_simplify_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_epsilon") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_epsilon(_ epsilon: Double) { + withUnsafePointer(to: epsilon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_set_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_epsilon") + return withUnsafePointer(to: &NavigationPathQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_epsilon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationPathQueryParameters2D.method_get_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters3D.swift new file mode 100644 index 000000000..801c53dbc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryParameters3D.swift @@ -0,0 +1,594 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for 3D navigation path queries. +/// +/// By changing various properties of this object, such as the start and target position, you can configure path queries to the ``NavigationServer3D``. +open class NavigationPathQueryParameters3D: RefCounted { + override open class var godotClassName: StringName { "NavigationPathQueryParameters3D" } + public enum PathfindingAlgorithm: Int64, CaseIterable, CustomDebugStringConvertible { + /// The path query uses the default A* pathfinding algorithm. + case pathfindingAlgorithmAstar = 0 // PATHFINDING_ALGORITHM_ASTAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .pathfindingAlgorithmAstar: return ".pathfindingAlgorithmAstar" + } + + } + + } + + public enum PathPostProcessing: Int64, CaseIterable, CustomDebugStringConvertible { + /// Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. + case corridorfunnel = 0 // PATH_POSTPROCESSING_CORRIDORFUNNEL + /// Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. + case edgecentered = 1 // PATH_POSTPROCESSING_EDGECENTERED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .corridorfunnel: return ".corridorfunnel" + case .edgecentered: return ".edgecentered" + } + + } + + } + + public struct PathMetadataFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Include the type of navigation primitive (region or link) that each point of the path goes through. + public static let types = PathMetadataFlags (rawValue: 1) + /// Include the ``RID``s of the regions and links that each point of the path goes through. + public static let rids = PathMetadataFlags (rawValue: 2) + /// Include the `ObjectID`s of the ``Object``s which manage the regions and links each point of the path goes through. + public static let owners = PathMetadataFlags (rawValue: 4) + /// Include all available metadata about the returned path. + public static let all = PathMetadataFlags (rawValue: 7) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.types) { result += "types, " } + if self.contains (.rids) { result += "rids, " } + if self.contains (.owners) { result += "owners, " } + if self.contains (.all) { result += "all, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + + /* Properties */ + + /// The navigation map ``RID`` used in the path query. + final public var map: RID { + get { + return get_map () + } + + set { + set_map (newValue) + } + + } + + /// The pathfinding start position in global coordinates. + final public var startPosition: Vector3 { + get { + return get_start_position () + } + + set { + set_start_position (newValue) + } + + } + + /// The pathfinding target position in global coordinates. + final public var targetPosition: Vector3 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The navigation layers the query will use (as a bitmask). + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// The pathfinding algorithm used in the path query. + final public var pathfindingAlgorithm: NavigationPathQueryParameters3D.PathfindingAlgorithm { + get { + return get_pathfinding_algorithm () + } + + set { + set_pathfinding_algorithm (newValue) + } + + } + + /// The path postprocessing applied to the raw path corridor found by the ``pathfindingAlgorithm``. + final public var pathPostprocessing: NavigationPathQueryParameters3D.PathPostProcessing { + get { + return get_path_postprocessing () + } + + set { + set_path_postprocessing (newValue) + } + + } + + /// Additional information to include with the navigation path. + final public var metadataFlags: NavigationPathQueryParameters3D.PathMetadataFlags { + get { + return get_metadata_flags () + } + + set { + set_metadata_flags (newValue) + } + + } + + /// If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by ``simplifyEpsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + final public var simplifyPath: Bool { + get { + return get_simplify_path () + } + + set { + set_simplify_path (newValue) + } + + } + + /// The path simplification amount in worlds units. + final public var simplifyEpsilon: Double { + get { + return get_simplify_epsilon () + } + + set { + set_simplify_epsilon (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 394560454)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pathfinding_algorithm(_ pathfindingAlgorithm: NavigationPathQueryParameters3D.PathfindingAlgorithm) { + withUnsafePointer(to: pathfindingAlgorithm.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_pathfinding_algorithm: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pathfinding_algorithm") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3398491350)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_pathfinding_algorithm() -> NavigationPathQueryParameters3D.PathfindingAlgorithm { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_pathfinding_algorithm, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters3D.PathfindingAlgorithm (rawValue: _result)! + } + + fileprivate static var method_set_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_postprocessing") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2267362344)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_postprocessing(_ pathPostprocessing: NavigationPathQueryParameters3D.PathPostProcessing) { + withUnsafePointer(to: pathPostprocessing.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_postprocessing: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_postprocessing") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3883858360)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_postprocessing() -> NavigationPathQueryParameters3D.PathPostProcessing { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_path_postprocessing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPathQueryParameters3D.PathPostProcessing (rawValue: _result)! + } + + fileprivate static var method_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_map") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_map(_ map: RID) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_map") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_map() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_start_position") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_start_position(_ startPosition: Vector3) { + withUnsafePointer(to: startPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_start_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start_position") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_start_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_start_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ targetPosition: Vector3) { + withUnsafePointer(to: targetPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_metadata_flags") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2713846708)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_metadata_flags(_ flags: NavigationPathQueryParameters3D.PathMetadataFlags) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_metadata_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_metadata_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_metadata_flags") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1582332802)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_metadata_flags() -> NavigationPathQueryParameters3D.PathMetadataFlags { + var _result: NavigationPathQueryParameters3D.PathMetadataFlags = NavigationPathQueryParameters3D.PathMetadataFlags () + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_metadata_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_path") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_path(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_simplify_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_path") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_path() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_simplify_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simplify_epsilon") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simplify_epsilon(_ epsilon: Double) { + withUnsafePointer(to: epsilon) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_set_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simplify_epsilon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simplify_epsilon") + return withUnsafePointer(to: &NavigationPathQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simplify_epsilon() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationPathQueryParameters3D.method_get_simplify_epsilon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult2D.swift new file mode 100644 index 000000000..6e605563c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult2D.swift @@ -0,0 +1,288 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents the result of a 2D pathfinding query. +/// +/// This class stores the result of a 2D navigation path query from the ``NavigationServer2D``. +open class NavigationPathQueryResult2D: RefCounted { + override open class var godotClassName: StringName { "NavigationPathQueryResult2D" } + public enum PathSegmentType: Int64, CaseIterable, CustomDebugStringConvertible { + /// This segment of the path goes through a region. + case region = 0 // PATH_SEGMENT_TYPE_REGION + /// This segment of the path goes through a link. + case link = 1 // PATH_SEGMENT_TYPE_LINK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .region: return ".region" + case .link: return ".link" + } + + } + + } + + + /* Properties */ + + /// The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var path: PackedVector2Array { + get { + return get_path () + } + + set { + set_path (newValue) + } + + } + + /// The type of navigation primitive (region or link) that each point of the path goes through. + final public var pathTypes: PackedInt32Array { + get { + return get_path_types () + } + + set { + set_path_types (newValue) + } + + } + + /// The ``RID``s of the regions and links that each point of the path goes through. + final public var pathRids: VariantCollection { + get { + return get_path_rids () + } + + set { + set_path_rids (newValue) + } + + } + + /// The `ObjectID`s of the ``Object``s which manage the regions and links each point of the path goes through. + final public var pathOwnerIds: PackedInt64Array { + get { + return get_path_owner_ids () + } + + set { + set_path_owner_ids (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path(_ path: PackedVector2Array) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_set_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_path_types: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_types") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_types(_ pathTypes: PackedInt32Array) { + withUnsafePointer(to: pathTypes.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_set_path_types, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_types: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_types") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_types() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_get_path_types, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_path_rids: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_rids") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_rids(_ pathRids: VariantCollection) { + withUnsafePointer(to: pathRids.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_set_path_rids, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_rids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_rids") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_rids() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_get_path_rids, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_path_owner_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_owner_ids") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3709968205)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_owner_ids(_ pathOwnerIds: PackedInt64Array) { + withUnsafePointer(to: pathOwnerIds.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_set_path_owner_ids, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_owner_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_owner_ids") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 235988956)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_owner_ids() -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_get_path_owner_ids, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("reset") + return withUnsafePointer(to: &NavigationPathQueryResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Reset the result object to its initial state. This is useful to reuse the object across multiple queries. + public final func reset() { + gi.object_method_bind_ptrcall(NavigationPathQueryResult2D.method_reset, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult3D.swift new file mode 100644 index 000000000..7294dce7e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationPathQueryResult3D.swift @@ -0,0 +1,288 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents the result of a 3D pathfinding query. +/// +/// This class stores the result of a 3D navigation path query from the ``NavigationServer3D``. +open class NavigationPathQueryResult3D: RefCounted { + override open class var godotClassName: StringName { "NavigationPathQueryResult3D" } + public enum PathSegmentType: Int64, CaseIterable, CustomDebugStringConvertible { + /// This segment of the path goes through a region. + case region = 0 // PATH_SEGMENT_TYPE_REGION + /// This segment of the path goes through a link. + case link = 1 // PATH_SEGMENT_TYPE_LINK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .region: return ".region" + case .link: return ".link" + } + + } + + } + + + /* Properties */ + + /// The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var path: PackedVector3Array { + get { + return get_path () + } + + set { + set_path (newValue) + } + + } + + /// The type of navigation primitive (region or link) that each point of the path goes through. + final public var pathTypes: PackedInt32Array { + get { + return get_path_types () + } + + set { + set_path_types (newValue) + } + + } + + /// The ``RID``s of the regions and links that each point of the path goes through. + final public var pathRids: VariantCollection { + get { + return get_path_rids () + } + + set { + set_path_rids (newValue) + } + + } + + /// The `ObjectID`s of the ``Object``s which manage the regions and links each point of the path goes through. + final public var pathOwnerIds: PackedInt64Array { + get { + return get_path_owner_ids () + } + + set { + set_path_owner_ids (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 334873810)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path(_ path: PackedVector3Array) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_set_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_path_types: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_types") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_types(_ pathTypes: PackedInt32Array) { + withUnsafePointer(to: pathTypes.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_set_path_types, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_types: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_types") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_types() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_get_path_types, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_path_rids: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_rids") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_rids(_ pathRids: VariantCollection) { + withUnsafePointer(to: pathRids.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_set_path_rids, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_rids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_rids") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_rids() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_get_path_rids, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_path_owner_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path_owner_ids") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3709968205)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path_owner_ids(_ pathOwnerIds: PackedInt64Array) { + withUnsafePointer(to: pathOwnerIds.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_set_path_owner_ids, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path_owner_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_owner_ids") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 235988956)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path_owner_ids() -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_get_path_owner_ids, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_reset: GDExtensionMethodBindPtr = { + let methodName = StringName("reset") + return withUnsafePointer(to: &NavigationPathQueryResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Reset the result object to its initial state. This is useful to reuse the object across multiple queries. + public final func reset() { + gi.object_method_bind_ptrcall(NavigationPathQueryResult3D.method_reset, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationPolygon.swift b/Sources/SwiftGodot/Generated/Api/NavigationPolygon.swift new file mode 100644 index 000000000..361f5bdda --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationPolygon.swift @@ -0,0 +1,1021 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D navigation mesh that describes a traversable surface for pathfinding. +/// +/// A navigation mesh can be created either by baking it with the help of the ``NavigationServer2D``, or by adding vertices and convex polygon indices arrays manually. +/// +/// To bake a navigation mesh at least one outline needs to be added that defines the outer bounds of the baked area. +/// +/// Adding vertices and polygon indices manually. +/// +open class NavigationPolygon: Resource { + override open class var godotClassName: StringName { "NavigationPolygon" } + public enum ParsedGeometryType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Parses mesh instances as obstruction geometry. This includes ``Polygon2D``, ``MeshInstance2D``, ``MultiMeshInstance2D``, and ``TileMap`` nodes. + /// + /// Meshes are only parsed when they use a 2D vertices surface format. + /// + case meshInstances = 0 // PARSED_GEOMETRY_MESH_INSTANCES + /// Parses ``StaticBody2D`` and ``TileMap`` colliders as obstruction geometry. The collider should be in any of the layers specified by ``parsedCollisionMask``. + case staticColliders = 1 // PARSED_GEOMETRY_STATIC_COLLIDERS + /// Both ``ParsedGeometryType/meshInstances`` and ``ParsedGeometryType/staticColliders``. + case both = 2 // PARSED_GEOMETRY_BOTH + /// Represents the size of the ``NavigationPolygon/ParsedGeometryType`` enum. + case max = 3 // PARSED_GEOMETRY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .meshInstances: return ".meshInstances" + case .staticColliders: return ".staticColliders" + case .both: return ".both" + case .max: return ".max" + } + + } + + } + + public enum SourceGeometryMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Scans the child nodes of the root node recursively for geometry. + case rootNodeChildren = 0 // SOURCE_GEOMETRY_ROOT_NODE_CHILDREN + /// Scans nodes in a group and their child nodes recursively for geometry. The group is specified by ``sourceGeometryGroupName``. + case groupsWithChildren = 1 // SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN + /// Uses nodes in a group for geometry. The group is specified by ``sourceGeometryGroupName``. + case groupsExplicit = 2 // SOURCE_GEOMETRY_GROUPS_EXPLICIT + /// Represents the size of the ``NavigationPolygon/SourceGeometryMode`` enum. + case max = 3 // SOURCE_GEOMETRY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rootNodeChildren: return ".rootNodeChildren" + case .groupsWithChildren: return ".groupsWithChildren" + case .groupsExplicit: return ".groupsExplicit" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + final public var vertices: PackedVector2Array { + get { + return get_vertices () + } + + set { + set_vertices (newValue) + } + + } + + /// Determines which type of nodes will be parsed as geometry. See ``NavigationPolygon/ParsedGeometryType`` for possible values. + final public var parsedGeometryType: NavigationPolygon.ParsedGeometryType { + get { + return get_parsed_geometry_type () + } + + set { + set_parsed_geometry_type (newValue) + } + + } + + /// The physics layers to scan for static colliders. + /// + /// Only used when ``parsedGeometryType`` is ``ParsedGeometryType/staticColliders`` or ``ParsedGeometryType/both``. + /// + final public var parsedCollisionMask: UInt32 { + get { + return get_parsed_collision_mask () + } + + set { + set_parsed_collision_mask (newValue) + } + + } + + /// The source of the geometry used when baking. See ``NavigationPolygon/SourceGeometryMode`` for possible values. + final public var sourceGeometryMode: NavigationPolygon.SourceGeometryMode { + get { + return get_source_geometry_mode () + } + + set { + set_source_geometry_mode (newValue) + } + + } + + /// The group name of nodes that should be parsed for baking source geometry. + /// + /// Only used when ``sourceGeometryMode`` is ``SourceGeometryMode/groupsWithChildren`` or ``SourceGeometryMode/groupsExplicit``. + /// + final public var sourceGeometryGroupName: StringName { + get { + return get_source_geometry_group_name () + } + + set { + set_source_geometry_group_name (newValue) + } + + } + + /// The cell size used to rasterize the navigation mesh vertices. Must match with the cell size on the navigation map. + final public var cellSize: Double { + get { + return get_cell_size () + } + + set { + set_cell_size (newValue) + } + + } + + /// The size of the non-navigable border around the bake bounding area defined by the ``bakingRect`` ``Rect2``. + /// + /// In conjunction with the ``bakingRect`` the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by ``agentRadius``. + /// + final public var borderSize: Double { + get { + return get_border_size () + } + + set { + set_border_size (newValue) + } + + } + + /// The distance to erode/shrink the walkable surface when baking the navigation mesh. + final public var agentRadius: Double { + get { + return get_agent_radius () + } + + set { + set_agent_radius (newValue) + } + + } + + /// If the baking ``Rect2`` has an area the navigation mesh baking will be restricted to its enclosing area. + final public var bakingRect: Rect2 { + get { + return get_baking_rect () + } + + set { + set_baking_rect (newValue) + } + + } + + /// The position offset applied to the ``bakingRect`` ``Rect2``. + final public var bakingRectOffset: Vector2 { + get { + return get_baking_rect_offset () + } + + set { + set_baking_rect_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertices") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + /// Sets the vertices that can be then indexed to create polygons with the ``addPolygon(_:)`` method. + fileprivate final func set_vertices(_ vertices: PackedVector2Array) { + withUnsafePointer(to: vertices.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_vertices, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + /// Returns a ``PackedVector2Array`` containing all the vertices being used to create the polygons. + fileprivate final func get_vertices() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("add_polygon") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + /// Adds a polygon using the indices of the vertices you get when calling ``getVertices()``. + public final func addPolygon(_ polygon: PackedInt32Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_add_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon_count") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the count of all polygons. + public final func getPolygonCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_polygon_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3668444399)! + } + + } + + }() + + /// Returns a ``PackedInt32Array`` containing the indices of the vertices of a created polygon. + public final func getPolygon(idx: Int32) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_clear_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_polygons") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the array of polygons, but it doesn't clear the array of outlines and vertices. + public final func clearPolygons() { + gi.object_method_bind_ptrcall(NavigationPolygon.method_clear_polygons, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_mesh") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 330232164)! + } + + } + + }() + + /// Returns the ``NavigationMesh`` resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the ``NavigationServer3D/regionSetNavigationMesh(region:navigationMesh:)`` API directly (as 2D uses the 3D server behind the scene). + public final func getNavigationMesh() -> NavigationMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("add_outline") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + /// Appends a ``PackedVector2Array`` that contains the vertices of an outline to the internal array that contains all the outlines. + public final func addOutline(_ outline: PackedVector2Array) { + withUnsafePointer(to: outline.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_add_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_outline_at_index: GDExtensionMethodBindPtr = { + let methodName = StringName("add_outline_at_index") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1569738947)! + } + + } + + }() + + /// Adds a ``PackedVector2Array`` that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. + public final func addOutlineAtIndex(outline: PackedVector2Array, index: Int32) { + withUnsafePointer(to: outline.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_add_outline_at_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_outline_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline_count") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of outlines that were created in the editor or by script. + public final func getOutlineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_outline_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("set_outline") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1201971903)! + } + + } + + }() + + /// Changes an outline created in the editor or by script. You have to call ``makePolygonsFromOutlines()`` for the polygons to update. + public final func setOutline(idx: Int32, outline: PackedVector2Array) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: outline.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("get_outline") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3946907486)! + } + + } + + }() + + /// Returns a ``PackedVector2Array`` containing the vertices of an outline that was created in the editor or by script. + public final func getOutline(idx: Int32) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_outline: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_outline") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes an outline created in the editor or by script. You have to call ``makePolygonsFromOutlines()`` for the polygons to update. + public final func removeOutline(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_remove_outline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_outlines") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. + public final func clearOutlines() { + gi.object_method_bind_ptrcall(NavigationPolygon.method_clear_outlines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_make_polygons_from_outlines: GDExtensionMethodBindPtr = { + let methodName = StringName("make_polygons_from_outlines") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Creates polygons from the outlines added in the editor or by script. + public final func makePolygonsFromOutlines() { + gi.object_method_bind_ptrcall(NavigationPolygon.method_make_polygons_from_outlines, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_size(_ cellSize: Double) { + withUnsafePointer(to: cellSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_size") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_border_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_border_size") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_border_size(_ borderSize: Double) { + withUnsafePointer(to: borderSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_border_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_border_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_border_size") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_border_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_border_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_parsed_geometry_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parsed_geometry_type") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2507971764)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_parsed_geometry_type(_ geometryType: NavigationPolygon.ParsedGeometryType) { + withUnsafePointer(to: geometryType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_parsed_geometry_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_parsed_geometry_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_geometry_type") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1073219508)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_parsed_geometry_type() -> NavigationPolygon.ParsedGeometryType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_parsed_geometry_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPolygon.ParsedGeometryType (rawValue: _result)! + } + + fileprivate static var method_set_parsed_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parsed_collision_mask") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_parsed_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_parsed_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_parsed_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_collision_mask") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_parsed_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_parsed_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_parsed_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_parsed_collision_mask_value") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``parsedCollisionMask``, given a `layerNumber` between 1 and 32. + public final func setParsedCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_parsed_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_parsed_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_collision_mask_value") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``parsedCollisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getParsedCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_parsed_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_source_geometry_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_source_geometry_mode") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4002316705)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_source_geometry_mode(_ geometryMode: NavigationPolygon.SourceGeometryMode) { + withUnsafePointer(to: geometryMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_source_geometry_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_source_geometry_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_geometry_mode") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 459686762)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_source_geometry_mode() -> NavigationPolygon.SourceGeometryMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_source_geometry_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NavigationPolygon.SourceGeometryMode (rawValue: _result)! + } + + fileprivate static var method_set_source_geometry_group_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_source_geometry_group_name") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_source_geometry_group_name(_ groupName: StringName) { + withUnsafePointer(to: groupName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_source_geometry_group_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_source_geometry_group_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_geometry_group_name") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_source_geometry_group_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_source_geometry_group_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_agent_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_agent_radius") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_agent_radius(_ agentRadius: Double) { + withUnsafePointer(to: agentRadius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_agent_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_agent_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_agent_radius") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_agent_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_agent_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_baking_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_baking_rect") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_baking_rect(_ rect: Rect2) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_baking_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_baking_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baking_rect") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_baking_rect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_baking_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_baking_rect_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_baking_rect_offset") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_baking_rect_offset(_ rectOffset: Vector2) { + withUnsafePointer(to: rectOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationPolygon.method_set_baking_rect_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_baking_rect_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_baking_rect_offset") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_baking_rect_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(NavigationPolygon.method_get_baking_rect_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &NavigationPolygon.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the internal arrays for vertices and polygon indices. + public final func clear() { + gi.object_method_bind_ptrcall(NavigationPolygon.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationRegion2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationRegion2D.swift new file mode 100644 index 000000000..dec3d4a94 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationRegion2D.swift @@ -0,0 +1,599 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A traversable 2D region that ``NavigationAgent2D``s can use for pathfinding. +/// +/// A traversable 2D region based on a ``NavigationPolygon`` that ``NavigationAgent2D``s can use for pathfinding. +/// +/// Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using ``NavigationServer2D/mapSetEdgeConnectionMargin(map:margin:)``. +/// +/// > Note: Overlapping two regions' navigation polygons is not enough for connecting two regions. They must share a similar edge. +/// +/// The pathfinding cost of entering a region from another region can be controlled with the ``enterCost`` value. +/// +/// > Note: This value is not added to the path cost when the start position is already inside this region. +/// +/// The pathfinding cost of traveling distances inside this region can be controlled with the ``travelCost`` multiplier. +/// +/// > Note: This node caches changes to its properties, so if you make changes to the underlying region ``RID`` in ``NavigationServer2D``, they will not be reflected in this node's properties. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``navigationPolygonChanged`` +/// - ``bakeFinished`` +open class NavigationRegion2D: Node2D { + override open class var godotClassName: StringName { "NavigationRegion2D" } + + /* Properties */ + + /// The ``NavigationPolygon`` resource to use. + final public var navigationPolygon: NavigationPolygon? { + get { + return get_navigation_polygon () + } + + set { + set_navigation_polygon (newValue) + } + + } + + /// Determines if the ``NavigationRegion2D`` is enabled or disabled. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + final public var useEdgeConnections: Bool { + get { + return get_use_edge_connections () + } + + set { + set_use_edge_connections (newValue) + } + + } + + /// A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// When pathfinding enters this region's navigation mesh from another regions navigation mesh the ``enterCost`` value is added to the path distance for determining the shortest path. + final public var enterCost: Double { + get { + return get_enter_cost () + } + + set { + set_enter_cost (newValue) + } + + } + + /// When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travelCost`` for determining the shortest path. + final public var travelCost: Double { + get { + return get_travel_cost () + } + + set { + set_travel_cost (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this region on the ``NavigationServer2D``. Combined with ``NavigationServer2D/mapGetClosestPointOwner(map:toPoint:)`` can be used to identify the ``NavigationRegion2D`` closest to a point on the merged navigation map. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_navigation_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_polygon") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1515040758)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_polygon(_ navigationPolygon: NavigationPolygon?) { + withUnsafePointer(to: navigationPolygon?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_navigation_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_polygon") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1046532237)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_polygon() -> NavigationPolygon? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_navigation_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion2D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this region should use. By default the region will automatically join the ``World2D`` default navigation map so this function is only required to override the default map. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the current navigation map ``RID`` used by this region. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_edge_connections") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_edge_connections(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_use_edge_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_edge_connections") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_edge_connections() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_use_edge_connections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_region_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region_rid") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this region on the ``NavigationServer2D``. + public final func getRegionRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_region_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enter_cost") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enter_cost(_ enterCost: Double) { + withUnsafePointer(to: enterCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_enter_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enter_cost") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enter_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_enter_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_travel_cost") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_travel_cost(_ travelCost: Double) { + withUnsafePointer(to: travelCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_set_travel_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel_cost") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_travel_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationRegion2D.method_get_travel_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_bake_navigation_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_navigation_polygon") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3216645846)! + } + + } + + }() + + /// Bakes the ``NavigationPolygon``. If `onThread` is set to `true` (default), the baking is done on a separate thread. + public final func bakeNavigationPolygon(onThread: Bool = true) { + withUnsafePointer(to: onThread) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion2D.method_bake_navigation_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_baking: GDExtensionMethodBindPtr = { + let methodName = StringName("is_baking") + return withUnsafePointer(to: &NavigationRegion2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` when the ``NavigationPolygon`` is being baked on a background thread. + public final func isBaking() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion2D.method_is_baking, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the used navigation polygon is replaced or changes to the internals of the current navigation polygon are committed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationPolygonChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationPolygonChanged: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_polygon_changed") } + + /// Emitted when a navigation polygon bake operation is completed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bakeFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var bakeFinished: SimpleSignal { SimpleSignal (target: self, signalName: "bake_finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationRegion3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationRegion3D.swift new file mode 100644 index 000000000..0671697b2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationRegion3D.swift @@ -0,0 +1,599 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A traversable 3D region that ``NavigationAgent3D``s can use for pathfinding. +/// +/// A traversable 3D region based on a ``NavigationMesh`` that ``NavigationAgent3D``s can use for pathfinding. +/// +/// Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using ``NavigationServer3D/mapSetEdgeConnectionMargin(map:margin:)``. +/// +/// > Note: Overlapping two regions' navigation meshes is not enough for connecting two regions. They must share a similar edge. +/// +/// The cost of entering this region from another region can be controlled with the ``enterCost`` value. +/// +/// > Note: This value is not added to the path cost when the start position is already inside this region. +/// +/// The cost of traveling distances inside this region can be controlled with the ``travelCost`` multiplier. +/// +/// > Note: This node caches changes to its properties, so if you make changes to the underlying region ``RID`` in ``NavigationServer3D``, they will not be reflected in this node's properties. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``navigationMeshChanged`` +/// - ``bakeFinished`` +open class NavigationRegion3D: Node3D { + override open class var godotClassName: StringName { "NavigationRegion3D" } + + /* Properties */ + + /// The ``NavigationMesh`` resource to use. + final public var navigationMesh: NavigationMesh? { + get { + return get_navigation_mesh () + } + + set { + set_navigation_mesh (newValue) + } + + } + + /// Determines if the ``NavigationRegion3D`` is enabled or disabled. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + final public var useEdgeConnections: Bool { + get { + return get_use_edge_connections () + } + + set { + set_use_edge_connections (newValue) + } + + } + + /// A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. + final public var navigationLayers: UInt32 { + get { + return get_navigation_layers () + } + + set { + set_navigation_layers (newValue) + } + + } + + /// When pathfinding enters this region's navigation mesh from another regions navigation mesh the ``enterCost`` value is added to the path distance for determining the shortest path. + final public var enterCost: Double { + get { + return get_enter_cost () + } + + set { + set_enter_cost (newValue) + } + + } + + /// When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with ``travelCost`` for determining the shortest path. + final public var travelCost: Double { + get { + return get_travel_cost () + } + + set { + set_travel_cost (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this region on the ``NavigationServer3D``. Combined with ``NavigationServer3D/mapGetClosestPointOwner(map:toPoint:)`` can be used to identify the ``NavigationRegion3D`` closest to a point on the merged navigation map. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_mesh") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2923361153)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_mesh(_ navigationMesh: NavigationMesh?) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_mesh") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1468720886)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_mesh() -> NavigationMesh? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion3D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_map") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Sets the ``RID`` of the navigation map this region should use. By default the region will automatically join the ``World3D`` default navigation map so this function is only required to override the default map. + public final func setNavigationMap(_ navigationMap: RID) { + withUnsafePointer(to: navigationMap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_navigation_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_map") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the current navigation map ``RID`` used by this region. + public final func getNavigationMap() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_navigation_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_edge_connections") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_edge_connections(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_use_edge_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_edge_connections") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_edge_connections() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_use_edge_connections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layers") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_navigation_layers(_ navigationLayers: UInt32) { + withUnsafePointer(to: navigationLayers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_navigation_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layers") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_navigation_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_navigation_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_navigation_layer_value") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``navigationLayers`` bitmask, given a `layerNumber` between 1 and 32. + public final func setNavigationLayerValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_navigation_layer_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_navigation_layer_value") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``navigationLayers`` bitmask is enabled, given a `layerNumber` between 1 and 32. + public final func getNavigationLayerValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_navigation_layer_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_region_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region_rid") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this region on the ``NavigationServer3D``. + public final func getRegionRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_region_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enter_cost") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enter_cost(_ enterCost: Double) { + withUnsafePointer(to: enterCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_enter_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enter_cost") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enter_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_enter_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("set_travel_cost") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_travel_cost(_ travelCost: Double) { + withUnsafePointer(to: travelCost) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_set_travel_cost, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel_cost") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_travel_cost() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NavigationRegion3D.method_get_travel_cost, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_bake_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_navigation_mesh") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3216645846)! + } + + } + + }() + + /// Bakes the ``NavigationMesh``. If `onThread` is set to `true` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new ``NavigationMesh``. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled). + public final func bakeNavigationMesh(onThread: Bool = true) { + withUnsafePointer(to: onThread) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NavigationRegion3D.method_bake_navigation_mesh, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_baking: GDExtensionMethodBindPtr = { + let methodName = StringName("is_baking") + return withUnsafePointer(to: &NavigationRegion3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` when the ``NavigationMesh`` is being baked on a background thread. + public final func isBaking() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NavigationRegion3D.method_is_baking, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Notifies when the ``NavigationMesh`` has changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationMeshChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationMeshChanged: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_mesh_changed") } + + /// Notifies when the navigation mesh bake operation is completed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bakeFinished.connect { + /// print ("caught signal") + /// } + /// ``` + public var bakeFinished: SimpleSignal { SimpleSignal (target: self, signalName: "bake_finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationServer2D.swift b/Sources/SwiftGodot/Generated/Api/NavigationServer2D.swift new file mode 100644 index 000000000..2c2dce6b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationServer2D.swift @@ -0,0 +1,3659 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for low-level 2D navigation access. +/// +/// NavigationServer2D is the server that handles navigation maps, regions and agents. It does not handle A* navigation from ``AStar2D`` or ``AStarGrid2D``. +/// +/// Maps are divided into regions, which are composed of navigation polygons. Together, they define the traversable areas in the 2D world. +/// +/// > Note: Most ``NavigationServer2D`` changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. +/// +/// For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than `edge_connection_margin` to the respective other edge's vertex. +/// +/// You may assign navigation layers to regions with ``NavigationServer2D/regionSetNavigationLayers(region:navigationLayers:)``, which then can be checked upon when requesting a path with ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. This can be used to allow or deny certain areas for some objects. +/// +/// To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. +/// +/// > Note: The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +/// +/// This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``mapChanged`` +/// - ``navigationDebugChanged`` +open class NavigationServer2D: Object { + /// The shared instance of this class + public static var shared: NavigationServer2D = { + return withUnsafePointer (to: &NavigationServer2D.godotClassName.content) { ptr in + NavigationServer2D (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "NavigationServer2D" } + /* Methods */ + fileprivate static var method_get_maps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_maps") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns all created navigation map ``RID``s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. + public static func getMaps() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_maps, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_map_create: GDExtensionMethodBindPtr = { + let methodName = StringName("map_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Create a new map. + public static func mapCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_map_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_map_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_active") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the map active. + public static func mapSetActive(map: RID, active: Bool) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("map_is_active") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the map is active. + public static func mapIsActive(map: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_is_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_cell_size") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the map cell size used to rasterize the navigation mesh vertices. Must match with the cell size of the used navigation meshes. + public static func mapSetCellSize(map: RID, cellSize: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: cellSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_cell_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_cell_size") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the map cell size used to rasterize the navigation mesh vertices. + public static func mapGetCellSize(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_cell_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_use_edge_connections") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Set the navigation `map` edge connection use. If `enabled` is `true`, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func mapSetUseEdgeConnections(map: RID, enabled: Bool) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_use_edge_connections") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether the navigation `map` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func mapGetUseEdgeConnections(map: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_edge_connection_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_edge_connection_margin") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the map edge connection margin used to weld the compatible region edges. + public static func mapSetEdgeConnectionMargin(map: RID, margin: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: margin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_edge_connection_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_edge_connection_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_edge_connection_margin") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. + public static func mapGetEdgeConnectionMargin(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_edge_connection_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_link_connection_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_link_connection_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the map's link connection radius used to connect links to navigation polygons. + public static func mapSetLinkConnectionRadius(map: RID, radius: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_link_connection_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_link_connection_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_link_connection_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. + public static func mapGetLinkConnectionRadius(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_link_connection_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_path") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3146466012)! + } + + } + + }() + + /// Returns the navigation path to reach the destination from the origin. `navigationLayers` is a bitmask of all region navigation layers that are allowed to be in the path. + public static func mapGetPath(map: RID, origin: Vector2, destination: Vector2, optimize: Bool, navigationLayers: UInt32 = 1) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: origin) { pArg1 in + withUnsafePointer(to: destination) { pArg2 in + withUnsafePointer(to: optimize) { pArg3 in + withUnsafePointer(to: navigationLayers) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1358334418)! + } + + } + + }() + + /// Returns the point closest to the provided `toPoint` on the navigation mesh surface. + public static func mapGetClosestPoint(map: RID, toPoint: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: toPoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point_owner") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1353467510)! + } + + } + + }() + + /// Returns the owner region RID for the point returned by ``mapGetClosestPoint(map:toPoint:)``. + public static func mapGetClosestPointOwner(map: RID, toPoint: Vector2) -> RID { + let _result: RID = RID () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: toPoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point_owner, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_links: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_links") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation link ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetLinks(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_links, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_regions: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_regions") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation regions ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetRegions(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_regions, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_agents") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation agents ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetAgents(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_obstacles") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation obstacle ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetObstacles(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_force_update: GDExtensionMethodBindPtr = { + let methodName = StringName("map_force_update") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// This function immediately forces synchronization of the specified navigation `map` ``RID``. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + /// + /// Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + /// + /// Avoidance processing and dispatch of the `safe_velocity` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. + /// + /// > Note: With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + /// + public static func mapForceUpdate(map: RID) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_force_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_map_get_iteration_id: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_iteration_id") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + /// + /// > Note: The iteration id will wrap back to 1 after reaching its range limit. + /// + public static func mapGetIterationId(map: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_iteration_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_random_point: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_random_point") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3271000763)! + } + + } + + }() + + /// Returns a random position picked from all map region polygons with matching `navigationLayers`. + /// + /// If `uniformly` is `true`, all map regions, polygons, and faces are weighted by their surface area (slower). + /// + /// If `uniformly` is `false`, just a random region and a random polygon are picked (faster). + /// + public static func mapGetRandomPoint(map: RID, navigationLayers: UInt32, uniformly: Bool) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: uniformly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_random_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_query_path: GDExtensionMethodBindPtr = { + let methodName = StringName("query_path") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3394638789)! + } + + } + + }() + + /// Queries a path in a given navigation map. Start and target position and other parameters are defined through ``NavigationPathQueryParameters2D``. Updates the provided ``NavigationPathQueryResult2D`` result object with the path among other results requested by the query. + public static func queryPath(parameters: NavigationPathQueryParameters2D?, result: NavigationPathQueryResult2D?) { + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: result?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_query_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_create: GDExtensionMethodBindPtr = { + let methodName = StringName("region_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new region. + public static func regionCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_region_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_region_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true` the specified `region` will contribute to its current navigation map. + public static func regionSetEnabled(region: RID, enabled: Bool) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `region` is enabled. + public static func regionGetEnabled(region: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_use_edge_connections") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the navigation `region` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func regionSetUseEdgeConnections(region: RID, enabled: Bool) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_use_edge_connections") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether the navigation `region` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func regionGetUseEdgeConnections(region: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_enter_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `enterCost` for this `region`. + public static func regionSetEnterCost(region: RID, enterCost: Double) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enterCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_enter_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the enter cost of this `region`. + public static func regionGetEnterCost(region: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_travel_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `travelCost` for this `region`. + public static func regionSetTravelCost(region: RID, travelCost: Double) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: travelCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_travel_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the travel cost of this `region`. + public static func regionGetTravelCost(region: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_owner_id") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the `ObjectID` of the object which manages this region. + public static func regionSetOwnerId(region: RID, ownerId: UInt) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: ownerId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_owner_id") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the object which manages this region. + public static func regionGetOwnerId(region: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_owns_point: GDExtensionMethodBindPtr = { + let methodName = StringName("region_owns_point") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 219849798)! + } + + } + + }() + + /// Returns `true` if the provided `point` in world space is currently owned by the provided navigation `region`. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + /// + /// If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + /// + /// > Note: If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + /// + public static func regionOwnsPoint(region: RID, point: Vector2) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: point) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_owns_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the map for the region. + public static func regionSetMap(region: RID, map: RID) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `region` is currently assigned to. + public static func regionGetMap(region: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_navigation_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the region's navigation layers. This allows selecting regions from a path request (when using ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``). + public static func regionSetNavigationLayers(region: RID, navigationLayers: UInt32) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_navigation_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the region's navigation layers. + public static func regionGetNavigationLayers(region: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_transform") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets the global transformation for the region. + public static func regionSetTransform(region: RID, transform: Transform2D) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_transform") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 213527486)! + } + + } + + }() + + /// Returns the global transformation of this `region`. + public static func regionGetTransform(region: RID) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_navigation_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_navigation_polygon") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3633623451)! + } + + } + + }() + + /// Sets the `navigationPolygon` for the region. + public static func regionSetNavigationPolygon(region: RID, navigationPolygon: NavigationPolygon?) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationPolygon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_navigation_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_connections_count: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connections_count") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns how many connections this `region` has with other regions in the map. + public static func regionGetConnectionsCount(region: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connections_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_connection_pathway_start: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connection_pathway_start") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2546185844)! + } + + } + + }() + + /// Returns the starting point of a connection door. `connection` is an index between 0 and the return value of ``regionGetConnectionsCount(region:)``. + public static func regionGetConnectionPathwayStart(region: RID, connection: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: connection) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connection_pathway_start, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_connection_pathway_end: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connection_pathway_end") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2546185844)! + } + + } + + }() + + /// Returns the ending point of a connection door. `connection` is an index between 0 and the return value of ``regionGetConnectionsCount(region:)``. + public static func regionGetConnectionPathwayEnd(region: RID, connection: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: connection) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connection_pathway_end, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_random_point: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_random_point") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3271000763)! + } + + } + + }() + + /// Returns a random position picked from all region polygons with matching `navigationLayers`. + /// + /// If `uniformly` is `true`, all region polygons and faces are weighted by their surface area (slower). + /// + /// If `uniformly` is `false`, just a random polygon and face is picked (faster). + /// + public static func regionGetRandomPoint(region: RID, navigationLayers: UInt32, uniformly: Bool) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: uniformly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_random_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_link_create: GDExtensionMethodBindPtr = { + let methodName = StringName("link_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Create a new link between two positions on a map. + public static func linkCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_link_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_link_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the navigation map ``RID`` for the link. + public static func linkSetMap(link: RID, map: RID) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `link` is currently assigned to. + public static func linkGetMap(link: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the specified `link` will contribute to its current navigation map. + public static func linkSetEnabled(link: RID, enabled: Bool) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `link` is enabled. + public static func linkGetEnabled(link: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_bidirectional") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether this `link` can be travelled in both directions. + public static func linkSetBidirectional(link: RID, bidirectional: Bool) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: bidirectional) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_bidirectional, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_is_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("link_is_bidirectional") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether this `link` can be travelled in both directions. + public static func linkIsBidirectional(link: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_is_bidirectional, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_navigation_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the links's navigation layers. This allows selecting links from a path request (when using ``NavigationServer2D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``). + public static func linkSetNavigationLayers(link: RID, navigationLayers: UInt32) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_navigation_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the navigation layers for this `link`. + public static func linkGetNavigationLayers(link: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_start_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the entry position for this `link`. + public static func linkSetStartPosition(link: RID, position: Vector2) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_start_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_start_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the starting position of this `link`. + public static func linkGetStartPosition(link: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_start_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_end_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the exit position for the `link`. + public static func linkSetEndPosition(link: RID, position: Vector2) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_end_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_end_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the ending position of this `link`. + public static func linkGetEndPosition(link: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_end_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_enter_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `enterCost` for this `link`. + public static func linkSetEnterCost(link: RID, enterCost: Double) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: enterCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_enter_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the enter cost of this `link`. + public static func linkGetEnterCost(link: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_travel_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `travelCost` for this `link`. + public static func linkSetTravelCost(link: RID, travelCost: Double) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: travelCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_travel_cost") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the travel cost of this `link`. + public static func linkGetTravelCost(link: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_owner_id") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the `ObjectID` of the object which manages this link. + public static func linkSetOwnerId(link: RID, ownerId: UInt) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: ownerId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_owner_id") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the object which manages this link. + public static func linkGetOwnerId(link: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_create: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates the agent. + public static func agentCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_agent_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_agent_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the specified `agent` uses avoidance. + public static func agentSetAvoidanceEnabled(agent: RID, enabled: Bool) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Return `true` if the specified `agent` uses avoidance. + public static func agentGetAvoidanceEnabled(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Puts the agent in the map. + public static func agentSetMap(agent: RID, map: RID) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `agent` is currently assigned to. + public static func agentGetMap(agent: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_paused") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `paused` is true the specified `agent` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. + public static func agentSetPaused(agent: RID, paused: Bool) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: paused) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_paused") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `agent` is paused. + public static func agentGetPaused(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_neighbor_distance") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + public static func agentSetNeighborDistance(agent: RID, distance: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: distance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_neighbor_distance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_neighbor_distance") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the maximum distance to other agents the specified `agent` takes into account in the navigation. + public static func agentGetNeighborDistance(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_neighbor_distance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_max_neighbors") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + public static func agentSetMaxNeighbors(agent: RID, count: Int32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: count) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_max_neighbors, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_max_neighbors") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the maximum number of other agents the specified `agent` takes into account in the navigation. + public static func agentGetMaxNeighbors(agent: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_max_neighbors, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_time_horizon_agents") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + public static func agentSetTimeHorizonAgents(agent: RID, timeHorizon: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: timeHorizon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_time_horizon_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_time_horizon_agents") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the minimal amount of time for which the specified `agent`'s velocities that are computed by the simulation are safe with respect to other agents. + public static func agentGetTimeHorizonAgents(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_time_horizon_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + public static func agentSetTimeHorizonObstacles(agent: RID, timeHorizon: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: timeHorizon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the minimal amount of time for which the specified `agent`'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + public static func agentGetTimeHorizonObstacles(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the radius of the agent. + public static func agentSetRadius(agent: RID, radius: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the radius of the specified `agent`. + public static func agentGetRadius(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_max_speed") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the maximum speed of the agent. Must be positive. + public static func agentSetMaxSpeed(agent: RID, maxSpeed: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: maxSpeed) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_max_speed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_max_speed") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the maximum speed of the specified `agent`. + public static func agentGetMaxSpeed(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_max_speed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_velocity_forced: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_velocity_forced") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Replaces the internal velocity in the collision avoidance simulation with `velocity` for the specified `agent`. When an agent is teleported to a new position far away this function should be used in the same frame. If called frequently this function can get agents stuck. + public static func agentSetVelocityForced(agent: RID, velocity: Vector2) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_velocity_forced, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_velocity") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets `velocity` as the new wanted velocity for the specified `agent`. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use ``agentSetVelocityForced(agent:velocity:)`` instead to reset the internal velocity state. + public static func agentSetVelocity(agent: RID, velocity: Vector2) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_velocity") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the velocity of the specified `agent`. + public static func agentGetVelocity(agent: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the position of the agent in world space. + public static func agentSetPosition(agent: RID, position: Vector2) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the position of the specified `agent` in world space. + public static func agentGetPosition(agent: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_is_map_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_is_map_changed") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the map got changed the previous frame. + public static func agentIsMapChanged(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_is_map_changed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_callback") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the callback ``Callable`` that gets called after each avoidance processing step for the `agent`. The calculated `safe_velocity` will be dispatched with a signal to the object just before the physics calculations. + /// + /// > Note: Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use ``agentSetAvoidanceCallback(agent:callback:)`` again with an empty ``Callable``. + /// + public static func agentSetAvoidanceCallback(agent: RID, callback: Callable) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_has_avoidance_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_has_avoidance_callback") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Return `true` if the specified `agent` has an avoidance callback. + public static func agentHasAvoidanceCallback(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_has_avoidance_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the agent's `avoidance_layers` bitmask. + public static func agentSetAvoidanceLayers(agent: RID, layers: UInt32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_layers` bitmask of the specified `agent`. + public static func agentGetAvoidanceLayers(agent: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_mask") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the agent's `avoidance_mask` bitmask. + public static func agentSetAvoidanceMask(agent: RID, mask: UInt32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_mask") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_mask` bitmask of the specified `agent`. + public static func agentGetAvoidanceMask(agent: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_priority") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the agent's `avoidance_priority` with a `priority` between 0.0 (lowest priority) to 1.0 (highest priority). + /// + /// The specified `agent` does not adjust the velocity for other agents that would match the `avoidance_mask` but have a lower `avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + /// + public static func agentSetAvoidancePriority(agent: RID, priority: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_priority") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the `avoidance_priority` of the specified `agent`. + public static func agentGetAvoidancePriority(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_create: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new navigation obstacle. + public static func obstacleCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_obstacle_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_obstacle_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the provided `obstacle` affects avoidance using agents. + public static func obstacleSetAvoidanceEnabled(obstacle: RID, enabled: Bool) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the provided `obstacle` has avoidance enabled. + public static func obstacleGetAvoidanceEnabled(obstacle: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the navigation map ``RID`` for the obstacle. + public static func obstacleSetMap(obstacle: RID, map: RID) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_map") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `obstacle` is currently assigned to. + public static func obstacleGetMap(obstacle: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_paused") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `paused` is true the specified `obstacle` will not be processed, e.g. affect avoidance velocities. + public static func obstacleSetPaused(obstacle: RID, paused: Bool) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: paused) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_paused") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `obstacle` is paused. + public static func obstacleGetPaused(obstacle: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the radius of the dynamic obstacle. + public static func obstacleSetRadius(obstacle: RID, radius: Double) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_radius") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the radius of the specified dynamic `obstacle`. + public static func obstacleGetRadius(obstacle: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_velocity") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets `velocity` of the dynamic `obstacle`. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. + public static func obstacleSetVelocity(obstacle: RID, velocity: Vector2) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_velocity") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the velocity of the specified dynamic `obstacle`. + public static func obstacleGetVelocity(obstacle: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the position of the obstacle in world space. + public static func obstacleSetPosition(obstacle: RID, position: Vector2) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_position") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the position of the specified `obstacle` in world space. + public static func obstacleGetPosition(obstacle: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_vertices") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 29476483)! + } + + } + + }() + + /// Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. + public static func obstacleSetVertices(obstacle: RID, vertices: PackedVector2Array) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: vertices.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_vertices, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_vertices") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2222557395)! + } + + } + + }() + + /// Returns the outline vertices for the specified `obstacle`. + public static func obstacleGetVertices(obstacle: RID) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_vertices, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_avoidance_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the obstacles's `avoidance_layers` bitmask. + public static func obstacleSetAvoidanceLayers(obstacle: RID, layers: UInt32) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_avoidance_layers") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_layers` bitmask of the specified `obstacle`. + public static func obstacleGetAvoidanceLayers(obstacle: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_parse_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_source_geometry_data") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1176164995)! + } + + } + + }() + + /// Parses the ``SceneTree`` for source geometry according to the properties of `navigationPolygon`. Updates the provided `sourceGeometryData` resource with the resulting data. The resource can then be used to bake a navigation mesh with ``bakeFromSourceGeometryData(navigationPolygon:sourceGeometryData:callback:)``. After the process is finished the optional `callback` will be called. + /// + /// > Note: This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + /// + /// **Performance:** While convenient, reading data arrays from ``Mesh`` resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the ``RenderingServer`` in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + /// + public static func parseSourceGeometryData(navigationPolygon: NavigationPolygon?, sourceGeometryData: NavigationMeshSourceGeometryData2D?, rootNode: Node?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationPolygon?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: rootNode?.handle) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_parse_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bake_from_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_from_source_geometry_data") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2909414286)! + } + + } + + }() + + /// Bakes the provided `navigationPolygon` with the data from the provided `sourceGeometryData`. After the process is finished the optional `callback` will be called. + public static func bakeFromSourceGeometryData(navigationPolygon: NavigationPolygon?, sourceGeometryData: NavigationMeshSourceGeometryData2D?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationPolygon?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_from_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bake_from_source_geometry_data_async: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_from_source_geometry_data_async") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2909414286)! + } + + } + + }() + + /// Bakes the provided `navigationPolygon` with the data from the provided `sourceGeometryData` as an async task running on a background thread. After the process is finished the optional `callback` will be called. + public static func bakeFromSourceGeometryDataAsync(navigationPolygon: NavigationPolygon?, sourceGeometryData: NavigationMeshSourceGeometryData2D?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationPolygon?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_from_source_geometry_data_async, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_baking_navigation_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("is_baking_navigation_polygon") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3729405808)! + } + + } + + }() + + /// Returns `true` when the provided navigation polygon is being baked on a background thread. + public static func isBakingNavigationPolygon(_ navigationPolygon: NavigationPolygon?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: navigationPolygon?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_baking_navigation_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_source_geometry_parser_create: GDExtensionMethodBindPtr = { + let methodName = StringName("source_geometry_parser_create") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new source geometry parser. If a ``Callable`` is set for the parser with ``sourceGeometryParserSetCallback(parser:callback:)`` the callback will be called for every single node that gets parsed whenever ``parseSourceGeometryData(navigationPolygon:sourceGeometryData:rootNode:callback:)`` is used. + public static func sourceGeometryParserCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_source_geometry_parser_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_source_geometry_parser_set_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("source_geometry_parser_set_callback") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the `callback` ``Callable`` for the specific source geometry `parser`. The ``Callable`` will receive a call with the following parameters: + /// + /// - `navigation_mesh` - The ``NavigationPolygon`` reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + /// + /// - `source_geometry_data` - The ``NavigationMeshSourceGeometryData2D`` reference. Add custom source geometry for navigation mesh baking to this object. + /// + /// - `node` - The ``Node`` that is parsed. + /// + public static func sourceGeometryParserSetCallback(parser: RID, callback: Callable) { + withUnsafePointer(to: parser.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_source_geometry_parser_set_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("simplify_path") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2457191505)! + } + + } + + }() + + /// Returns a simplified version of `path` with less critical path points removed. The simplification amount is in worlds units and controlled by `epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + public static func simplifyPath(_ path: PackedVector2Array, epsilon: Double) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: epsilon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_simplify_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Destroys the given RID. + public static func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_rid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true` enables debug mode on the NavigationServer. + public static func setDebugEnabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_debug_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_enabled") + return withUnsafePointer(to: &NavigationServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` when the NavigationServer has debug enabled. + public static func getDebugEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_get_debug_enabled, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ map: RID) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a navigation map is updated, when a region moves or is modified. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mapChanged.connect { map in + /// print ("caught signal") + /// } + /// ``` + public var mapChanged: Signal1 { Signal1 (target: self, signalName: "map_changed") } + + /// Emitted when navigation debug settings are changed. Only available in debug builds. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationDebugChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationDebugChanged: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_debug_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NavigationServer3D.swift b/Sources/SwiftGodot/Generated/Api/NavigationServer3D.swift new file mode 100644 index 000000000..ff199d631 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NavigationServer3D.swift @@ -0,0 +1,4258 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for low-level 3D navigation access. +/// +/// NavigationServer3D is the server that handles navigation maps, regions and agents. It does not handle A* navigation from ``AStar3D``. +/// +/// Maps are divided into regions, which are composed of navigation meshes. Together, they define the navigable areas in the 3D world. +/// +/// > Note: Most ``NavigationServer3D`` changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts. +/// +/// For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than `edge_connection_margin` to the respective other edge's vertex. +/// +/// You may assign navigation layers to regions with ``NavigationServer3D/regionSetNavigationLayers(region:navigationLayers:)``, which then can be checked upon when requesting a path with ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``. This can be used to allow or deny certain areas for some objects. +/// +/// To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity. +/// +/// > Note: The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine. +/// +/// This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``mapChanged`` +/// - ``navigationDebugChanged`` +/// - ``avoidanceDebugChanged`` +open class NavigationServer3D: Object { + /// The shared instance of this class + public static var shared: NavigationServer3D = { + return withUnsafePointer (to: &NavigationServer3D.godotClassName.content) { ptr in + NavigationServer3D (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "NavigationServer3D" } + public enum ProcessInfo: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to get the number of active navigation maps. + case activeMaps = 0 // INFO_ACTIVE_MAPS + /// Constant to get the number of active navigation regions. + case regionCount = 1 // INFO_REGION_COUNT + /// Constant to get the number of active navigation agents processing avoidance. + case agentCount = 2 // INFO_AGENT_COUNT + /// Constant to get the number of active navigation links. + case linkCount = 3 // INFO_LINK_COUNT + /// Constant to get the number of navigation mesh polygons. + case polygonCount = 4 // INFO_POLYGON_COUNT + /// Constant to get the number of navigation mesh polygon edges. + case edgeCount = 5 // INFO_EDGE_COUNT + /// Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap. + case edgeMergeCount = 6 // INFO_EDGE_MERGE_COUNT + /// Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity. + case edgeConnectionCount = 7 // INFO_EDGE_CONNECTION_COUNT + /// Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links. + case edgeFreeCount = 8 // INFO_EDGE_FREE_COUNT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .activeMaps: return ".activeMaps" + case .regionCount: return ".regionCount" + case .agentCount: return ".agentCount" + case .linkCount: return ".linkCount" + case .polygonCount: return ".polygonCount" + case .edgeCount: return ".edgeCount" + case .edgeMergeCount: return ".edgeMergeCount" + case .edgeConnectionCount: return ".edgeConnectionCount" + case .edgeFreeCount: return ".edgeFreeCount" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_maps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_maps") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns all created navigation map ``RID``s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. + public static func getMaps() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_maps, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_map_create: GDExtensionMethodBindPtr = { + let methodName = StringName("map_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Create a new map. + public static func mapCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_map_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_map_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_active") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the map active. + public static func mapSetActive(map: RID, active: Bool) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("map_is_active") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the map is active. + public static func mapIsActive(map: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_is_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_up: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_up") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the map up direction. + public static func mapSetUp(map: RID, up: Vector3) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: up) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_up, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_up: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_up") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the map's up direction. + public static func mapGetUp(map: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_up, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_cell_size") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the map cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size of the used navigation meshes. + public static func mapSetCellSize(map: RID, cellSize: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: cellSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_cell_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_cell_size") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane. + public static func mapGetCellSize(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_cell_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_cell_height: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_cell_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the map cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height of the used navigation meshes. + public static func mapSetCellHeight(map: RID, cellHeight: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: cellHeight) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_cell_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_cell_height: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_cell_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis. + public static func mapGetCellHeight(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_cell_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_merge_rasterizer_cell_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_merge_rasterizer_cell_scale") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the map's internal merge rasterizer cell scale used to control merging sensitivity. + public static func mapSetMergeRasterizerCellScale(map: RID, scale: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_merge_rasterizer_cell_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_merge_rasterizer_cell_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_merge_rasterizer_cell_scale") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns map's internal merge rasterizer cell scale. + public static func mapGetMergeRasterizerCellScale(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_merge_rasterizer_cell_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_use_edge_connections") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Set the navigation `map` edge connection use. If `enabled` is `true`, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func mapSetUseEdgeConnections(map: RID, enabled: Bool) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_use_edge_connections") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the navigation `map` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func mapGetUseEdgeConnections(map: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_edge_connection_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_edge_connection_margin") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the map edge connection margin used to weld the compatible region edges. + public static func mapSetEdgeConnectionMargin(map: RID, margin: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: margin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_edge_connection_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_edge_connection_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_edge_connection_margin") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. + public static func mapGetEdgeConnectionMargin(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_edge_connection_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_set_link_connection_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("map_set_link_connection_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the map's link connection radius used to connect links to navigation polygons. + public static func mapSetLinkConnectionRadius(map: RID, radius: Double) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_set_link_connection_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_map_get_link_connection_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_link_connection_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. + public static func mapGetLinkConnectionRadius(map: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_link_connection_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_path") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1187418690)! + } + + } + + }() + + /// Returns the navigation path to reach the destination from the origin. `navigationLayers` is a bitmask of all region navigation layers that are allowed to be in the path. + public static func mapGetPath(map: RID, origin: Vector3, destination: Vector3, optimize: Bool, navigationLayers: UInt32 = 1) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: origin) { pArg1 in + withUnsafePointer(to: destination) { pArg2 in + withUnsafePointer(to: optimize) { pArg3 in + withUnsafePointer(to: navigationLayers) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point_to_segment: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point_to_segment") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3830095642)! + } + + } + + }() + + /// Returns the closest point between the navigation surface and the segment. + public static func mapGetClosestPointToSegment(map: RID, start: Vector3, end: Vector3, useCollision: Bool = false) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: start) { pArg1 in + withUnsafePointer(to: end) { pArg2 in + withUnsafePointer(to: useCollision) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point_to_segment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2056183332)! + } + + } + + }() + + /// Returns the point closest to the provided `toPoint` on the navigation mesh surface. + public static func mapGetClosestPoint(map: RID, toPoint: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: toPoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point_normal") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2056183332)! + } + + } + + }() + + /// Returns the normal for the point returned by ``mapGetClosestPoint(map:toPoint:)``. + public static func mapGetClosestPointNormal(map: RID, toPoint: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: toPoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point_normal, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_closest_point_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_closest_point_owner") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 553364610)! + } + + } + + }() + + /// Returns the owner region RID for the point returned by ``mapGetClosestPoint(map:toPoint:)``. + public static func mapGetClosestPointOwner(map: RID, toPoint: Vector3) -> RID { + let _result: RID = RID () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: toPoint) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_closest_point_owner, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_links: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_links") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation link ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetLinks(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_links, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_regions: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_regions") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation regions ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetRegions(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_regions, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_agents") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation agents ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetAgents(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_get_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_obstacles") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns all navigation obstacle ``RID``s that are currently assigned to the requested navigation `map`. + public static func mapGetObstacles(map: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_map_force_update: GDExtensionMethodBindPtr = { + let methodName = StringName("map_force_update") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// This function immediately forces synchronization of the specified navigation `map` ``RID``. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + /// + /// Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + /// + /// Avoidance processing and dispatch of the `safe_velocity` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. + /// + /// > Note: With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + /// + public static func mapForceUpdate(map: RID) { + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_force_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_map_get_iteration_id: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_iteration_id") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + /// + /// > Note: The iteration id will wrap back to 1 after reaching its range limit. + /// + public static func mapGetIterationId(map: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_iteration_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_map_get_random_point: GDExtensionMethodBindPtr = { + let methodName = StringName("map_get_random_point") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 722801526)! + } + + } + + }() + + /// Returns a random position picked from all map region polygons with matching `navigationLayers`. + /// + /// If `uniformly` is `true`, all map regions, polygons, and faces are weighted by their surface area (slower). + /// + /// If `uniformly` is `false`, just a random region and a random polygon are picked (faster). + /// + public static func mapGetRandomPoint(map: RID, navigationLayers: UInt32, uniformly: Bool) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: map.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: uniformly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_map_get_random_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_query_path: GDExtensionMethodBindPtr = { + let methodName = StringName("query_path") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3415008901)! + } + + } + + }() + + /// Queries a path in a given navigation map. Start and target position and other parameters are defined through ``NavigationPathQueryParameters3D``. Updates the provided ``NavigationPathQueryResult3D`` result object with the path among other results requested by the query. + public static func queryPath(parameters: NavigationPathQueryParameters3D?, result: NavigationPathQueryResult3D?) { + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: result?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_query_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_create: GDExtensionMethodBindPtr = { + let methodName = StringName("region_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new region. + public static func regionCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_region_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_region_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the specified `region` will contribute to its current navigation map. + public static func regionSetEnabled(region: RID, enabled: Bool) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `region` is enabled. + public static func regionGetEnabled(region: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_use_edge_connections") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the navigation `region` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func regionSetUseEdgeConnections(region: RID, enabled: Bool) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_use_edge_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_use_edge_connections") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the navigation `region` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. + public static func regionGetUseEdgeConnections(region: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_use_edge_connections, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_enter_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `enterCost` for this `region`. + public static func regionSetEnterCost(region: RID, enterCost: Double) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: enterCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_enter_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the enter cost of this `region`. + public static func regionGetEnterCost(region: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_travel_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `travelCost` for this `region`. + public static func regionSetTravelCost(region: RID, travelCost: Double) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: travelCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_travel_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the travel cost of this `region`. + public static func regionGetTravelCost(region: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_owner_id") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the `ObjectID` of the object which manages this region. + public static func regionSetOwnerId(region: RID, ownerId: UInt) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: ownerId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_owner_id") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the object which manages this region. + public static func regionGetOwnerId(region: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_owns_point: GDExtensionMethodBindPtr = { + let methodName = StringName("region_owns_point") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2360011153)! + } + + } + + }() + + /// Returns `true` if the provided `point` in world space is currently owned by the provided navigation `region`. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + /// + /// If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + /// + /// > Note: If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + /// + public static func regionOwnsPoint(region: RID, point: Vector3) -> Bool { + var _result: Bool = false + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: point) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_owns_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the map for the region. + public static func regionSetMap(region: RID, map: RID) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `region` is currently assigned to. + public static func regionGetMap(region: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_navigation_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the region's navigation layers. This allows selecting regions from a path request (when using ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``). + public static func regionSetNavigationLayers(region: RID, navigationLayers: UInt32) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_navigation_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the region's navigation layers. + public static func regionGetNavigationLayers(region: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_transform") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets the global transformation for the region. + public static func regionSetTransform(region: RID, transform: Transform3D) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_transform") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1128465797)! + } + + } + + }() + + /// Returns the global transformation of this `region`. + public static func regionGetTransform(region: RID) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_set_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("region_set_navigation_mesh") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2764952978)! + } + + } + + }() + + /// Sets the navigation mesh for the region. + public static func regionSetNavigationMesh(region: RID, navigationMesh: NavigationMesh?) { + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationMesh?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_set_navigation_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_bake_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("region_bake_navigation_mesh") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1401173477)! + } + + } + + }() + + /// Bakes the `navigationMesh` with bake source geometry collected starting from the `rootNode`. + public static func regionBakeNavigationMesh(_ navigationMesh: NavigationMesh?, rootNode: Node?) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: rootNode?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_bake_navigation_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_region_get_connections_count: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connections_count") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns how many connections this `region` has with other regions in the map. + public static func regionGetConnectionsCount(region: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connections_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_connection_pathway_start: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connection_pathway_start") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3440143363)! + } + + } + + }() + + /// Returns the starting point of a connection door. `connection` is an index between 0 and the return value of ``regionGetConnectionsCount(region:)``. + public static func regionGetConnectionPathwayStart(region: RID, connection: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: connection) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connection_pathway_start, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_connection_pathway_end: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_connection_pathway_end") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3440143363)! + } + + } + + }() + + /// Returns the ending point of a connection door. `connection` is an index between 0 and the return value of ``regionGetConnectionsCount(region:)``. + public static func regionGetConnectionPathwayEnd(region: RID, connection: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: connection) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_connection_pathway_end, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_region_get_random_point: GDExtensionMethodBindPtr = { + let methodName = StringName("region_get_random_point") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 722801526)! + } + + } + + }() + + /// Returns a random position picked from all region polygons with matching `navigationLayers`. + /// + /// If `uniformly` is `true`, all region polygons and faces are weighted by their surface area (slower). + /// + /// If `uniformly` is `false`, just a random polygon and face is picked (faster). + /// + public static func regionGetRandomPoint(region: RID, navigationLayers: UInt32, uniformly: Bool) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: region.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: uniformly) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_region_get_random_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_link_create: GDExtensionMethodBindPtr = { + let methodName = StringName("link_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Create a new link between two positions on a map. + public static func linkCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_link_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_link_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the navigation map ``RID`` for the link. + public static func linkSetMap(link: RID, map: RID) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `link` is currently assigned to. + public static func linkGetMap(link: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the specified `link` will contribute to its current navigation map. + public static func linkSetEnabled(link: RID, enabled: Bool) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `link` is enabled. + public static func linkGetEnabled(link: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_bidirectional") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether this `link` can be travelled in both directions. + public static func linkSetBidirectional(link: RID, bidirectional: Bool) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: bidirectional) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_bidirectional, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_is_bidirectional: GDExtensionMethodBindPtr = { + let methodName = StringName("link_is_bidirectional") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether this `link` can be travelled in both directions. + public static func linkIsBidirectional(link: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_is_bidirectional, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_navigation_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the links's navigation layers. This allows selecting links from a path request (when using ``NavigationServer3D/mapGetPath(map:origin:destination:optimize:navigationLayers:)``). + public static func linkSetNavigationLayers(link: RID, navigationLayers: UInt32) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: navigationLayers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_navigation_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_navigation_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the navigation layers for this `link`. + public static func linkGetNavigationLayers(link: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_navigation_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_start_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the entry position for this `link`. + public static func linkSetStartPosition(link: RID, position: Vector3) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_start_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_start_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_start_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the starting position of this `link`. + public static func linkGetStartPosition(link: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_start_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_end_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the exit position for the `link`. + public static func linkSetEndPosition(link: RID, position: Vector3) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_end_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_end_position: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_end_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the ending position of this `link`. + public static func linkGetEndPosition(link: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_end_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_enter_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `enterCost` for this `link`. + public static func linkSetEnterCost(link: RID, enterCost: Double) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: enterCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_enter_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_enter_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the enter cost of this `link`. + public static func linkGetEnterCost(link: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_enter_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_travel_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `travelCost` for this `link`. + public static func linkSetTravelCost(link: RID, travelCost: Double) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: travelCost) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_travel_cost: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_travel_cost") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the travel cost of this `link`. + public static func linkGetTravelCost(link: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_travel_cost, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_link_set_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("link_set_owner_id") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the `ObjectID` of the object which manages this link. + public static func linkSetOwnerId(link: RID, ownerId: UInt) { + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: ownerId) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_link_set_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_link_get_owner_id: GDExtensionMethodBindPtr = { + let methodName = StringName("link_get_owner_id") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the object which manages this link. + public static func linkGetOwnerId(link: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: link.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_link_get_owner_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_create: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates the agent. + public static func agentCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_agent_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_agent_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the provided `agent` calculates avoidance. + public static func agentSetAvoidanceEnabled(agent: RID, enabled: Bool) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the provided `agent` has avoidance enabled. + public static func agentGetAvoidanceEnabled(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_use_3d_avoidance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled. + /// + /// If `true` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, underwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's. + /// + /// If `false` the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance. + /// + public static func agentSetUse3dAvoidance(agent: RID, enabled: Bool) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_use_3d_avoidance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_use_3d_avoidance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the provided `agent` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). + public static func agentGetUse3dAvoidance(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_use_3d_avoidance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Puts the agent in the map. + public static func agentSetMap(agent: RID, map: RID) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `agent` is currently assigned to. + public static func agentGetMap(agent: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_paused") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `paused` is true the specified `agent` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. + public static func agentSetPaused(agent: RID, paused: Bool) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: paused) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_paused") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `agent` is paused. + public static func agentGetPaused(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_neighbor_distance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + public static func agentSetNeighborDistance(agent: RID, distance: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: distance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_neighbor_distance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_neighbor_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_neighbor_distance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the maximum distance to other agents the specified `agent` takes into account in the navigation. + public static func agentGetNeighborDistance(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_neighbor_distance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_max_neighbors") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. + public static func agentSetMaxNeighbors(agent: RID, count: Int32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: count) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_max_neighbors, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_max_neighbors: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_max_neighbors") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the maximum number of other agents the specified `agent` takes into account in the navigation. + public static func agentGetMaxNeighbors(agent: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_max_neighbors, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_time_horizon_agents") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + public static func agentSetTimeHorizonAgents(agent: RID, timeHorizon: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: timeHorizon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_time_horizon_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_time_horizon_agents: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_time_horizon_agents") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the minimal amount of time for which the specified `agent`'s velocities that are computed by the simulation are safe with respect to other agents. + public static func agentGetTimeHorizonAgents(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_time_horizon_agents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. + public static func agentSetTimeHorizonObstacles(agent: RID, timeHorizon: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: timeHorizon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_time_horizon_obstacles: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_time_horizon_obstacles") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the minimal amount of time for which the specified `agent`'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. + public static func agentGetTimeHorizonObstacles(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_time_horizon_obstacles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the radius of the agent. + public static func agentSetRadius(agent: RID, radius: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the radius of the specified `agent`. + public static func agentGetRadius(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Updates the provided `agent` `height`. + public static func agentSetHeight(agent: RID, height: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the `height` of the specified `agent`. + public static func agentGetHeight(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_max_speed") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the maximum speed of the agent. Must be positive. + public static func agentSetMaxSpeed(agent: RID, maxSpeed: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: maxSpeed) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_max_speed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_max_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_max_speed") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the maximum speed of the specified `agent`. + public static func agentGetMaxSpeed(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_max_speed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_velocity_forced: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_velocity_forced") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Replaces the internal velocity in the collision avoidance simulation with `velocity` for the specified `agent`. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. + public static func agentSetVelocityForced(agent: RID, velocity: Vector3) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_velocity_forced, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_velocity") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets `velocity` as the new wanted velocity for the specified `agent`. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use ``agentSetVelocityForced(agent:velocity:)`` as well to reset the internal simulation velocity. + public static func agentSetVelocity(agent: RID, velocity: Vector3) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_velocity") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the velocity of the specified `agent`. + public static func agentGetVelocity(agent: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the position of the agent in world space. + public static func agentSetPosition(agent: RID, position: Vector3) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the position of the specified `agent` in world space. + public static func agentGetPosition(agent: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_is_map_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_is_map_changed") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns true if the map got changed the previous frame. + public static func agentIsMapChanged(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_is_map_changed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_callback") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the callback ``Callable`` that gets called after each avoidance processing step for the `agent`. The calculated `safe_velocity` will be dispatched with a signal to the object just before the physics calculations. + /// + /// > Note: Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use ``agentSetAvoidanceCallback(agent:callback:)`` again with an empty ``Callable``. + /// + public static func agentSetAvoidanceCallback(agent: RID, callback: Callable) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_has_avoidance_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_has_avoidance_callback") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Return `true` if the specified `agent` has an avoidance callback. + public static func agentHasAvoidanceCallback(agent: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_has_avoidance_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the agent's `avoidance_layers` bitmask. + public static func agentSetAvoidanceLayers(agent: RID, layers: UInt32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_layers` bitmask of the specified `agent`. + public static func agentGetAvoidanceLayers(agent: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_mask") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the agent's `avoidance_mask` bitmask. + public static func agentSetAvoidanceMask(agent: RID, mask: UInt32) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_mask") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_mask` bitmask of the specified `agent`. + public static func agentGetAvoidanceMask(agent: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_agent_set_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_set_avoidance_priority") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Set the agent's `avoidance_priority` with a `priority` between 0.0 (lowest priority) to 1.0 (highest priority). + /// + /// The specified `agent` does not adjust the velocity for other agents that would match the `avoidance_mask` but have a lower `avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + /// + public static func agentSetAvoidancePriority(agent: RID, priority: Double) { + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_agent_set_avoidance_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_agent_get_avoidance_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("agent_get_avoidance_priority") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the `avoidance_priority` of the specified `agent`. + public static func agentGetAvoidancePriority(agent: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: agent.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_agent_get_avoidance_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_create: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new obstacle. + public static func obstacleCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_obstacle_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_obstacle_set_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, the provided `obstacle` affects avoidance using agents. + public static func obstacleSetAvoidanceEnabled(obstacle: RID, enabled: Bool) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_avoidance_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_avoidance_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the provided `obstacle` has avoidance enabled. + public static func obstacleGetAvoidanceEnabled(obstacle: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_avoidance_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_use_3d_avoidance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets if the `obstacle` uses the 2D avoidance or the 3D avoidance while avoidance is enabled. + public static func obstacleSetUse3dAvoidance(obstacle: RID, enabled: Bool) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_use_3d_avoidance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_use_3d_avoidance: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_use_3d_avoidance") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the provided `obstacle` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). + public static func obstacleGetUse3dAvoidance(obstacle: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_use_3d_avoidance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_map: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Assigns the `obstacle` to a navigation map. + public static func obstacleSetMap(obstacle: RID, map: RID) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: map.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_map: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_map") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the navigation map ``RID`` the requested `obstacle` is currently assigned to. + public static func obstacleGetMap(obstacle: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_map, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_paused") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `paused` is true the specified `obstacle` will not be processed, e.g. affect avoidance velocities. + public static func obstacleSetPaused(obstacle: RID, paused: Bool) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: paused) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_paused") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the specified `obstacle` is paused. + public static func obstacleGetPaused(obstacle: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_paused, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the radius of the dynamic obstacle. + public static func obstacleSetRadius(obstacle: RID, radius: Double) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_radius") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the radius of the specified dynamic `obstacle`. + public static func obstacleGetRadius(obstacle: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `height` for the `obstacle`. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance. + public static func obstacleSetHeight(obstacle: RID, height: Double) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_height") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the `height` of the specified `obstacle`. + public static func obstacleGetHeight(obstacle: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_velocity") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets `velocity` of the dynamic `obstacle`. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. + public static func obstacleSetVelocity(obstacle: RID, velocity: Vector3) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_velocity") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the velocity of the specified dynamic `obstacle`. + public static func obstacleGetVelocity(obstacle: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Updates the `position` in world space for the `obstacle`. + public static func obstacleSetPosition(obstacle: RID, position: Vector3) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_position") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the position of the specified `obstacle` in world space. + public static func obstacleGetPosition(obstacle: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_vertices") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4030257846)! + } + + } + + }() + + /// Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. + public static func obstacleSetVertices(obstacle: RID, vertices: PackedVector3Array) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: vertices.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_vertices, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_vertices") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 808965560)! + } + + } + + }() + + /// Returns the outline vertices for the specified `obstacle`. + public static func obstacleGetVertices(obstacle: RID) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_vertices, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_obstacle_set_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_set_avoidance_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Set the obstacles's `avoidance_layers` bitmask. + public static func obstacleSetAvoidanceLayers(obstacle: RID, layers: UInt32) { + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_set_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_obstacle_get_avoidance_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("obstacle_get_avoidance_layers") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `avoidance_layers` bitmask of the specified `obstacle`. + public static func obstacleGetAvoidanceLayers(obstacle: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: obstacle.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_obstacle_get_avoidance_layers, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_parse_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_source_geometry_data") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 685862123)! + } + + } + + }() + + /// Parses the ``SceneTree`` for source geometry according to the properties of `navigationMesh`. Updates the provided `sourceGeometryData` resource with the resulting data. The resource can then be used to bake a navigation mesh with ``bakeFromSourceGeometryData(navigationMesh:sourceGeometryData:callback:)``. After the process is finished the optional `callback` will be called. + /// + /// > Note: This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + /// + /// **Performance:** While convenient, reading data arrays from ``Mesh`` resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the ``RenderingServer`` in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + /// + public static func parseSourceGeometryData(navigationMesh: NavigationMesh?, sourceGeometryData: NavigationMeshSourceGeometryData3D?, rootNode: Node?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: rootNode?.handle) { pArg2 in + withUnsafePointer(to: callback.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_parse_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bake_from_source_geometry_data: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_from_source_geometry_data") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2469318639)! + } + + } + + }() + + /// Bakes the provided `navigationMesh` with the data from the provided `sourceGeometryData`. After the process is finished the optional `callback` will be called. + public static func bakeFromSourceGeometryData(navigationMesh: NavigationMesh?, sourceGeometryData: NavigationMeshSourceGeometryData3D?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_from_source_geometry_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_bake_from_source_geometry_data_async: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_from_source_geometry_data_async") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2469318639)! + } + + } + + }() + + /// Bakes the provided `navigationMesh` with the data from the provided `sourceGeometryData` as an async task running on a background thread. After the process is finished the optional `callback` will be called. + public static func bakeFromSourceGeometryDataAsync(navigationMesh: NavigationMesh?, sourceGeometryData: NavigationMeshSourceGeometryData3D?, callback: Callable = Callable()) { + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: sourceGeometryData?.handle) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_from_source_geometry_data_async, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_is_baking_navigation_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("is_baking_navigation_mesh") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3142026141)! + } + + } + + }() + + /// Returns `true` when the provided navigation mesh is being baked on a background thread. + public static func isBakingNavigationMesh(_ navigationMesh: NavigationMesh?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: navigationMesh?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_baking_navigation_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_source_geometry_parser_create: GDExtensionMethodBindPtr = { + let methodName = StringName("source_geometry_parser_create") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new source geometry parser. If a ``Callable`` is set for the parser with ``sourceGeometryParserSetCallback(parser:callback:)`` the callback will be called for every single node that gets parsed whenever ``parseSourceGeometryData(navigationMesh:sourceGeometryData:rootNode:callback:)`` is used. + public static func sourceGeometryParserCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_source_geometry_parser_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_source_geometry_parser_set_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("source_geometry_parser_set_callback") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the `callback` ``Callable`` for the specific source geometry `parser`. The ``Callable`` will receive a call with the following parameters: + /// + /// - `navigation_mesh` - The ``NavigationMesh`` reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + /// + /// - `source_geometry_data` - The ``NavigationMeshSourceGeometryData3D`` reference. Add custom source geometry for navigation mesh baking to this object. + /// + /// - `node` - The ``Node`` that is parsed. + /// + public static func sourceGeometryParserSetCallback(parser: RID, callback: Callable) { + withUnsafePointer(to: parser.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_source_geometry_parser_set_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_simplify_path: GDExtensionMethodBindPtr = { + let methodName = StringName("simplify_path") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2344122170)! + } + + } + + }() + + /// Returns a simplified version of `path` with less critical path points removed. The simplification amount is in worlds units and controlled by `epsilon`. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + /// + /// Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + /// + public static func simplifyPath(_ path: PackedVector3Array, epsilon: Double) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: epsilon) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_simplify_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Destroys the given RID. + public static func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_rid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_active") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Control activation of this server. + public static func setActive(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true` enables debug mode on the NavigationServer. + public static func setDebugEnabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_debug_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_enabled") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` when the NavigationServer has debug enabled. + public static func getDebugEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_get_debug_enabled, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_process_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_info") + return withUnsafePointer(to: &NavigationServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1938440894)! + } + + } + + }() + + /// Returns information about the current state of the NavigationServer. See ``NavigationServer3D/ProcessInfo`` for a list of available states. + public static func getProcessInfo(_ processInfo: NavigationServer3D.ProcessInfo) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: processInfo.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_process_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ map: RID) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a navigation map is updated, when a region moves or is modified. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.mapChanged.connect { map in + /// print ("caught signal") + /// } + /// ``` + public var mapChanged: Signal1 { Signal1 (target: self, signalName: "map_changed") } + + /// Emitted when navigation debug settings are changed. Only available in debug builds. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.navigationDebugChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var navigationDebugChanged: SimpleSignal { SimpleSignal (target: self, signalName: "navigation_debug_changed") } + + /// Emitted when avoidance debug settings are changed. Only available in debug builds. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.avoidanceDebugChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var avoidanceDebugChanged: SimpleSignal { SimpleSignal (target: self, signalName: "avoidance_debug_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NinePatchRect.swift b/Sources/SwiftGodot/Generated/Api/NinePatchRect.swift new file mode 100644 index 000000000..4ae6a85a9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NinePatchRect.swift @@ -0,0 +1,458 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control that displays a texture by keeping its corners intact, but tiling its edges and center. +/// +/// Also known as 9-slice panels, ``NinePatchRect`` produces clean panels of any size based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's edges horizontally or vertically, tiles the center on both axes, and leaves the corners unchanged. +/// +/// +/// This object emits the following signals: +/// +/// - ``textureChanged`` +open class NinePatchRect: Control { + override open class var godotClassName: StringName { "NinePatchRect" } + public enum AxisStretchMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted. + case stretch = 0 // AXIS_STRETCH_MODE_STRETCH + /// Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges. + case tile = 1 // AXIS_STRETCH_MODE_TILE + /// Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than ``AxisStretchMode/stretch``. The texture must be seamless for this to work without displaying artifacts between edges. + case tileFit = 2 // AXIS_STRETCH_MODE_TILE_FIT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .stretch: return ".stretch" + case .tile: return ".tile" + case .tileFit: return ".tileFit" + } + + } + + } + + + /* Properties */ + + /// The node's texture resource. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// If `true`, draw the panel's center. Else, only draw the 9-slice's borders. + final public var drawCenter: Bool { + get { + return is_draw_center_enabled () + } + + set { + set_draw_center (newValue) + } + + } + + /// Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. + final public var regionRect: Rect2 { + get { + return get_region_rect () + } + + set { + set_region_rect (newValue) + } + + } + + /// The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. + final public var patchMarginLeft: Int32 { + get { + return get_patch_margin (Side (rawValue: 0)!) + } + + set { + set_patch_margin (Side (rawValue: 0)!, newValue) + } + + } + + /// The height of the 9-slice's top row. A margin of 16 means the 9-slice's top corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. + final public var patchMarginTop: Int32 { + get { + return get_patch_margin (Side (rawValue: 1)!) + } + + set { + set_patch_margin (Side (rawValue: 1)!, newValue) + } + + } + + /// The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. + final public var patchMarginRight: Int32 { + get { + return get_patch_margin (Side (rawValue: 2)!) + } + + set { + set_patch_margin (Side (rawValue: 2)!, newValue) + } + + } + + /// The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. + final public var patchMarginBottom: Int32 { + get { + return get_patch_margin (Side (rawValue: 3)!) + } + + set { + set_patch_margin (Side (rawValue: 3)!, newValue) + } + + } + + /// The stretch mode to use for horizontal stretching/tiling. See ``NinePatchRect.AxisStretchMode`` for possible values. + final public var axisStretchHorizontal: NinePatchRect.AxisStretchMode { + get { + return get_h_axis_stretch_mode () + } + + set { + set_h_axis_stretch_mode (newValue) + } + + } + + /// The stretch mode to use for vertical stretching/tiling. See ``NinePatchRect.AxisStretchMode`` for possible values. + final public var axisStretchVertical: NinePatchRect.AxisStretchMode { + get { + return get_v_axis_stretch_mode () + } + + set { + set_v_axis_stretch_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NinePatchRect.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_patch_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_patch_margin") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 437707142)! + } + + } + + }() + + @inline(__always) + /// Sets the size of the margin on the specified ``Side`` to `value` pixels. + fileprivate final func set_patch_margin(_ margin: Side, _ value: Int32) { + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_patch_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_patch_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_patch_margin") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1983885014)! + } + + } + + }() + + @inline(__always) + /// Returns the size of the margin on the specified ``Side``. + fileprivate final func get_patch_margin(_ margin: Side) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: margin.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_get_patch_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_region_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_region_rect") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_region_rect(_ rect: Rect2) { + withUnsafePointer(to: rect) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_region_rect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_region_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_region_rect") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_region_rect() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(NinePatchRect.method_get_region_rect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_draw_center: GDExtensionMethodBindPtr = { + let methodName = StringName("set_draw_center") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_draw_center(_ drawCenter: Bool) { + withUnsafePointer(to: drawCenter) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_draw_center, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_draw_center_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_draw_center_enabled") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_draw_center_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NinePatchRect.method_is_draw_center_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_h_axis_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_axis_stretch_mode") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3219608417)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_axis_stretch_mode(_ mode: NinePatchRect.AxisStretchMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_h_axis_stretch_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_axis_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_axis_stretch_mode") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3317113799)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_axis_stretch_mode() -> NinePatchRect.AxisStretchMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NinePatchRect.method_get_h_axis_stretch_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NinePatchRect.AxisStretchMode (rawValue: _result)! + } + + fileprivate static var method_set_v_axis_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_axis_stretch_mode") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3219608417)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_axis_stretch_mode(_ mode: NinePatchRect.AxisStretchMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NinePatchRect.method_set_v_axis_stretch_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_axis_stretch_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_axis_stretch_mode") + return withUnsafePointer(to: &NinePatchRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3317113799)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_axis_stretch_mode() -> NinePatchRect.AxisStretchMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(NinePatchRect.method_get_v_axis_stretch_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NinePatchRect.AxisStretchMode (rawValue: _result)! + } + + // Signals + /// Emitted when the node's texture changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.textureChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var textureChanged: SimpleSignal { SimpleSignal (target: self, signalName: "texture_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Node.swift b/Sources/SwiftGodot/Generated/Api/Node.swift new file mode 100644 index 000000000..93175d58f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Node.swift @@ -0,0 +1,4295 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for all scene objects. +/// +/// Nodes are Godot's building blocks. They can be assigned as the child of another node, resulting in a tree arrangement. A given node can contain any number of nodes as children with the requirement that all siblings (direct children of a node) should have unique names. +/// +/// A tree of nodes is called a _scene_. Scenes can be saved to the disk and then instantiated into other scenes. This allows for very high flexibility in the architecture and data model of Godot projects. +/// +/// **Scene tree:** The ``SceneTree`` contains the active tree of nodes. When a node is added to the scene tree, it receives the ``notificationEnterTree`` notification and its ``_enterTree()`` callback is triggered. Child nodes are always added _after_ their parent node, i.e. the ``_enterTree()`` callback of a parent node will be triggered before its child's. +/// +/// Once all nodes have been added in the scene tree, they receive the ``notificationReady`` notification and their respective ``_ready()`` callbacks are triggered. For groups of nodes, the ``_ready()`` callback is called in reverse order, starting with the children and moving up to the parent nodes. +/// +/// This means that when adding a node to the scene tree, the following order will be used for the callbacks: ``_enterTree()`` of the parent, ``_enterTree()`` of the children, ``_ready()`` of the children and finally ``_ready()`` of the parent (recursively for the entire scene tree). +/// +/// **Processing:** Nodes can override the "process" state, so that they receive a callback on each frame requesting them to process (do something). Normal processing (callback ``_process(delta:)``, toggled with ``setProcess(enable:)``) happens as fast as possible and is dependent on the frame rate, so the processing time _delta_ (in seconds) is passed as an argument. Physics processing (callback ``_physicsProcess(delta:)``, toggled with ``setPhysicsProcess(enable:)``) happens a fixed number of times per second (60 by default) and is useful for code related to the physics engine. +/// +/// Nodes can also process input events. When present, the ``_input(event:)`` function will be called for each input that the program receives. In many cases, this can be overkill (unless used for simple projects), and the ``_unhandledInput(event:)`` function might be preferred; it is called when the input event was not handled by anyone else (typically, GUI ``Control`` nodes), ensuring that the node only receives the events that were meant for it. +/// +/// To keep track of the scene hierarchy (especially when instantiating scenes into other scenes), an "owner" can be set for the node with the ``owner`` property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. +/// +/// Finally, when a node is freed with ``Object/free()`` or ``queueFree()``, it will also free all its children. +/// +/// **Groups:** Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See ``addToGroup(_:persistent:)``, ``isInGroup(_:)`` and ``removeFromGroup(_:)``. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on ``SceneTree``. +/// +/// **Networking with nodes:** After connecting to a server (or making one, see ``ENetMultiplayerPeer``), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling ``rpc(method:)`` with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its ``NodePath`` (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. +/// +/// > Note: The `script` property is part of the ``Object`` class, not ``Node``. It isn't exposed like most properties but does have a setter and getter (see ``Object/setScript(_:)`` and ``Object/getScript()``). +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``ready`` +/// - ``renamed`` +/// - ``treeEntered`` +/// - ``treeExiting`` +/// - ``treeExited`` +/// - ``childEnteredTree`` +/// - ``childExitingTree`` +/// - ``childOrderChanged`` +/// - ``replacingBy`` +/// - ``editorDescriptionChanged`` +open class Node: Object { + override open class var godotClassName: StringName { "Node" } + public enum ProcessMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Inherits ``processMode`` from the node's parent. This is the default for any newly created node. + case inherit = 0 // PROCESS_MODE_INHERIT + /// Stops processing when ``SceneTree/paused`` is `true`. This is the inverse of ``ProcessMode/whenPaused``, and the default for the root node. + case pausable = 1 // PROCESS_MODE_PAUSABLE + /// Process **only** when ``SceneTree/paused`` is `true`. This is the inverse of ``ProcessMode/pausable``. + case whenPaused = 2 // PROCESS_MODE_WHEN_PAUSED + /// Always process. Keeps processing, ignoring ``SceneTree/paused``. This is the inverse of ``ProcessMode/disabled``. + case always = 3 // PROCESS_MODE_ALWAYS + /// Never process. Completely disables processing, ignoring ``SceneTree/paused``. This is the inverse of ``ProcessMode/always``. + case disabled = 4 // PROCESS_MODE_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherit: return ".inherit" + case .pausable: return ".pausable" + case .whenPaused: return ".whenPaused" + case .always: return ".always" + case .disabled: return ".disabled" + } + + } + + } + + public enum ProcessThreadGroup: Int64, CaseIterable, CustomDebugStringConvertible { + /// Process this node based on the thread group mode of the first parent (or grandparent) node that has a thread group mode that is not inherit. See ``processThreadGroup`` for more information. + case inherit = 0 // PROCESS_THREAD_GROUP_INHERIT + /// Process this node (and child nodes set to inherit) on the main thread. See ``processThreadGroup`` for more information. + case mainThread = 1 // PROCESS_THREAD_GROUP_MAIN_THREAD + /// Process this node (and child nodes set to inherit) on a sub-thread. See ``processThreadGroup`` for more information. + case subThread = 2 // PROCESS_THREAD_GROUP_SUB_THREAD + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherit: return ".inherit" + case .mainThread: return ".mainThread" + case .subThread: return ".subThread" + } + + } + + } + + public struct ProcessThreadMessages: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Allows this node to process threaded messages created with ``callDeferredThreadGroup(method:)`` right before ``_process(delta:)`` is called. + public static let messages = ProcessThreadMessages (rawValue: 1) + /// Allows this node to process threaded messages created with ``callDeferredThreadGroup(method:)`` right before ``_physicsProcess(delta:)`` is called. + public static let messagesPhysics = ProcessThreadMessages (rawValue: 2) + /// Allows this node to process threaded messages created with ``callDeferredThreadGroup(method:)`` right before either ``_process(delta:)`` or ``_physicsProcess(delta:)`` are called. + public static let messagesAll = ProcessThreadMessages (rawValue: 3) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.messages) { result += "messages, " } + if self.contains (.messagesPhysics) { result += "messagesPhysics, " } + if self.contains (.messagesAll) { result += "messagesAll, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum PhysicsInterpolationMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Inherits ``physicsInterpolationMode`` from the node's parent. This is the default for any newly created node. + case inherit = 0 // PHYSICS_INTERPOLATION_MODE_INHERIT + /// Enables physics interpolation for this node and for children set to ``PhysicsInterpolationMode/inherit``. This is the default for the root node. + case on = 1 // PHYSICS_INTERPOLATION_MODE_ON + /// Disables physics interpolation for this node and for children set to ``PhysicsInterpolationMode/inherit``. + case off = 2 // PHYSICS_INTERPOLATION_MODE_OFF + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherit: return ".inherit" + case .on: return ".on" + case .off: return ".off" + } + + } + + } + + public enum DuplicateFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Duplicate the node's signal connections. + case signals = 1 // DUPLICATE_SIGNALS + /// Duplicate the node's groups. + case groups = 2 // DUPLICATE_GROUPS + /// Duplicate the node's script (also overriding the duplicated children's scripts, if combined with ``DuplicateFlags/useInstantiation``). + case scripts = 4 // DUPLICATE_SCRIPTS + /// Duplicate using ``PackedScene/instantiate(editState:)``. If the node comes from a scene saved on disk, re-uses ``PackedScene/instantiate(editState:)`` as the base for the duplicated node and its children. + case useInstantiation = 8 // DUPLICATE_USE_INSTANTIATION + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .signals: return ".signals" + case .groups: return ".groups" + case .scripts: return ".scripts" + case .useInstantiation: return ".useInstantiation" + } + + } + + } + + public enum InternalMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The node will not be internal. + case disabled = 0 // INTERNAL_MODE_DISABLED + /// The node will be placed at the beginning of the parent's children, before any non-internal sibling. + case front = 1 // INTERNAL_MODE_FRONT + /// The node will be placed at the end of the parent's children, after any non-internal sibling. + case back = 2 // INTERNAL_MODE_BACK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .front: return ".front" + case .back: return ".back" + } + + } + + } + + public enum AutoTranslateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Inherits ``autoTranslateMode`` from the node's parent. This is the default for any newly created node. + case inherit = 0 // AUTO_TRANSLATE_MODE_INHERIT + /// Always automatically translate. This is the inverse of ``AutoTranslateMode/disabled``, and the default for the root node. + case always = 1 // AUTO_TRANSLATE_MODE_ALWAYS + /// Never automatically translate. This is the inverse of ``AutoTranslateMode/always``. + /// + /// String parsing for POT generation will be skipped for this node and children that are set to ``AutoTranslateMode/inherit``. + /// + case disabled = 2 // AUTO_TRANSLATE_MODE_DISABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .inherit: return ".inherit" + case .always: return ".always" + case .disabled: return ".disabled" + } + + } + + } + + /* Constants */ + /// Notification received when the node enters a ``SceneTree``. See ``_enterTree()``. + /// + /// This notification is received _before_ the related [signal tree_entered] signal. + /// + public static let notificationEnterTree = 10 + /// Notification received when the node is about to exit a ``SceneTree``. See ``_exitTree()``. + /// + /// This notification is received _after_ the related [signal tree_exiting] signal. + /// + public static let notificationExitTree = 11 + /// + public static let notificationMovedInParent = 12 + /// Notification received when the node is ready. See ``_ready()``. + public static let notificationReady = 13 + /// Notification received when the node is paused. See ``processMode``. + public static let notificationPaused = 14 + /// Notification received when the node is unpaused. See ``processMode``. + public static let notificationUnpaused = 15 + /// Notification received from the tree every physics frame when ``isPhysicsProcessing()`` returns `true`. See ``_physicsProcess(delta:)``. + public static let notificationPhysicsProcess = 16 + /// Notification received from the tree every rendered frame when ``isProcessing()`` returns `true`. See ``_process(delta:)``. + public static let notificationProcess = 17 + /// Notification received when the node is set as a child of another node (see ``addChild(node:forceReadableName:`internal`:)`` and ``addSibling(_:forceReadableName:)``). + /// + /// > Note: This does _not_ mean that the node entered the ``SceneTree``. + /// + public static let notificationParented = 18 + /// Notification received when the parent node calls ``removeChild(node:)`` on this node. + /// + /// > Note: This does _not_ mean that the node exited the ``SceneTree``. + /// + public static let notificationUnparented = 19 + /// Notification received _only_ by the newly instantiated scene root node, when ``PackedScene/instantiate(editState:)`` is completed. + public static let notificationSceneInstantiated = 20 + /// Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. + /// + /// Can be triggered either by dragging a ``Control`` that provides drag data (see ``Control/_getDragData(atPosition:)``) or using ``Control/forceDrag(data:preview:)``. + /// + /// Use ``Viewport/guiGetDragData()`` to get the dragged data. + /// + public static let notificationDragBegin = 21 + /// Notification received when a drag operation ends. + /// + /// Use ``Viewport/guiIsDragSuccessful()`` to check if the drag succeeded. + /// + public static let notificationDragEnd = 22 + /// Notification received when the node's ``name`` or one of its ancestors' ``name`` is changed. This notification is _not_ received when the node is removed from the ``SceneTree``. + public static let notificationPathRenamed = 23 + /// Notification received when the list of children is changed. This happens when child nodes are added, moved or removed. + public static let notificationChildOrderChanged = 24 + /// Notification received from the tree every rendered frame when ``isProcessingInternal()`` returns `true`. + public static let notificationInternalProcess = 25 + /// Notification received from the tree every physics frame when ``isPhysicsProcessingInternal()`` returns `true`. + public static let notificationInternalPhysicsProcess = 26 + /// Notification received when the node enters the tree, just before ``notificationReady`` may be received. Unlike the latter, it is sent every time the node enters tree, not just once. + public static let notificationPostEnterTree = 27 + /// Notification received when the node is disabled. See ``ProcessMode/disabled``. + public static let notificationDisabled = 28 + /// Notification received when the node is enabled again after being disabled. See ``ProcessMode/disabled``. + public static let notificationEnabled = 29 + /// Notification received when ``resetPhysicsInterpolation()`` is called on the node or its ancestors. + public static let notificationResetPhysicsInterpolation = 2001 + /// Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. + public static let notificationEditorPreSave = 9001 + /// Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. + public static let notificationEditorPostSave = 9002 + /// Notification received when the mouse enters the window. + /// + /// Implemented for embedded windows and on desktop and web platforms. + /// + public static let notificationWmMouseEnter = 1002 + /// Notification received when the mouse leaves the window. + /// + /// Implemented for embedded windows and on desktop and web platforms. + /// + public static let notificationWmMouseExit = 1003 + /// Notification received from the OS when the node's ``Window`` ancestor is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case ``notificationApplicationFocusIn`` is also received). + /// + /// A ``Window`` node receives this notification when it is focused. + /// + public static let notificationWmWindowFocusIn = 1004 + /// Notification received from the OS when the node's ``Window`` ancestor is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case ``notificationApplicationFocusOut`` is also received). + /// + /// A ``Window`` node receives this notification when it is defocused. + /// + public static let notificationWmWindowFocusOut = 1005 + /// Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]). + /// + /// Implemented on desktop platforms. + /// + public static let notificationWmCloseRequest = 1006 + /// Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). + /// + /// Implemented only on iOS. + /// + public static let notificationWmGoBackRequest = 1007 + /// Notification received when the window is resized. + /// + /// > Note: Only the resized ``Window`` node receives this notification, and it's not propagated to the child nodes. + /// + public static let notificationWmSizeChanged = 1008 + /// Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS. + public static let notificationWmDpiChange = 1009 + /// Notification received when the mouse cursor enters the ``Viewport``'s visible area, that is not occluded behind other ``Control``s or ``Window``s, provided its ``Viewport/guiDisableInput`` is `false` and regardless if it's currently focused or not. + public static let notificationVpMouseEnter = 1010 + /// Notification received when the mouse cursor leaves the ``Viewport``'s visible area, that is not occluded behind other ``Control``s or ``Window``s, provided its ``Viewport/guiDisableInput`` is `false` and regardless if it's currently focused or not. + public static let notificationVpMouseExit = 1011 + /// Notification received from the OS when the application is exceeding its allocated memory. + /// + /// Implemented only on iOS. + /// + public static let notificationOsMemoryWarning = 2009 + /// Notification received when translations may have changed. Can be triggered by the user changing the locale, changing ``autoTranslateMode`` or when the node enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like ``Object/tr(message:context:)``. + /// + /// > Note: This notification is received alongside ``notificationEnterTree``, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using ``isNodeReady()``. + /// + public static let notificationTranslationChanged = 2010 + /// Notification received from the OS when a request for "About" information is sent. + /// + /// Implemented only on macOS. + /// + public static let notificationWmAbout = 2011 + /// Notification received from Godot's crash handler when the engine is about to crash. + /// + /// Implemented on desktop platforms, if the crash handler is enabled. + /// + public static let notificationCrash = 2012 + /// Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + /// + /// Implemented only on macOS. + /// + public static let notificationOsImeUpdate = 2013 + /// Notification received from the OS when the application is resumed. + /// + /// Specific to the Android and iOS platforms. + /// + public static let notificationApplicationResumed = 2014 + /// Notification received from the OS when the application is paused. + /// + /// Specific to the Android and iOS platforms. + /// + /// > Note: On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. + /// + public static let notificationApplicationPaused = 2015 + /// Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + /// + /// Implemented on desktop and mobile platforms. + /// + public static let notificationApplicationFocusIn = 2016 + /// Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + /// + /// Implemented on desktop and mobile platforms. + /// + public static let notificationApplicationFocusOut = 2017 + /// Notification received when the ``TextServer`` is changed. + public static let notificationTextServerChanged = 2018 + + /* Properties */ + + /// The name of the node. This name must be unique among the siblings (other child nodes from the same parent). When set to an existing sibling's name, the node is automatically renamed. + /// + /// > Note: When changing the name, the following characters will be replaced with an underscore: (`.` `:` `@` `/` `"` `%`). In particular, the `@` character is reserved for auto-generated names. See also ``GString/validateNodeName()``. + /// + final public var name: StringName { + get { + return get_name () + } + + set { + set_name (String (newValue)) + } + + } + + /// If `true`, the node can be accessed from any node sharing the same ``owner`` or from the ``owner`` itself, with special `%Name` syntax in ``getNode(path:)``. + /// + /// > Note: If another node with the same ``owner`` shares the same ``name`` as this node, the other node will no longer be accessible as unique. + /// + final public var uniqueNameInOwner: Bool { + get { + return is_unique_name_in_owner () + } + + set { + set_unique_name_in_owner (newValue) + } + + } + + /// The original scene's file path, if the node has been instantiated from a ``PackedScene`` file. Only scene root nodes contains this. + final public var sceneFilePath: String { + get { + return get_scene_file_path () + } + + set { + set_scene_file_path (newValue) + } + + } + + /// The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a ``PackedScene``, all the nodes it owns are also saved with it. + /// + /// > Note: In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling ``addChild(node:forceReadableName:`internal`:)``. See also (see ``uniqueNameInOwner``) + /// + final public var owner: Node? { + get { + return get_owner () + } + + set { + set_owner (newValue) + } + + } + + /// The ``MultiplayerAPI`` instance associated with this node. See ``SceneTree/getMultiplayer(forPath:)``. + /// + /// > Note: Renaming the node, or moving it in the tree, will not move the ``MultiplayerAPI`` to the new path, you will have to update this manually. + /// + final public var multiplayer: MultiplayerAPI? { + get { + return get_multiplayer () + } + + } + + /// The node's processing behavior (see ``Node/ProcessMode``). To check if the node can process in its current mode, use ``canProcess()``. + final public var processMode: Node.ProcessMode { + get { + return get_process_mode () + } + + set { + set_process_mode (newValue) + } + + } + + /// The node's execution order of the process callbacks (``_process(delta:)``, ``_physicsProcess(delta:)``, and internal processing). Nodes whose priority value is _lower_ call their process callbacks first, regardless of tree order. + final public var processPriority: Int32 { + get { + return get_process_priority () + } + + set { + set_process_priority (newValue) + } + + } + + /// Similar to ``processPriority`` but for ``notificationPhysicsProcess``, ``_physicsProcess(delta:)`` or the internal version. + final public var processPhysicsPriority: Int32 { + get { + return get_physics_process_priority () + } + + set { + set_physics_process_priority (newValue) + } + + } + + /// Set the process thread group for this node (basically, whether it receives ``notificationProcess``, ``notificationPhysicsProcess``, ``_process(delta:)`` or ``_physicsProcess(delta:)`` (and the internal versions) on the main thread or in a sub-thread. + /// + /// By default, the thread group is ``ProcessThreadGroup/inherit``, which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on ``processThreadGroupOrder``). If the value is set is ``ProcessThreadGroup/subThread``, this thread group will occur on a sub thread (not the main thread), otherwise if set to ``ProcessThreadGroup/mainThread`` it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the _default thread group_. This default group will process on the main thread and its group order is 0. + /// + /// During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use ``Object/callDeferred(method:)``, ``callThreadSafe(method:)``, ``callDeferredThreadGroup(method:)`` and the likes in order to communicate from the thread groups to the main thread (or to other thread groups). + /// + /// To better understand process thread groups, the idea is that any node set to any other value than ``ProcessThreadGroup/inherit`` will include any child (and grandchild) nodes set to inherit into its process thread group. This means that the processing of all the nodes in the group will happen together, at the same time as the node including them. + /// + final public var processThreadGroup: Node.ProcessThreadGroup { + get { + return get_process_thread_group () + } + + set { + set_process_thread_group (newValue) + } + + } + + /// Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example. + final public var processThreadGroupOrder: Int32 { + get { + return get_process_thread_group_order () + } + + set { + set_process_thread_group_order (newValue) + } + + } + + /// Set whether the current thread group will process messages (calls to ``callDeferredThreadGroup(method:)`` on threads), and whether it wants to receive them during regular process or physics process callbacks. + final public var processThreadMessages: Node.ProcessThreadMessages { + get { + return get_process_thread_messages () + } + + set { + set_process_thread_messages (newValue) + } + + } + + /// Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally. See ``ProjectSettings/physics/common/physicsInterpolation`` and ``SceneTree/physicsInterpolation`` for the global setting. + /// + /// > Note: When teleporting a node to a distant position you should temporarily disable interpolation with ``Node/resetPhysicsInterpolation()``. + /// + final public var physicsInterpolationMode: Node.PhysicsInterpolationMode { + get { + return get_physics_interpolation_mode () + } + + set { + set_physics_interpolation_mode (newValue) + } + + } + + /// Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as ``Label``, ``RichTextLabel``, ``Window``, etc.). Also decides if the node's strings should be parsed for POT generation. + /// + /// > Note: For the root node, auto translate mode can also be set via ``ProjectSettings/internationalization/rendering/rootNodeAutoTranslate``. + /// + final public var autoTranslateMode: Node.AutoTranslateMode { + get { + return get_auto_translate_mode () + } + + set { + set_auto_translate_mode (newValue) + } + + } + + /// An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock. + final public var editorDescription: String { + get { + return get_editor_description () + } + + set { + set_editor_description (newValue) + } + + } + + /* Methods */ + /// Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the `delta` time since the previous frame is not constant. `delta` is in seconds. + /// + /// It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setProcess(enable:)``. + /// + /// Corresponds to the ``notificationProcess`` notification in ``Wrapper._notification(code:reverse)``. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + /// + @_documentation(visibility: public) + open func _process(delta: Double) { + } + + /// Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the `delta` variable should be constant. `delta` is in seconds. + /// + /// It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setPhysicsProcess(enable:)``. + /// + /// Corresponds to the ``notificationPhysicsProcess`` notification in ``Wrapper._notification(code:reverse)``. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + /// + @_documentation(visibility: public) + open func _physicsProcess(delta: Double) { + } + + /// Called when the node enters the ``SceneTree`` (e.g. upon instantiating, scene changing, or after calling ``addChild(node:forceReadableName:`internal`:)`` in a script). If the node has children, its ``_enterTree()`` callback will be called first, and then that of the children. + /// + /// Corresponds to the ``notificationEnterTree`` notification in ``Wrapper._notification(code:reverse)``. + /// + @_documentation(visibility: public) + open func _enterTree() { + } + + /// Called when the node is about to leave the ``SceneTree`` (e.g. upon freeing, scene changing, or after calling ``removeChild(node:)`` in a script). If the node has children, its ``_exitTree()`` callback will be called last, after all its children have left the tree. + /// + /// Corresponds to the ``notificationExitTree`` notification in ``Wrapper._notification(code:reverse)`` and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. + /// + @_documentation(visibility: public) + open func _exitTree() { + } + + /// Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their ``_ready()`` callbacks get triggered first, and the parent node will receive the ready notification afterwards. + /// + /// Corresponds to the ``notificationReady`` notification in ``Wrapper._notification(code:reverse)``. See also the `@onready` annotation for variables. + /// + /// Usually used for initialization. For even earlier initialization, ``Object/_init()`` may be used. See also ``_enterTree()``. + /// + /// > Note: This method may be called only once for each node. After removing a node from the scene tree and adding it again, ``_ready()`` will **not** be called a second time. This can be bypassed by requesting another call with ``requestReady()``, which may be called anywhere before adding the node again. + /// + @_documentation(visibility: public) + open func _ready() { + } + + /// The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a `tool` script. + /// + /// Returning an empty array produces no warnings. + /// + /// Call ``updateConfigurationWarnings()`` when the warnings need to be updated for this node. + /// + @_documentation(visibility: public) + open func _getConfigurationWarnings() -> PackedStringArray { + return PackedStringArray () + } + + /// Called when there is an input event. The input event propagates up through the node tree until a node consumes it. + /// + /// It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setProcessInput(enable:)``. + /// + /// To consume the input event and stop it propagating further to other nodes, ``Viewport/setInputAsHandled()`` can be called. + /// + /// For gameplay input, ``_unhandledInput(event:)`` and ``_unhandledKeyInput(event:)`` are usually a better fit as they allow the GUI to intercept the events first. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + /// + @_documentation(visibility: public) + open func _input(event: InputEvent) { + } + + /// Called when an ``InputEventKey``, ``InputEventShortcut``, or ``InputEventJoypadButton`` hasn't been consumed by ``_input(event:)`` or any GUI ``Control`` item. It is called before ``_unhandledKeyInput(event:)`` and ``_unhandledInput(event:)``. The input event propagates up through the node tree until a node consumes it. + /// + /// It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setProcessShortcutInput(enable:)``. + /// + /// To consume the input event and stop it propagating further to other nodes, ``Viewport/setInputAsHandled()`` can be called. + /// + /// This method can be used to handle shortcuts. For generic GUI events, use ``_input(event:)`` instead. Gameplay events should usually be handled with either ``_unhandledInput(event:)`` or ``_unhandledKeyInput(event:)``. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not orphan). + /// + @_documentation(visibility: public) + open func _shortcutInput(event: InputEvent?) { + } + + /// Called when an ``InputEvent`` hasn't been consumed by ``_input(event:)`` or any GUI ``Control`` item. It is called after ``_shortcutInput(event:)`` and after ``_unhandledKeyInput(event:)``. The input event propagates up through the node tree until a node consumes it. + /// + /// It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setProcessUnhandledInput(enable:)``. + /// + /// To consume the input event and stop it propagating further to other nodes, ``Viewport/setInputAsHandled()`` can be called. + /// + /// For gameplay input, this method is usually a better fit than ``_input(event:)``, as GUI events need a higher priority. For keyboard shortcuts, consider using ``_shortcutInput(event:)`` instead, as it is called before this method. Finally, to handle keyboard events, consider using ``_unhandledKeyInput(event:)`` for performance reasons. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + /// + @_documentation(visibility: public) + open func _unhandledInput(event: InputEvent?) { + } + + /// Called when an ``InputEventKey`` hasn't been consumed by ``_input(event:)`` or any GUI ``Control`` item. It is called after ``_shortcutInput(event:)`` but before ``_unhandledInput(event:)``. The input event propagates up through the node tree until a node consumes it. + /// + /// It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with ``setProcessUnhandledKeyInput(enable:)``. + /// + /// To consume the input event and stop it propagating further to other nodes, ``Viewport/setInputAsHandled()`` can be called. + /// + /// This method can be used to handle Unicode character input with [kbd]Alt[/kbd], [kbd]Alt + Ctrl[/kbd], and [kbd]Alt + Shift[/kbd] modifiers, after shortcuts were handled. + /// + /// For gameplay input, this and ``_unhandledInput(event:)`` are usually a better fit than ``_input(event:)``, as GUI events should be handled first. This method also performs better than ``_unhandledInput(event:)``, since unrelated events such as ``InputEventMouseMotion`` are automatically filtered. For shortcuts, consider using ``_shortcutInput(event:)`` instead. + /// + /// > Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + /// + @_documentation(visibility: public) + open func _unhandledKeyInput(event: InputEvent?) { + } + + fileprivate static var method_print_orphan_nodes: GDExtensionMethodBindPtr = { + let methodName = StringName("print_orphan_nodes") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Prints all orphan nodes (nodes outside the ``SceneTree``). Useful for debugging. + /// + /// > Note: This method only works in debug builds. Does nothing in a project exported in release mode. + /// + public static func printOrphanNodes() { + gi.object_method_bind_ptrcall(method_print_orphan_nodes, nil, nil, nil) + + } + + fileprivate static var method_add_sibling: GDExtensionMethodBindPtr = { + let methodName = StringName("add_sibling") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2570952461)! + } + + } + + }() + + /// Adds a `sibling` node to this node's parent, and moves the added sibling right below this node. + /// + /// If `forceReadableName` is `true`, improves the readability of the added `sibling`. If not named, the `sibling` is renamed to its type, and if it shares ``name`` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to `false`, which assigns a dummy name featuring `@` in both situations. + /// + /// Use ``addChild(node:forceReadableName:`internal`:)`` instead of this method if you don't need the child node to be added below a specific node in the list of children. + /// + /// > Note: If this node is internal, the added sibling will be internal too (see ``addChild(node:forceReadableName:`internal`:)``'s `internal` parameter). + /// + public final func addSibling(_ sibling: Node?, forceReadableName: Bool = false) { + withUnsafePointer(to: sibling?.handle) { pArg0 in + withUnsafePointer(to: forceReadableName) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_add_sibling, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_name") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_name(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_name() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Node.method_get_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_child: GDExtensionMethodBindPtr = { + let methodName = StringName("add_child") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3863233950)! + } + + } + + }() + + /// Adds a child `node`. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. + /// + /// If `forceReadableName` is `true`, improves the readability of the added `node`. If not named, the `node` is renamed to its type, and if it shares ``name`` with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to `false`, which assigns a dummy name featuring `@` in both situations. + /// + /// If `internal` is different than ``InternalMode/disabled``, the child will be added as internal node. These nodes are ignored by methods like ``getChildren(includeInternal:)``, unless their parameter `include_internal` is `true`. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. ``ColorPicker``. See ``Node/InternalMode`` for available modes. + /// + /// > Note: If `node` already has a parent, this method will fail. Use ``removeChild(node:)`` first to remove `node` from its current parent. For example: + /// + /// If you need the child node to be added below a specific node in the list of children, use ``addSibling(_:forceReadableName:)`` instead of this method. + /// + /// > Note: If you want a child to be persisted to a ``PackedScene``, you must set ``owner`` in addition to calling ``addChild(node:forceReadableName:`internal`:)``. This is typically relevant for tool scripts and editor plugins. If ``addChild(node:forceReadableName:`internal`:)`` is called without setting ``owner``, the newly added ``Node`` will not be visible in the scene tree, though it will be visible in the 2D/3D view. + /// + public final func addChild(node: Node?, forceReadableName: Bool = false, `internal`: Node.InternalMode = .disabled) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: forceReadableName) { pArg1 in + withUnsafePointer(to: `internal`.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Node.method_add_child, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_child: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_child") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Removes a child `node`. The `node`, along with its children, are **not** deleted. To delete a node, see ``queueFree()``. + /// + /// > Note: When this node is inside the tree, this method sets the ``owner`` of the removed `node` (or its descendants) to `null`, if their ``owner`` is no longer an ancestor (see ``isAncestorOf(node:)``). + /// + public final func removeChild(node: Node?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_remove_child, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_reparent: GDExtensionMethodBindPtr = { + let methodName = StringName("reparent") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3685795103)! + } + + } + + }() + + /// Changes the parent of this ``Node`` to the `newParent`. The node needs to already have a parent. The node's ``owner`` is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation). + /// + /// If `keepGlobalTransform` is `true`, the node's global transform will be preserved if supported. ``Node2D``, ``Node3D`` and ``Control`` support this argument (but ``Control`` keeps only position). + /// + public final func reparent(newParent: Node?, keepGlobalTransform: Bool = true) { + withUnsafePointer(to: newParent?.handle) { pArg0 in + withUnsafePointer(to: keepGlobalTransform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_reparent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_child_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_child_count") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 894402480)! + } + + } + + }() + + /// Returns the number of children of this node. + /// + /// If `includeInternal` is `false`, internal children are not counted (see ``addChild(node:forceReadableName:`internal`:)``'s `internal` parameter). + /// + public final func getChildCount(includeInternal: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: includeInternal) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_child_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_children: GDExtensionMethodBindPtr = { + let methodName = StringName("get_children") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 873284517)! + } + + } + + }() + + /// Returns all children of this node inside an ``GArray``. + /// + /// If `includeInternal` is `false`, excludes internal children from the returned array (see ``addChild(node:forceReadableName:`internal`:)``'s `internal` parameter). + /// + public final func getChildren(includeInternal: Bool = false) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: includeInternal) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_children, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_child: GDExtensionMethodBindPtr = { + let methodName = StringName("get_child") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 541253412)! + } + + } + + }() + + /// Fetches a child node by its index. Each child node has an index relative its siblings (see ``getIndex(includeInternal:)``). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with ``getChildCount(includeInternal:)`` to iterate over this node's children. If no child exists at the given index, this method returns `null` and an error is generated. + /// + /// If `includeInternal` is `false`, internal children are ignored (see ``addChild(node:forceReadableName:`internal`:)``'s `internal` parameter). + /// + /// > Note: To fetch a node by ``NodePath``, use ``getNode(path:)``. + /// + public final func getChild(idx: Int32, includeInternal: Bool = false) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: includeInternal) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_child, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_has_node: GDExtensionMethodBindPtr = { + let methodName = StringName("has_node") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 861721659)! + } + + } + + }() + + /// Returns `true` if the `path` points to a valid node. See also ``getNode(path:)``. + public final func hasNode(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_has_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2734337346)! + } + + } + + }() + + /// Fetches a node. The ``NodePath`` can either be a relative path (from this node), or an absolute path (from the ``SceneTree/root``) to a node. If `path` does not point to a valid node, generates an error and returns `null`. Attempts to access methods on the return value will result in an _"Attempt to call on a null instance."_ error. + /// + /// > Note: Fetching by absolute path only works when the node is inside the scene tree (see ``isInsideTree()``). + /// + /// **Example:** Assume this method is called from the Character node, inside the following tree: + /// + /// The following calls will return a valid node: + /// + public final func getNode(path: NodePath) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_node_or_null: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_or_null") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2734337346)! + } + + } + + }() + + /// Fetches a node by ``NodePath``. Similar to ``getNode(path:)``, but does not generate an error if `path` does not point to a valid node. + public final func getNodeOrNull(path: NodePath) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_node_or_null, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + /// Returns this node's parent node, or `null` if the node doesn't have a parent. + public final func getParent() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_parent, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_find_child: GDExtensionMethodBindPtr = { + let methodName = StringName("find_child") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2008217037)! + } + + } + + }() + + /// Finds the first descendant of this node whose ``name`` matches `pattern`, returning `null` if no match is found. The matching is done against node names, _not_ their paths, through ``GString/match()``. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. + /// + /// If `recursive` is `false`, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see `internal` parameter in ``addChild(node:forceReadableName:`internal`:)``). + /// + /// If `owned` is `true`, only descendants with a valid ``owner`` node are checked. + /// + /// > Note: This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use ``getNode(path:)`` with unique names (see ``uniqueNameInOwner``). + /// + /// > Note: To find all descendant nodes matching a pattern or a class type, see ``findChildren(pattern:type:recursive:owned:)``. + /// + public final func findChild(pattern: String, recursive: Bool = true, owned: Bool = true) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + let pattern = GString(pattern) + withUnsafePointer(to: pattern.content) { pArg0 in + withUnsafePointer(to: recursive) { pArg1 in + withUnsafePointer(to: owned) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Node.method_find_child, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_find_children: GDExtensionMethodBindPtr = { + let methodName = StringName("find_children") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2560337219)! + } + + } + + }() + + /// Finds all descendants of this node whose names match `pattern`, returning an empty ``GArray`` if no match is found. The matching is done against node names, _not_ their paths, through ``GString/match()``. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. + /// + /// If `type` is not empty, only ancestors inheriting from `type` are included (see ``Object/isClass(_:)``). + /// + /// If `recursive` is `false`, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see `internal` parameter in ``addChild(node:forceReadableName:`internal`:)``). + /// + /// If `owned` is `true`, only descendants with a valid ``owner`` node are checked. + /// + /// > Note: This method can be very slow. Consider storing references to the found nodes in a variable. + /// + /// > Note: To find a single descendant node matching a pattern, see ``findChild(pattern:recursive:owned:)``. + /// + public final func findChildren(pattern: String, type: String = "", recursive: Bool = true, owned: Bool = true) -> ObjectCollection { + var _result: Int64 = 0 + let pattern = GString(pattern) + withUnsafePointer(to: pattern.content) { pArg0 in + let type = GString(type) + withUnsafePointer(to: type.content) { pArg1 in + withUnsafePointer(to: recursive) { pArg2 in + withUnsafePointer(to: owned) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Node.method_find_children, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_find_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("find_parent") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1140089439)! + } + + } + + }() + + /// Finds the first ancestor of this node whose ``name`` matches `pattern`, returning `null` if no match is found. The matching is done through ``GString/match()``. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. See also ``findChild(pattern:recursive:owned:)`` and ``findChildren(pattern:type:recursive:owned:)``. + /// + /// > Note: As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use ``getNode(path:)`` with unique names (see ``uniqueNameInOwner``). + /// + public final func findParent(pattern: String) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + let pattern = GString(pattern) + withUnsafePointer(to: pattern.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_find_parent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_has_node_and_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("has_node_and_resource") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 861721659)! + } + + } + + }() + + /// Returns `true` if `path` points to a valid node and its subnames point to a valid ``Resource``, e.g. `Area2D/CollisionShape2D:shape`. Properties that are not ``Resource`` types (such as nodes or other ``Variant`` types) are not considered. See also ``getNodeAndResource(path:)``. + public final func hasNodeAndResource(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_has_node_and_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_and_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_and_resource") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 502563882)! + } + + } + + }() + + /// Fetches a node and its most nested resource as specified by the ``NodePath``'s subname. Returns an ``GArray`` of size `3` where: + /// + /// - Element `0` is the ``Node``, or `null` if not found; + /// + /// - Element `1` is the subname's last nested ``Resource``, or `null` if not found; + /// + /// - Element `2` is the remaining ``NodePath``, referring to an existing, non-``Resource`` property (see ``Object/getIndexed(propertyPath:)``). + /// + /// **Example:** Assume that the child's ``Sprite2D/texture`` has been assigned a ``AtlasTexture``: + /// + public final func getNodeAndResource(path: NodePath) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_node_and_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_is_inside_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("is_inside_tree") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this node is currently inside a ``SceneTree``. See also ``getTree()``. + public final func isInsideTree() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_inside_tree, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_part_of_edited_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("is_part_of_edited_scene") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is part of the scene currently opened in the editor. + public final func isPartOfEditedScene() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_part_of_edited_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_ancestor_of: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ancestor_of") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given `node` is a direct or indirect child of this node. + public final func isAncestorOf(node: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_is_ancestor_of, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_greater_than: GDExtensionMethodBindPtr = { + let methodName = StringName("is_greater_than") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if the given `node` occurs later in the scene hierarchy than this node. A node occurring later is usually processed last. + public final func isGreaterThan(node: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_is_greater_than, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + /// Returns the node's absolute path, relative to the ``SceneTree/root``. If the node is not inside the scene tree, this method fails and returns an empty ``NodePath``. + public final func getPath() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Node.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_path_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_to") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 498846349)! + } + + } + + }() + + /// Returns the relative ``NodePath`` from this node to the specified `node`. Both nodes must be in the same ``SceneTree`` or scene hierarchy, otherwise this method fails and returns an empty ``NodePath``. + /// + /// If `useUniquePath` is `true`, returns the shortest path accounting for this node's unique name (see ``uniqueNameInOwner``). + /// + /// > Note: If you get a relative path which starts from a unique node, the path may be longer than a normal relative path, due to the addition of the unique node's name. + /// + public final func getPathTo(node: Node?, useUniquePath: Bool = false) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: useUniquePath) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_path_to, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_add_to_group: GDExtensionMethodBindPtr = { + let methodName = StringName("add_to_group") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3683006648)! + } + + } + + }() + + /// Adds the node to the `group`. Groups can be helpful to organize a subset of nodes, for example `"enemies"` or `"collectables"`. See notes in the description, and the group methods in ``SceneTree``. + /// + /// If `persistent` is `true`, the group will be stored when saved inside a ``PackedScene``. All groups created and displayed in the Node dock are persistent. + /// + /// > Note: To improve performance, the order of group names is _not_ guaranteed and may vary between project runs. Therefore, do not rely on the group order. + /// + /// > Note: ``SceneTree``'s group methods will _not_ work on this node if not inside the tree (see ``isInsideTree()``). + /// + public final func addToGroup(_ group: StringName, persistent: Bool = false) { + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: persistent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_add_to_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_from_group: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_from_group") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the node from the given `group`. Does nothing if the node is not in the `group`. See also notes in the description, and the ``SceneTree``'s group methods. + public final func removeFromGroup(_ group: StringName) { + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_remove_from_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_in_group: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_group") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if this node has been added to the given `group`. See ``addToGroup(_:persistent:)`` and ``removeFromGroup(_:)``. See also notes in the description, and the ``SceneTree``'s group methods. + public final func isInGroup(_ group: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_is_in_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_move_child: GDExtensionMethodBindPtr = { + let methodName = StringName("move_child") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3315886247)! + } + + } + + }() + + /// Moves `childNode` to the given index. A node's index is the order among its siblings. If `toIndex` is negative, the index is counted from the end of the list. See also ``getChild(idx:includeInternal:)`` and ``getIndex(includeInternal:)``. + /// + /// > Note: The processing order of several engine callbacks (``_ready()``, ``_process(delta:)``, etc.) and notifications sent through ``propagateNotification(what:)`` is affected by tree order. ``CanvasItem`` nodes are also rendered in tree order. See also ``processPriority``. + /// + public final func moveChild(childNode: Node?, toIndex: Int32) { + withUnsafePointer(to: childNode?.handle) { pArg0 in + withUnsafePointer(to: toIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_move_child, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_groups: GDExtensionMethodBindPtr = { + let methodName = StringName("get_groups") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` of group names that the node has been added to. + /// + /// > Note: To improve performance, the order of group names is _not_ guaranteed and may vary between project runs. Therefore, do not rely on the group order. + /// + /// > Note: This method may also return some group names starting with an underscore (`_`). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet: + /// + public final func getGroups() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Node.method_get_groups, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("set_owner") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_owner(_ owner: Node?) { + withUnsafePointer(to: owner?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("get_owner") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_owner() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_owner, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_index") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 894402480)! + } + + } + + }() + + /// Returns this node's order among its siblings. The first node's index is `0`. See also ``getChild(idx:includeInternal:)``. + /// + /// If `includeInternal` is `false`, returns the index ignoring internal children. The first, non-internal child will have an index of `0` (see ``addChild(node:forceReadableName:`internal`:)``'s `internal` parameter). + /// + public final func getIndex(includeInternal: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: includeInternal) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_get_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_print_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("print_tree") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs ``NodePath``s relative to this node, and is good for copy/pasting into ``getNode(path:)``. See also ``printTreePretty()``. + /// + /// May print, for example: + /// + public final func printTree() { + gi.object_method_bind_ptrcall(Node.method_print_tree, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_print_tree_pretty: GDExtensionMethodBindPtr = { + let methodName = StringName("print_tree_pretty") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to ``printTree()``, but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees. + /// + /// May print, for example: + /// + public final func printTreePretty() { + gi.object_method_bind_ptrcall(Node.method_print_tree_pretty, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_tree_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tree_string") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns the tree as a ``String``. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the ``getNode(path:)`` function. It also can be used in game UI/UX. + /// + /// May print, for example: + /// + public final func getTreeString() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Node.method_get_tree_string, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_tree_string_pretty: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tree_string_pretty") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Similar to ``getTreeString()``, this returns the tree as a ``String``. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. + /// + /// May print, for example: + /// + public final func getTreeStringPretty() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Node.method_get_tree_string_pretty, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_scene_file_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scene_file_path") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scene_file_path(_ sceneFilePath: String) { + let sceneFilePath = GString(sceneFilePath) + withUnsafePointer(to: sceneFilePath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_scene_file_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene_file_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene_file_path") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scene_file_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Node.method_get_scene_file_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_propagate_notification: GDExtensionMethodBindPtr = { + let methodName = StringName("propagate_notification") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Calls ``Object/notification(what:reversed:)`` with `what` on this node and all of its children, recursively. + public final func propagateNotification(what: Int32) { + withUnsafePointer(to: what) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_propagate_notification, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_propagate_call: GDExtensionMethodBindPtr = { + let methodName = StringName("propagate_call") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1871007965)! + } + + } + + }() + + /// Calls the given `method` name, passing `args` as arguments, on this node and all of its children, recursively. + /// + /// If `parentFirst` is `true`, the method is called on this node first, then on all of its children. If `false`, the children's methods are called first. + /// + public final func propagateCall(method: StringName, args: GArray = GArray (), parentFirst: Bool = false) { + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: args.content) { pArg1 in + withUnsafePointer(to: parentFirst) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Node.method_propagate_call, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_physics_process: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_process") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables physics (fixed framerate) processing. When a node is being processed, it will receive a ``notificationPhysicsProcess`` at a fixed (usually 60 FPS, see ``Engine/physicsTicksPerSecond`` to change) interval (and the ``_physicsProcess(delta:)`` callback will be called if it exists). + /// + /// > Note: If ``_physicsProcess(delta:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. + /// + public final func setPhysicsProcess(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_physics_process, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_process_delta_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_process_delta_time") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the time elapsed (in seconds) since the last physics callback. This value is identical to ``_physicsProcess(delta:)``'s `delta` parameter, and is often consistent at run-time, unless ``Engine/physicsTicksPerSecond`` is changed. See also ``notificationPhysicsProcess``. + public final func getPhysicsProcessDeltaTime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node.method_get_physics_process_delta_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_physics_processing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physics_processing") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if physics processing is enabled (see ``setPhysicsProcess(enable:)``). + public final func isPhysicsProcessing() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_physics_processing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_process_delta_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_delta_time") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the time elapsed (in seconds) since the last process callback. This value is identical to ``_process(delta:)``'s `delta` parameter, and may vary from frame to frame. See also ``notificationProcess``. + public final func getProcessDeltaTime() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node.method_get_process_delta_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables processing. When a node is being processed, it will receive a ``notificationProcess`` on every drawn frame (and the ``_process(delta:)`` callback will be called if it exists). + /// + /// > Note: If ``_process(delta:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. + /// + /// > Note: This method only affects the ``_process(delta:)`` callback, i.e. it has no effect on other callbacks like ``_physicsProcess(delta:)``. If you want to disable all processing for the node, set ``processMode`` to ``ProcessMode/disabled``. + /// + public final func setProcess(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_process_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_priority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_priority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Node.method_get_process_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_process_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_process_priority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_process_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_physics_process_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_process_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_process_priority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physics_process_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Node.method_get_physics_process_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_processing: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if processing is enabled (see ``setProcess(enable:)``). + public final func isProcessing() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_input: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables input processing. + /// + /// > Note: If ``_input(event:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. Input processing is also already enabled for GUI controls, such as ``Button`` and ``TextEdit``. + /// + public final func setProcessInput(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_input, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_processing_input: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is processing input (see ``setProcessInput(enable:)``). + public final func isProcessingInput() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing_input, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_shortcut_input: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_shortcut_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables shortcut processing for this node. + /// + /// > Note: If ``_shortcutInput(event:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. + /// + public final func setProcessShortcutInput(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_shortcut_input, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_processing_shortcut_input: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing_shortcut_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is processing shortcuts (see ``setProcessShortcutInput(enable:)``). + public final func isProcessingShortcutInput() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing_shortcut_input, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_unhandled_input: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_unhandled_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a ``Control``). + /// + /// > Note: If ``_unhandledInput(event:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. Unhandled input processing is also already enabled for GUI controls, such as ``Button`` and ``TextEdit``. + /// + public final func setProcessUnhandledInput(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_unhandled_input, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_processing_unhandled_input: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing_unhandled_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is processing unhandled input (see ``setProcessUnhandledInput(enable:)``). + public final func isProcessingUnhandledInput() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing_unhandled_input, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_unhandled_key_input: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_unhandled_key_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables unhandled key input processing. + /// + /// > Note: If ``_unhandledKeyInput(event:)`` is overridden, this will be automatically enabled before ``_ready()`` is called. + /// + public final func setProcessUnhandledKeyInput(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_unhandled_key_input, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_processing_unhandled_key_input: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing_unhandled_key_input") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is processing unhandled key input (see ``setProcessUnhandledKeyInput(enable:)``). + public final func isProcessingUnhandledKeyInput() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing_unhandled_key_input, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1841290486)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_mode(_ mode: Node.ProcessMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 739966102)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_mode() -> Node.ProcessMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node.method_get_process_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Node.ProcessMode (rawValue: _result)! + } + + fileprivate static var method_can_process: GDExtensionMethodBindPtr = { + let methodName = StringName("can_process") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node can receive processing notifications and input callbacks (``notificationProcess``, ``_input(event:)``, etc.) from the ``SceneTree`` and ``Viewport``. The returned value depends on ``processMode``: + /// + /// - If set to ``ProcessMode/pausable``, returns `true` when the game is processing, i.e. ``SceneTree/paused`` is `false`; + /// + /// - If set to ``ProcessMode/whenPaused``, returns `true` when the game is paused, i.e. ``SceneTree/paused`` is `true`; + /// + /// - If set to ``ProcessMode/always``, always returns `true`; + /// + /// - If set to ``ProcessMode/disabled``, always returns `false`; + /// + /// - If set to ``ProcessMode/inherit``, use the parent node's ``processMode`` to determine the result. + /// + /// If the node is not inside the tree, returns `false` no matter the value of ``processMode``. + /// + public final func canProcess() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_can_process, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_thread_group: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_thread_group") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2275442745)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_thread_group(_ mode: Node.ProcessThreadGroup) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_thread_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_thread_group: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_thread_group") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1866404740)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_thread_group() -> Node.ProcessThreadGroup { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node.method_get_process_thread_group, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Node.ProcessThreadGroup (rawValue: _result)! + } + + fileprivate static var method_set_process_thread_messages: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_thread_messages") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1357280998)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_thread_messages(_ flags: Node.ProcessThreadMessages) { + withUnsafePointer(to: flags.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_thread_messages, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_thread_messages: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_thread_messages") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4228993612)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_thread_messages() -> Node.ProcessThreadMessages { + var _result: Node.ProcessThreadMessages = Node.ProcessThreadMessages () + gi.object_method_bind_ptrcall(Node.method_get_process_thread_messages, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_thread_group_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_thread_group_order") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_process_thread_group_order(_ order: Int32) { + withUnsafePointer(to: order) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_thread_group_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_thread_group_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_thread_group_order") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_process_thread_group_order() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Node.method_get_process_thread_group_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_display_folded: GDExtensionMethodBindPtr = { + let methodName = StringName("set_display_folded") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also ``isDisplayedFolded()``. + public final func setDisplayFolded(fold: Bool) { + withUnsafePointer(to: fold) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_display_folded, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_displayed_folded: GDExtensionMethodBindPtr = { + let methodName = StringName("is_displayed_folded") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also ``setDisplayFolded(fold:)``. + public final func isDisplayedFolded() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_displayed_folded, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_process_internal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_process_internal") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables internal processing for this node. Internal processing happens in isolation from the normal ``_process(delta:)`` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting (``setProcess(enable:)``). + /// + /// > Warning: Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. + /// + public final func setProcessInternal(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_process_internal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_processing_internal: GDExtensionMethodBindPtr = { + let methodName = StringName("is_processing_internal") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if internal processing is enabled (see ``setProcessInternal(enable:)``). + public final func isProcessingInternal() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_processing_internal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_process_internal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_process_internal") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, enables internal physics for this node. Internal physics processing happens in isolation from the normal ``_physicsProcess(delta:)`` calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting (``setPhysicsProcess(enable:)``). + /// + /// > Warning: Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. + /// + public final func setPhysicsProcessInternal(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_physics_process_internal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_physics_processing_internal: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physics_processing_internal") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if internal physics processing is enabled (see ``setPhysicsProcessInternal(enable:)``). + public final func isPhysicsProcessingInternal() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_physics_processing_internal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_interpolation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_interpolation_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3202404928)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_interpolation_mode(_ mode: Node.PhysicsInterpolationMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_physics_interpolation_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_interpolation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_interpolation_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920385216)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physics_interpolation_mode() -> Node.PhysicsInterpolationMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node.method_get_physics_interpolation_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Node.PhysicsInterpolationMode (rawValue: _result)! + } + + fileprivate static var method_is_physics_interpolated: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physics_interpolated") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if physics interpolation is enabled for this node (see ``physicsInterpolationMode``). + /// + /// > Note: Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the ``SceneTree``. This can be tested using ``isPhysicsInterpolatedAndEnabled()``. + /// + public final func isPhysicsInterpolated() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_physics_interpolated, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_physics_interpolated_and_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physics_interpolated_and_enabled") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if physics interpolation is enabled (see ``physicsInterpolationMode``) **and** enabled in the ``SceneTree``. + /// + /// This is a convenience version of ``isPhysicsInterpolated()`` that also checks whether physics interpolation is enabled globally. + /// + /// See ``SceneTree/physicsInterpolation`` and ``ProjectSettings/physics/common/physicsInterpolation``. + /// + public final func isPhysicsInterpolatedAndEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_physics_interpolated_and_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_reset_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("reset_physics_interpolation") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick. + /// + /// That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete. + /// + /// The notification ``notificationResetPhysicsInterpolation`` will be received by the node and all children recursively. + /// + /// > Note: This function should be called **after** moving the node, rather than before. + /// + public final func resetPhysicsInterpolation() { + gi.object_method_bind_ptrcall(Node.method_reset_physics_interpolation, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_auto_translate_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_translate_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 776149714)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_translate_mode(_ mode: Node.AutoTranslateMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_auto_translate_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auto_translate_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_translate_mode") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2498906432)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_translate_mode() -> Node.AutoTranslateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node.method_get_auto_translate_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Node.AutoTranslateMode (rawValue: _result)! + } + + fileprivate static var method_get_window: GDExtensionMethodBindPtr = { + let methodName = StringName("get_window") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1757182445)! + } + + } + + }() + + /// Returns the ``Window`` that contains this node. If the node is in the main window, this is equivalent to getting the root node (`get_tree().get_root()`). + public final func getWindow() -> Window? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_window, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_last_exclusive_window: GDExtensionMethodBindPtr = { + let methodName = StringName("get_last_exclusive_window") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1757182445)! + } + + } + + }() + + /// Returns the ``Window`` that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node. + public final func getLastExclusiveWindow() -> Window? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_last_exclusive_window, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tree") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2958820483)! + } + + } + + }() + + /// Returns the ``SceneTree`` that contains this node. If this node is not inside the tree, generates an error and returns `null`. See also ``isInsideTree()``. + public final func getTree() -> SceneTree? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_tree, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_tween: GDExtensionMethodBindPtr = { + let methodName = StringName("create_tween") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3426978995)! + } + + } + + }() + + /// Creates a new ``Tween`` and binds it to this node. + /// + /// This is the equivalent of doing: + /// + /// The Tween will start automatically on the next process frame or physics frame (depending on ``Tween.TweenProcessMode``). See ``Tween/bindNode(_:)`` for more info on Tweens bound to nodes. + /// + /// > Note: The method can still be used when the node is not inside ``SceneTree``. It can fail in an unlikely case of using a custom ``MainLoop``. + /// + public final func createTween() -> Tween? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_create_tween, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_duplicate: GDExtensionMethodBindPtr = { + let methodName = StringName("duplicate") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3511555459)! + } + + } + + }() + + /// Duplicates the node, returning a new node with all of its properties, signals and groups copied from the original. The behavior can be tweaked through the `flags` (see ``Node/DuplicateFlags``). + /// + /// > Note: For nodes with a ``Script`` attached, if ``Object/_init()`` has been defined with required parameters, the duplicated node will not have a ``Script``. + /// + public final func duplicate(flags: Int32 = 15) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: flags) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_duplicate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_replace_by: GDExtensionMethodBindPtr = { + let methodName = StringName("replace_by") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2570952461)! + } + + } + + }() + + /// Replaces this node by the given `node`. All children of this node are moved to `node`. + /// + /// If `keepGroups` is `true`, the `node` is added to the same groups that the replaced node is in (see ``addToGroup(_:persistent:)``). + /// + /// > Warning: The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use ``Object/free()``. + /// + public final func replaceBy(node: Node?, keepGroups: Bool = false) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: keepGroups) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_replace_by, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_scene_instance_load_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scene_instance_load_placeholder") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, the node becomes a ``InstancePlaceholder`` when packed and instantiated from a ``PackedScene``. See also ``getSceneInstanceLoadPlaceholder()``. + public final func setSceneInstanceLoadPlaceholder(_ loadPlaceholder: Bool) { + withUnsafePointer(to: loadPlaceholder) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_scene_instance_load_placeholder, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene_instance_load_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene_instance_load_placeholder") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this node is an instance load placeholder. See ``InstancePlaceholder`` and ``setSceneInstanceLoadPlaceholder(_:)``. + public final func getSceneInstanceLoadPlaceholder() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_get_scene_instance_load_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_editable_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editable_instance") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2731852923)! + } + + } + + }() + + /// Set to `true` to allow all nodes owned by `node` to be available, and editable, in the Scene dock, even if their ``owner`` is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also ``isEditableInstance(node:)``. + public final func setEditableInstance(node: Node?, isEditable: Bool) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: isEditable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_editable_instance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_editable_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editable_instance") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3093956946)! + } + + } + + }() + + /// Returns `true` if `node` has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also ``setEditableInstance(node:isEditable:)``. + public final func isEditableInstance(node: Node?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_is_editable_instance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("get_viewport") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3596683776)! + } + + } + + }() + + /// Returns the node's closest ``Viewport`` ancestor, if the node is inside the tree. Otherwise, returns `null`. + public final func getViewport() -> Viewport? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_queue_free: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_free") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid. + /// + /// Unlike with ``Object/free()``, the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call ``queueFree()`` multiple times. Use ``Object/isQueuedForDeletion()`` to check if the node will be deleted at the end of the frame. + /// + /// > Note: The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling ``Object/free()`` through ``Object/callDeferred(method:)``. + /// + public final func queueFree() { + gi.object_method_bind_ptrcall(Node.method_queue_free, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_request_ready: GDExtensionMethodBindPtr = { + let methodName = StringName("request_ready") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Requests ``_ready()`` to be called again the next time the node enters the tree. Does **not** immediately call ``_ready()``. + /// + /// > Note: This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of ``_ready()`` callbacks will be the same as normal. + /// + public final func requestReady() { + gi.object_method_bind_ptrcall(Node.method_request_ready, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_is_node_ready: GDExtensionMethodBindPtr = { + let methodName = StringName("is_node_ready") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is ready, i.e. it's inside scene tree and all its children are initialized. + /// + /// ``requestReady()`` resets it back to `false`. + /// + public final func isNodeReady() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_node_ready, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_multiplayer_authority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multiplayer_authority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 972357352)! + } + + } + + }() + + /// Sets the node's multiplayer authority to the peer with the given peer `id`. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with ``rpcConfig(method:config:)`` and the ``MultiplayerAPI``. + /// + /// If `recursive` is `true`, the given peer is recursively set as the authority for all children of this node. + /// + /// > Warning: This does **not** automatically replicate the new authority to other peers. It is the developer's responsibility to do so. You may replicate the new authority's information using ``MultiplayerSpawner/spawnFunction``, an RPC, or a ``MultiplayerSynchronizer``. Furthermore, the parent's authority does **not** propagate to newly added children. + /// + public final func setMultiplayerAuthority(id: Int32, recursive: Bool = true) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: recursive) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_multiplayer_authority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_multiplayer_authority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multiplayer_authority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the peer ID of the multiplayer authority for this node. See ``setMultiplayerAuthority(id:recursive:)``. + public final func getMultiplayerAuthority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Node.method_get_multiplayer_authority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_multiplayer_authority: GDExtensionMethodBindPtr = { + let methodName = StringName("is_multiplayer_authority") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the local system is the multiplayer authority of this node. + public final func isMultiplayerAuthority() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_multiplayer_authority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_multiplayer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multiplayer") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 406750475)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_multiplayer() -> MultiplayerAPI? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node.method_get_multiplayer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_rpc_config: GDExtensionMethodBindPtr = { + let methodName = StringName("rpc_config") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Changes the RPC configuration for the given `method`. `config` should either be `null` to disable the feature (as by default), or a ``GDictionary`` containing the following entries: + /// + /// - `rpc_mode`: see ``MultiplayerAPI.RPCMode``; + /// + /// - `transfer_mode`: see ``MultiplayerPeer.TransferMode``; + /// + /// - `call_local`: if `true`, the method will also be called locally; + /// + /// - `channel`: an integer representing the channel to send the RPC on. + /// + /// > Note: In GDScript, this method corresponds to the [annotation @GDScript.@rpc] annotation, with various parameters passed (`@rpc(any)`, `@rpc(authority)`...). See also the high-level multiplayer tutorial. + /// + public final func rpcConfig(method: StringName, config: Variant?) { + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: config.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_rpc_config, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_editor_description: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editor_description") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editor_description(_ editorDescription: String) { + let editorDescription = GString(editorDescription) + withUnsafePointer(to: editorDescription.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_editor_description, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_editor_description: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_description") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_editor_description() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Node.method_get_editor_description, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_unique_name_in_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unique_name_in_owner") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_unique_name_in_owner(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node.method_set_unique_name_in_owner, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_unique_name_in_owner: GDExtensionMethodBindPtr = { + let methodName = StringName("is_unique_name_in_owner") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_unique_name_in_owner() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node.method_is_unique_name_in_owner, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_atr: GDExtensionMethodBindPtr = { + let methodName = StringName("atr") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3344478075)! + } + + } + + }() + + /// Translates a `message`, using the translation catalogs configured in the Project Settings. Further `context` can be specified to help with the translation. Note that most ``Control`` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. + /// + /// This method works the same as ``Object/tr(message:context:)``, with the addition of respecting the ``autoTranslateMode`` state. + /// + /// If ``Object/canTranslateMessages()`` is `false`, or no translation is available, this method returns the `message` without changes. See ``Object/setMessageTranslation(enable:)``. + /// + /// For detailed examples, see Internationalizing games. + /// + public final func atr(message: String, context: StringName = StringName ("")) -> String { + let _result = GString () + let message = GString(message) + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: context.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node.method_atr, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_atr_n: GDExtensionMethodBindPtr = { + let methodName = StringName("atr_n") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259354841)! + } + + } + + }() + + /// Translates a `message` or `pluralMessage`, using the translation catalogs configured in the Project Settings. Further `context` can be specified to help with the translation. + /// + /// This method works the same as ``Object/trN(message:pluralMessage:n:context:)``, with the addition of respecting the ``autoTranslateMode`` state. + /// + /// If ``Object/canTranslateMessages()`` is `false`, or no translation is available, this method returns `message` or `pluralMessage`, without changes. See ``Object/setMessageTranslation(enable:)``. + /// + /// The `n` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. + /// + /// For detailed examples, see Localization using gettext. + /// + /// > Note: Negative and float numbers may not properly apply to some countable subjects. It's recommended to handle these cases with ``atr(message:context:)``. + /// + public final func atrN(message: String, pluralMessage: StringName, n: Int32, context: StringName = StringName ("")) -> String { + let _result = GString () + let message = GString(message) + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: pluralMessage.content) { pArg1 in + withUnsafePointer(to: n) { pArg2 in + withUnsafePointer(to: context.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Node.method_atr_n, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_rpc: GDExtensionMethodBindPtr = { + let methodName = StringName("rpc") + return withUnsafePointer(to: &Node.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4047867050)! + } + + } + + }() + + /// Sends a remote procedure call request for the given `method` to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same ``NodePath``, including the exact same ``name``. Behavior depends on the RPC configuration for the given `method` (see ``rpcConfig(method:config:)`` and [annotation @GDScript.@rpc]). By default, methods are not exposed to RPCs. + /// + /// May return ``GodotError/ok`` if the call is successful, ``GodotError/errInvalidParameter`` if the arguments passed in the `method` do not match, ``GodotError/errUnconfigured`` if the node's ``multiplayer`` cannot be fetched (such as when the node is not inside the tree), ``GodotError/errConnectionError`` if ``multiplayer``'s connection is not available. + /// + /// > Note: You can only safely use RPCs on clients after you received the [signal MultiplayerAPI.connected_to_server] signal from the ``MultiplayerAPI``. You also need to keep track of the connection state, either by the ``MultiplayerAPI`` signals like [signal MultiplayerAPI.server_disconnected] or by checking (`get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED`). + /// + public final func rpc(method: StringName, _ arguments: Variant?...) -> GodotError { + var _result: Variant.ContentType = Variant.zero + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Node.method_rpc, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. GodotError { + var _result: Variant.ContentType = Variant.zero + let peerId = Variant(peerId) + withUnsafePointer(to: peerId.content) { pArg0 in + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg1 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_call(Node.method_rpc_id, UnsafeMutableRawPointer(mutating: handle), pArgs, 2, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 2 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + pArgsBuffer.initializeElement(at: 1, to: pArg1) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Variant? { + var _result: Variant.ContentType = Variant.zero + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Node.method_call_deferred_thread_group, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Variant? { + var _result: Variant.ContentType = Variant.zero + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Node.method_call_thread_safe, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_enter_tree": + return _Node_proxy_enter_tree + case "_exit_tree": + return _Node_proxy_exit_tree + case "_get_configuration_warnings": + return _Node_proxy_get_configuration_warnings + case "_input": + return _Node_proxy_input + case "_physics_process": + return _Node_proxy_physics_process + case "_process": + return _Node_proxy_process + case "_ready": + return _Node_proxy_ready + case "_shortcut_input": + return _Node_proxy_shortcut_input + case "_unhandled_input": + return _Node_proxy_unhandled_input + case "_unhandled_key_input": + return _Node_proxy_unhandled_key_input + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when the node is considered ready, after ``_ready()`` is called. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.ready.connect { + /// print ("caught signal") + /// } + /// ``` + public var ready: SimpleSignal { SimpleSignal (target: self, signalName: "ready") } + + /// Emitted when the node's ``name`` is changed, if the node is inside the tree. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.renamed.connect { + /// print ("caught signal") + /// } + /// ``` + public var renamed: SimpleSignal { SimpleSignal (target: self, signalName: "renamed") } + + /// Emitted when the node enters the tree. + /// + /// This signal is emitted _after_ the related ``notificationEnterTree`` notification. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeEntered.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeEntered: SimpleSignal { SimpleSignal (target: self, signalName: "tree_entered") } + + /// Emitted when the node is just about to exit the tree. The node is still valid. As such, this is the right place for de-initialization (or a "destructor", if you will). + /// + /// This signal is emitted _after_ the node's ``_exitTree()``, and _before_ the related ``notificationExitTree``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeExiting.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeExiting: SimpleSignal { SimpleSignal (target: self, signalName: "tree_exiting") } + + /// Emitted after the node exits the tree and is no longer active. + /// + /// This signal is emitted _after_ the related ``notificationExitTree`` notification. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeExited.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeExited: SimpleSignal { SimpleSignal (target: self, signalName: "tree_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the child `node` enters the ``SceneTree``, usually because this node entered the tree (see [signal tree_entered]), or ``addChild(node:forceReadableName:`internal`:)`` has been called. + /// + /// This signal is emitted _after_ the child node's own ``notificationEnterTree`` and [signal tree_entered]. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.childEnteredTree.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var childEnteredTree: Signal1 { Signal1 (target: self, signalName: "child_entered_tree") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the child `node` is about to exit the ``SceneTree``, usually because this node is exiting the tree (see [signal tree_exiting]), or because the child `node` is being removed or freed. + /// + /// When this signal is received, the child `node` is still accessible inside the tree. This signal is emitted _after_ the child node's own [signal tree_exiting] and ``notificationExitTree``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.childExitingTree.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var childExitingTree: Signal2 { Signal2 (target: self, signalName: "child_exiting_tree") } + + /// Emitted when the list of children is changed. This happens when child nodes are added, moved or removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.childOrderChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var childOrderChanged: SimpleSignal { SimpleSignal (target: self, signalName: "child_order_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this node is being replaced by the `node`, see ``replaceBy(node:keepGroups:)``. + /// + /// This signal is emitted _after_ `node` has been added as a child of the original parent node, but _before_ all original child nodes have been reparented to `node`. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.replacingBy.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var replacingBy: Signal3 { Signal3 (target: self, signalName: "replacing_by") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the node's editor description field changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.editorDescriptionChanged.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var editorDescriptionChanged: Signal4 { Signal4 (target: self, signalName: "editor_description_changed") } + +} + +// Support methods for proxies +func _Node_proxy_enter_tree (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._enterTree () +} + +func _Node_proxy_exit_tree (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._exitTree () +} + +func _Node_proxy_get_configuration_warnings (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConfigurationWarnings () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _Node_proxy_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._input (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? lookupObject (nativeHandle: resolved_0)!) +} + +func _Node_proxy_physics_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._physicsProcess (delta: args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _Node_proxy_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._process (delta: args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _Node_proxy_ready (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._ready () +} + +func _Node_proxy_shortcut_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._shortcutInput (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? lookupObject (nativeHandle: resolved_0)!) +} + +func _Node_proxy_unhandled_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._unhandledInput (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? lookupObject (nativeHandle: resolved_0)!) +} + +func _Node_proxy_unhandled_key_input (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._unhandledKeyInput (event: lookupLiveObject (handleAddress: resolved_0) as? InputEvent ?? lookupObject (nativeHandle: resolved_0)!) +} + diff --git a/Sources/SwiftGodot/Generated/Api/Node2D.swift b/Sources/SwiftGodot/Generated/Api/Node2D.swift new file mode 100644 index 000000000..d56f03574 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Node2D.swift @@ -0,0 +1,978 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. +/// +/// A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. +open class Node2D: CanvasItem { + override open class var godotClassName: StringName { "Node2D" } + + /* Properties */ + + /// Position, relative to the node's parent. + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// Rotation in radians, relative to the node's parent. + /// + /// > Note: This property is edited in the inspector in degrees. If you want to use degrees in a script, use ``rotationDegrees``. + /// + final public var rotation: Double { + get { + return get_rotation () + } + + set { + set_rotation (newValue) + } + + } + + /// Helper property to access ``rotation`` in degrees instead of radians. + final public var rotationDegrees: Double { + get { + return get_rotation_degrees () + } + + set { + set_rotation_degrees (newValue) + } + + } + + /// The node's scale. Unscaled value: `(1, 1)`. + /// + /// > Note: Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. + /// + final public var scale: Vector2 { + get { + return get_scale () + } + + set { + set_scale (newValue) + } + + } + + /// Slants the node. + /// + /// > Note: Skew is X axis only. + /// + final public var skew: Double { + get { + return get_skew () + } + + set { + set_skew (newValue) + } + + } + + /// Local ``Transform2D``. + final public var transform: Transform2D { + get { + return getTransform () + } + + set { + set_transform (newValue) + } + + } + + /// Global position. + final public var globalPosition: Vector2 { + get { + return get_global_position () + } + + set { + set_global_position (newValue) + } + + } + + /// Global rotation in radians. + final public var globalRotation: Double { + get { + return get_global_rotation () + } + + set { + set_global_rotation (newValue) + } + + } + + /// Helper property to access ``globalRotation`` in degrees instead of radians. + final public var globalRotationDegrees: Double { + get { + return get_global_rotation_degrees () + } + + set { + set_global_rotation_degrees (newValue) + } + + } + + /// Global scale. + final public var globalScale: Vector2 { + get { + return get_global_scale () + } + + set { + set_global_scale (newValue) + } + + } + + /// Global skew in radians. + final public var globalSkew: Double { + get { + return get_global_skew () + } + + set { + set_global_skew (newValue) + } + + } + + /// Global ``Transform2D``. + final public var globalTransform: Transform2D { + get { + return getGlobalTransform () + } + + set { + set_global_transform (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_degrees") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_degrees(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_skew: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skew") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skew(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_skew, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Node2D.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_degrees") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_degrees() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_skew: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skew") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skew() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_skew, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Node2D.method_get_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_rotate: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Applies a rotation to the node, in radians, starting from its current rotation. + public final func rotate(radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_rotate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_move_local_x: GDExtensionMethodBindPtr = { + let methodName = StringName("move_local_x") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2087892650)! + } + + } + + }() + + /// Applies a local translation on the node's X axis based on the ``Node/_process(delta:)``'s `delta`. If `scaled` is `false`, normalizes the movement. + public final func moveLocalX(delta: Double, scaled: Bool = false) { + withUnsafePointer(to: delta) { pArg0 in + withUnsafePointer(to: scaled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_move_local_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_move_local_y: GDExtensionMethodBindPtr = { + let methodName = StringName("move_local_y") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2087892650)! + } + + } + + }() + + /// Applies a local translation on the node's Y axis based on the ``Node/_process(delta:)``'s `delta`. If `scaled` is `false`, normalizes the movement. + public final func moveLocalY(delta: Double, scaled: Bool = false) { + withUnsafePointer(to: delta) { pArg0 in + withUnsafePointer(to: scaled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_move_local_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_translate: GDExtensionMethodBindPtr = { + let methodName = StringName("translate") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Translates the node by the given `offset` in local coordinates. + public final func translate(offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_translate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_global_translate: GDExtensionMethodBindPtr = { + let methodName = StringName("global_translate") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Adds the `offset` vector to the node's global position. + public final func globalTranslate(offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_global_translate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_scale") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Multiplies the current scale by the `ratio` vector. + public final func applyScale(ratio: Vector2) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_apply_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_position") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_position") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Node2D.method_get_global_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_rotation") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_rotation(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_global_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_rotation_degrees") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_rotation_degrees(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_rotation") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_rotation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_global_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_global_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_rotation_degrees") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_rotation_degrees() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_global_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_skew: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_skew") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_skew(_ radians: Double) { + withUnsafePointer(to: radians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_skew, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_skew: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_skew") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_skew() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Node2D.method_get_global_skew, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_scale") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_scale") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Node2D.method_get_global_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ xform: Transform2D) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_global_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_transform") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_transform(_ xform: Transform2D) { + withUnsafePointer(to: xform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_set_global_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_look_at: GDExtensionMethodBindPtr = { + let methodName = StringName("look_at") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Rotates the node so that its local +X axis points towards the `point`, which is expected to use global coordinates. + /// + /// `point` should not be the same as the node's position, otherwise the node always looks to the right. + /// + public final func lookAt(point: Vector2) { + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_look_at, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angle_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angle_to") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2276447920)! + } + + } + + }() + + /// Returns the angle between the node and the `point` in radians. + /// + /// Illustration of the returned angle. + /// + public final func getAngleTo(point: Vector2) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_get_angle_to, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_to_local: GDExtensionMethodBindPtr = { + let methodName = StringName("to_local") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Transforms the provided global position into a position in local coordinate space. The output will be local relative to the ``Node2D`` it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent. + public final func toLocal(globalPoint: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: globalPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_to_local, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_to_global: GDExtensionMethodBindPtr = { + let methodName = StringName("to_global") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the ``Node2D`` it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position. + public final func toGlobal(localPoint: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: localPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_to_global, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_relative_transform_to_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_relative_transform_to_parent") + return withUnsafePointer(to: &Node2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 904556875)! + } + + } + + }() + + /// Returns the ``Transform2D`` relative to this node's parent. + public final func getRelativeTransformToParent(_ parent: Node?) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: parent?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node2D.method_get_relative_transform_to_parent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Node3D.swift b/Sources/SwiftGodot/Generated/Api/Node3D.swift new file mode 100644 index 000000000..2a8c73a43 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Node3D.swift @@ -0,0 +1,1922 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Most basic 3D game object, parent of all 3D-related nodes. +/// +/// Most basic 3D game object, with a ``Transform3D`` and visibility settings. All other 3D game objects inherit from ``Node3D``. Use ``Node3D`` as a parent node to move, scale, rotate and show/hide children in a 3D project. +/// +/// Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the ``Node3D`` object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the ``Node3D``'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the ``Node3D`` object itself is referred to as object-local coordinate system. +/// +/// > Note: Unless otherwise specified, all methods that have angle parameters must have angles specified as _radians_. To convert degrees to radians, use ``@GlobalScope.deg_to_rad``. +/// +/// > Note: Be aware that "Spatial" nodes are now called "Node3D" starting with Godot 4. Any Godot 3.x references to "Spatial" nodes refer to "Node3D" in Godot 4. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``visibilityChanged`` +open class Node3D: Node { + override open class var godotClassName: StringName { "Node3D" } + public enum RotationEditMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The rotation is edited using ``Vector3`` Euler angles. + case euler = 0 // ROTATION_EDIT_MODE_EULER + /// The rotation is edited using a ``Quaternion``. + case quaternion = 1 // ROTATION_EDIT_MODE_QUATERNION + /// The rotation is edited using a ``Basis``. In this mode, ``scale`` can't be edited separately. + case basis = 2 // ROTATION_EDIT_MODE_BASIS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .euler: return ".euler" + case .quaternion: return ".quaternion" + case .basis: return ".basis" + } + + } + + } + + /* Constants */ + /// ``Node3D`` nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform. + /// + /// In order for ``notificationTransformChanged`` to work, users first need to ask for it, with ``setNotifyTransform(enable:)``. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. + /// + public static let notificationTransformChanged = 2000 + /// ``Node3D`` nodes receive this notification when they are registered to new ``World3D`` resource. + public static let notificationEnterWorld = 41 + /// ``Node3D`` nodes receive this notification when they are unregistered from current ``World3D`` resource. + public static let notificationExitWorld = 42 + /// ``Node3D`` nodes receive this notification when their visibility changes. + public static let notificationVisibilityChanged = 43 + /// ``Node3D`` nodes receive this notification when their local transform changes. This is not received when the transform of a parent node is changed. + /// + /// In order for ``notificationLocalTransformChanged`` to work, users first need to ask for it, with ``setNotifyLocalTransform(enable:)``. + /// + public static let notificationLocalTransformChanged = 44 + + /* Properties */ + + /// Local space ``Transform3D`` of this node, with respect to the parent node. + final public var transform: Transform3D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /// World3D space (global) ``Transform3D`` of this node. + final public var globalTransform: Transform3D { + get { + return get_global_transform () + } + + set { + set_global_transform (newValue) + } + + } + + /// Local position or translation of this node relative to the parent. This is equivalent to `transform.origin`. + final public var position: Vector3 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the ``rotationOrder`` property. + /// + /// > Note: In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a ``Vector3`` data structure not because the rotation is a vector, but only because ``Vector3`` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + /// + /// > Note: This property is edited in the inspector in degrees. If you want to use degrees in a script, use ``rotationDegrees``. + /// + final public var rotation: Vector3 { + get { + return get_rotation () + } + + set { + set_rotation (newValue) + } + + } + + /// Helper property to access ``rotation`` in degrees instead of radians. + final public var rotationDegrees: Vector3 { + get { + return get_rotation_degrees () + } + + set { + set_rotation_degrees (newValue) + } + + } + + /// Access to the node rotation as a ``Quaternion``. This property is ideal for tweening complex rotations. + final public var quaternion: Quaternion { + get { + return get_quaternion () + } + + set { + set_quaternion (newValue) + } + + } + + /// Basis of the ``transform`` property. Represents the rotation, scale, and shear of this node. + final public var basis: Basis { + get { + return get_basis () + } + + set { + set_basis (newValue) + } + + } + + /// Scale part of the local transformation. + /// + /// > Note: Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative. + /// + /// > Note: Not all nodes are visually scaled by the ``scale`` property. For example, ``Light3D``s are not visually affected by ``scale``. + /// + final public var scale: Vector3 { + get { + return get_scale () + } + + set { + set_scale (newValue) + } + + } + + /// Specify how rotation (and scale) will be presented in the editor. + final public var rotationEditMode: Node3D.RotationEditMode { + get { + return get_rotation_edit_mode () + } + + set { + set_rotation_edit_mode (newValue) + } + + } + + /// Specify the axis rotation order of the ``rotation`` property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. + final public var rotationOrder: EulerOrder { + get { + return get_rotation_order () + } + + set { + set_rotation_order (newValue) + } + + } + + /// If `true`, the node will not inherit its transformations from its parent. Node transformations are only in global space. + final public var topLevel: Bool { + get { + return is_set_as_top_level () + } + + set { + set_as_top_level (newValue) + } + + } + + /// Global position of this node. This is equivalent to `global_transform.origin`. + final public var globalPosition: Vector3 { + get { + return get_global_position () + } + + set { + set_global_position (newValue) + } + + } + + /// Global basis of this node. This is equivalent to `global_transform.basis`. + final public var globalBasis: Basis { + get { + return get_global_basis () + } + + set { + set_global_basis (newValue) + } + + } + + /// Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). + /// + /// > Note: In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a ``Vector3`` data structure not because the rotation is a vector, but only because ``Vector3`` exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + /// + final public var globalRotation: Vector3 { + get { + return get_global_rotation () + } + + set { + set_global_rotation (newValue) + } + + } + + /// Helper property to access ``globalRotation`` in degrees instead of radians. + final public var globalRotationDegrees: Vector3 { + get { + return get_global_rotation_degrees () + } + + set { + set_global_rotation_degrees (newValue) + } + + } + + /// If `true`, this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, ``isVisibleInTree()`` must return `true`). + final public var visible: Bool { + get { + return is_visible () + } + + set { + set_visible (newValue) + } + + } + + /// Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own ``GeometryInstance3D/visibilityRangeBegin``. Nodes hidden via the ``Node3D/visible`` property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account. + final public var visibilityParent: NodePath { + get { + return get_visibility_parent () + } + + set { + set_visibility_parent (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ local: Transform3D) { + withUnsafePointer(to: local) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(Node3D.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation(_ eulerRadians: Vector3) { + withUnsafePointer(to: eulerRadians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_degrees") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_degrees(_ eulerDegrees: Vector3) { + withUnsafePointer(to: eulerDegrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_degrees") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_degrees() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_order") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1820889989)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_order(_ order: EulerOrder) { + withUnsafePointer(to: order.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_rotation_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_order") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 916939469)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_order() -> EulerOrder { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node3D.method_get_rotation_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return EulerOrder (rawValue: _result)! + } + + fileprivate static var method_set_rotation_edit_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_edit_mode") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 141483330)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_edit_mode(_ editMode: Node3D.RotationEditMode) { + withUnsafePointer(to: editMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_rotation_edit_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation_edit_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_edit_mode") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1572188370)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_edit_mode() -> Node3D.RotationEditMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(Node3D.method_get_rotation_edit_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Node3D.RotationEditMode (rawValue: _result)! + } + + fileprivate static var method_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scale") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scale(_ scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scale") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_quaternion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_quaternion") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1727505552)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_quaternion(_ quaternion: Quaternion) { + withUnsafePointer(to: quaternion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_quaternion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_quaternion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_quaternion") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1222331677)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_quaternion() -> Quaternion { + var _result: Quaternion = Quaternion () + gi.object_method_bind_ptrcall(Node3D.method_get_quaternion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("set_basis") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1055510324)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_basis(_ basis: Basis) { + withUnsafePointer(to: basis) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_basis, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_basis") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_basis() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(Node3D.method_get_basis, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_transform(_ global: Transform3D) { + withUnsafePointer(to: global) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_global_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_transform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(Node3D.method_get_global_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_position") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_global_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_position") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_global_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_basis") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1055510324)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_basis(_ basis: Basis) { + withUnsafePointer(to: basis) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_global_basis, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_basis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_basis") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_basis() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(Node3D.method_get_global_basis, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_rotation") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_rotation(_ eulerRadians: Vector3) { + withUnsafePointer(to: eulerRadians) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_global_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_rotation") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_rotation() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_global_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_global_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("set_global_rotation_degrees") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_global_rotation_degrees(_ eulerDegrees: Vector3) { + withUnsafePointer(to: eulerDegrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_global_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_global_rotation_degrees: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_rotation_degrees") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_global_rotation_degrees() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(Node3D.method_get_global_rotation_degrees, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_parent_node_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parent_node_3d") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 151077316)! + } + + } + + }() + + /// Returns the parent ``Node3D``, or `null` if no parent exists, the parent is not of type ``Node3D``, or ``topLevel`` is `true`. + /// + /// > Note: Calling this method is not equivalent to `get_parent() as Node3D`, which does not take ``topLevel`` into account. + /// + public final func getParentNode3d() -> Node3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node3D.method_get_parent_node_3d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_ignore_transform_notification: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_transform_notification") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the node ignores notification that its transformation (global or local) changed. + public final func setIgnoreTransformNotification(enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_ignore_transform_notification, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_as_top_level: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_top_level") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_top_level(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_as_top_level, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_set_as_top_level: GDExtensionMethodBindPtr = { + let methodName = StringName("is_set_as_top_level") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_set_as_top_level() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_set_as_top_level, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_scale") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the node uses a scale of `(1, 1, 1)` or its local transformation scale. Changes to the local transformation scale are preserved. + public final func setDisableScale(disable: Bool) { + withUnsafePointer(to: disable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_disable_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_scale_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_scale_disabled") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether this node uses a scale of `(1, 1, 1)` or its local transformation scale. + public final func isScaleDisabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_scale_disabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_world_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_world_3d") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 317588385)! + } + + } + + }() + + /// Returns the current ``World3D`` resource this ``Node3D`` node is registered to. + public final func getWorld3d() -> World3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Node3D.method_get_world_3d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_force_update_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. + public final func forceUpdateTransform() { + gi.object_method_bind_ptrcall(Node3D.method_force_update_transform, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_visibility_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visibility_parent") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visibility_parent(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_visibility_parent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visibility_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visibility_parent") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visibility_parent() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Node3D.method_get_visibility_parent, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_update_gizmos: GDExtensionMethodBindPtr = { + let methodName = StringName("update_gizmos") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates all the ``Node3D`` gizmos attached to this node. + public final func updateGizmos() { + gi.object_method_bind_ptrcall(Node3D.method_update_gizmos, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_add_gizmo: GDExtensionMethodBindPtr = { + let methodName = StringName("add_gizmo") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1544533845)! + } + + } + + }() + + /// Attach an editor gizmo to this ``Node3D``. + /// + /// > Note: The gizmo object would typically be an instance of ``EditorNode3DGizmo``, but the argument type is kept generic to avoid creating a dependency on editor classes in ``Node3D``. + /// + public final func addGizmo(_ gizmo: Node3DGizmo?) { + withUnsafePointer(to: gizmo?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_add_gizmo, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gizmos: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gizmos") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns all the gizmos attached to this ``Node3D``. + public final func getGizmos() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Node3D.method_get_gizmos, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_clear_gizmos: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_gizmos") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clear all gizmos attached to this ``Node3D``. + public final func clearGizmos() { + gi.object_method_bind_ptrcall(Node3D.method_clear_gizmos, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_subgizmo_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subgizmo_selection") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3317607635)! + } + + } + + }() + + /// Set subgizmo selection for this node in the editor. + /// + /// > Note: The gizmo object would typically be an instance of ``EditorNode3DGizmo``, but the argument type is kept generic to avoid creating a dependency on editor classes in ``Node3D``. + /// + public final func setSubgizmoSelection(gizmo: Node3DGizmo?, id: Int32, transform: Transform3D) { + withUnsafePointer(to: gizmo?.handle) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_subgizmo_selection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_clear_subgizmo_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_subgizmo_selection") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change. + public final func clearSubgizmoSelection() { + gi.object_method_bind_ptrcall(Node3D.method_clear_subgizmo_selection, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_visible, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_visible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_visible_in_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("is_visible_in_tree") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the node is present in the ``SceneTree``, its ``visible`` property is `true` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree. + public final func isVisibleInTree() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_visible_in_tree, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_show: GDExtensionMethodBindPtr = { + let methodName = StringName("show") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Enables rendering of this node. Changes ``visible`` to `true`. + public final func show() { + gi.object_method_bind_ptrcall(Node3D.method_show, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_hide: GDExtensionMethodBindPtr = { + let methodName = StringName("hide") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Disables rendering of this node. Changes ``visible`` to `false`. + public final func hide() { + gi.object_method_bind_ptrcall(Node3D.method_hide, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_notify_local_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_notify_local_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the node notifies about its local transformation changes. ``Node3D`` will not propagate this by default. + public final func setNotifyLocalTransform(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_notify_local_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_local_transform_notification_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_local_transform_notification_enabled") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether node notifies about its local transformation changes. ``Node3D`` will not propagate this by default. + public final func isLocalTransformNotificationEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_local_transform_notification_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_notify_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_notify_transform") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Sets whether the node notifies about its global and local transformation changes. ``Node3D`` will not propagate this by default, unless it is in the editor context and it has a valid gizmo. + public final func setNotifyTransform(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_set_notify_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_transform_notification_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_transform_notification_enabled") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the node notifies about its global and local transformation changes. ``Node3D`` will not propagate this by default. + public final func isTransformNotificationEnabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Node3D.method_is_transform_notification_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_rotate: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3436291937)! + } + + } + + }() + + /// Rotates the local transformation around axis, a unit ``Vector3``, by specified angle in radians. + public final func rotate(axis: Vector3, angle: Double) { + withUnsafePointer(to: axis) { pArg0 in + withUnsafePointer(to: angle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_rotate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_rotate: GDExtensionMethodBindPtr = { + let methodName = StringName("global_rotate") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3436291937)! + } + + } + + }() + + /// Rotates the global (world) transformation around axis, a unit ``Vector3``, by specified angle in radians. The rotation axis is in global coordinate system. + public final func globalRotate(axis: Vector3, angle: Double) { + withUnsafePointer(to: axis) { pArg0 in + withUnsafePointer(to: angle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_global_rotate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("global_scale") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Scales the global (world) transformation by the given ``Vector3`` scale factors. + public final func globalScale(_ scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_global_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_global_translate: GDExtensionMethodBindPtr = { + let methodName = StringName("global_translate") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Moves the global (world) transformation by ``Vector3`` offset. The offset is in global coordinate system. + public final func globalTranslate(offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_global_translate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rotate_object_local: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_object_local") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3436291937)! + } + + } + + }() + + /// Rotates the local transformation around axis, a unit ``Vector3``, by specified angle in radians. The rotation axis is in object-local coordinate system. + public final func rotateObjectLocal(axis: Vector3, angle: Double) { + withUnsafePointer(to: axis) { pArg0 in + withUnsafePointer(to: angle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_rotate_object_local, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_scale_object_local: GDExtensionMethodBindPtr = { + let methodName = StringName("scale_object_local") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Scales the local transformation by given 3D scale factors in object-local coordinate system. + public final func scaleObjectLocal(scale: Vector3) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_scale_object_local, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_translate_object_local: GDExtensionMethodBindPtr = { + let methodName = StringName("translate_object_local") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Changes the node's position by the given offset ``Vector3`` in local space. + public final func translateObjectLocal(offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_translate_object_local, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rotate_x: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_x") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Rotates the local transformation around the X axis by angle in radians. + public final func rotateX(angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_rotate_x, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rotate_y: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_y") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Rotates the local transformation around the Y axis by angle in radians. + public final func rotateY(angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_rotate_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rotate_z: GDExtensionMethodBindPtr = { + let methodName = StringName("rotate_z") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Rotates the local transformation around the Z axis by angle in radians. + public final func rotateZ(angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_rotate_z, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_translate: GDExtensionMethodBindPtr = { + let methodName = StringName("translate") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Changes the node's position by the given offset ``Vector3``. + /// + /// Note that the translation `offset` is affected by the node's scale, so if scaled by e.g. `(10, 1, 1)`, a translation by an offset of `(2, 0, 0)` would actually add 20 (`2 * 10`) to the X coordinate. + /// + public final func translate(offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_translate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_orthonormalize: GDExtensionMethodBindPtr = { + let methodName = StringName("orthonormalize") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's ``Transform3D``. + public final func orthonormalize() { + gi.object_method_bind_ptrcall(Node3D.method_orthonormalize, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_identity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_identity") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Reset all transformations for this node (sets its ``Transform3D`` to the identity matrix). + public final func setIdentity() { + gi.object_method_bind_ptrcall(Node3D.method_set_identity, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_look_at: GDExtensionMethodBindPtr = { + let methodName = StringName("look_at") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2882425029)! + } + + } + + }() + + /// Rotates the node so that the local forward axis (-Z, ``Vector3/forward``) points toward the `target` position. + /// + /// The local up axis (+Y) points as close to the `up` vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. + /// + /// The `target` position cannot be the same as the node's position, the `up` vector cannot be zero, and the direction from the node's position to the `target` vector cannot be parallel to the `up` vector. + /// + /// Operations take place in global space, which means that the node must be in the scene tree. + /// + /// If `useModelFront` is `true`, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the `target` position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). + /// + public final func lookAt(target: Vector3, up: Vector3 = Vector3 (x: 0, y: 1, z: 0), useModelFront: Bool = false) { + withUnsafePointer(to: target) { pArg0 in + withUnsafePointer(to: up) { pArg1 in + withUnsafePointer(to: useModelFront) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_look_at, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_look_at_from_position: GDExtensionMethodBindPtr = { + let methodName = StringName("look_at_from_position") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2086826090)! + } + + } + + }() + + /// Moves the node to the specified `position`, and then rotates the node to point toward the `target` as per ``lookAt(target:up:useModelFront:)``. Operations take place in global space. + public final func lookAtFromPosition(_ position: Vector3, target: Vector3, up: Vector3 = Vector3 (x: 0, y: 1, z: 0), useModelFront: Bool = false) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: target) { pArg1 in + withUnsafePointer(to: up) { pArg2 in + withUnsafePointer(to: useModelFront) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_look_at_from_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_to_local: GDExtensionMethodBindPtr = { + let methodName = StringName("to_local") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 192990374)! + } + + } + + }() + + /// Transforms `globalPoint` from world space to this node's local space. + public final func toLocal(globalPoint: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: globalPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_to_local, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_to_global: GDExtensionMethodBindPtr = { + let methodName = StringName("to_global") + return withUnsafePointer(to: &Node3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 192990374)! + } + + } + + }() + + /// Transforms `localPoint` from this node's local space to world space. + public final func toGlobal(localPoint: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: localPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Node3D.method_to_global, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + // Signals + /// Emitted when node visibility changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.visibilityChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var visibilityChanged: SimpleSignal { SimpleSignal (target: self, signalName: "visibility_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Node3DGizmo.swift b/Sources/SwiftGodot/Generated/Api/Node3DGizmo.swift new file mode 100644 index 000000000..7a9dcb273 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Node3DGizmo.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract class to expose editor gizmos for ``Node3D``. +/// +/// This abstract class helps connect the ``Node3D`` scene with the editor-specific ``EditorNode3DGizmo`` class. +/// +/// ``Node3DGizmo`` by itself has no exposed API, refer to ``Node3D/addGizmo(_:)`` and pass it an ``EditorNode3DGizmo`` instance. +/// +open class Node3DGizmo: RefCounted { + override open class var godotClassName: StringName { "Node3DGizmo" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Noise.swift b/Sources/SwiftGodot/Generated/Api/Noise.swift new file mode 100644 index 000000000..1ac8d8256 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Noise.swift @@ -0,0 +1,351 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for noise generators. +/// +/// This class defines the interface for noise generation libraries to inherit from. +/// +/// A default ``getSeamlessImage(width:height:invert:in3dSpace:skirt:normalize:)`` implementation is provided for libraries that do not provide seamless noise. This function requests a larger image from the ``getImage(width:height:invert:in3dSpace:normalize:)`` method, reverses the quadrants of the image, then uses the strips of extra width to blend over the seams. +/// +/// Inheriting noise classes can optionally override this function to provide a more optimal algorithm. +/// +open class Noise: Resource { + override open class var godotClassName: StringName { "Noise" } + /* Methods */ + fileprivate static var method_get_noise_1d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_1d") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3919130443)! + } + + } + + }() + + /// Returns the 1D noise value at the given (x) coordinate. + public final func getNoise1d(x: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_noise_1d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_noise_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_2d") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2753205203)! + } + + } + + }() + + /// Returns the 2D noise value at the given position. + public final func getNoise2d(x: Double, y: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_noise_2d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_noise_2dv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_2dv") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2276447920)! + } + + } + + }() + + /// Returns the 2D noise value at the given position. + public final func getNoise2dv(v: Vector2) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: v) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_noise_2dv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_noise_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_3d") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 973811851)! + } + + } + + }() + + /// Returns the 3D noise value at the given position. + public final func getNoise3d(x: Double, y: Double, z: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: x) { pArg0 in + withUnsafePointer(to: y) { pArg1 in + withUnsafePointer(to: z) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_noise_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_noise_3dv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise_3dv") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1109078154)! + } + + } + + }() + + /// Returns the 3D noise value at the given position. + public final func getNoise3dv(v: Vector3) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: v) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_noise_3dv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_image: GDExtensionMethodBindPtr = { + let methodName = StringName("get_image") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3180683109)! + } + + } + + }() + + /// Returns an ``Image`` containing 2D noise values. + /// + /// > Note: With `normalize` set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + /// + public final func getImage(width: Int32, height: Int32, invert: Bool = false, in3dSpace: Bool = false, normalize: Bool = true) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: invert) { pArg2 in + withUnsafePointer(to: in3dSpace) { pArg3 in + withUnsafePointer(to: normalize) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_image, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_seamless_image: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless_image") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2770743602)! + } + + } + + }() + + /// Returns an ``Image`` containing seamless 2D noise values. + /// + /// > Note: With `normalize` set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + /// + public final func getSeamlessImage(width: Int32, height: Int32, invert: Bool = false, in3dSpace: Bool = false, skirt: Double = 0.1, normalize: Bool = true) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: invert) { pArg2 in + withUnsafePointer(to: in3dSpace) { pArg3 in + withUnsafePointer(to: skirt) { pArg4 in + withUnsafePointer(to: normalize) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_seamless_image, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_image_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_image_3d") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3977814329)! + } + + } + + }() + + /// Returns an ``GArray`` of ``Image``s containing 3D noise values for use with ``ImageTexture3D/create(format:width:height:depth:useMipmaps:data:)``. + /// + /// > Note: With `normalize` set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + /// + public final func getImage3d(width: Int32, height: Int32, depth: Int32, invert: Bool = false, normalize: Bool = true) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: depth) { pArg2 in + withUnsafePointer(to: invert) { pArg3 in + withUnsafePointer(to: normalize) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_image_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_seamless_image_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless_image_3d") + return withUnsafePointer(to: &Noise.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 451006340)! + } + + } + + }() + + /// Returns an ``GArray`` of ``Image``s containing seamless 3D noise values for use with ``ImageTexture3D/create(format:width:height:depth:useMipmaps:data:)``. + /// + /// > Note: With `normalize` set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + /// + public final func getSeamlessImage3d(width: Int32, height: Int32, depth: Int32, invert: Bool = false, skirt: Double = 0.1, normalize: Bool = true) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: depth) { pArg2 in + withUnsafePointer(to: invert) { pArg3 in + withUnsafePointer(to: skirt) { pArg4 in + withUnsafePointer(to: normalize) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(Noise.method_get_seamless_image_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NoiseTexture2D.swift b/Sources/SwiftGodot/Generated/Api/NoiseTexture2D.swift new file mode 100644 index 000000000..34203bf77 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NoiseTexture2D.swift @@ -0,0 +1,684 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D texture filled with noise generated by a ``Noise`` object. +/// +/// Uses the ``FastNoiseLite`` library or other noise generators to fill the texture data of your desired size. ``NoiseTexture2D`` can also generate normal map textures. +/// +/// The class uses ``Thread``s to generate the texture data internally, so ``Texture2D/getImage()`` may return `null` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image and the generated byte data: +/// +open class NoiseTexture2D: Texture2D { + override open class var godotClassName: StringName { "NoiseTexture2D" } + + /* Properties */ + + /// Width of the generated texture (in pixels). + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// Height of the generated texture (in pixels). + final public var height: Int32 { + get { + return getHeight () + } + + set { + set_height (newValue) + } + + } + + /// If `true`, inverts the noise texture. White becomes black, black becomes white. + final public var invert: Bool { + get { + return get_invert () + } + + set { + set_invert (newValue) + } + + } + + /// Determines whether the noise image is calculated in 3D space. May result in reduced contrast. + final public var in3dSpace: Bool { + get { + return is_in_3d_space () + } + + set { + set_in_3d_space (newValue) + } + + } + + /// Determines whether mipmaps are generated for this texture. Enabling this results in less texture aliasing in the distance, at the cost of increasing memory usage by roughly 33% and making the noise texture generation take longer. + /// + /// > Note: ``generateMipmaps`` requires mipmap filtering to be enabled on the material using the ``NoiseTexture2D`` to have an effect. + /// + final public var generateMipmaps: Bool { + get { + return is_generating_mipmaps () + } + + set { + set_generate_mipmaps (newValue) + } + + } + + /// If `true`, a seamless texture is requested from the ``Noise`` resource. + /// + /// > Note: Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used ``Noise`` resource. This is because some implementations use higher dimensions for generating seamless noise. + /// + /// > Note: The default ``FastNoiseLite`` implementation uses the fallback path for seamless generation. If using a ``width`` or ``height`` lower than the default, you may need to increase ``seamlessBlendSkirt`` to make seamless blending more effective. + /// + final public var seamless: Bool { + get { + return get_seamless () + } + + set { + set_seamless (newValue) + } + + } + + /// Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See ``Noise`` for further details. + /// + /// > Note: If using a ``width`` or ``height`` lower than the default, you may need to increase ``seamlessBlendSkirt`` to make seamless blending more effective. + /// + final public var seamlessBlendSkirt: Double { + get { + return get_seamless_blend_skirt () + } + + set { + set_seamless_blend_skirt (newValue) + } + + } + + /// If `true`, the resulting texture contains a normal map created from the original noise interpreted as a bump map. + final public var asNormalMap: Bool { + get { + return is_normal_map () + } + + set { + set_as_normal_map (newValue) + } + + } + + /// Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer. + final public var bumpStrength: Double { + get { + return get_bump_strength () + } + + set { + set_bump_strength (newValue) + } + + } + + /// If `true`, the noise image coming from the noise generator is normalized to the range `0.0` to `1.0`. + /// + /// Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures. + /// + final public var normalize: Bool { + get { + return is_normalized () + } + + set { + set_normalize (newValue) + } + + } + + /// A ``Gradient`` which is used to map the luminance of each pixel to a color value. + final public var colorRamp: Gradient? { + get { + return get_color_ramp () + } + + set { + set_color_ramp (newValue) + } + + } + + /// The instance of the ``Noise`` object. + final public var noise: Noise? { + get { + return get_noise () + } + + set { + set_noise (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Int32) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_invert: GDExtensionMethodBindPtr = { + let methodName = StringName("set_invert") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_invert(_ invert: Bool) { + withUnsafePointer(to: invert) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_invert, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_invert: GDExtensionMethodBindPtr = { + let methodName = StringName("get_invert") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_invert() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_invert, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_in_3d_space: GDExtensionMethodBindPtr = { + let methodName = StringName("set_in_3d_space") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_in_3d_space(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_in_3d_space, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_in_3d_space: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_3d_space") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_in_3d_space() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_is_in_3d_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_generate_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_generate_mipmaps") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_generate_mipmaps(_ invert: Bool) { + withUnsafePointer(to: invert) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_generate_mipmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_generating_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("is_generating_mipmaps") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_generating_mipmaps() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_is_generating_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_seamless: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seamless") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seamless(_ seamless: Bool) { + withUnsafePointer(to: seamless) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_seamless, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seamless: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seamless() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_seamless, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_seamless_blend_skirt: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seamless_blend_skirt") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seamless_blend_skirt(_ seamlessBlendSkirt: Double) { + withUnsafePointer(to: seamlessBlendSkirt) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_seamless_blend_skirt, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seamless_blend_skirt: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless_blend_skirt") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seamless_blend_skirt() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_seamless_blend_skirt, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_as_normal_map: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_normal_map") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_normal_map(_ asNormalMap: Bool) { + withUnsafePointer(to: asNormalMap) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_as_normal_map, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_normal_map: GDExtensionMethodBindPtr = { + let methodName = StringName("is_normal_map") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_normal_map() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_is_normal_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bump_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bump_strength") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bump_strength(_ bumpStrength: Double) { + withUnsafePointer(to: bumpStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_bump_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bump_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bump_strength") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bump_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_bump_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normalize: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normalize") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normalize(_ normalize: Bool) { + withUnsafePointer(to: normalize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_normalize, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("is_normalized") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_normalized() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture2D.method_is_normalized, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_ramp") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_ramp(_ gradient: Gradient?) { + withUnsafePointer(to: gradient?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_color_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_ramp") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_color_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_noise: GDExtensionMethodBindPtr = { + let methodName = StringName("set_noise") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4135492439)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_noise(_ noise: Noise?) { + withUnsafePointer(to: noise?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture2D.method_set_noise, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_noise: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise") + return withUnsafePointer(to: &NoiseTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 185851837)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_noise() -> Noise? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NoiseTexture2D.method_get_noise, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/NoiseTexture3D.swift b/Sources/SwiftGodot/Generated/Api/NoiseTexture3D.swift new file mode 100644 index 000000000..9c3624350 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/NoiseTexture3D.swift @@ -0,0 +1,495 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D texture filled with noise generated by a ``Noise`` object. +/// +/// Uses the ``FastNoiseLite`` library or other noise generators to fill the texture data of your desired size. +/// +/// The class uses ``Thread``s to generate the texture data internally, so ``Texture3D/getData()`` may return `null` if the generation process has not completed yet. In that case, you need to wait for the texture to be generated before accessing the image: +/// +open class NoiseTexture3D: Texture3D { + override open class var godotClassName: StringName { "NoiseTexture3D" } + + /* Properties */ + + /// Width of the generated texture (in pixels). + final public var width: Int32 { + get { + return getWidth () + } + + set { + set_width (newValue) + } + + } + + /// Height of the generated texture (in pixels). + final public var height: Int32 { + get { + return getHeight () + } + + set { + set_height (newValue) + } + + } + + /// Depth of the generated texture (in pixels). + final public var depth: Int32 { + get { + return getDepth () + } + + set { + set_depth (newValue) + } + + } + + /// If `true`, inverts the noise texture. White becomes black, black becomes white. + final public var invert: Bool { + get { + return get_invert () + } + + set { + set_invert (newValue) + } + + } + + /// If `true`, a seamless texture is requested from the ``Noise`` resource. + /// + /// > Note: Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used ``Noise`` resource. This is because some implementations use higher dimensions for generating seamless noise. + /// + /// > Note: The default ``FastNoiseLite`` implementation uses the fallback path for seamless generation. If using a ``width``, ``height`` or ``depth`` lower than the default, you may need to increase ``seamlessBlendSkirt`` to make seamless blending more effective. + /// + final public var seamless: Bool { + get { + return get_seamless () + } + + set { + set_seamless (newValue) + } + + } + + /// Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See ``Noise`` for further details. + /// + /// > Note: If using a ``width``, ``height`` or ``depth`` lower than the default, you may need to increase ``seamlessBlendSkirt`` to make seamless blending more effective. + /// + final public var seamlessBlendSkirt: Double { + get { + return get_seamless_blend_skirt () + } + + set { + set_seamless_blend_skirt (newValue) + } + + } + + /// If `true`, the noise image coming from the noise generator is normalized to the range `0.0` to `1.0`. + /// + /// Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures. + /// + final public var normalize: Bool { + get { + return is_normalized () + } + + set { + set_normalize (newValue) + } + + } + + /// A ``Gradient`` which is used to map the luminance of each pixel to a color value. + final public var colorRamp: Gradient? { + get { + return get_color_ramp () + } + + set { + set_color_ramp (newValue) + } + + } + + /// The instance of the ``Noise`` object. + final public var noise: Noise? { + get { + return get_noise () + } + + set { + set_noise (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ width: Int32) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ height: Int32) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth(_ depth: Int32) { + withUnsafePointer(to: depth) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_invert: GDExtensionMethodBindPtr = { + let methodName = StringName("set_invert") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_invert(_ invert: Bool) { + withUnsafePointer(to: invert) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_invert, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_invert: GDExtensionMethodBindPtr = { + let methodName = StringName("get_invert") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_invert() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture3D.method_get_invert, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_seamless: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seamless") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seamless(_ seamless: Bool) { + withUnsafePointer(to: seamless) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_seamless, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seamless: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seamless() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture3D.method_get_seamless, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_seamless_blend_skirt: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seamless_blend_skirt") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seamless_blend_skirt(_ seamlessBlendSkirt: Double) { + withUnsafePointer(to: seamlessBlendSkirt) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_seamless_blend_skirt, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seamless_blend_skirt: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seamless_blend_skirt") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seamless_blend_skirt() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(NoiseTexture3D.method_get_seamless_blend_skirt, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_normalize: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normalize") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_normalize(_ normalize: Bool) { + withUnsafePointer(to: normalize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_normalize, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_normalized: GDExtensionMethodBindPtr = { + let methodName = StringName("is_normalized") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_normalized() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(NoiseTexture3D.method_is_normalized, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_ramp") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2756054477)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_ramp(_ gradient: Gradient?) { + withUnsafePointer(to: gradient?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_color_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_ramp") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 132272999)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_ramp() -> Gradient? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NoiseTexture3D.method_get_color_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_noise: GDExtensionMethodBindPtr = { + let methodName = StringName("set_noise") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4135492439)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_noise(_ noise: Noise?) { + withUnsafePointer(to: noise?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(NoiseTexture3D.method_set_noise, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_noise: GDExtensionMethodBindPtr = { + let methodName = StringName("get_noise") + return withUnsafePointer(to: &NoiseTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 185851837)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_noise() -> Noise? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(NoiseTexture3D.method_get_noise, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ORMMaterial3D.swift b/Sources/SwiftGodot/Generated/Api/ORMMaterial3D.swift new file mode 100644 index 000000000..02fa27977 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ORMMaterial3D.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A PBR (Physically Based Rendering) material to be used on 3D objects. Uses an ORM texture. +/// +/// ORMMaterial3D's properties are inherited from ``BaseMaterial3D``. Unlike ``StandardMaterial3D``, ORMMaterial3D uses a single texture for ambient occlusion, roughness and metallic maps, known as an ORM texture. +open class ORMMaterial3D: BaseMaterial3D { + override open class var godotClassName: StringName { "ORMMaterial3D" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/OS.swift b/Sources/SwiftGodot/Generated/Api/OS.swift new file mode 100644 index 000000000..5ff5c6e7a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OS.swift @@ -0,0 +1,2192 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to common operating system functionalities. +/// +/// The ``OS`` class wraps the most common functionalities for communicating with the host operating system, such as the video driver, delays, environment variables, execution of binaries, command line, etc. +/// +/// > Note: In Godot 4, ``OS`` functions related to window management, clipboard, and TTS were moved to the ``DisplayServer`` singleton (and the ``Window`` class). Functions related to time were removed and are only available in the ``Time`` class. +/// +open class OS: Object { + /// The shared instance of this class + public static var shared: OS = { + return withUnsafePointer (to: &OS.godotClassName.content) { ptr in + OS (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "OS" } + public enum RenderingDriver: Int64, CaseIterable, CustomDebugStringConvertible { + /// The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available. + case vulkan = 0 // RENDERING_DRIVER_VULKAN + /// The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. + case opengl3 = 1 // RENDERING_DRIVER_OPENGL3 + /// The Direct3D 12 rendering driver. + case d3d12 = 2 // RENDERING_DRIVER_D3D12 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .vulkan: return ".vulkan" + case .opengl3: return ".opengl3" + case .d3d12: return ".d3d12" + } + + } + + } + + public enum SystemDir: Int64, CaseIterable, CustomDebugStringConvertible { + /// Refers to the Desktop directory path. + case desktop = 0 // SYSTEM_DIR_DESKTOP + /// Refers to the DCIM (Digital Camera Images) directory path. + case dcim = 1 // SYSTEM_DIR_DCIM + /// Refers to the Documents directory path. + case documents = 2 // SYSTEM_DIR_DOCUMENTS + /// Refers to the Downloads directory path. + case downloads = 3 // SYSTEM_DIR_DOWNLOADS + /// Refers to the Movies (or Videos) directory path. + case movies = 4 // SYSTEM_DIR_MOVIES + /// Refers to the Music directory path. + case music = 5 // SYSTEM_DIR_MUSIC + /// Refers to the Pictures directory path. + case pictures = 6 // SYSTEM_DIR_PICTURES + /// Refers to the Ringtones directory path. + case ringtones = 7 // SYSTEM_DIR_RINGTONES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .desktop: return ".desktop" + case .dcim: return ".dcim" + case .documents: return ".documents" + case .downloads: return ".downloads" + case .movies: return ".movies" + case .music: return ".music" + case .pictures: return ".pictures" + case .ringtones: return ".ringtones" + } + + } + + } + + + /* Properties */ + + /// If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. + /// + /// > Note: On start-up, this is the same as ``ProjectSettings/application/run/lowProcessorMode``. + /// + static public var lowProcessorUsageMode: Bool { + get { + return is_in_low_processor_usage_mode () + } + + set { + set_low_processor_usage_mode (newValue) + } + + } + + /// The amount of sleeping between frames when the low-processor usage mode is enabled, in microseconds. Higher values will result in lower CPU usage. See also ``lowProcessorUsageMode``. + /// + /// > Note: On start-up, this is the same as ``ProjectSettings/application/run/lowProcessorModeSleepUsec``. + /// + static public var lowProcessorUsageModeSleepUsec: Int32 { + get { + return get_low_processor_usage_mode_sleep_usec () + } + + set { + set_low_processor_usage_mode_sleep_usec (newValue) + } + + } + + /// If `true`, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This only works on systems where V-Sync is active. + /// + /// > Note: On start-up, this is the same as ``ProjectSettings/application/run/deltaSmoothing``. + /// + static public var deltaSmoothing: Bool { + get { + return is_delta_smoothing_enabled () + } + + set { + set_delta_smoothing (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_entropy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_entropy") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 47165747)! + } + + } + + }() + + /// Generates a ``PackedByteArray`` of cryptographically secure random bytes with given `size`. + /// + /// > Note: Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using ``Crypto/generateRandomBytes(size:)`` is preferred in most cases. + /// + public static func getEntropy(size: Int32) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_entropy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_system_ca_certificates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_ca_certificates") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns the list of certification authorities trusted by the operating system as a string of concatenated certificates in PEM format. + public static func getSystemCaCertificates() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_system_ca_certificates, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_connected_midi_inputs: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connected_midi_inputs") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with ``openMidiInputs()``. See also ``closeMidiInputs()``. + /// + /// > Note: This method is implemented on Linux, macOS and Windows. + /// + public static func getConnectedMidiInputs() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_connected_midi_inputs, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_open_midi_inputs: GDExtensionMethodBindPtr = { + let methodName = StringName("open_midi_inputs") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Initializes the singleton for the system MIDI driver, allowing Godot to receive ``InputEventMIDI``. See also ``getConnectedMidiInputs()`` and ``closeMidiInputs()``. + /// + /// > Note: This method is implemented on Linux, macOS and Windows. + /// + public static func openMidiInputs() { + gi.object_method_bind_ptrcall(method_open_midi_inputs, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_close_midi_inputs: GDExtensionMethodBindPtr = { + let methodName = StringName("close_midi_inputs") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Shuts down the system MIDI driver. Godot will no longer receive ``InputEventMIDI``. See also ``openMidiInputs()`` and ``getConnectedMidiInputs()``. + /// + /// > Note: This method is implemented on Linux, macOS and Windows. + /// + public static func closeMidiInputs() { + gi.object_method_bind_ptrcall(method_close_midi_inputs, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_alert: GDExtensionMethodBindPtr = { + let methodName = StringName("alert") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1783970740)! + } + + } + + }() + + /// Displays a modal dialog box using the host platform's implementation. The engine execution is blocked until the dialog is closed. + public static func alert(text: String, title: String = "Alert!") { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + let title = GString(title) + withUnsafePointer(to: title.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_alert, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_crash: GDExtensionMethodBindPtr = { + let methodName = StringName("crash") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Crashes the engine (or the editor if called within a `@tool` script). See also ``kill(pid:)``. + /// + /// > Note: This method should _only_ be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) ``@GDScript.assert``, ``@GlobalScope.push_error``, or ``alert(text:title:)``. + /// + public static func crash(message: String) { + let message = GString(message) + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_crash, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_low_processor_usage_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_low_processor_usage_mode") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_low_processor_usage_mode(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_low_processor_usage_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_in_low_processor_usage_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_in_low_processor_usage_mode") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_in_low_processor_usage_mode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_in_low_processor_usage_mode, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_low_processor_usage_mode_sleep_usec: GDExtensionMethodBindPtr = { + let methodName = StringName("set_low_processor_usage_mode_sleep_usec") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_low_processor_usage_mode_sleep_usec(_ usec: Int32) { + withUnsafePointer(to: usec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_low_processor_usage_mode_sleep_usec, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_low_processor_usage_mode_sleep_usec: GDExtensionMethodBindPtr = { + let methodName = StringName("get_low_processor_usage_mode_sleep_usec") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate static func get_low_processor_usage_mode_sleep_usec() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_low_processor_usage_mode_sleep_usec, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_delta_smoothing: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delta_smoothing") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_delta_smoothing(_ deltaSmoothingEnabled: Bool) { + withUnsafePointer(to: deltaSmoothingEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_delta_smoothing, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_delta_smoothing_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_delta_smoothing_enabled") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_delta_smoothing_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_delta_smoothing_enabled, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_processor_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_processor_count") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of _logical_ CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of _physical_ CPU cores. + public static func getProcessorCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_processor_count, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_processor_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_processor_name") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the full name of the CPU model on the host machine (e.g. `"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"`). + /// + /// > Note: This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, ``getProcessorName()`` returns an empty string. + /// + public static func getProcessorName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_processor_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_system_fonts: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_fonts") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of font family names available. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS and Windows. + /// + public static func getSystemFonts() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_system_fonts, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_system_font_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_font_path") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 626580860)! + } + + } + + }() + + /// Returns the path to the system font file with `fontName` and style. Returns an empty string if no matching fonts found. + /// + /// The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + /// + /// > Note: Returned font might have different style if the requested style is not available. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS and Windows. + /// + public static func getSystemFontPath(fontName: String, weight: Int32 = 400, stretch: Int32 = 100, italic: Bool = false) -> String { + let _result = GString () + let fontName = GString(fontName) + withUnsafePointer(to: fontName.content) { pArg0 in + withUnsafePointer(to: weight) { pArg1 in + withUnsafePointer(to: stretch) { pArg2 in + withUnsafePointer(to: italic) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_get_system_font_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_system_font_path_for_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_font_path_for_text") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 197317981)! + } + + } + + }() + + /// Returns an array of the system substitute font file paths, which are similar to the font with `fontName` and style for the specified text, locale, and script. Returns an empty array if no matching fonts found. + /// + /// The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + /// + /// > Note: Depending on OS, it's not guaranteed that any of the returned fonts will be suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. + /// + /// > Note: Returned fonts might have different style if the requested style is not available or belong to a different font family. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS and Windows. + /// + public static func getSystemFontPathForText(fontName: String, text: String, locale: String = "", script: String = "", weight: Int32 = 400, stretch: Int32 = 100, italic: Bool = false) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let fontName = GString(fontName) + withUnsafePointer(to: fontName.content) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + let locale = GString(locale) + withUnsafePointer(to: locale.content) { pArg2 in + let script = GString(script) + withUnsafePointer(to: script.content) { pArg3 in + withUnsafePointer(to: weight) { pArg4 in + withUnsafePointer(to: stretch) { pArg5 in + withUnsafePointer(to: italic) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_get_system_font_path_for_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_executable_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_executable_path") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the file path to the current engine executable. + /// + /// > Note: On macOS, always use ``createInstance(arguments:)`` instead of relying on executable path. + /// + public static func getExecutablePath() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_executable_path, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_read_string_from_stdin: GDExtensionMethodBindPtr = { + let methodName = StringName("read_string_from_stdin") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Reads a user input string from the standard input (usually the terminal). This operation is _blocking_, which causes the window to freeze if ``readStringFromStdin()`` is called on the main thread. The thread calling ``readStringFromStdin()`` will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]). + /// + /// > Note: This method is implemented on Linux, macOS and Windows. + /// + /// > Note: On exported Windows builds, run the console wrapper executable to access the terminal. Otherwise, the standard input will not work correctly. If you need a single executable with console support, use a custom build compiled with the `windows_subsystem=console` flag. + /// + public static func readStringFromStdin() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_read_string_from_stdin, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_execute: GDExtensionMethodBindPtr = { + let methodName = StringName("execute") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1488299882)! + } + + } + + }() + + /// Executes the given process in a _blocking_ way. The file specified in `path` must exist and be executable. The system path resolution will be used. The `arguments` are used in the given order, separated by spaces, and wrapped in quotes. + /// + /// If an `output` array is provided, the complete shell output of the process is appended to `output` as a single ``String`` element. If `readStderr` is `true`, the output to the standard error stream is also appended to the array. + /// + /// On Windows, if `openConsole` is `true` and the process is a console app, a new terminal window is opened. + /// + /// This method returns the exit code of the command, or `-1` if the process fails to execute. + /// + /// > Note: The main thread will be blocked until the executed command terminates. Use ``Thread`` to create a separate thread that will not block the main thread, or use ``createProcess(path:arguments:openConsole:)`` to create a completely independent process. + /// + /// For example, to retrieve a list of the working directory's contents: + /// + /// If you wish to access a shell built-in or execute a composite command, a platform-specific shell can be invoked. For example: + /// + /// > Note: This method is implemented on Android, Linux, macOS, and Windows. + /// + /// > Note: To execute a Windows command interpreter built-in command, specify `cmd.exe` in `path`, `/c` as the first argument, and the desired command as the second argument. + /// + /// > Note: To execute a PowerShell built-in command, specify `powershell.exe` in `path`, `-Command` as the first argument, and the desired command as the second argument. + /// + /// > Note: To execute a Unix shell built-in command, specify shell executable name in `path`, `-c` as the first argument, and the desired command as the second argument. + /// + /// > Note: On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export. + /// + /// > Note: On Android, system commands such as `dumpsys` can only be run on a rooted device. + /// + public static func execute(path: String, arguments: PackedStringArray, output: GArray = GArray (), readStderr: Bool = false, openConsole: Bool = false) -> Int32 { + var _result: Int32 = 0 + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: arguments.content) { pArg1 in + withUnsafePointer(to: output.content) { pArg2 in + withUnsafePointer(to: readStderr) { pArg3 in + withUnsafePointer(to: openConsole) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_execute, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_execute_with_pipe: GDExtensionMethodBindPtr = { + let methodName = StringName("execute_with_pipe") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3845631403)! + } + + } + + }() + + /// Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in `path` must exist and be an executable file or macOS `.app` bundle. The path is resolved based on the current platform. The `arguments` are used in the given order and separated by a space. + /// + /// If the process cannot be created, this method returns an empty ``GDictionary``. Otherwise, this method returns a ``GDictionary`` with the following keys: + /// + /// - `"stdio"` - ``FileAccess`` to access the process stdin and stdout pipes (read/write). + /// + /// - `"stderr"` - ``FileAccess`` to access the process stderr pipe (read only). + /// + /// - `"pid"` - Process ID as an integer, which you can use to monitor the process (and potentially terminate it with ``kill(pid:)``). + /// + /// > Note: This method is implemented on Android, Linux, macOS, and Windows. + /// + /// > Note: To execute a Windows command interpreter built-in command, specify `cmd.exe` in `path`, `/c` as the first argument, and the desired command as the second argument. + /// + /// > Note: To execute a PowerShell built-in command, specify `powershell.exe` in `path`, `-Command` as the first argument, and the desired command as the second argument. + /// + /// > Note: To execute a Unix shell built-in command, specify shell executable name in `path`, `-c` as the first argument, and the desired command as the second argument. + /// + /// > Note: On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + /// + public static func executeWithPipe(path: String, arguments: PackedStringArray) -> GDictionary { + let _result: GDictionary = GDictionary () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: arguments.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_execute_with_pipe, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_process: GDExtensionMethodBindPtr = { + let methodName = StringName("create_process") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2903767230)! + } + + } + + }() + + /// Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in `path` must exist and be an executable file or macOS `.app` bundle. The path is resolved based on the current platform. The `arguments` are used in the given order and separated by a space. + /// + /// On Windows, if `openConsole` is `true` and the process is a console app, a new terminal window will be opened. + /// + /// If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with ``kill(pid:)``). Otherwise, this method returns `-1`. + /// + /// For example, running another instance of the project: + /// + /// See ``execute(path:arguments:output:readStderr:openConsole:)`` if you wish to run an external command and retrieve the results. + /// + /// > Note: This method is implemented on Android, Linux, macOS, and Windows. + /// + /// > Note: On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + /// + public static func createProcess(path: String, arguments: PackedStringArray, openConsole: Bool = false) -> Int32 { + var _result: Int32 = 0 + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: arguments.content) { pArg1 in + withUnsafePointer(to: openConsole) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_create_process, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("create_instance") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1080601263)! + } + + } + + }() + + /// Creates a new instance of Godot that runs independently. The `arguments` are used in the given order and separated by a space. + /// + /// If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with ``kill(pid:)``). If the process cannot be created, this method returns `-1`. + /// + /// See ``createProcess(path:arguments:openConsole:)`` if you wish to run a different process. + /// + /// > Note: This method is implemented on Android, Linux, macOS and Windows. + /// + public static func createInstance(arguments: PackedStringArray) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: arguments.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_create_instance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_kill: GDExtensionMethodBindPtr = { + let methodName = StringName("kill") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844576869)! + } + + } + + }() + + /// Kill (terminate) the process identified by the given process ID (`pid`), such as the ID returned by ``execute(path:arguments:output:readStderr:openConsole:)`` in non-blocking mode. See also ``crash(message:)``. + /// + /// > Note: This method can also be used to kill processes that were not spawned by the engine. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS and Windows. + /// + public static func kill(pid: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: pid) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_kill, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_shell_open: GDExtensionMethodBindPtr = { + let methodName = StringName("shell_open") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Requests the OS to open a resource identified by `uri` with the most appropriate program. For example: + /// + /// - `OS.shell_open("C:\\Users\name\Downloads")` on Windows opens the file explorer at the user's Downloads folder. + /// + /// - `OS.shell_open("https://godotengine.org")` opens the default web browser on the official Godot website. + /// + /// - `OS.shell_open("mailto:example@example.com")` opens the default email client with the "To" field set to `example@example.com`. See RFC 2368 - The `mailto` URL scheme for a list of fields that can be added. + /// + /// Use ``ProjectSettings/globalizePath(_:)`` to convert a `res://` or `user://` project path into a system path for use with this method. + /// + /// > Note: Use ``GString/uriEncode()`` to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, ``shellOpen(uri:)`` may not work correctly in a project exported to the Web platform. + /// + /// > Note: This method is implemented on Android, iOS, Web, Linux, macOS and Windows. + /// + public static func shellOpen(uri: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let uri = GString(uri) + withUnsafePointer(to: uri.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shell_open, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_shell_show_in_file_manager: GDExtensionMethodBindPtr = { + let methodName = StringName("shell_show_in_file_manager") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3565188097)! + } + + } + + }() + + /// Requests the OS to open the file manager, navigate to the given `fileOrDirPath` and select the target file or folder. + /// + /// If `openFolder` is `true` and `fileOrDirPath` is a valid directory path, the OS will open the file manager and navigate to the target folder without selecting anything. + /// + /// Use ``ProjectSettings/globalizePath(_:)`` to convert a `res://` or `user://` project path into a system path to use with this method. + /// + /// > Note: This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to ``shellOpen(uri:)`` with a directory path of `fileOrDirPath` prefixed with `file://`. + /// + public static func shellShowInFileManager(fileOrDirPath: String, openFolder: Bool = true) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let fileOrDirPath = GString(fileOrDirPath) + withUnsafePointer(to: fileOrDirPath.content) { pArg0 in + withUnsafePointer(to: openFolder) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shell_show_in_file_manager, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_process_running: GDExtensionMethodBindPtr = { + let methodName = StringName("is_process_running") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the child process ID (`pid`) is still running or `false` if it has terminated. `pid` must be a valid ID generated from ``createProcess(path:arguments:openConsole:)``. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS, and Windows. + /// + public static func isProcessRunning(pid: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: pid) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_process_running, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_process_exit_code: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_exit_code") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the exit code of a spawned process once it has finished running (see ``isProcessRunning(pid:)``). + /// + /// Returns `-1` if the `pid` is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. + /// + /// > Note: This method is implemented on Android, Linux, macOS and Windows. + /// + public static func getProcessExitCode(pid: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: pid) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_process_exit_code, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_process_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_id") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number used by the host machine to uniquely identify this application. + /// + /// > Note: This method is implemented on Android, iOS, Linux, macOS, and Windows. + /// + public static func getProcessId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(method_get_process_id, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_has_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("has_environment") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the environment variable with the name `variable` exists. + /// + /// > Note: Double-check the casing of `variable`. Environment variable names are case-sensitive on all platforms except Windows. + /// + public static func hasEnvironment(variable: String) -> Bool { + var _result: Bool = false + let variable = GString(variable) + withUnsafePointer(to: variable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3135753539)! + } + + } + + }() + + /// Returns the value of the given environment variable, or an empty string if `variable` doesn't exist. + /// + /// > Note: Double-check the casing of `variable`. Environment variable names are case-sensitive on all platforms except Windows. + /// + /// > Note: On macOS, applications do not have access to shell environment variables. + /// + public static func getEnvironment(variable: String) -> String { + let _result = GString () + let variable = GString(variable) + withUnsafePointer(to: variable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_environment") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3605043004)! + } + + } + + }() + + /// Sets the value of the environment variable `variable` to `value`. The environment variable will be set for the Godot process and any process executed with ``execute(path:arguments:output:readStderr:openConsole:)`` after running ``setEnvironment(variable:value:)``. The environment variable will _not_ persist to processes run after the Godot process was terminated. + /// + /// > Note: Environment variable names are case-sensitive on all platforms except Windows. The `variable` name cannot be empty or include the `=` character. On Windows, there is a 32767 characters limit for the combined length of `variable`, `value`, and the `=` and null terminator characters that will be registered in the environment block. + /// + public static func setEnvironment(variable: String, value: String) { + let variable = GString(variable) + withUnsafePointer(to: variable.content) { pArg0 in + let value = GString(value) + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_unset_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("unset_environment") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3089850668)! + } + + } + + }() + + /// Removes the given environment variable from the current environment, if it exists. The `variable` name cannot be empty or include the `=` character. The environment variable will be removed for the Godot process and any process executed with ``execute(path:arguments:output:readStderr:openConsole:)`` after running ``unsetEnvironment(variable:)``. The removal of the environment variable will _not_ persist to processes run after the Godot process was terminated. + /// + /// > Note: Environment variable names are case-sensitive on all platforms except Windows. + /// + public static func unsetEnvironment(variable: String) { + let variable = GString(variable) + withUnsafePointer(to: variable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_unset_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the host platform. + /// + /// - On Windows, this is `"Windows"`. + /// + /// - On macOS, this is `"macOS"`. + /// + /// - On Linux-based operating systems, this is `"Linux"`. + /// + /// - On BSD-based operating systems, this is `"FreeBSD"`, `"NetBSD"`, `"OpenBSD"`, or `"BSD"` as a fallback. + /// + /// - On Android, this is `"Android"`. + /// + /// - On iOS, this is `"iOS"`. + /// + /// - On Web, this is `"Web"`. + /// + /// > Note: Custom builds of the engine may support additional platforms, such as consoles, possibly returning other names. + /// + /// > Note: On Web platforms, it is still possible to determine the host platform's OS with feature tags. See ``hasFeature(tagName:)``. + /// + public static func getName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_distribution_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_distribution_name") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the distribution for Linux and BSD platforms (e.g. "Ubuntu", "Manjaro", "OpenBSD", etc.). + /// + /// Returns the same value as ``getName()`` for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". + /// + /// Returns the same value as ``getName()`` for other platforms. + /// + /// > Note: This method is not supported on the Web platform. It returns an empty string. + /// + public static func getDistributionName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_distribution_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_version: GDExtensionMethodBindPtr = { + let methodName = StringName("get_version") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds. + /// + /// - For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like `10.0.9926` for a build of Windows 10, and it may look like `6.1.7601` for a build of Windows 7 SP1. + /// + /// - For rolling distributions, such as Arch Linux, an empty string is returned. + /// + /// - For macOS and iOS, the major and minor version are returned, as well as the patch number. + /// + /// - For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. + /// + /// > Note: This method is not supported on the Web platform. It returns an empty string. + /// + public static func getVersion() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_version, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_cmdline_args: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cmdline_args") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns the command-line arguments passed to the engine. + /// + /// Command-line arguments can be written in any form, including both `--key value` and `--key=value` forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. + /// + /// You can also incorporate environment variables using the ``getEnvironment(variable:)`` method. + /// + /// You can set ``ProjectSettings/editor/run/mainRunArgs`` to define command-line arguments to be passed by the editor when running the project. + /// + /// Here's a minimal example on how to parse command-line arguments into a ``GDictionary`` using the `--key=value` form for arguments: + /// + /// > Note: Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, pass the standard UNIX double dash (`--`) and then the custom arguments, which the engine will ignore by design. These can be read via ``getCmdlineUserArgs()``. + /// + public static func getCmdlineArgs() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_cmdline_args, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_cmdline_user_args: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cmdline_user_args") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981934095)! + } + + } + + }() + + /// Returns the command-line user arguments passed to the engine. User arguments are ignored by the engine and reserved for the user. They are passed after the double dash `--` argument. `++` may be used when `--` is intercepted by another program (such as `startx`). + /// + /// To get all passed arguments, use ``getCmdlineArgs()``. + /// + public static func getCmdlineUserArgs() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_cmdline_user_args, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_video_adapter_driver_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_video_adapter_driver_info") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the video adapter driver name and version for the user's currently active graphics card, as a ``PackedStringArray``. See also ``RenderingServer/getVideoAdapterApiVersion()``. + /// + /// The first element holds the driver name, such as `nvidia`, `amdgpu`, etc. + /// + /// The second element holds the driver version. For example, on the `nvidia` driver on a Linux/BSD platform, the version is in the format `510.85.02`. For Windows, the driver's format is `31.0.15.1659`. + /// + /// > Note: This method is only supported on Linux/BSD and Windows when not running in headless mode. On other platforms, it returns an empty array. + /// + public static func getVideoAdapterDriverInfo() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_video_adapter_driver_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_restart_on_exit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_restart_on_exit") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3331453935)! + } + + } + + }() + + /// If `restart` is `true`, restarts the project automatically when it is exited with ``SceneTree/quit(exitCode:)`` or ``Node/notificationWmCloseRequest``. Command-line `arguments` can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass ``getCmdlineArgs()`` as the value for `arguments`. + /// + /// This method can be used to apply setting changes that require a restart. See also ``isRestartOnExitSet()`` and ``getRestartOnExitArguments()``. + /// + /// > Note: This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. + /// + /// > Note: If the project process crashes or is _killed_ by the user (by sending `SIGKILL` instead of the usual `SIGTERM`), the project won't restart automatically. + /// + public static func setRestartOnExit(restart: Bool, arguments: PackedStringArray = PackedStringArray()) { + withUnsafePointer(to: restart) { pArg0 in + withUnsafePointer(to: arguments.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_restart_on_exit, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_restart_on_exit_set: GDExtensionMethodBindPtr = { + let methodName = StringName("is_restart_on_exit_set") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the project will automatically restart when it exits for any reason, `false` otherwise. See also ``setRestartOnExit(restart:arguments:)`` and ``getRestartOnExitArguments()``. + public static func isRestartOnExitSet() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_restart_on_exit_set, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_restart_on_exit_arguments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_restart_on_exit_arguments") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of command line arguments that will be used when the project automatically restarts using ``setRestartOnExit(restart:arguments:)``. See also ``isRestartOnExitSet()``. + public static func getRestartOnExitArguments() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_restart_on_exit_arguments, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_delay_usec: GDExtensionMethodBindPtr = { + let methodName = StringName("delay_usec") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 998575451)! + } + + } + + }() + + /// Delays execution of the current thread by `usec` microseconds. `usec` must be greater than or equal to `0`. Otherwise, ``delayUsec(_:)`` does nothing and prints an error message. + /// + /// > Note: ``delayUsec(_:)`` is a _blocking_ way to delay code execution. To delay code execution in a non-blocking way, you may use ``SceneTree/createTimer(timeSec:processAlways:processInPhysics:ignoreTimeScale:)``. Awaiting with a ``SceneTreeTimer`` delays the execution of code placed below the `await` without affecting the rest of the project (or editor, for ``EditorPlugin``s and ``EditorScript``s). + /// + /// > Note: When ``delayUsec(_:)`` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using ``delayUsec(_:)`` as part of an ``EditorPlugin`` or ``EditorScript``, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). + /// + public static func delayUsec(_ usec: Int32) { + withUnsafePointer(to: usec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_delay_usec, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_delay_msec: GDExtensionMethodBindPtr = { + let methodName = StringName("delay_msec") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 998575451)! + } + + } + + }() + + /// Delays execution of the current thread by `msec` milliseconds. `msec` must be greater than or equal to `0`. Otherwise, ``delayMsec(_:)`` does nothing and prints an error message. + /// + /// > Note: ``delayMsec(_:)`` is a _blocking_ way to delay code execution. To delay code execution in a non-blocking way, you may use ``SceneTree/createTimer(timeSec:processAlways:processInPhysics:ignoreTimeScale:)``. Awaiting with ``SceneTreeTimer`` delays the execution of code placed below the `await` without affecting the rest of the project (or editor, for ``EditorPlugin``s and ``EditorScript``s). + /// + /// > Note: When ``delayMsec(_:)`` is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using ``delayMsec(_:)`` as part of an ``EditorPlugin`` or ``EditorScript``, it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). + /// + public static func delayMsec(_ msec: Int32) { + withUnsafePointer(to: msec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_delay_msec, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_locale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_locale") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the host OS locale as a ``String`` of the form `language_Script_COUNTRY_VARIANT@extra`. Every substring after `language` is optional and may not exist. + /// + /// - `language` - 2 or 3-letter language code, in lower case. + /// + /// - [code skip-lint]Script` - 4-letter script code, in title case. + /// + /// - `COUNTRY` - 2 or 3-letter country code, in upper case. + /// + /// - `VARIANT` - language variant, region and sort order. The variant can have any number of underscored keywords. + /// + /// - `extra` - semicolon separated list of additional key words. This may include currency, calendar, sort order and numbering system information. + /// + /// If you want only the language code and not the fully specified locale from the OS, you can use ``getLocaleLanguage()``. + /// + public static func getLocale() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_locale, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_locale_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_locale_language") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the host OS locale's 2 or 3-letter language code as a string which should be consistent on all platforms. This is equivalent to extracting the `language` part of the ``getLocale()`` string. + /// + /// This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with `fr_CA` locale, this would return `fr`. + /// + public static func getLocaleLanguage() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_locale_language, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_model_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_model_name") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the model name of the current device. + /// + /// > Note: This method is implemented on Android and iOS. Returns `"GenericDevice"` on unsupported platforms. + /// + public static func getModelName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_model_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_userfs_persistent: GDExtensionMethodBindPtr = { + let methodName = StringName("is_userfs_persistent") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the `user://` file system is persistent, that is, its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable. + public static func isUserfsPersistent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_userfs_persistent, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_is_stdout_verbose: GDExtensionMethodBindPtr = { + let methodName = StringName("is_stdout_verbose") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the engine was executed with the `--verbose` or `-v` command line argument, or if ``ProjectSettings/debug/settings/stdout/verboseStdout`` is `true`. See also ``@GlobalScope.print_verbose``. + public static func isStdoutVerbose() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_stdout_verbose, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_is_debug_build: GDExtensionMethodBindPtr = { + let methodName = StringName("is_debug_build") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the Godot binary used to run the project is a _debug_ export template, or when running in the editor. + /// + /// Returns `false` if the Godot binary used to run the project is a _release_ export template. + /// + /// > Note: To check whether the Godot binary used to run the project is an export template (debug or release), use `OS.has_feature("template")` instead. + /// + public static func isDebugBuild() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_debug_build, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_static_memory_usage: GDExtensionMethodBindPtr = { + let methodName = StringName("get_static_memory_usage") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the amount of static memory being used by the program in bytes. Only works in debug builds. + public static func getStaticMemoryUsage() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_static_memory_usage, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_static_memory_peak_usage: GDExtensionMethodBindPtr = { + let methodName = StringName("get_static_memory_peak_usage") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the maximum amount of static memory used. Only works in debug builds. + public static func getStaticMemoryPeakUsage() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_static_memory_peak_usage, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_memory_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_memory_info") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + /// Returns a ``GDictionary`` containing information about the current memory with the following entries: + /// + /// - `"physical"` - total amount of usable physical memory in bytes. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by the kernel and devices. + /// + /// - `"free"` - amount of physical memory, that can be immediately allocated without disk access or other costly operations, in bytes. The process might be able to allocate more physical memory, but this action will require moving inactive pages to disk, which can be expensive. + /// + /// - `"available"` - amount of memory that can be allocated without extending the swap file(s), in bytes. This value includes both physical memory and swap. + /// + /// - `"stack"` - size of the current thread stack in bytes. + /// + /// > Note: Each entry's value may be `-1` if it is unknown. + /// + public static func getMemoryInfo() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(method_get_memory_info, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_move_to_trash: GDExtensionMethodBindPtr = { + let methodName = StringName("move_to_trash") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2113323047)! + } + + } + + }() + + /// Moves the file or directory at the given `path` to the system's recycle bin. See also ``DirAccess/remove(path:)``. + /// + /// The method takes only global paths, so you may need to use ``ProjectSettings/globalizePath(_:)``. Do not use it for files in `res://` as it will not work in exported projects. + /// + /// Returns ``GodotError/failed`` if the file or directory cannot be found, or the system does not support this method. + /// + /// > Note: This method is implemented on Android, Linux, macOS and Windows. + /// + /// > Note: If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. + /// + public static func moveToTrash(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_move_to_trash, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_user_data_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_user_data_dir") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the absolute directory path where user data is written (the `user://` directory in Godot). The path depends on the project name and ``ProjectSettings/application/config/useCustomUserDir``. + /// + /// - On Windows, this is `%AppData%\Godot\app_userdata\[project_name]`, or `%AppData%\[custom_name]` if `use_custom_user_dir` is set. `%AppData%` expands to `%UserProfile%\AppData\Roaming`. + /// + /// - On macOS, this is `~/Library/Application Support/Godot/app_userdata/[project_name]`, or `~/Library/Application Support/[custom_name]` if `use_custom_user_dir` is set. + /// + /// - On Linux and BSD, this is `~/.local/share/godot/app_userdata/[project_name]`, or `~/.local/share/[custom_name]` if `use_custom_user_dir` is set. + /// + /// - On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration. + /// + /// - On Web, this is a virtual directory managed by the browser. + /// + /// If the project name is empty, `[project_name]` falls back to `[unnamed project]`. + /// + /// Not to be confused with ``getDataDir()``, which returns the _global_ (non-project-specific) user home directory. + /// + public static func getUserDataDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_user_data_dir, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_system_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_dir") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3073895123)! + } + + } + + }() + + /// Returns the path to commonly used folders across different platforms, as defined by `dir`. See the ``OS/SystemDir`` constants for available locations. + /// + /// > Note: This method is implemented on Android, Linux, macOS and Windows. + /// + /// > Note: Shared storage is implemented on Android and allows to differentiate between app specific and shared directories, if `sharedStorage` is `true`. Shared directories have additional restrictions on Android. + /// + public static func getSystemDir(_ dir: OS.SystemDir, sharedStorage: Bool = true) -> String { + let _result = GString () + withUnsafePointer(to: dir.rawValue) { pArg0 in + withUnsafePointer(to: sharedStorage) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_system_dir, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_config_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_config_dir") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the _global_ user configuration directory according to the operating system's standards. + /// + /// On the Linux/BSD platform, this path can be overridden by setting the `XDG_CONFIG_HOME` environment variable before starting the project. See File paths in Godot projects in the documentation for more information. See also ``getCacheDir()`` and ``getDataDir()``. + /// + /// Not to be confused with ``getUserDataDir()``, which returns the _project-specific_ user data path. + /// + public static func getConfigDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_config_dir, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_data_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_data_dir") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the _global_ user data directory according to the operating system's standards. + /// + /// On the Linux/BSD platform, this path can be overridden by setting the `XDG_DATA_HOME` environment variable before starting the project. See File paths in Godot projects in the documentation for more information. See also ``getCacheDir()`` and ``getConfigDir()``. + /// + /// Not to be confused with ``getUserDataDir()``, which returns the _project-specific_ user data path. + /// + public static func getDataDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_data_dir, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_cache_dir: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cache_dir") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the _global_ cache data directory according to the operating system's standards. + /// + /// On the Linux/BSD platform, this path can be overridden by setting the `XDG_CACHE_HOME` environment variable before starting the project. See File paths in Godot projects in the documentation for more information. See also ``getConfigDir()`` and ``getDataDir()``. + /// + /// Not to be confused with ``getUserDataDir()``, which returns the _project-specific_ user data path. + /// + public static func getCacheDir() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_cache_dir, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unique_id") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns a string that is unique to the device. + /// + /// > Note: This string may change without notice if the user reinstalls their operating system, upgrades it, or modifies their hardware. This means it should generally not be used to encrypt persistent data, as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by this method for security purposes. + /// + /// > Note: On Web, returns an empty string and generates an error, as this method cannot be implemented for security reasons. + /// + public static func getUniqueId() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_unique_id, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_keycode_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_keycode_string") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2261993717)! + } + + } + + }() + + /// Returns the given keycode as a ``String``. + /// + /// See also ``findKeycodeFromString(_:)``, ``InputEventKey/keycode``, and ``InputEventKey/getKeycodeWithModifiers()``. + /// + public static func getKeycodeString(code: Key) -> String { + let _result = GString () + withUnsafePointer(to: code.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_keycode_string, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_keycode_unicode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_keycode_unicode") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the input keycode corresponds to a Unicode character. For a list of codes, see the ``Key`` constants. + /// + public static func isKeycodeUnicode(code: Int64) -> Bool { + var _result: Bool = false + withUnsafePointer(to: code) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_is_keycode_unicode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_find_keycode_from_string: GDExtensionMethodBindPtr = { + let methodName = StringName("find_keycode_from_string") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1084858572)! + } + + } + + }() + + /// Finds the keycode for the given string. The returned values are equivalent to the ``Key`` constants. + /// + /// See also ``getKeycodeString(code:)``. + /// + public static func findKeycodeFromString(_ string: String) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + let string = GString(string) + withUnsafePointer(to: string.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_find_keycode_from_string, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_set_use_file_access_save_and_swap: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_file_access_save_and_swap") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `enabled` is `true`, when opening a file for writing, a temporary file is used in its place. When closed, it is automatically applied to the target file. + /// + /// This can useful when files may be opened by other applications, such as antiviruses, text editors, or even the Godot editor itself. + /// + public static func setUseFileAccessSaveAndSwap(enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_use_file_access_save_and_swap, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_thread_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_thread_name") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Assigns the given name to the current thread. Returns ``GodotError/errUnavailable`` if unavailable on the current platform. + public static func setThreadName(_ name: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_thread_name, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_thread_caller_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_thread_caller_id") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. + /// + /// > Note: Thread IDs are not deterministic and may be reused across application restarts. + /// + public static func getThreadCallerId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_thread_caller_id, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_main_thread_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_main_thread_id") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ID of the main thread. See ``getThreadCallerId()``. + /// + /// > Note: Thread IDs are not deterministic and may be reused across application restarts. + /// + public static func getMainThreadId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_main_thread_id, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_has_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("has_feature") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the Feature Tags documentation for more details. + /// + /// > Note: Tag names are case-sensitive. + /// + /// > Note: On the Web platform, one of the following additional tags is defined to indicate the host platform: `web_android`, `web_ios`, `web_linuxbsd`, `web_macos`, or `web_windows`. + /// + public static func hasFeature(tagName: String) -> Bool { + var _result: Bool = false + let tagName = GString(tagName) + withUnsafePointer(to: tagName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_feature, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_sandboxed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sandboxed") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the application is running in the sandbox. + /// + /// > Note: This method is only implemented on macOS and Linux. + /// + public static func isSandboxed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_sandboxed, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_request_permission: GDExtensionMethodBindPtr = { + let methodName = StringName("request_permission") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Requests permission from the OS for the given `name`. Returns `true` if the permission has been successfully granted. + /// + /// > Note: This method is currently only implemented on Android, to specifically request permission for `"RECORD_AUDIO"` by `AudioDriverOpenSL`. + /// + public static func requestPermission(name: String) -> Bool { + var _result: Bool = false + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_request_permission, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_request_permissions: GDExtensionMethodBindPtr = { + let methodName = StringName("request_permissions") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Requests _dangerous_ permissions from the OS. Returns `true` if permissions have been successfully granted. + /// + /// > Note: This method is only implemented on Android. Normal permissions are automatically granted at install time in Android applications. + /// + public static func requestPermissions() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_request_permissions, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_granted_permissions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_granted_permissions") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// On Android devices: Returns the list of dangerous permissions that have been granted. + /// + /// On macOS: Returns the list of user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission. + /// + public static func getGrantedPermissions() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(method_get_granted_permissions, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_revoke_granted_permissions: GDExtensionMethodBindPtr = { + let methodName = StringName("revoke_granted_permissions") + return withUnsafePointer(to: &OS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// On macOS (sandboxed applications only), this function clears list of user selected folders accessible to the application. + public static func revokeGrantedPermissions() { + gi.object_method_bind_ptrcall(method_revoke_granted_permissions, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Object.swift b/Sources/SwiftGodot/Generated/Api/Object.swift new file mode 100644 index 000000000..f78066cd1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Object.swift @@ -0,0 +1,1556 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for all other classes in the engine. +/// +/// An advanced ``Variant`` type. All classes in the engine inherit from Object. Each class may define new properties, methods or signals, which are available to all inheriting classes. For example, a ``Sprite2D`` instance is able to call ``Node/addChild(node:forceReadableName:`internal`:)`` because it inherits from ``Node``. +/// +/// You can create new instances, using `Object.new()` in GDScript, or `new GodotObject` in C#. +/// +/// To delete an Object instance, call ``free()``. This is necessary for most classes inheriting Object, because they do not manage memory on their own, and will otherwise cause memory leaks when no longer in use. There are a few classes that perform memory management. For example, ``RefCounted`` (and by extension ``Resource``) deletes itself when no longer referenced, and ``Node`` deletes its children when freed. +/// +/// Objects can have a ``Script`` attached to them. Once the ``Script`` is instantiated, it effectively acts as an extension to the base class, allowing it to define and inherit new properties, methods and signals. +/// +/// Inside a ``Script``, ``_getPropertyList()`` may be overridden to customize properties in several ways. This allows them to be available to the editor, display as lists of options, sub-divide into groups, save on disk, etc. Scripting languages offer easier ways to customize properties, such as with the [annotation @GDScript.@export] annotation. +/// +/// Godot is very dynamic. An object's script, and therefore its properties, methods and signals, can be changed at run-time. Because of this, there can be occasions where, for example, a property required by a method may not exist. To prevent run-time errors, see methods such as ``set(property:value:)``, ``get(property:)``, ``call(method:)``, ``hasMethod(_:)``, ``hasSignal(_:)``, etc. Note that these methods are **much** slower than direct references. +/// +/// In GDScript, you can also check if a given property, method, or signal name exists in an object with the `in` operator: +/// +/// Notifications are integer constants commonly sent and received by objects. For example, on every rendered frame, the ``SceneTree`` notifies nodes inside the tree with a ``Node/notificationProcess``. The nodes receive it and may call ``Node/_process(delta:)`` to update. To make use of notifications, see ``notification(what:reversed:)`` and ``_notification()``. +/// +/// Lastly, every object can also contain metadata (data about data). ``setMeta(name:value:)`` can be useful to store information that the object itself does not depend on. To keep your code clean, making excessive use of metadata is discouraged. +/// +/// > Note: Unlike references to a ``RefCounted``, references to an object stored in a variable can become invalid without being set to `null`. To check if an object has been deleted, do _not_ compare it against `null`. Instead, use ``@GlobalScope.is_instance_valid``. It's also recommended to inherit from ``RefCounted`` for classes storing data instead of ``Object``. +/// +/// > Note: The `script` is not exposed like most properties. To set or get an object's ``Script`` in code, use ``setScript(_:)`` and ``getScript()``, respectively. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``scriptChanged`` +/// - ``propertyListChanged`` +open class Object: Wrapped { + override open class var godotClassName: StringName { "Object" } + public struct ConnectFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Deferred connections trigger their ``Callable``s on idle time (at the end of the frame), rather than instantly. + public static let deferred = ConnectFlags (rawValue: 1) + /// Persisting connections are stored when the object is serialized (such as when using ``PackedScene/pack(path:)``). In the editor, connections created through the Node dock are always persisting. + public static let persist = ConnectFlags (rawValue: 2) + /// One-shot connections disconnect themselves after emission. + public static let oneShot = ConnectFlags (rawValue: 4) + /// Reference-counted connections can be assigned to the same ``Callable`` multiple times. Each disconnection decreases the internal counter. The signal fully disconnects only when the counter reaches 0. + public static let referenceCounted = ConnectFlags (rawValue: 8) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.deferred) { result += "deferred, " } + if self.contains (.persist) { result += "persist, " } + if self.contains (.oneShot) { result += "oneShot, " } + if self.contains (.referenceCounted) { result += "referenceCounted, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + /* Constants */ + /// Notification received when the object is initialized, before its script is attached. Used internally. + public static let notificationPostinitialize = 0 + /// Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages. + public static let notificationPredelete = 1 + /// Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived. + public static let notificationExtensionReloaded = 2 + /* Methods */ + static var method_get_class: GDExtensionMethodBindPtr = { + let methodName = StringName("get_class") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the object's built-in class name, as a ``String``. See also ``isClass(_:)``. + /// + /// > Note: This method ignores `class_name` declarations. If this object's script has defined a `class_name`, the base, built-in class name is returned instead. + /// + public final func getClass() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Object.method_get_class, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_class: GDExtensionMethodBindPtr = { + let methodName = StringName("is_class") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the object inherits from the given `class`. See also ``getClass()``. + /// + /// > Note: This method ignores `class_name` declarations in the object's script. + /// + public final func isClass(_ `class`: String) -> Bool { + var _result: Bool = false + let `class` = GString(`class`) + withUnsafePointer(to: `class`.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_is_class, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set: GDExtensionMethodBindPtr = { + let methodName = StringName("set") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Assigns `value` to the given `property`. If the property does not exist or the given `value`'s type doesn't match, nothing happens. + /// + /// > Note: In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func set(property: StringName, value: Variant?) { + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get: GDExtensionMethodBindPtr = { + let methodName = StringName("get") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Returns the ``Variant`` value of the given `property`. If the `property` does not exist, this method returns `null`. + /// + /// > Note: In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func get(property: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_get, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_set_indexed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indexed") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3500910842)! + } + + } + + }() + + /// Assigns a new `value` to the property identified by the `propertyPath`. The path should be a ``NodePath`` relative to this object, and can use the colon character (`:`) to access nested properties. + /// + /// > Note: In C#, `propertyPath` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func setIndexed(propertyPath: NodePath, value: Variant?) { + withUnsafePointer(to: propertyPath.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_indexed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_indexed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_indexed") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4006125091)! + } + + } + + }() + + /// Gets the object's property indexed by the given `propertyPath`. The path should be a ``NodePath`` relative to the current object and can use the colon character (`:`) to access nested properties. + /// + /// **Examples:** `"position:x"` or `"material:next_pass:blend_mode"`. + /// + /// > Note: In C#, `propertyPath` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + /// > Note: This method does not support actual paths to nodes in the ``SceneTree``, only sub-property paths. In the context of nodes, use ``Node/getNodeAndResource(path:)`` instead. + /// + public final func getIndexed(propertyPath: NodePath) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: propertyPath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_get_indexed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_property_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_property_list") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the object's property list as an ``GArray`` of dictionaries. Each ``GDictionary`` contains the following entries: + /// + /// - `name` is the property's name, as a ``String``; + /// + /// - `class_name` is an empty ``StringName``, unless the property is ``Variant.GType/object`` and it inherits from a class; + /// + /// - `type` is the property's type, as an integer (see ``Variant.GType``); + /// + /// - `hint` is _how_ the property is meant to be edited (see ``PropertyHint``); + /// + /// - `hint_string` depends on the hint (see ``PropertyHint``); + /// + /// - `usage` is a combination of ``PropertyUsageFlags``. + /// + /// > Note: In GDScript, all class members are treated as properties. In C# and GDExtension, it may be necessary to explicitly mark class members as Godot properties using decorators or attributes. + /// + public final func getPropertyList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Object.method_get_property_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_method_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_method_list") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns this object's methods and their signatures as an ``GArray`` of dictionaries. Each ``GDictionary`` contains the following entries: + /// + /// - `name` is the name of the method, as a ``String``; + /// + /// - `args` is an ``GArray`` of dictionaries representing the arguments; + /// + /// - `default_args` is the default arguments as an ``GArray`` of variants; + /// + /// - `flags` is a combination of ``MethodFlags``; + /// + /// - `id` is the method's internal identifier integer; + /// + /// - `return` is the returned value, as a ``GDictionary``; + /// + /// > Note: The dictionaries of `args` and `return` are formatted identically to the results of ``getPropertyList()``, although not all entries are used. + /// + public final func getMethodList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Object.method_get_method_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_property_can_revert: GDExtensionMethodBindPtr = { + let methodName = StringName("property_can_revert") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the given `property` has a custom default value. Use ``propertyGetRevert(property:)`` to get the `property`'s default value. + /// + /// > Note: This method is used by the Inspector dock to display a revert icon. The object must implement ``_propertyCanRevert()`` to customize the default value. If ``_propertyCanRevert()`` is not implemented, this method returns `false`. + /// + public final func propertyCanRevert(property: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_property_can_revert, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_property_get_revert: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_revert") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Returns the custom default value of the given `property`. Use ``propertyCanRevert(property:)`` to check if the `property` has a custom default value. + /// + /// > Note: This method is used by the Inspector dock to display a revert icon. The object must implement ``_propertyGetRevert()`` to customize the default value. If ``_propertyGetRevert()`` is not implemented, this method returns `null`. + /// + public final func propertyGetRevert(property: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_property_get_revert, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_notification: GDExtensionMethodBindPtr = { + let methodName = StringName("notification") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4023243586)! + } + + } + + }() + + /// Sends the given `what` notification to all classes inherited by the object, triggering calls to ``_notification()``, starting from the highest ancestor (the ``Object`` class) and going down to the object's script. + /// + /// If `reversed` is `true`, the call order is reversed. + /// + public final func notification(what: Int32, reversed: Bool = false) { + withUnsafePointer(to: what) { pArg0 in + withUnsafePointer(to: reversed) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_notification, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_to_string: GDExtensionMethodBindPtr = { + let methodName = StringName("to_string") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Returns a ``String`` representing the object. Defaults to `""`. Override ``_toString()`` to customize the string representation of the object. + public final func toString() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Object.method_to_string, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_id") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the object's unique instance ID. This ID can be saved in ``EncodedObjectAsID``, and can be used to retrieve this object instance with ``@GlobalScope.instance_from_id``. + /// + /// > Note: This ID is only useful during the current session. It won't correspond to a similar object if the ID is sent over a network, or loaded from a file at a later time. + /// + public final func getInstanceId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(Object.method_get_instance_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_script: GDExtensionMethodBindPtr = { + let methodName = StringName("set_script") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1114965689)! + } + + } + + }() + + /// Attaches `script` to the object, and instantiates it. As a result, the script's ``_init()`` is called. A ``Script`` is used to extend the object's functionality. + /// + /// If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept. + /// + public final func setScript(_ script: Variant?) { + withUnsafePointer(to: script.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_script, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_script: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214101251)! + } + + } + + }() + + /// Returns the object's ``Script`` instance, or `null` if no script is attached. + public final func getScript() -> Variant? { + var _result: Variant.ContentType = Variant.zero + gi.object_method_bind_ptrcall(Object.method_get_script, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Variant(takingOver: _result) + } + + fileprivate static var method_set_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("set_meta") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Adds or changes the entry `name` inside the object's metadata. The metadata `value` can be any ``Variant``, although some types cannot be serialized correctly. + /// + /// If `value` is `null`, the entry is removed. This is the equivalent of using ``removeMeta(name:)``. See also ``hasMeta(name:)`` and ``getMeta(name:`default`:)``. + /// + /// > Note: A metadata's name must be a valid identifier as per ``StringName/isValidIdentifier()`` method. + /// + /// > Note: Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + /// + public final func setMeta(name: StringName, value: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_meta") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the given entry `name` from the object's metadata. See also ``hasMeta(name:)``, ``getMeta(name:`default`:)`` and ``setMeta(name:value:)``. + /// + /// > Note: A metadata's name must be a valid identifier as per ``StringName/isValidIdentifier()`` method. + /// + /// > Note: Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + /// + public final func removeMeta(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_remove_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("get_meta") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3990617847)! + } + + } + + }() + + /// Returns the object's metadata value for the given entry `name`. If the entry does not exist, returns `default`. If `default` is `null`, an error is also generated. + /// + /// > Note: A metadata's name must be a valid identifier as per ``StringName/isValidIdentifier()`` method. + /// + /// > Note: Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + /// + public final func getMeta(name: StringName, `default`: Variant?) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: `default`.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_get_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_has_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("has_meta") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if a metadata entry is found with the given `name`. See also ``getMeta(name:`default`:)``, ``setMeta(name:value:)`` and ``removeMeta(name:)``. + /// + /// > Note: A metadata's name must be a valid identifier as per ``StringName/isValidIdentifier()`` method. + /// + /// > Note: Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + /// + public final func hasMeta(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_has_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_meta_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_meta_list") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the object's metadata entry names as a ``PackedStringArray``. + public final func getMetaList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Object.method_get_meta_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_add_user_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("add_user_signal") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 85656714)! + } + + } + + }() + + /// Adds a user-defined `signal`. Optional arguments for the signal can be added as an ``GArray`` of dictionaries, each defining a `name` ``String`` and a `type` integer (see ``Variant.GType``). See also ``hasUserSignal(_:)`` and ``removeUserSignal(_:)``. + /// + public final func addUserSignal(_ signal: String, arguments: GArray = GArray ()) { + let signal = GString(signal) + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: arguments.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_add_user_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_user_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("has_user_signal") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the given user-defined `signal` name exists. Only signals added with ``addUserSignal(_:arguments:)`` are included. See also ``removeUserSignal(_:)``. + public final func hasUserSignal(_ signal: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_has_user_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_user_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_user_signal") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the given user signal `signal` from the object. See also ``addUserSignal(_:arguments:)`` and ``hasUserSignal(_:)``. + public final func removeUserSignal(_ signal: StringName) { + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_remove_user_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_emit_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("emit_signal") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4047867050)! + } + + } + + }() + + /// Emits the given `signal` by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see ``addUserSignal(_:arguments:)``). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. + /// + /// Returns ``GodotError/errUnavailable`` if `signal` does not exist or the parameters are invalid. + /// + /// > Note: In C#, `signal` must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the `SignalName` class to avoid allocating a new ``StringName`` on each call. + /// + @discardableResult /* discardable per discardableList: Object, emit_signal */ + public final func emitSignal(_ signal: StringName, _ arguments: Variant?...) -> GodotError { + var _result: Variant.ContentType = Variant.zero + let signal = Variant(signal) + withUnsafePointer(to: signal.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Object.method_emit_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func call(method: StringName, _ arguments: Variant?...) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Object.method_call, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + /// > Note: If you're looking to delay the function call by a frame, refer to the [signal SceneTree.process_frame] and [signal SceneTree.physics_frame] signals. + /// + public final func callDeferred(method: StringName, _ arguments: Variant?...) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg0 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_call(Object.method_call_deferred, UnsafeMutableRawPointer(mutating: handle), pArgs, 1, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 1 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func setDeferred(property: StringName, value: Variant?) { + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_deferred, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_callv: GDExtensionMethodBindPtr = { + let methodName = StringName("callv") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1260104456)! + } + + } + + }() + + /// Calls the `method` on the object and returns the result. Unlike ``call(method:)``, this method expects all parameters to be contained inside `argArray`. + /// + /// > Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func callv(method: StringName, argArray: GArray) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: argArray.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_callv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_has_method: GDExtensionMethodBindPtr = { + let methodName = StringName("has_method") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the given `method` name exists in the object. + /// + /// > Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func hasMethod(_ method: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_has_method, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_method_argument_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_method_argument_count") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2458036349)! + } + + } + + }() + + /// Returns the number of arguments of the given `method` by name. + /// + /// > Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func getMethodArgumentCount(method: StringName) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: method.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_get_method_argument_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("has_signal") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the given `signal` name exists in the object. + /// + /// > Note: In C#, `signal` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `SignalName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func hasSignal(_ signal: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_has_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_signal_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_signal_list") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the list of existing signals as an ``GArray`` of dictionaries. + /// + /// > Note: Due of the implementation, each ``GDictionary`` is formatted very similarly to the returned values of ``getMethodList()``. + /// + public final func getSignalList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Object.method_get_signal_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_signal_connection_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_signal_connection_list") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3147814860)! + } + + } + + }() + + /// Returns an ``GArray`` of connections for the given `signal` name. Each connection is represented as a ``GDictionary`` that contains three entries: + /// + /// - [code skip-lint]signal` is a reference to the ``Signal``; + /// + /// - `callable` is a reference to the connected ``Callable``; + /// + /// - `flags` is a combination of ``Object/ConnectFlags``. + /// + public final func getSignalConnectionList(signal: StringName) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_get_signal_connection_list, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_get_incoming_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_incoming_connections") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an ``GArray`` of signal connections received by this object. Each connection is represented as a ``GDictionary`` that contains three entries: + /// + /// - `signal` is a reference to the ``Signal``; + /// + /// - `callable` is a reference to the ``Callable``; + /// + /// - `flags` is a combination of ``Object/ConnectFlags``. + /// + public final func getIncomingConnections() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Object.method_get_incoming_connections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_connect: GDExtensionMethodBindPtr = { + let methodName = StringName("connect") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1518946055)! + } + + } + + }() + + /// Connects a `signal` by name to a `callable`. Optional `flags` can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// A signal can only be connected once to the same ``Callable``. If the signal is already connected, this method returns ``GodotError/errInvalidParameter`` and pushes an error message, unless the signal is connected with ``ConnectFlags/referenceCounted``. To prevent this, use ``isConnected(signal:callable:)`` first to check for existing connections. + /// + /// If the `callable`'s object is freed, the connection will be lost. + /// + /// **Examples with recommended syntax:** + /// + /// Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach. + /// + /// **[code skip-lint]Object.connect()` or [code skip-lint]Signal.connect()`?** + /// + /// As seen above, the recommended method to connect signals is not ``Object/connect(signal:callable:flags:)``. The code block below shows the four options for connecting signals, using either this legacy method or the recommended ``Signal/connect(callable:flags:)``, and using either an implicit ``Callable`` or a manually defined one. + /// + /// While all options have the same outcome (`button`'s [signal BaseButton.button_down] signal will be connected to `_on_button_down`), **option 3** offers the best validation: it will print a compile-time error if either the `button_down` ``Signal`` or the `_on_button_down` ``Callable`` are not defined. On the other hand, **option 2** only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if `"button_down"` doesn't correspond to a signal, or if `"_on_button_down"` is not a registered method in the object `self`. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. + /// + /// **Binding and passing parameters:** + /// + /// The syntax to bind parameters is through ``Callable/bind()``, which returns a copy of the ``Callable`` with its parameters bound. + /// + /// When calling ``emitSignal(_:)`` or ``Signal/emit()``, the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. + /// + public final func connect(signal: StringName, callable: Callable, flags: UInt32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: flags) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(Object.method_connect, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_disconnect: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1874754934)! + } + + } + + }() + + /// Disconnects a `signal` by name from a given `callable`. If the connection does not exist, generates an error. Use ``isConnected(signal:callable:)`` to make sure that the connection exists. + public final func disconnect(signal: StringName, callable: Callable) { + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_disconnect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_is_connected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_connected") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 768136979)! + } + + } + + }() + + /// Returns `true` if a connection exists between the given `signal` name and `callable`. + /// + /// > Note: In C#, `signal` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `SignalName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func isConnected(signal: StringName, callable: Callable) -> Bool { + var _result: Bool = false + withUnsafePointer(to: signal.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_is_connected, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_block_signals: GDExtensionMethodBindPtr = { + let methodName = StringName("set_block_signals") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, the object becomes unable to emit signals. As such, ``emitSignal(_:)`` and signal connections will not work, until it is set to `false`. + public final func setBlockSignals(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_block_signals, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_blocking_signals: GDExtensionMethodBindPtr = { + let methodName = StringName("is_blocking_signals") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the object is blocking its signals from being emitted. See ``setBlockSignals(enable:)``. + public final func isBlockingSignals() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Object.method_is_blocking_signals, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_notify_property_list_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("notify_property_list_changed") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Emits the [signal property_list_changed] signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated. + public final func notifyPropertyListChanged() { + gi.object_method_bind_ptrcall(Object.method_notify_property_list_changed, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_message_translation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_message_translation") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, allows the object to translate messages with ``tr(message:context:)`` and ``trN(message:pluralMessage:n:context:)``. Enabled by default. See also ``canTranslateMessages()``. + public final func setMessageTranslation(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Object.method_set_message_translation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_can_translate_messages: GDExtensionMethodBindPtr = { + let methodName = StringName("can_translate_messages") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the object is allowed to translate messages with ``tr(message:context:)`` and ``trN(message:pluralMessage:n:context:)``. See also ``setMessageTranslation(enable:)``. + public final func canTranslateMessages() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Object.method_can_translate_messages, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_tr: GDExtensionMethodBindPtr = { + let methodName = StringName("tr") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2475554935)! + } + + } + + }() + + /// Translates a `message`, using the translation catalogs configured in the Project Settings. Further `context` can be specified to help with the translation. Note that most ``Control`` nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. + /// + /// If ``canTranslateMessages()`` is `false`, or no translation is available, this method returns the `message` without changes. See ``setMessageTranslation(enable:)``. + /// + /// For detailed examples, see Internationalizing games. + /// + /// > Note: This method can't be used without an ``Object`` instance, as it requires the ``canTranslateMessages()`` method. To translate strings in a static context, use ``TranslationServer/translate(message:context:)``. + /// + public final func tr(message: StringName, context: StringName = StringName ("")) -> String { + let _result = GString () + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: context.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Object.method_tr, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_tr_n: GDExtensionMethodBindPtr = { + let methodName = StringName("tr_n") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4021311862)! + } + + } + + }() + + /// Translates a `message` or `pluralMessage`, using the translation catalogs configured in the Project Settings. Further `context` can be specified to help with the translation. + /// + /// If ``canTranslateMessages()`` is `false`, or no translation is available, this method returns `message` or `pluralMessage`, without changes. See ``setMessageTranslation(enable:)``. + /// + /// The `n` is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. + /// + /// For detailed examples, see Localization using gettext. + /// + /// > Note: Negative and float numbers may not properly apply to some countable subjects. It's recommended to handle these cases with ``tr(message:context:)``. + /// + /// > Note: This method can't be used without an ``Object`` instance, as it requires the ``canTranslateMessages()`` method. To translate strings in a static context, use ``TranslationServer/translatePlural(message:pluralMessage:n:context:)``. + /// + public final func trN(message: StringName, pluralMessage: StringName, n: Int32, context: StringName = StringName ("")) -> String { + let _result = GString () + withUnsafePointer(to: message.content) { pArg0 in + withUnsafePointer(to: pluralMessage.content) { pArg1 in + withUnsafePointer(to: n) { pArg2 in + withUnsafePointer(to: context.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(Object.method_tr_n, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_queued_for_deletion: GDExtensionMethodBindPtr = { + let methodName = StringName("is_queued_for_deletion") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the ``Node/queueFree()`` method was called for the object. + public final func isQueuedForDeletion() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Object.method_is_queued_for_deletion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_cancel_free: GDExtensionMethodBindPtr = { + let methodName = StringName("cancel_free") + return withUnsafePointer(to: &Object.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// If this method is called during ``notificationPredelete``, this object will reject being freed and will remain allocated. This is mostly an internal function used for error handling to avoid the user from freeing objects when they are not intended to. + public final func cancelFree() { + gi.object_method_bind_ptrcall(Object.method_cancel_free, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + // Signals + /// Emitted when the object's script is changed. + /// + /// > Note: When this signal is emitted, the new script is not initialized yet. If you need to access the new script, defer connections to this signal with ``ConnectFlags/deferred``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.scriptChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var scriptChanged: SimpleSignal { SimpleSignal (target: self, signalName: "script_changed") } + + /// Emitted when ``notifyPropertyListChanged()`` is called. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.propertyListChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var propertyListChanged: SimpleSignal { SimpleSignal (target: self, signalName: "property_list_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Occluder3D.swift b/Sources/SwiftGodot/Generated/Api/Occluder3D.swift new file mode 100644 index 000000000..71c3b38b8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Occluder3D.swift @@ -0,0 +1,67 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Occluder shape resource for use with occlusion culling in ``OccluderInstance3D``. +/// +/// ``Occluder3D`` stores an occluder shape that can be used by the engine's occlusion culling system. +/// +/// See ``OccluderInstance3D``'s documentation for instructions on setting up occlusion culling. +/// +open class Occluder3D: Resource { + override open class var godotClassName: StringName { "Occluder3D" } + /* Methods */ + fileprivate static var method_get_vertices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertices") + return withUnsafePointer(to: &Occluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 497664490)! + } + + } + + }() + + /// Returns the occluder shape's vertex positions. + public final func getVertices() -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + gi.object_method_bind_ptrcall(Occluder3D.method_get_vertices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_indices: GDExtensionMethodBindPtr = { + let methodName = StringName("get_indices") + return withUnsafePointer(to: &Occluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + /// Returns the occluder shape's vertex indices. + public final func getIndices() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(Occluder3D.method_get_indices, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OccluderInstance3D.swift b/Sources/SwiftGodot/Generated/Api/OccluderInstance3D.swift new file mode 100644 index 000000000..204696422 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OccluderInstance3D.swift @@ -0,0 +1,281 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides occlusion culling for 3D nodes, which improves performance in closed areas. +/// +/// Occlusion culling can improve rendering performance in closed/semi-open areas by hiding geometry that is occluded by other objects. +/// +/// The occlusion culling system is mostly static. ``OccluderInstance3D``s can be moved or hidden at run-time, but doing so will trigger a background recomputation that can take several frames. It is recommended to only move ``OccluderInstance3D``s sporadically (e.g. for procedural generation purposes), rather than doing so every frame. +/// +/// The occlusion culling system works by rendering the occluders on the CPU in parallel using Embree, drawing the result to a low-resolution buffer then using this to cull 3D nodes individually. In the 3D editor, you can preview the occlusion culling buffer by choosing **Perspective > Debug Advanced... > Occlusion Culling Buffer** in the top-left corner of the 3D viewport. The occlusion culling buffer quality can be adjusted in the Project Settings. +/// +/// **Baking:** Select an ``OccluderInstance3D`` node, then use the **Bake Occluders** button at the top of the 3D editor. Only opaque materials will be taken into account; transparent materials (alpha-blended or alpha-tested) will be ignored by the occluder generation. +/// +/// > Note: Occlusion culling is only effective if ``ProjectSettings/rendering/occlusionCulling/useOcclusionCulling`` is `true`. Enabling occlusion culling has a cost on the CPU. Only enable occlusion culling if you actually plan to use it. Large open scenes with few or no objects blocking the view will generally not benefit much from occlusion culling. Large open scenes generally benefit more from mesh LOD and visibility ranges (``GeometryInstance3D/visibilityRangeBegin`` and ``GeometryInstance3D/visibilityRangeEnd``) compared to occlusion culling. +/// +/// > Note: Due to memory constraints, occlusion culling is not supported by default in Web export templates. It can be enabled by compiling custom Web export templates with `module_raycast_enabled=yes`. +/// +open class OccluderInstance3D: VisualInstance3D { + override open class var godotClassName: StringName { "OccluderInstance3D" } + + /* Properties */ + + /// The occluder resource for this ``OccluderInstance3D``. You can generate an occluder resource by selecting an ``OccluderInstance3D`` node then using the **Bake Occluders** button at the top of the editor. + /// + /// You can also draw your own 2D occluder polygon by adding a new ``PolygonOccluder3D`` resource to the ``occluder`` property in the Inspector. + /// + /// Alternatively, you can select a primitive occluder to use: ``QuadOccluder3D``, ``BoxOccluder3D`` or ``SphereOccluder3D``. + /// + final public var occluder: Occluder3D? { + get { + return get_occluder () + } + + set { + set_occluder (newValue) + } + + } + + /// The visual layers to account for when baking for occluders. Only ``MeshInstance3D``s whose ``VisualInstance3D/layers`` match with this ``bakeMask`` will be included in the generated occluder mesh. By default, all objects with _opaque_ materials are taken into account for the occluder baking. + /// + /// To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in ``bakeMask``. + /// + final public var bakeMask: UInt32 { + get { + return get_bake_mask () + } + + set { + set_bake_mask (newValue) + } + + } + + /// The simplification distance to use for simplifying the generated occluder polygon (in 3D units). Higher values result in a less detailed occluder mesh, which improves performance but reduces culling accuracy. + /// + /// The occluder geometry is rendered on the CPU, so it is important to keep its geometry as simple as possible. Since the buffer is rendered at a low resolution, less detailed occluder meshes generally still work well. The default value is fairly aggressive, so you may have to decrease it if you run into false negatives (objects being occluded even though they are visible by the camera). A value of `0.01` will act conservatively, and will keep geometry _perceptually_ unaffected in the occlusion culling buffer. Depending on the scene, a value of `0.01` may still simplify the mesh noticeably compared to disabling simplification entirely. + /// + /// Setting this to `0.0` disables simplification entirely, but vertices in the exact same position will still be merged. The mesh will also be re-indexed to reduce both the number of vertices and indices. + /// + /// > Note: This uses the meshoptimizer library under the hood, similar to LOD generation. + /// + final public var bakeSimplificationDistance: Double { + get { + return get_bake_simplification_distance () + } + + set { + set_bake_simplification_distance (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_bake_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_mask") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderInstance3D.method_set_bake_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mask") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(OccluderInstance3D.method_get_bake_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bake_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_mask_value") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``bakeMask``, given a `layerNumber` between 1 and 32. + public final func setBakeMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OccluderInstance3D.method_set_bake_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bake_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_mask_value") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``bakeMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getBakeMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderInstance3D.method_get_bake_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_bake_simplification_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bake_simplification_distance") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bake_simplification_distance(_ simplificationDistance: Double) { + withUnsafePointer(to: simplificationDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderInstance3D.method_set_bake_simplification_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bake_simplification_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bake_simplification_distance") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bake_simplification_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OccluderInstance3D.method_get_bake_simplification_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_occluder: GDExtensionMethodBindPtr = { + let methodName = StringName("set_occluder") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1664878165)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_occluder(_ occluder: Occluder3D?) { + withUnsafePointer(to: occluder?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderInstance3D.method_set_occluder, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_occluder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_occluder") + return withUnsafePointer(to: &OccluderInstance3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1696836198)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_occluder() -> Occluder3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(OccluderInstance3D.method_get_occluder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OccluderPolygon2D.swift b/Sources/SwiftGodot/Generated/Api/OccluderPolygon2D.swift new file mode 100644 index 000000000..04c65a34b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OccluderPolygon2D.swift @@ -0,0 +1,218 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Defines a 2D polygon for LightOccluder2D. +/// +/// Editor facility that helps you draw a 2D polygon used as resource for ``LightOccluder2D``. +open class OccluderPolygon2D: Resource { + override open class var godotClassName: StringName { "OccluderPolygon2D" } + public enum CullMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Culling is disabled. See ``cullMode``. + case disabled = 0 // CULL_DISABLED + /// Culling is performed in the clockwise direction. See ``cullMode``. + case clockwise = 1 // CULL_CLOCKWISE + /// Culling is performed in the counterclockwise direction. See ``cullMode``. + case counterClockwise = 2 // CULL_COUNTER_CLOCKWISE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .clockwise: return ".clockwise" + case .counterClockwise: return ".counterClockwise" + } + + } + + } + + + /* Properties */ + + /// If `true`, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. + final public var closed: Bool { + get { + return is_closed () + } + + set { + set_closed (newValue) + } + + } + + /// The culling mode to use. + final public var cullMode: OccluderPolygon2D.CullMode { + get { + return get_cull_mode () + } + + set { + set_cull_mode (newValue) + } + + } + + /// A ``Vector2`` array with the index for polygon's vertices positions. + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_closed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_closed") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_closed(_ closed: Bool) { + withUnsafePointer(to: closed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_set_closed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_closed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_closed") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_closed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_is_closed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mode") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3500863002)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mode(_ cullMode: OccluderPolygon2D.CullMode) { + withUnsafePointer(to: cullMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_set_cull_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mode") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 33931036)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mode() -> OccluderPolygon2D.CullMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_get_cull_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OccluderPolygon2D.CullMode (rawValue: _result)! + } + + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &OccluderPolygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(OccluderPolygon2D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OfflineMultiplayerPeer.swift b/Sources/SwiftGodot/Generated/Api/OfflineMultiplayerPeer.swift new file mode 100644 index 000000000..e8f7b0438 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OfflineMultiplayerPeer.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``MultiplayerPeer`` which is always connected and acts as a server. +/// +/// This is the default ``MultiplayerAPI/multiplayerPeer`` for the ``Node/multiplayer``. It mimics the behavior of a server with no peers connected. +/// +/// This means that the ``SceneTree`` will act as the multiplayer authority by default. Calls to ``MultiplayerAPI/isServer()`` will return `true`, and calls to ``MultiplayerAPI/getUniqueId()`` will return ``MultiplayerPeer/targetPeerServer``. +/// +open class OfflineMultiplayerPeer: MultiplayerPeer { + override open class var godotClassName: StringName { "OfflineMultiplayerPeer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/OggPacketSequence.swift b/Sources/SwiftGodot/Generated/Api/OggPacketSequence.swift new file mode 100644 index 000000000..6e10e72a1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OggPacketSequence.swift @@ -0,0 +1,217 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A sequence of Ogg packets. +/// +/// A sequence of Ogg packets. +open class OggPacketSequence: Resource { + override open class var godotClassName: StringName { "OggPacketSequence" } + + /* Properties */ + + /// Contains the raw packets that make up this OggPacketSequence. + final public var packetData: VariantCollection { + get { + return get_packet_data () + } + + set { + set_packet_data (newValue) + } + + } + + /// Contains the granule positions for each page in this packet sequence. + final public var granulePositions: PackedInt64Array { + get { + return get_packet_granule_positions () + } + + set { + set_packet_granule_positions (newValue) + } + + } + + /// Holds sample rate information about this sequence. Must be set by another class that actually understands the codec. + final public var samplingRate: Double { + get { + return get_sampling_rate () + } + + set { + set_sampling_rate (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_packet_data: GDExtensionMethodBindPtr = { + let methodName = StringName("set_packet_data") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_packet_data(_ packetData: VariantCollection) { + withUnsafePointer(to: packetData.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OggPacketSequence.method_set_packet_data, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_packet_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_data") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_packet_data() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(OggPacketSequence.method_get_packet_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_packet_granule_positions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_packet_granule_positions") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3709968205)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_packet_granule_positions(_ granulePositions: PackedInt64Array) { + withUnsafePointer(to: granulePositions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OggPacketSequence.method_set_packet_granule_positions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_packet_granule_positions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_granule_positions") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 235988956)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_packet_granule_positions() -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + gi.object_method_bind_ptrcall(OggPacketSequence.method_get_packet_granule_positions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_sampling_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sampling_rate") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sampling_rate(_ samplingRate: Double) { + withUnsafePointer(to: samplingRate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OggPacketSequence.method_set_sampling_rate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sampling_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sampling_rate") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sampling_rate() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OggPacketSequence.method_get_sampling_rate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_length") + return withUnsafePointer(to: &OggPacketSequence.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// The length of this stream, in seconds. + public final func getLength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OggPacketSequence.method_get_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OggPacketSequencePlayback.swift b/Sources/SwiftGodot/Generated/Api/OggPacketSequencePlayback.swift new file mode 100644 index 000000000..1e57f33d6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OggPacketSequencePlayback.swift @@ -0,0 +1,24 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class OggPacketSequencePlayback: RefCounted { + override open class var godotClassName: StringName { "OggPacketSequencePlayback" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/OmniLight3D.swift b/Sources/SwiftGodot/Generated/Api/OmniLight3D.swift new file mode 100644 index 000000000..eeb198b50 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OmniLight3D.swift @@ -0,0 +1,142 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Omnidirectional light, such as a light bulb or a candle. +/// +/// An Omnidirectional light is a type of ``Light3D`` that emits light in all directions. The light is attenuated by distance and this attenuation can be configured by changing its energy, radius, and attenuation parameters. +/// +/// > Note: When using the Mobile rendering method, only 8 omni lights can be displayed on each mesh resource. Attempting to display more than 8 omni lights on a single mesh resource will result in omni lights flickering in and out as the camera moves. When using the Compatibility rendering method, only 8 omni lights can be displayed on each mesh resource by default, but this can be increased by adjusting ``ProjectSettings/rendering/limits/opengl/maxLightsPerObject``. +/// +/// > Note: When using the Mobile or Compatibility rendering methods, omni lights will only correctly affect meshes whose visibility AABB intersects with the light's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, ``GeometryInstance3D/extraCullMargin`` must be increased on the mesh. Otherwise, the light may not be visible on the mesh. +/// +open class OmniLight3D: Light3D { + override open class var godotClassName: StringName { "OmniLight3D" } + public enum ShadowMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Shadows are rendered to a dual-paraboloid texture. Faster than ``ShadowMode/cube``, but lower-quality. + case dualParaboloid = 0 // SHADOW_DUAL_PARABOLOID + /// Shadows are rendered to a cubemap. Slower than ``ShadowMode/dualParaboloid``, but higher-quality. + case cube = 1 // SHADOW_CUBE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .dualParaboloid: return ".dualParaboloid" + case .cube: return ".cube" + } + + } + + } + + + /* Properties */ + + /// The light's radius. Note that the effectively lit area may appear to be smaller depending on the ``omniAttenuation`` in use. No matter the ``omniAttenuation`` in use, the light will never reach anything outside this radius. + /// + /// > Note: ``omniRange`` is not affected by ``Node3D/scale`` (the light's scale or its parent's scale). + /// + final public var omniRange: Double { + get { + return get_param (Light3D.Param (rawValue: 4)!) + } + + set { + set_param (Light3D.Param (rawValue: 4)!, newValue) + } + + } + + /// Controls the distance attenuation function for omnilights. + /// + /// A value of `0.0` will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of `2.0` for physically accurate lights as it results in the proper inverse square attenutation. + /// + /// > Note: Setting attenuation to `2.0` or higher may result in distant objects receiving minimal light, even within range. For example, with a range of `4096`, an object at `100` units is attenuated by a factor of `0.0001`. With a default brightness of `1`, the light would not be visible at that distance. + /// + /// > Note: Using negative or values higher than `10.0` may lead to unexpected results. + /// + final public var omniAttenuation: Double { + get { + return get_param (Light3D.Param (rawValue: 6)!) + } + + set { + set_param (Light3D.Param (rawValue: 6)!, newValue) + } + + } + + /// See ``OmniLight3D/ShadowMode``. + final public var omniShadowMode: OmniLight3D.ShadowMode { + get { + return get_shadow_mode () + } + + set { + set_shadow_mode (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shadow_mode") + return withUnsafePointer(to: &OmniLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121862228)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shadow_mode(_ mode: OmniLight3D.ShadowMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OmniLight3D.method_set_shadow_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shadow_mode") + return withUnsafePointer(to: &OmniLight3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4181586331)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shadow_mode() -> OmniLight3D.ShadowMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OmniLight3D.method_get_shadow_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OmniLight3D.ShadowMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRAPIExtension.swift b/Sources/SwiftGodot/Generated/Api/OpenXRAPIExtension.swift new file mode 100644 index 000000000..aff4e3e30 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRAPIExtension.swift @@ -0,0 +1,508 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Makes the OpenXR API available for GDExtension. +/// +/// ``OpenXRAPIExtension`` makes OpenXR available for GDExtension. It provides the OpenXR API to GDExtension through the ``getInstanceProcAddr(name:)`` method, and the OpenXR instance through ``getInstance()``. +/// +/// It also provides methods for querying the status of OpenXR initialization, and helper methods for ease of use of the API with GDExtension. +/// +open class OpenXRAPIExtension: RefCounted { + override open class var godotClassName: StringName { "OpenXRAPIExtension" } + public enum OpenXRAlphaBlendModeSupport: Int64, CaseIterable, CustomDebugStringConvertible { + /// Means that ``XRInterface/EnvironmentBlendMode/alphaBlend`` isn't supported at all. + case none = 0 // OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE + /// Means that ``XRInterface/EnvironmentBlendMode/alphaBlend`` is really supported. + case real = 1 // OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL + /// Means that ``XRInterface/EnvironmentBlendMode/alphaBlend`` is emulated. + case emulating = 2 // OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .real: return ".real" + case .emulating: return ".emulating" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the XrInstance created during the initialization of the OpenXR API. + public final func getInstance() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_instance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_system_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_id") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the id of the system, which is a XrSystemId cast to an integer. + public final func getSystemId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_system_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_session: GDExtensionMethodBindPtr = { + let methodName = StringName("get_session") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the OpenXR session, which is an XrSession cast to an integer. + public final func getSession() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_session, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_transform_from_pose: GDExtensionMethodBindPtr = { + let methodName = StringName("transform_from_pose") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3255299855)! + } + + } + + }() + + /// Creates a ``Transform3D`` from an XrPosef. + public final func transformFromPose(_ pose: OpaquePointer?) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: pose) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_transform_from_pose, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_xr_result: GDExtensionMethodBindPtr = { + let methodName = StringName("xr_result") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3886436197)! + } + + } + + }() + + /// Returns `true` if the provided XrResult (cast to an integer) is successful. Otherwise returns `false` and prints the XrResult converted to a string, with the specified additional information. + public final func xrResult(_ result: UInt, format: String, args: GArray) -> Bool { + var _result: Bool = false + withUnsafePointer(to: result) { pArg0 in + let format = GString(format) + withUnsafePointer(to: format.content) { pArg1 in + withUnsafePointer(to: args.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_xr_result, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_openxr_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("openxr_is_enabled") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2703660260)! + } + + } + + }() + + /// Returns `true` if OpenXR is enabled. + public static func openxrIsEnabled(checkRunInEditor: Bool) -> Bool { + var _result: Bool = false + withUnsafePointer(to: checkRunInEditor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_openxr_is_enabled, nil, pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_instance_proc_addr: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_proc_addr") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1597066294)! + } + + } + + }() + + /// Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns `0`. + /// + /// > Note: `openxr/util.h` contains utility macros for acquiring OpenXR functions, e.g. `GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)`. + /// + public final func getInstanceProcAddr(name: String) -> UInt { + var _result: UInt = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_instance_proc_addr, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_error_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_error_string") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 990163283)! + } + + } + + }() + + /// Returns an error string for the given XrResult. + public final func getErrorString(result: UInt) -> String { + let _result = GString () + withUnsafePointer(to: result) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_error_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_swapchain_format_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swapchain_format_name") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 990163283)! + } + + } + + }() + + /// Returns the name of the specified swapchain format. + public final func getSwapchainFormatName(swapchainFormat: Int) -> String { + let _result = GString () + withUnsafePointer(to: swapchainFormat) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_swapchain_format_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_initialized: GDExtensionMethodBindPtr = { + let methodName = StringName("is_initialized") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if OpenXR is initialized. + public final func isInitialized() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_is_initialized, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_running: GDExtensionMethodBindPtr = { + let methodName = StringName("is_running") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if OpenXR is running (xrBeginSession was successfully called and the swapchains were created). + public final func isRunning() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_is_running, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_play_space: GDExtensionMethodBindPtr = { + let methodName = StringName("get_play_space") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the play space, which is an XrSpace cast to an integer. + public final func getPlaySpace() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_play_space, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_predicted_display_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_predicted_display_time") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the predicted display timing for the current frame. + public final func getPredictedDisplayTime() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_predicted_display_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_next_frame_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_next_frame_time") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the predicted display timing for the next frame. + public final func getNextFrameTime() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_next_frame_time, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_can_render: GDExtensionMethodBindPtr = { + let methodName = StringName("can_render") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if OpenXR is initialized for rendering with an XR viewport. + public final func canRender() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_can_render, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_hand_tracker: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_tracker") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the corresponding `XRHandTrackerEXT` handle for the given hand index value. + public final func getHandTracker(handIndex: Int32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: handIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_get_hand_tracker, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_register_composition_layer_provider: GDExtensionMethodBindPtr = { + let methodName = StringName("register_composition_layer_provider") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1997997368)! + } + + } + + }() + + /// Registers the given extension as a composition layer provider. + public final func registerCompositionLayerProvider(`extension`: OpenXRExtensionWrapperExtension?) { + withUnsafePointer(to: `extension`?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_register_composition_layer_provider, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_unregister_composition_layer_provider: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_composition_layer_provider") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1997997368)! + } + + } + + }() + + /// Unregisters the given extension as a composition layer provider. + public final func unregisterCompositionLayerProvider(`extension`: OpenXRExtensionWrapperExtension?) { + withUnsafePointer(to: `extension`?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_unregister_composition_layer_provider, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_emulate_environment_blend_mode_alpha_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emulate_environment_blend_mode_alpha_blend") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If set to `true`, an OpenXR extension is loaded which is capable of emulating the ``XRInterface/EnvironmentBlendMode/alphaBlend`` blend mode. + public final func setEmulateEnvironmentBlendModeAlphaBlend(enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_set_emulate_environment_blend_mode_alpha_blend, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_environment_blend_mode_alpha_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_environment_blend_mode_alpha_supported") + return withUnsafePointer(to: &OpenXRAPIExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1579290861)! + } + + } + + }() + + /// Returns ``OpenXRAPIExtension.OpenXRAlphaBlendModeSupport`` denoting if ``XRInterface/EnvironmentBlendMode/alphaBlend`` is really supported, emulated or not supported at all. + public final func isEnvironmentBlendModeAlphaSupported() -> OpenXRAPIExtension.OpenXRAlphaBlendModeSupport { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRAPIExtension.method_is_environment_blend_mode_alpha_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRAPIExtension.OpenXRAlphaBlendModeSupport (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRAction.swift b/Sources/SwiftGodot/Generated/Api/OpenXRAction.swift new file mode 100644 index 000000000..981db755f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRAction.swift @@ -0,0 +1,229 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An OpenXR action. +/// +/// This resource defines an OpenXR action. Actions can be used both for inputs (buttons, joysticks, triggers, etc.) and outputs (haptics). +/// +/// OpenXR performs automatic conversion between action type and input type whenever possible. An analog trigger bound to a boolean action will thus return `false` if the trigger is depressed and `true` if pressed fully. +/// +/// Actions are not directly bound to specific devices, instead OpenXR recognizes a limited number of top level paths that identify devices by usage. We can restrict which devices an action can be bound to by these top level paths. For instance an action that should only be used for hand held controllers can have the top level paths "/user/hand/left" and "/user/hand/right" associated with them. See the reserved path section in the OpenXR specification for more info on the top level paths. +/// +/// Note that the name of the resource is used to register the action with. +/// +open class OpenXRAction: Resource { + override open class var godotClassName: StringName { "OpenXRAction" } + public enum ActionType: Int64, CaseIterable, CustomDebugStringConvertible { + /// This action provides a boolean value. + case bool = 0 // OPENXR_ACTION_BOOL + /// This action provides a float value between `0.0` and `1.0` for any analog input such as triggers. + case float = 1 // OPENXR_ACTION_FLOAT + /// This action provides a ``Vector2`` value and can be bound to embedded trackpads and joysticks. + case vector2 = 2 // OPENXR_ACTION_VECTOR2 + /// + case pose = 3 // OPENXR_ACTION_POSE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bool: return ".bool" + case .float: return ".float" + case .vector2: return ".vector2" + case .pose: return ".pose" + } + + } + + } + + + /* Properties */ + + /// The localized description of this action. + final public var localizedName: String { + get { + return get_localized_name () + } + + set { + set_localized_name (newValue) + } + + } + + /// The type of action. + final public var actionType: OpenXRAction.ActionType { + get { + return get_action_type () + } + + set { + set_action_type (newValue) + } + + } + + /// A collections of toplevel paths to which this action can be bound. + final public var toplevelPaths: PackedStringArray { + get { + return get_toplevel_paths () + } + + set { + set_toplevel_paths (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_localized_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_localized_name") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_localized_name(_ localizedName: String) { + let localizedName = GString(localizedName) + withUnsafePointer(to: localizedName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAction.method_set_localized_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_localized_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_localized_name") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_localized_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(OpenXRAction.method_get_localized_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_action_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action_type") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1675238366)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_action_type(_ actionType: OpenXRAction.ActionType) { + withUnsafePointer(to: actionType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAction.method_set_action_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_action_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_type") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536542431)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_action_type() -> OpenXRAction.ActionType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRAction.method_get_action_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRAction.ActionType (rawValue: _result)! + } + + fileprivate static var method_set_toplevel_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("set_toplevel_paths") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_toplevel_paths(_ toplevelPaths: PackedStringArray) { + withUnsafePointer(to: toplevelPaths.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRAction.method_set_toplevel_paths, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_toplevel_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("get_toplevel_paths") + return withUnsafePointer(to: &OpenXRAction.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_toplevel_paths() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(OpenXRAction.method_get_toplevel_paths, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRActionMap.swift b/Sources/SwiftGodot/Generated/Api/OpenXRActionMap.swift new file mode 100644 index 000000000..7eb69e795 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRActionMap.swift @@ -0,0 +1,415 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Collection of ``OpenXRActionSet`` and ``OpenXRInteractionProfile`` resources for the OpenXR module. +/// +/// OpenXR uses an action system similar to Godots Input map system to bind inputs and outputs on various types of XR controllers to named actions. OpenXR specifies more detail on these inputs and outputs than Godot supports. +/// +/// Another important distinction is that OpenXR offers no control over these bindings. The bindings we register are suggestions, it is up to the XR runtime to offer users the ability to change these bindings. This allows the XR runtime to fill in the gaps if new hardware becomes available. +/// +/// The action map therefore needs to be loaded at startup and can't be changed afterwards. This resource is a container for the entire action map. +/// +open class OpenXRActionMap: Resource { + override open class var godotClassName: StringName { "OpenXRActionMap" } + + /* Properties */ + + /// Collection of ``OpenXRActionSet``s that are part of this action map. + final public var actionSets: GArray { + get { + return get_action_sets () + } + + set { + set_action_sets (newValue) + } + + } + + /// Collection of ``OpenXRInteractionProfile``s that are part of this action map. + final public var interactionProfiles: GArray { + get { + return get_interaction_profiles () + } + + set { + set_interaction_profiles (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_action_sets: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action_sets") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_action_sets(_ actionSets: GArray) { + withUnsafePointer(to: actionSets.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_set_action_sets, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_action_sets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_sets") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_action_sets() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_action_sets, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_action_set_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_set_count") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Retrieve the number of actions sets in our action map. + public final func getActionSetCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_action_set_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_find_action_set: GDExtensionMethodBindPtr = { + let methodName = StringName("find_action_set") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1888809267)! + } + + } + + }() + + /// Retrieve an action set by name. + public final func findActionSet(name: String) -> OpenXRActionSet? { + var _result = UnsafeRawPointer (bitPattern: 0) + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_find_action_set, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_action_set: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_set") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1789580336)! + } + + } + + }() + + /// Retrieve the action set at this index. + public final func getActionSet(idx: Int32) -> OpenXRActionSet? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_action_set, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_action_set: GDExtensionMethodBindPtr = { + let methodName = StringName("add_action_set") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2093310581)! + } + + } + + }() + + /// Add an action set. + public final func addActionSet(_ actionSet: OpenXRActionSet?) { + withUnsafePointer(to: actionSet?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_add_action_set, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_action_set: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_action_set") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2093310581)! + } + + } + + }() + + /// Remove an action set. + public final func removeActionSet(_ actionSet: OpenXRActionSet?) { + withUnsafePointer(to: actionSet?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_remove_action_set, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_interaction_profiles: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interaction_profiles") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interaction_profiles(_ interactionProfiles: GArray) { + withUnsafePointer(to: interactionProfiles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_set_interaction_profiles, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_interaction_profiles: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interaction_profiles") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interaction_profiles() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_interaction_profiles, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_interaction_profile_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interaction_profile_count") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Retrieve the number of interaction profiles in our action map. + public final func getInteractionProfileCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_interaction_profile_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_find_interaction_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("find_interaction_profile") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3095875538)! + } + + } + + }() + + /// Find an interaction profile by its name (path). + public final func findInteractionProfile(name: String) -> OpenXRInteractionProfile? { + var _result = UnsafeRawPointer (bitPattern: 0) + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_find_interaction_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_interaction_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interaction_profile") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2546151210)! + } + + } + + }() + + /// Get the interaction profile at this index. + public final func getInteractionProfile(idx: Int32) -> OpenXRInteractionProfile? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_get_interaction_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_add_interaction_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("add_interaction_profile") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2697953512)! + } + + } + + }() + + /// Add an interaction profile. + public final func addInteractionProfile(_ interactionProfile: OpenXRInteractionProfile?) { + withUnsafePointer(to: interactionProfile?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_add_interaction_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_interaction_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_interaction_profile") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2697953512)! + } + + } + + }() + + /// Remove an interaction profile. + public final func removeInteractionProfile(_ interactionProfile: OpenXRInteractionProfile?) { + withUnsafePointer(to: interactionProfile?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionMap.method_remove_interaction_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_create_default_action_sets: GDExtensionMethodBindPtr = { + let methodName = StringName("create_default_action_sets") + return withUnsafePointer(to: &OpenXRActionMap.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Setup this action set with our default actions. + public final func createDefaultActionSets() { + gi.object_method_bind_ptrcall(OpenXRActionMap.method_create_default_action_sets, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRActionSet.swift b/Sources/SwiftGodot/Generated/Api/OpenXRActionSet.swift new file mode 100644 index 000000000..3f5e6cd6b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRActionSet.swift @@ -0,0 +1,273 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Collection of ``OpenXRAction`` resources that make up an action set. +/// +/// Action sets in OpenXR define a collection of actions that can be activated in unison. This allows games to easily change between different states that require different inputs or need to reinterpret inputs. For instance we could have an action set that is active when a menu is open, an action set that is active when the player is freely walking around and an action set that is active when the player is controlling a vehicle. +/// +/// Action sets can contain the same action with the same name, if such action sets are active at the same time the action set with the highest priority defines which binding is active. +/// +open class OpenXRActionSet: Resource { + override open class var godotClassName: StringName { "OpenXRActionSet" } + + /* Properties */ + + /// The localized name of this action set. + final public var localizedName: String { + get { + return get_localized_name () + } + + set { + set_localized_name (newValue) + } + + } + + /// The priority for this action set. + final public var priority: Int32 { + get { + return get_priority () + } + + set { + set_priority (newValue) + } + + } + + /// Collection of actions for this action set. + final public var actions: GArray { + get { + return get_actions () + } + + set { + set_actions (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_localized_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_localized_name") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_localized_name(_ localizedName: String) { + let localizedName = GString(localizedName) + withUnsafePointer(to: localizedName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionSet.method_set_localized_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_localized_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_localized_name") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_localized_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(OpenXRActionSet.method_get_localized_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("set_priority") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_priority(_ priority: Int32) { + withUnsafePointer(to: priority) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionSet.method_set_priority, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("get_priority") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_priority() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRActionSet.method_get_priority, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_action_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_count") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Retrieve the number of actions in our action set. + public final func getActionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRActionSet.method_get_action_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_actions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_actions") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_actions(_ actions: GArray) { + withUnsafePointer(to: actions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionSet.method_set_actions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_actions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_actions") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_actions() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRActionSet.method_get_actions, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_add_action: GDExtensionMethodBindPtr = { + let methodName = StringName("add_action") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 349361333)! + } + + } + + }() + + /// Add an action to this action set. + public final func addAction(_ action: OpenXRAction?) { + withUnsafePointer(to: action?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionSet.method_add_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_action: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_action") + return withUnsafePointer(to: &OpenXRActionSet.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 349361333)! + } + + } + + }() + + /// Remove an action from this action set. + public final func removeAction(_ action: OpenXRAction?) { + withUnsafePointer(to: action?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRActionSet.method_remove_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayer.swift b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayer.swift new file mode 100644 index 000000000..76a176d9b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayer.swift @@ -0,0 +1,321 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// The parent class of all OpenXR composition layer nodes. +/// +/// Composition layers allow 2D viewports to be displayed inside of the headset by the XR compositor through special projections that retain their quality. This allows for rendering clear text while keeping the layer at a native resolution. +/// +/// > Note: If the OpenXR runtime doesn't support the given composition layer type, a fallback mesh can be generated with a ``ViewportTexture``, in order to emulate the composition layer. +/// +open class OpenXRCompositionLayer: Node3D { + override open class var godotClassName: StringName { "OpenXRCompositionLayer" } + + /* Properties */ + + /// The ``SubViewport`` to render on the composition layer. + final public var layerViewport: SubViewport? { + get { + return get_layer_viewport () + } + + set { + set_layer_viewport (newValue) + } + + } + + /// The sort order for this composition layer. Higher numbers will be shown in front of lower numbers. + /// + /// > Note: This will have no effect if a fallback mesh is being used. + /// + final public var sortOrder: Int32 { + get { + return get_sort_order () + } + + set { + set_sort_order (newValue) + } + + } + + /// Enables the blending the layer using its alpha channel. + /// + /// Can be combined with ``Viewport/transparentBg`` to give the layer a transparent background. + /// + final public var alphaBlend: Bool { + get { + return get_alpha_blend () + } + + set { + set_alpha_blend (newValue) + } + + } + + /// Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting ``sortOrder`` to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible. + /// + /// This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer. + /// + final public var enableHolePunch: Bool { + get { + return get_enable_hole_punch () + } + + set { + set_enable_hole_punch (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_layer_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layer_viewport") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3888077664)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layer_viewport(_ viewport: SubViewport?) { + withUnsafePointer(to: viewport?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_set_layer_viewport, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_layer_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("get_layer_viewport") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3750751911)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_layer_viewport() -> SubViewport? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_get_layer_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_enable_hole_punch: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_hole_punch") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_hole_punch(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_set_enable_hole_punch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_hole_punch: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_hole_punch") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_hole_punch() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_get_enable_hole_punch, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sort_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sort_order") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sort_order(_ order: Int32) { + withUnsafePointer(to: order) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_set_sort_order, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sort_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sort_order") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sort_order() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_get_sort_order, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_alpha_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_blend") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_blend(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_set_alpha_blend, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_blend") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_blend() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_get_alpha_blend, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_natively_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_natively_supported") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns true if the OpenXR runtime natively supports this composition layer type. + /// + /// > Note: This will only return an accurate result after the OpenXR session has started. + /// + public final func isNativelySupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_is_natively_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_intersects_ray: GDExtensionMethodBindPtr = { + let methodName = StringName("intersects_ray") + return withUnsafePointer(to: &OpenXRCompositionLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1091262597)! + } + + } + + }() + + /// Returns UV coordinates where the given ray intersects with the composition layer. `origin` and `direction` must be in global space. + /// + /// Returns `Vector2(-1.0, -1.0)` if the ray doesn't intersect. + /// + public final func intersectsRay(origin: Vector3, direction: Vector3) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: origin) { pArg0 in + withUnsafePointer(to: direction) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayer.method_intersects_ray, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerCylinder.swift b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerCylinder.swift new file mode 100644 index 000000000..3d2dc68cc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerCylinder.swift @@ -0,0 +1,255 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An OpenXR composition layer that is rendered as an internal slice of a cylinder. +/// +/// An OpenXR composition layer that allows rendering a ``SubViewport`` on an internal slice of a cylinder. +open class OpenXRCompositionLayerCylinder: OpenXRCompositionLayer { + override open class var godotClassName: StringName { "OpenXRCompositionLayerCylinder" } + + /* Properties */ + + /// The radius of the cylinder. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The aspect ratio of the slice. Used to set the height relative to the width. + final public var aspectRatio: Double { + get { + return get_aspect_ratio () + } + + set { + set_aspect_ratio (newValue) + } + + } + + /// The central angle of the cylinder. Used to set the width. + final public var centralAngle: Double { + get { + return get_central_angle () + } + + set { + set_central_angle (newValue) + } + + } + + /// The number of segments to use in the fallback mesh. + final public var fallbackSegments: UInt32 { + get { + return get_fallback_segments () + } + + set { + set_fallback_segments (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_aspect_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_aspect_ratio") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_aspect_ratio(_ aspectRatio: Double) { + withUnsafePointer(to: aspectRatio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_set_aspect_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_aspect_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_aspect_ratio") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_aspect_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_get_aspect_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_central_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_central_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_central_angle(_ angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_set_central_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_central_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_central_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_central_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_get_central_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fallback_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fallback_segments") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fallback_segments(_ segments: UInt32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_set_fallback_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fallback_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fallback_segments") + return withUnsafePointer(to: &OpenXRCompositionLayerCylinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fallback_segments() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerCylinder.method_get_fallback_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerEquirect.swift b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerEquirect.swift new file mode 100644 index 000000000..aa7130c57 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerEquirect.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An OpenXR composition layer that is rendered as an internal slice of a sphere. +/// +/// An OpenXR composition layer that allows rendering a ``SubViewport`` on an internal slice of a sphere. +open class OpenXRCompositionLayerEquirect: OpenXRCompositionLayer { + override open class var godotClassName: StringName { "OpenXRCompositionLayerEquirect" } + + /* Properties */ + + /// The radius of the sphere. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// The central horizontal angle of the sphere. Used to set the width. + final public var centralHorizontalAngle: Double { + get { + return get_central_horizontal_angle () + } + + set { + set_central_horizontal_angle (newValue) + } + + } + + /// The upper vertical angle of the sphere. Used (together with ``lowerVerticalAngle``) to set the height. + final public var upperVerticalAngle: Double { + get { + return get_upper_vertical_angle () + } + + set { + set_upper_vertical_angle (newValue) + } + + } + + /// The lower vertical angle of the sphere. Used (together with ``upperVerticalAngle``) to set the height. + final public var lowerVerticalAngle: Double { + get { + return get_lower_vertical_angle () + } + + set { + set_lower_vertical_angle (newValue) + } + + } + + /// The number of segments to use in the fallback mesh. + final public var fallbackSegments: UInt32 { + get { + return get_fallback_segments () + } + + set { + set_fallback_segments (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_central_horizontal_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_central_horizontal_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_central_horizontal_angle(_ angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_set_central_horizontal_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_central_horizontal_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_central_horizontal_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_central_horizontal_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_get_central_horizontal_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_upper_vertical_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_upper_vertical_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_upper_vertical_angle(_ angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_set_upper_vertical_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_upper_vertical_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_upper_vertical_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_upper_vertical_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_get_upper_vertical_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lower_vertical_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lower_vertical_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lower_vertical_angle(_ angle: Double) { + withUnsafePointer(to: angle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_set_lower_vertical_angle, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lower_vertical_angle: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lower_vertical_angle") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lower_vertical_angle() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_get_lower_vertical_angle, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fallback_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fallback_segments") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fallback_segments(_ segments: UInt32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_set_fallback_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fallback_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fallback_segments") + return withUnsafePointer(to: &OpenXRCompositionLayerEquirect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fallback_segments() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(OpenXRCompositionLayerEquirect.method_get_fallback_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerQuad.swift b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerQuad.swift new file mode 100644 index 000000000..442bc6697 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRCompositionLayerQuad.swift @@ -0,0 +1,87 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An OpenXR composition layer that is rendered as a quad. +/// +/// An OpenXR composition layer that allows rendering a ``SubViewport`` on a quad. +open class OpenXRCompositionLayerQuad: OpenXRCompositionLayer { + override open class var godotClassName: StringName { "OpenXRCompositionLayerQuad" } + + /* Properties */ + + /// The dimensions of the quad. + final public var quadSize: Vector2 { + get { + return get_quad_size () + } + + set { + set_quad_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_quad_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_quad_size") + return withUnsafePointer(to: &OpenXRCompositionLayerQuad.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_quad_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRCompositionLayerQuad.method_set_quad_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_quad_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_quad_size") + return withUnsafePointer(to: &OpenXRCompositionLayerQuad.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_quad_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(OpenXRCompositionLayerQuad.method_get_quad_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRExtensionWrapperExtension.swift b/Sources/SwiftGodot/Generated/Api/OpenXRExtensionWrapperExtension.swift new file mode 100644 index 000000000..fba9a5cce --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRExtensionWrapperExtension.swift @@ -0,0 +1,456 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Allows clients to implement OpenXR extensions with GDExtension. +/// +/// ``OpenXRExtensionWrapperExtension`` allows clients to implement OpenXR extensions with GDExtension. The extension should be registered with ``registerExtensionWrapper()``. +open class OpenXRExtensionWrapperExtension: Object { + override open class var godotClassName: StringName { "OpenXRExtensionWrapperExtension" } + /* Methods */ + /// Returns a ``GDictionary`` of OpenXR extensions related to this extension. The ``GDictionary`` should contain the name of the extension, mapped to a `bool *` cast to an integer: + /// + /// - If the `bool *` is a `nullptr` this extension is mandatory. + /// + /// - If the `bool *` points to a boolean, the boolean will be updated to `true` if the extension is enabled. + /// + @_documentation(visibility: public) + open func _getRequestedExtensions() -> GDictionary { + return GDictionary () + } + + /// Returns the number of composition layers this extension wrapper provides via ``_getCompositionLayer(index:)``. + /// + /// This will only be called if the extension previously registered itself with ``OpenXRAPIExtension/registerCompositionLayerProvider(`extension`:)``. + /// + @_documentation(visibility: public) + open func _getCompositionLayerCount() -> Int32 { + return 0 + } + + /// Returns a pointer to an `XrCompositionLayerBaseHeader` struct to provide the given composition layer. + /// + /// This will only be called if the extension previously registered itself with ``OpenXRAPIExtension/registerCompositionLayerProvider(`extension`:)``. + /// + @_documentation(visibility: public) + open func _getCompositionLayer(index: Int32) -> UInt { + return 0 + } + + /// Returns an integer that will be used to sort the given composition layer provided via ``_getCompositionLayer(index:)``. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of `0`, so layers provided by this method should probably be above or below (but not exactly) `0`. + /// + /// This will only be called if the extension previously registered itself with ``OpenXRAPIExtension/registerCompositionLayerProvider(`extension`:)``. + /// + @_documentation(visibility: public) + open func _getCompositionLayerOrder(index: Int32) -> Int32 { + return 0 + } + + /// Returns a ``PackedStringArray`` of positional tracker names that are used within the extension wrapper. + @_documentation(visibility: public) + open func _getSuggestedTrackerNames() -> PackedStringArray { + return PackedStringArray () + } + + /// Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor. + /// + /// Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware. + /// + @_documentation(visibility: public) + open func _onRegisterMetadata() { + } + + /// Called before the OpenXR instance is created. + @_documentation(visibility: public) + open func _onBeforeInstanceCreated() { + } + + /// Called right after the OpenXR instance is created. + @_documentation(visibility: public) + open func _onInstanceCreated(instance: UInt) { + } + + /// Called right before the OpenXR instance is destroyed. + @_documentation(visibility: public) + open func _onInstanceDestroyed() { + } + + /// Called right after the OpenXR session is created. + @_documentation(visibility: public) + open func _onSessionCreated(session: UInt) { + } + + /// Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic. + @_documentation(visibility: public) + open func _onProcess() { + } + + /// Called right before the XR viewports begin their rendering step. + @_documentation(visibility: public) + open func _onPreRender() { + } + + /// Called right after the main swapchains are (re)created. + @_documentation(visibility: public) + open func _onMainSwapchainsCreated() { + } + + /// Called right before the OpenXR session is destroyed. + @_documentation(visibility: public) + open func _onSessionDestroyed() { + } + + /// Called when the OpenXR session state is changed to idle. + @_documentation(visibility: public) + open func _onStateIdle() { + } + + /// Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session. + @_documentation(visibility: public) + open func _onStateReady() { + } + + /// Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus. + @_documentation(visibility: public) + open func _onStateSynchronized() { + } + + /// Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames. + @_documentation(visibility: public) + open func _onStateVisible() { + } + + /// Called when the OpenXR session state is changed to focused. This state is the active state when the game runs. + @_documentation(visibility: public) + open func _onStateFocused() { + } + + /// Called when the OpenXR session state is changed to stopping. + @_documentation(visibility: public) + open func _onStateStopping() { + } + + /// Called when the OpenXR session state is changed to loss pending. + @_documentation(visibility: public) + open func _onStateLossPending() { + } + + /// Called when the OpenXR session state is changed to exiting. + @_documentation(visibility: public) + open func _onStateExiting() { + } + + /// Called when there is an OpenXR event to process. When implementing, return `true` if the event was handled, return `false` otherwise. + @_documentation(visibility: public) + open func _onEventPolled(event: OpaquePointer?) -> Bool { + return false + } + + /// Gets an array of ``GDictionary``s that represent properties, just like ``Object/_getPropertyList()``, that will be added to ``OpenXRCompositionLayer`` nodes. + @_documentation(visibility: public) + open func _getViewportCompositionLayerExtensionProperties() -> VariantCollection { + return VariantCollection() + } + + /// Gets a ``GDictionary`` containing the default values for the properties returned by ``_getViewportCompositionLayerExtensionProperties()``. + @_documentation(visibility: public) + open func _getViewportCompositionLayerExtensionPropertyDefaults() -> GDictionary { + return GDictionary () + } + + /// Called when a composition layer created via ``OpenXRCompositionLayer`` is destroyed. + /// + /// `layer` is a pointer to an `XrCompositionLayerBaseHeader` struct. + /// + @_documentation(visibility: public) + open func _onViewportCompositionLayerDestroyed(layer: OpaquePointer?) { + } + + fileprivate static var method_get_openxr_api: GDExtensionMethodBindPtr = { + let methodName = StringName("get_openxr_api") + return withUnsafePointer(to: &OpenXRExtensionWrapperExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1637791613)! + } + + } + + }() + + /// Returns the created ``OpenXRAPIExtension``, which can be used to access the OpenXR API. + public final func getOpenxrApi() -> OpenXRAPIExtension? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(OpenXRExtensionWrapperExtension.method_get_openxr_api, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_register_extension_wrapper: GDExtensionMethodBindPtr = { + let methodName = StringName("register_extension_wrapper") + return withUnsafePointer(to: &OpenXRExtensionWrapperExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Registers the extension. This should happen at core module initialization level. + public final func registerExtensionWrapper() { + gi.object_method_bind_ptrcall(OpenXRExtensionWrapperExtension.method_register_extension_wrapper, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_composition_layer": + return _OpenXRExtensionWrapperExtension_proxy_get_composition_layer + case "_get_composition_layer_count": + return _OpenXRExtensionWrapperExtension_proxy_get_composition_layer_count + case "_get_composition_layer_order": + return _OpenXRExtensionWrapperExtension_proxy_get_composition_layer_order + case "_get_requested_extensions": + return _OpenXRExtensionWrapperExtension_proxy_get_requested_extensions + case "_get_suggested_tracker_names": + return _OpenXRExtensionWrapperExtension_proxy_get_suggested_tracker_names + case "_get_viewport_composition_layer_extension_properties": + return _OpenXRExtensionWrapperExtension_proxy_get_viewport_composition_layer_extension_properties + case "_get_viewport_composition_layer_extension_property_defaults": + return _OpenXRExtensionWrapperExtension_proxy_get_viewport_composition_layer_extension_property_defaults + case "_on_before_instance_created": + return _OpenXRExtensionWrapperExtension_proxy_on_before_instance_created + case "_on_event_polled": + return _OpenXRExtensionWrapperExtension_proxy_on_event_polled + case "_on_instance_created": + return _OpenXRExtensionWrapperExtension_proxy_on_instance_created + case "_on_instance_destroyed": + return _OpenXRExtensionWrapperExtension_proxy_on_instance_destroyed + case "_on_main_swapchains_created": + return _OpenXRExtensionWrapperExtension_proxy_on_main_swapchains_created + case "_on_pre_render": + return _OpenXRExtensionWrapperExtension_proxy_on_pre_render + case "_on_process": + return _OpenXRExtensionWrapperExtension_proxy_on_process + case "_on_register_metadata": + return _OpenXRExtensionWrapperExtension_proxy_on_register_metadata + case "_on_session_created": + return _OpenXRExtensionWrapperExtension_proxy_on_session_created + case "_on_session_destroyed": + return _OpenXRExtensionWrapperExtension_proxy_on_session_destroyed + case "_on_state_exiting": + return _OpenXRExtensionWrapperExtension_proxy_on_state_exiting + case "_on_state_focused": + return _OpenXRExtensionWrapperExtension_proxy_on_state_focused + case "_on_state_idle": + return _OpenXRExtensionWrapperExtension_proxy_on_state_idle + case "_on_state_loss_pending": + return _OpenXRExtensionWrapperExtension_proxy_on_state_loss_pending + case "_on_state_ready": + return _OpenXRExtensionWrapperExtension_proxy_on_state_ready + case "_on_state_stopping": + return _OpenXRExtensionWrapperExtension_proxy_on_state_stopping + case "_on_state_synchronized": + return _OpenXRExtensionWrapperExtension_proxy_on_state_synchronized + case "_on_state_visible": + return _OpenXRExtensionWrapperExtension_proxy_on_state_visible + case "_on_viewport_composition_layer_destroyed": + return _OpenXRExtensionWrapperExtension_proxy_on_viewport_composition_layer_destroyed + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _OpenXRExtensionWrapperExtension_proxy_get_composition_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCompositionLayer (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _OpenXRExtensionWrapperExtension_proxy_get_composition_layer_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCompositionLayerCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _OpenXRExtensionWrapperExtension_proxy_get_composition_layer_order (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCompositionLayerOrder (index: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _OpenXRExtensionWrapperExtension_proxy_get_requested_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRequestedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _OpenXRExtensionWrapperExtension_proxy_get_suggested_tracker_names (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSuggestedTrackerNames () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _OpenXRExtensionWrapperExtension_proxy_get_viewport_composition_layer_extension_properties (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getViewportCompositionLayerExtensionProperties () + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::Dictionary +} + +func _OpenXRExtensionWrapperExtension_proxy_get_viewport_composition_layer_extension_property_defaults (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getViewportCompositionLayerExtensionPropertyDefaults () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Dictionary + ret.content = GDictionary.zero +} + +func _OpenXRExtensionWrapperExtension_proxy_on_before_instance_created (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onBeforeInstanceCreated () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_event_polled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._onEventPolled (event: args [0]!.assumingMemoryBound (to: OpaquePointer?.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _OpenXRExtensionWrapperExtension_proxy_on_instance_created (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onInstanceCreated (instance: args [0]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _OpenXRExtensionWrapperExtension_proxy_on_instance_destroyed (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onInstanceDestroyed () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_main_swapchains_created (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onMainSwapchainsCreated () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_pre_render (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onPreRender () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_process (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onProcess () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_register_metadata (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onRegisterMetadata () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_session_created (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onSessionCreated (session: args [0]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _OpenXRExtensionWrapperExtension_proxy_on_session_destroyed (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onSessionDestroyed () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_exiting (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateExiting () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_focused (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateFocused () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_idle (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateIdle () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_loss_pending (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateLossPending () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_ready (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateReady () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_stopping (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateStopping () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_synchronized (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateSynchronized () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_state_visible (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onStateVisible () +} + +func _OpenXRExtensionWrapperExtension_proxy_on_viewport_composition_layer_destroyed (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._onViewportCompositionLayerDestroyed (layer: args [0]!.assumingMemoryBound (to: OpaquePointer?.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRHand.swift b/Sources/SwiftGodot/Generated/Api/OpenXRHand.swift new file mode 100644 index 000000000..e9e3e5dc4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRHand.swift @@ -0,0 +1,394 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node supporting hand and finger tracking in OpenXR. +/// +/// This node enables OpenXR's hand tracking functionality. The node should be a child node of an ``XROrigin3D`` node, tracking will update its position to the player's tracked hand Palm joint location (the center of the middle finger's metacarpal bone). This node also updates the skeleton of a properly skinned hand or avatar model. +/// +/// If the skeleton is a hand (one of the hand bones is the root node of the skeleton), then the skeleton will be placed relative to the hand palm location and the hand mesh and skeleton should be children of the OpenXRHand node. +/// +/// If the hand bones are part of a full skeleton, then the root of the hand will keep its location with the assumption that IK is used to position the hand and arm. +/// +/// By default the skeleton hand bones are repositioned to match the size of the tracked hand. To preserve the modeled bone sizes change ``boneUpdate`` to apply rotation only. +/// +open class OpenXRHand: Node3D { + override open class var godotClassName: StringName { "OpenXRHand" } + public enum Hands: Int64, CaseIterable, CustomDebugStringConvertible { + /// Tracking the player's left hand. + case left = 0 // HAND_LEFT + /// Tracking the player's right hand. + case right = 1 // HAND_RIGHT + /// Maximum supported hands. + case max = 2 // HAND_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .left: return ".left" + case .right: return ".right" + case .max: return ".max" + } + + } + + } + + public enum MotionRange: Int64, CaseIterable, CustomDebugStringConvertible { + /// When player grips, hand skeleton will form a full fist. + case unobstructed = 0 // MOTION_RANGE_UNOBSTRUCTED + /// When player grips, hand skeleton conforms to the controller the player is holding. + case conformToController = 1 // MOTION_RANGE_CONFORM_TO_CONTROLLER + /// Maximum supported motion ranges. + case max = 2 // MOTION_RANGE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unobstructed: return ".unobstructed" + case .conformToController: return ".conformToController" + case .max: return ".max" + } + + } + + } + + public enum SkeletonRig: Int64, CaseIterable, CustomDebugStringConvertible { + /// An OpenXR compliant skeleton. + case openxr = 0 // SKELETON_RIG_OPENXR + /// A ``SkeletonProfileHumanoid`` compliant skeleton. + case humanoid = 1 // SKELETON_RIG_HUMANOID + /// Maximum supported hands. + case max = 2 // SKELETON_RIG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .openxr: return ".openxr" + case .humanoid: return ".humanoid" + case .max: return ".max" + } + + } + + } + + public enum BoneUpdate: Int64, CaseIterable, CustomDebugStringConvertible { + /// The skeletons bones are fully updated (both position and rotation) to match the tracked bones. + case full = 0 // BONE_UPDATE_FULL + /// The skeletons bones are only rotated to align with the tracked bones, preserving bone length. + case rotationOnly = 1 // BONE_UPDATE_ROTATION_ONLY + /// Maximum supported bone update mode. + case max = 2 // BONE_UPDATE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .full: return ".full" + case .rotationOnly: return ".rotationOnly" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// Specifies whether this node tracks the left or right hand of the player. + final public var hand: OpenXRHand.Hands { + get { + return get_hand () + } + + set { + set_hand (newValue) + } + + } + + /// Set the motion range (if supported) limiting the hand motion. + final public var motionRange: OpenXRHand.MotionRange { + get { + return get_motion_range () + } + + set { + set_motion_range (newValue) + } + + } + + /// Set a ``Skeleton3D`` node for which the pose positions will be updated. + final public var handSkeleton: NodePath { + get { + return get_hand_skeleton () + } + + set { + set_hand_skeleton (newValue) + } + + } + + /// Set the type of skeleton rig the ``handSkeleton`` is compliant with. + final public var skeletonRig: OpenXRHand.SkeletonRig { + get { + return get_skeleton_rig () + } + + set { + set_skeleton_rig (newValue) + } + + } + + /// Specify the type of updates to perform on the bone. + final public var boneUpdate: OpenXRHand.BoneUpdate { + get { + return get_bone_update () + } + + set { + set_bone_update (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_hand: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hand") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1849328560)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hand(_ hand: OpenXRHand.Hands) { + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRHand.method_set_hand, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_hand: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2850644561)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_hand() -> OpenXRHand.Hands { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRHand.method_get_hand, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRHand.Hands (rawValue: _result)! + } + + fileprivate static var method_set_hand_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hand_skeleton") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hand_skeleton(_ handSkeleton: NodePath) { + withUnsafePointer(to: handSkeleton.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRHand.method_set_hand_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_hand_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_skeleton") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_hand_skeleton() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(OpenXRHand.method_get_hand_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_motion_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_range") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3326516003)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion_range(_ motionRange: OpenXRHand.MotionRange) { + withUnsafePointer(to: motionRange.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRHand.method_set_motion_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_range") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2191822314)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion_range() -> OpenXRHand.MotionRange { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRHand.method_get_motion_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRHand.MotionRange (rawValue: _result)! + } + + fileprivate static var method_set_skeleton_rig: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton_rig") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1528072213)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton_rig(_ skeletonRig: OpenXRHand.SkeletonRig) { + withUnsafePointer(to: skeletonRig.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRHand.method_set_skeleton_rig, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton_rig: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton_rig") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968409338)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton_rig() -> OpenXRHand.SkeletonRig { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRHand.method_get_skeleton_rig, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRHand.SkeletonRig (rawValue: _result)! + } + + fileprivate static var method_set_bone_update: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_update") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3144625444)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bone_update(_ boneUpdate: OpenXRHand.BoneUpdate) { + withUnsafePointer(to: boneUpdate.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRHand.method_set_bone_update, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone_update: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_update") + return withUnsafePointer(to: &OpenXRHand.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1310695248)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bone_update() -> OpenXRHand.BoneUpdate { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(OpenXRHand.method_get_bone_update, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return OpenXRHand.BoneUpdate (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRIPBinding.swift b/Sources/SwiftGodot/Generated/Api/OpenXRIPBinding.swift new file mode 100644 index 000000000..bf912c577 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRIPBinding.swift @@ -0,0 +1,243 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Defines a binding between an ``OpenXRAction`` and an XR input or output. +/// +/// This binding resource binds an ``OpenXRAction`` to inputs or outputs. As most controllers have left hand and right versions that are handled by the same interaction profile we can specify multiple bindings. For instance an action "Fire" could be bound to both "/user/hand/left/input/trigger" and "/user/hand/right/input/trigger". +open class OpenXRIPBinding: Resource { + override open class var godotClassName: StringName { "OpenXRIPBinding" } + + /* Properties */ + + /// ``OpenXRAction`` that is bound to these paths. + final public var action: OpenXRAction? { + get { + return get_action () + } + + set { + set_action (newValue) + } + + } + + /// Paths that define the inputs or outputs bound on the device. + final public var paths: PackedStringArray { + get { + return get_paths () + } + + set { + set_paths (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_action: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 349361333)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_action(_ action: OpenXRAction?) { + withUnsafePointer(to: action?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_set_action, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_action: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4072409085)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_action() -> OpenXRAction? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_get_action, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_path_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path_count") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Get the number of input/output paths in this binding. + public final func getPathCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_get_path_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("set_paths") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4015028928)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_paths(_ paths: PackedStringArray) { + withUnsafePointer(to: paths.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_set_paths, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_paths: GDExtensionMethodBindPtr = { + let methodName = StringName("get_paths") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_paths() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_get_paths, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_has_path: GDExtensionMethodBindPtr = { + let methodName = StringName("has_path") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if this input/output path is part of this binding. + public final func hasPath(_ path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_has_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_path: GDExtensionMethodBindPtr = { + let methodName = StringName("add_path") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Add an input/output path to this binding. + public final func addPath(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_add_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_path: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_path") + return withUnsafePointer(to: &OpenXRIPBinding.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Removes this input/output path from this binding. + public final func removePath(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRIPBinding.method_remove_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfile.swift b/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfile.swift new file mode 100644 index 000000000..20afec8f1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfile.swift @@ -0,0 +1,192 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Suggested bindings object for OpenXR. +/// +/// This object stores suggested bindings for an interaction profile. Interaction profiles define the metadata for a tracked XR device such as an XR controller. +/// +/// For more information see the interaction profiles info in the OpenXR specification. +/// +open class OpenXRInteractionProfile: Resource { + override open class var godotClassName: StringName { "OpenXRInteractionProfile" } + + /* Properties */ + + /// The interaction profile path identifying the XR device. + final public var interactionProfilePath: String { + get { + return get_interaction_profile_path () + } + + set { + set_interaction_profile_path (newValue) + } + + } + + /// Action bindings for this interaction profile. + final public var bindings: GArray { + get { + return get_bindings () + } + + set { + set_bindings (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_interaction_profile_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_interaction_profile_path") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_interaction_profile_path(_ interactionProfilePath: String) { + let interactionProfilePath = GString(interactionProfilePath) + withUnsafePointer(to: interactionProfilePath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_set_interaction_profile_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_interaction_profile_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_interaction_profile_path") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_interaction_profile_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_get_interaction_profile_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_binding_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_binding_count") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Get the number of bindings in this interaction profile. + public final func getBindingCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_get_binding_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_binding: GDExtensionMethodBindPtr = { + let methodName = StringName("get_binding") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3934429652)! + } + + } + + }() + + /// Retrieve the binding at this index. + public final func getBinding(index: Int32) -> OpenXRIPBinding? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_get_binding, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_bindings: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bindings") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bindings(_ bindings: GArray) { + withUnsafePointer(to: bindings.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_set_bindings, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bindings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bindings") + return withUnsafePointer(to: &OpenXRInteractionProfile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bindings() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRInteractionProfile.method_get_bindings, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfileMetadata.swift b/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfileMetadata.swift new file mode 100644 index 000000000..f793bdb24 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRInteractionProfileMetadata.swift @@ -0,0 +1,183 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Meta class registering supported devices in OpenXR. +/// +/// This class allows OpenXR core and extensions to register metadata relating to supported interaction devices such as controllers, trackers, haptic devices, etc. It is primarily used by the action map editor and to sanitize any action map by removing extension-dependent entries when applicable. +open class OpenXRInteractionProfileMetadata: Object { + override open class var godotClassName: StringName { "OpenXRInteractionProfileMetadata" } + /* Methods */ + fileprivate static var method_register_profile_rename: GDExtensionMethodBindPtr = { + let methodName = StringName("register_profile_rename") + return withUnsafePointer(to: &OpenXRInteractionProfileMetadata.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3186203200)! + } + + } + + }() + + /// Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps. + public final func registerProfileRename(oldName: String, newName: String) { + let oldName = GString(oldName) + withUnsafePointer(to: oldName.content) { pArg0 in + let newName = GString(newName) + withUnsafePointer(to: newName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfileMetadata.method_register_profile_rename, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_register_top_level_path: GDExtensionMethodBindPtr = { + let methodName = StringName("register_top_level_path") + return withUnsafePointer(to: &OpenXRInteractionProfileMetadata.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 254767734)! + } + + } + + }() + + /// Registers a top level path to which profiles can be bound. For instance `/user/hand/left` refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register `/user/body/vest`. + /// + /// `displayName` is the name shown to the user. `openxrPath` is the top level path being registered. `openxrExtensionName` is optional and ensures the top level path is only used if the specified extension is available/enabled. + /// + /// When a top level path ends up being bound by OpenXR, a ``XRPositionalTracker`` is instantiated to manage the state of the device. + /// + public final func registerTopLevelPath(displayName: String, openxrPath: String, openxrExtensionName: String) { + let displayName = GString(displayName) + withUnsafePointer(to: displayName.content) { pArg0 in + let openxrPath = GString(openxrPath) + withUnsafePointer(to: openxrPath.content) { pArg1 in + let openxrExtensionName = GString(openxrExtensionName) + withUnsafePointer(to: openxrExtensionName.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfileMetadata.method_register_top_level_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_register_interaction_profile: GDExtensionMethodBindPtr = { + let methodName = StringName("register_interaction_profile") + return withUnsafePointer(to: &OpenXRInteractionProfileMetadata.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 254767734)! + } + + } + + }() + + /// Registers an interaction profile using its OpenXR designation (e.g. `/interaction_profiles/khr/simple_controller` is the profile for OpenXR's simple controller profile). + /// + /// `displayName` is the description shown to the user. `openxrPath` is the interaction profile path being registered. `openxrExtensionName` optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out. + /// + public final func registerInteractionProfile(displayName: String, openxrPath: String, openxrExtensionName: String) { + let displayName = GString(displayName) + withUnsafePointer(to: displayName.content) { pArg0 in + let openxrPath = GString(openxrPath) + withUnsafePointer(to: openxrPath.content) { pArg1 in + let openxrExtensionName = GString(openxrExtensionName) + withUnsafePointer(to: openxrExtensionName.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfileMetadata.method_register_interaction_profile, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_register_io_path: GDExtensionMethodBindPtr = { + let methodName = StringName("register_io_path") + return withUnsafePointer(to: &OpenXRInteractionProfileMetadata.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3443511926)! + } + + } + + }() + + /// Registers an input/output path for the given `interactionProfile`. The profile should previously have been registered using ``registerInteractionProfile(displayName:openxrPath:openxrExtensionName:)``. `displayName` is the description shown to the user. `toplevelPath` specifies the bind path this input/output can be bound to (e.g. `/user/hand/left` or `/user/hand/right`). `openxrPath` is the action input/output being registered (e.g. `/user/hand/left/input/aim/pose`). `openxrExtensionName` restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. `XR_EXT_palm_pose` that introduces `…/input/palm_ext/pose` input paths). `actionType` defines the type of input or output provided by OpenXR. + public final func registerIoPath(interactionProfile: String, displayName: String, toplevelPath: String, openxrPath: String, openxrExtensionName: String, actionType: OpenXRAction.ActionType) { + let interactionProfile = GString(interactionProfile) + withUnsafePointer(to: interactionProfile.content) { pArg0 in + let displayName = GString(displayName) + withUnsafePointer(to: displayName.content) { pArg1 in + let toplevelPath = GString(toplevelPath) + withUnsafePointer(to: toplevelPath.content) { pArg2 in + let openxrPath = GString(openxrPath) + withUnsafePointer(to: openxrPath.content) { pArg3 in + let openxrExtensionName = GString(openxrExtensionName) + withUnsafePointer(to: openxrExtensionName.content) { pArg4 in + withUnsafePointer(to: actionType.rawValue) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInteractionProfileMetadata.method_register_io_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OpenXRInterface.swift b/Sources/SwiftGodot/Generated/Api/OpenXRInterface.swift new file mode 100644 index 000000000..4b56054ab --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OpenXRInterface.swift @@ -0,0 +1,1216 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Our OpenXR interface. +/// +/// The OpenXR interface allows Godot to interact with OpenXR runtimes and make it possible to create XR experiences and games. +/// +/// Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Godot starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Godot to know which render result should be output to the headset. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``sessionBegun`` +/// - ``sessionStopping`` +/// - ``sessionFocussed`` +/// - ``sessionVisible`` +/// - ``sessionLossPending`` +/// - ``instanceExiting`` +/// - ``poseRecentered`` +/// - ``refreshRateChanged`` +open class OpenXRInterface: XRInterface { + override open class var godotClassName: StringName { "OpenXRInterface" } + public enum Hand: Int64, CaseIterable, CustomDebugStringConvertible { + /// Left hand. + case left = 0 // HAND_LEFT + /// Right hand. + case right = 1 // HAND_RIGHT + /// Maximum value for the hand enum. + case max = 2 // HAND_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .left: return ".left" + case .right: return ".right" + case .max: return ".max" + } + + } + + } + + public enum HandMotionRange: Int64, CaseIterable, CustomDebugStringConvertible { + /// Full hand range, if user closes their hands, we make a full fist. + case unobstructed = 0 // HAND_MOTION_RANGE_UNOBSTRUCTED + /// Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller. + case conformToController = 1 // HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER + /// Maximum value for the motion range enum. + case max = 2 // HAND_MOTION_RANGE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unobstructed: return ".unobstructed" + case .conformToController: return ".conformToController" + case .max: return ".max" + } + + } + + } + + public enum HandTrackedSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// The source of hand tracking data is unknown (the extension is likely unsupported). + case unknown = 0 // HAND_TRACKED_SOURCE_UNKNOWN + /// The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc. + case unobstructed = 1 // HAND_TRACKED_SOURCE_UNOBSTRUCTED + /// The source of hand tracking is a controller, bone positions are inferred from controller inputs. + case controller = 2 // HAND_TRACKED_SOURCE_CONTROLLER + /// Maximum value for the hand tracked source enum. + case max = 3 // HAND_TRACKED_SOURCE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .unknown: return ".unknown" + case .unobstructed: return ".unobstructed" + case .controller: return ".controller" + case .max: return ".max" + } + + } + + } + + public enum HandJoints: Int64, CaseIterable, CustomDebugStringConvertible { + /// Palm joint. + case palm = 0 // HAND_JOINT_PALM + /// Wrist joint. + case wrist = 1 // HAND_JOINT_WRIST + /// Thumb metacarpal joint. + case thumbMetacarpal = 2 // HAND_JOINT_THUMB_METACARPAL + /// Thumb proximal joint. + case thumbProximal = 3 // HAND_JOINT_THUMB_PROXIMAL + /// Thumb distal joint. + case thumbDistal = 4 // HAND_JOINT_THUMB_DISTAL + /// Thumb tip joint. + case thumbTip = 5 // HAND_JOINT_THUMB_TIP + /// Index metacarpal joint. + case indexMetacarpal = 6 // HAND_JOINT_INDEX_METACARPAL + /// Index proximal joint. + case indexProximal = 7 // HAND_JOINT_INDEX_PROXIMAL + /// Index intermediate joint. + case indexIntermediate = 8 // HAND_JOINT_INDEX_INTERMEDIATE + /// Index distal joint. + case indexDistal = 9 // HAND_JOINT_INDEX_DISTAL + /// Index tip joint. + case indexTip = 10 // HAND_JOINT_INDEX_TIP + /// Middle metacarpal joint. + case middleMetacarpal = 11 // HAND_JOINT_MIDDLE_METACARPAL + /// Middle proximal joint. + case middleProximal = 12 // HAND_JOINT_MIDDLE_PROXIMAL + /// Middle intermediate joint. + case middleIntermediate = 13 // HAND_JOINT_MIDDLE_INTERMEDIATE + /// Middle distal joint. + case middleDistal = 14 // HAND_JOINT_MIDDLE_DISTAL + /// Middle tip joint. + case middleTip = 15 // HAND_JOINT_MIDDLE_TIP + /// Ring metacarpal joint. + case ringMetacarpal = 16 // HAND_JOINT_RING_METACARPAL + /// Ring proximal joint. + case ringProximal = 17 // HAND_JOINT_RING_PROXIMAL + /// Ring intermediate joint. + case ringIntermediate = 18 // HAND_JOINT_RING_INTERMEDIATE + /// Ring distal joint. + case ringDistal = 19 // HAND_JOINT_RING_DISTAL + /// Ring tip joint. + case ringTip = 20 // HAND_JOINT_RING_TIP + /// Little metacarpal joint. + case littleMetacarpal = 21 // HAND_JOINT_LITTLE_METACARPAL + /// Little proximal joint. + case littleProximal = 22 // HAND_JOINT_LITTLE_PROXIMAL + /// Little intermediate joint. + case littleIntermediate = 23 // HAND_JOINT_LITTLE_INTERMEDIATE + /// Little distal joint. + case littleDistal = 24 // HAND_JOINT_LITTLE_DISTAL + /// Little tip joint. + case littleTip = 25 // HAND_JOINT_LITTLE_TIP + /// Maximum value for the hand joint enum. + case max = 26 // HAND_JOINT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .palm: return ".palm" + case .wrist: return ".wrist" + case .thumbMetacarpal: return ".thumbMetacarpal" + case .thumbProximal: return ".thumbProximal" + case .thumbDistal: return ".thumbDistal" + case .thumbTip: return ".thumbTip" + case .indexMetacarpal: return ".indexMetacarpal" + case .indexProximal: return ".indexProximal" + case .indexIntermediate: return ".indexIntermediate" + case .indexDistal: return ".indexDistal" + case .indexTip: return ".indexTip" + case .middleMetacarpal: return ".middleMetacarpal" + case .middleProximal: return ".middleProximal" + case .middleIntermediate: return ".middleIntermediate" + case .middleDistal: return ".middleDistal" + case .middleTip: return ".middleTip" + case .ringMetacarpal: return ".ringMetacarpal" + case .ringProximal: return ".ringProximal" + case .ringIntermediate: return ".ringIntermediate" + case .ringDistal: return ".ringDistal" + case .ringTip: return ".ringTip" + case .littleMetacarpal: return ".littleMetacarpal" + case .littleProximal: return ".littleProximal" + case .littleIntermediate: return ".littleIntermediate" + case .littleDistal: return ".littleDistal" + case .littleTip: return ".littleTip" + case .max: return ".max" + } + + } + + } + + public struct HandJointFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used. + public static let orientationValid = HandJointFlags (rawValue: 1) + /// If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data. + public static let orientationTracked = HandJointFlags (rawValue: 2) + /// If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used. + public static let positionValid = HandJointFlags (rawValue: 4) + /// If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data. + public static let positionTracked = HandJointFlags (rawValue: 8) + /// If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used. + public static let linearVelocityValid = HandJointFlags (rawValue: 16) + /// If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used. + public static let angularVelocityValid = HandJointFlags (rawValue: 32) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.orientationValid) { result += "orientationValid, " } + if self.contains (.orientationTracked) { result += "orientationTracked, " } + if self.contains (.positionValid) { result += "positionValid, " } + if self.contains (.positionTracked) { result += "positionTracked, " } + if self.contains (.linearVelocityValid) { result += "linearVelocityValid, " } + if self.contains (.angularVelocityValid) { result += "angularVelocityValid, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + + /* Properties */ + + /// The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized. + final public var displayRefreshRate: Double { + get { + return get_display_refresh_rate () + } + + set { + set_display_refresh_rate (newValue) + } + + } + + /// The render size multiplier for the current HMD. Must be set before the interface has been initialized. + final public var renderTargetSizeMultiplier: Double { + get { + return get_render_target_size_multiplier () + } + + set { + set_render_target_size_multiplier (newValue) + } + + } + + /// Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible. + /// + /// > Note: Only works on compatibility renderer. + /// + final public var foveationLevel: Int32 { + get { + return get_foveation_level () + } + + set { + set_foveation_level (newValue) + } + + } + + /// Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and ``foveationLevel``. + /// + /// > Note: Only works on compatibility renderer. + /// + final public var foveationDynamic: Bool { + get { + return get_foveation_dynamic () + } + + set { + set_foveation_dynamic (newValue) + } + + } + + /// The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + /// + /// > Note: Mobile and Forward+ renderers only. Requires ``Viewport/vrsMode`` to be set to ``Viewport/VRSMode/xr``. + /// + final public var vrsMinRadius: Double { + get { + return get_vrs_min_radius () + } + + set { + set_vrs_min_radius (newValue) + } + + } + + /// The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + /// + /// > Note: Mobile and Forward+ renderers only. Requires ``Viewport/vrsMode`` to be set to ``Viewport/VRSMode/xr``. + /// + final public var vrsStrength: Double { + get { + return get_vrs_strength () + } + + set { + set_vrs_strength (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_display_refresh_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_display_refresh_rate") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_display_refresh_rate() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_display_refresh_rate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_display_refresh_rate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_display_refresh_rate") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_display_refresh_rate(_ refreshRate: Double) { + withUnsafePointer(to: refreshRate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_display_refresh_rate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_render_target_size_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_target_size_multiplier") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_render_target_size_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_render_target_size_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_render_target_size_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_render_target_size_multiplier") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_render_target_size_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_render_target_size_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_foveation_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_foveation_supported") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value. + /// + /// > Note: This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set ``Viewport/vrsMode`` to `VRS_XR` on desktop. + /// + public final func isFoveationSupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRInterface.method_is_foveation_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_foveation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("get_foveation_level") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_foveation_level() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_foveation_level, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_foveation_level: GDExtensionMethodBindPtr = { + let methodName = StringName("set_foveation_level") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_foveation_level(_ foveationLevel: Int32) { + withUnsafePointer(to: foveationLevel) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_foveation_level, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_foveation_dynamic: GDExtensionMethodBindPtr = { + let methodName = StringName("get_foveation_dynamic") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_foveation_dynamic() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_foveation_dynamic, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_foveation_dynamic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_foveation_dynamic") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_foveation_dynamic(_ foveationDynamic: Bool) { + withUnsafePointer(to: foveationDynamic) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_foveation_dynamic, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_action_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_action_set_active") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the given action set is active. + public final func isActionSetActive(name: String) -> Bool { + var _result: Bool = false + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_is_action_set_active, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_action_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_action_set_active") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Sets the given action set as active or inactive. + public final func setActionSetActive(name: String, active: Bool) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_action_set_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_action_sets: GDExtensionMethodBindPtr = { + let methodName = StringName("get_action_sets") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of action sets registered with Godot (loaded from the action map at runtime). + public final func getActionSets() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_action_sets, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_available_display_refresh_rates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_available_display_refresh_rates") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized. + public final func getAvailableDisplayRefreshRates() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_available_display_refresh_rates, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_motion_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_range") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 855158159)! + } + + } + + }() + + /// If handtracking is enabled and motion range is supported, sets the currently configured motion range for `hand` to `motionRange`. + public final func setMotionRange(hand: OpenXRInterface.Hand, motionRange: OpenXRInterface.HandMotionRange) { + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: motionRange.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_motion_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_motion_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_range") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3955838114)! + } + + } + + }() + + /// If handtracking is enabled and motion range is supported, gets the currently configured motion range for `hand`. + public final func getMotionRange(hand: OpenXRInterface.Hand) -> OpenXRInterface.HandMotionRange { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_motion_range, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return OpenXRInterface.HandMotionRange (rawValue: _result)! + } + + fileprivate static var method_get_hand_tracking_source: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_tracking_source") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4092421202)! + } + + } + + }() + + /// If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for `hand`. + public final func getHandTrackingSource(hand: OpenXRInterface.Hand) -> OpenXRInterface.HandTrackedSource { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_tracking_source, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return OpenXRInterface.HandTrackedSource (rawValue: _result)! + } + + fileprivate static var method_get_hand_joint_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_flags") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 720567706)! + } + + } + + }() + + /// If handtracking is enabled, returns flags that inform us of the validity of the tracking data. + public final func getHandJointFlags(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> OpenXRInterface.HandJointFlags { + var _result: OpenXRInterface.HandJointFlags = OpenXRInterface.HandJointFlags () + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_hand_joint_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_rotation") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1974618321)! + } + + } + + }() + + /// If handtracking is enabled, returns the rotation of a joint (`joint`) of a hand (`hand`) as provided by OpenXR. + public final func getHandJointRotation(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> Quaternion { + var _result: Quaternion = Quaternion () + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_hand_joint_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_position") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3529194242)! + } + + } + + }() + + /// If handtracking is enabled, returns the position of a joint (`joint`) of a hand (`hand`) as provided by OpenXR. This is relative to ``XROrigin3D`` without worldscale applied! + public final func getHandJointPosition(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_hand_joint_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_radius") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 901522724)! + } + + } + + }() + + /// If handtracking is enabled, returns the radius of a joint (`joint`) of a hand (`hand`) as provided by OpenXR. This is without worldscale applied! + public final func getHandJointRadius(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_hand_joint_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_linear_velocity") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3529194242)! + } + + } + + }() + + /// If handtracking is enabled, returns the linear velocity of a joint (`joint`) of a hand (`hand`) as provided by OpenXR. This is relative to ``XROrigin3D`` without worldscale applied! + public final func getHandJointLinearVelocity(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_hand_joint_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_hand_joint_angular_velocity") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3529194242)! + } + + } + + }() + + /// If handtracking is enabled, returns the angular velocity of a joint (`joint`) of a hand (`hand`) as provided by OpenXR. This is relative to ``XROrigin3D``! + public final func getHandJointAngularVelocity(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: hand.rawValue) { pArg0 in + withUnsafePointer(to: joint.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_hand_joint_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_is_hand_tracking_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hand_tracking_supported") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if OpenXR's hand tracking is supported and enabled. + /// + /// > Note: This only returns a valid value after OpenXR has been initialized. + /// + public final func isHandTrackingSupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRInterface.method_is_hand_tracking_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_hand_interaction_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hand_interaction_supported") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if OpenXR's hand interaction profile is supported and enabled. + /// + /// > Note: This only returns a valid value after OpenXR has been initialized. + /// + public final func isHandInteractionSupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRInterface.method_is_hand_interaction_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_eye_gaze_interaction_supported: GDExtensionMethodBindPtr = { + let methodName = StringName("is_eye_gaze_interaction_supported") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns the capabilities of the eye gaze interaction extension. + /// + /// > Note: This only returns a valid value after OpenXR has been initialized. + /// + public final func isEyeGazeInteractionSupported() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OpenXRInterface.method_is_eye_gaze_interaction_supported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_vrs_min_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vrs_min_radius") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vrs_min_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_vrs_min_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vrs_min_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vrs_min_radius") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vrs_min_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_vrs_min_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vrs_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vrs_strength") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vrs_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(OpenXRInterface.method_get_vrs_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_vrs_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vrs_strength") + return withUnsafePointer(to: &OpenXRInterface.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vrs_strength(_ strength: Double) { + withUnsafePointer(to: strength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OpenXRInterface.method_set_vrs_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Informs our OpenXR session has been started. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sessionBegun.connect { + /// print ("caught signal") + /// } + /// ``` + public var sessionBegun: SimpleSignal { SimpleSignal (target: self, signalName: "session_begun") } + + /// Informs our OpenXR session is stopping. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sessionStopping.connect { + /// print ("caught signal") + /// } + /// ``` + public var sessionStopping: SimpleSignal { SimpleSignal (target: self, signalName: "session_stopping") } + + /// Informs our OpenXR session now has focus. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sessionFocussed.connect { + /// print ("caught signal") + /// } + /// ``` + public var sessionFocussed: SimpleSignal { SimpleSignal (target: self, signalName: "session_focussed") } + + /// Informs our OpenXR session is now visible (output is being sent to the HMD). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sessionVisible.connect { + /// print ("caught signal") + /// } + /// ``` + public var sessionVisible: SimpleSignal { SimpleSignal (target: self, signalName: "session_visible") } + + /// Informs our OpenXR session is in the process of being lost. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sessionLossPending.connect { + /// print ("caught signal") + /// } + /// ``` + public var sessionLossPending: SimpleSignal { SimpleSignal (target: self, signalName: "session_loss_pending") } + + /// Informs our OpenXR instance is exiting. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.instanceExiting.connect { + /// print ("caught signal") + /// } + /// ``` + public var instanceExiting: SimpleSignal { SimpleSignal (target: self, signalName: "instance_exiting") } + + /// Informs the user queued a recenter of the player position. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.poseRecentered.connect { + /// print ("caught signal") + /// } + /// ``` + public var poseRecentered: SimpleSignal { SimpleSignal (target: self, signalName: "pose_recentered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ refreshRate: Double) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Double (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Informs the user the HMD refresh rate has changed. + /// + /// **Node:** Only emitted if XR runtime supports the refresh rate extension. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.refreshRateChanged.connect { refreshRate in + /// print ("caught signal") + /// } + /// ``` + public var refreshRateChanged: Signal1 { Signal1 (target: self, signalName: "refresh_rate_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OptimizedTranslation.swift b/Sources/SwiftGodot/Generated/Api/OptimizedTranslation.swift new file mode 100644 index 000000000..2817e3c27 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OptimizedTranslation.swift @@ -0,0 +1,54 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An optimized translation, used by default for CSV Translations. +/// +/// An optimized translation, used by default for CSV Translations. Uses real-time compressed translations, which results in very small dictionaries. +open class OptimizedTranslation: Translation { + override open class var godotClassName: StringName { "OptimizedTranslation" } + /* Methods */ + fileprivate static var method_generate: GDExtensionMethodBindPtr = { + let methodName = StringName("generate") + return withUnsafePointer(to: &OptimizedTranslation.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1466479800)! + } + + } + + }() + + /// Generates and sets an optimized translation from the given ``Translation`` resource. + public final func generate(from: Translation?) { + withUnsafePointer(to: from?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptimizedTranslation.method_generate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/OptionButton.swift b/Sources/SwiftGodot/Generated/Api/OptionButton.swift new file mode 100644 index 000000000..2755cda69 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/OptionButton.swift @@ -0,0 +1,1103 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A button that brings up a dropdown with selectable options when pressed. +/// +/// ``OptionButton`` is a type of button that brings up a dropdown with selectable items when pressed. The item selected becomes the "current" item and is displayed as the button text. +/// +/// See also ``BaseButton`` which contains common properties and methods associated with this node. +/// +/// > Note: The ID values used for items are limited to 32 bits, not full 64 bits of integer. This has a range of `-2^32` to `2^32 - 1`, i.e. `-2147483648` to `2147483647`. +/// +/// > Note: The ``Button/text`` and ``Button/icon`` properties are set automatically based on the selected item. They shouldn't be changed manually. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``itemSelected`` +/// - ``itemFocused`` +open class OptionButton: Button { + override open class var godotClassName: StringName { "OptionButton" } + + /* Properties */ + + /// If `true`, minimum size will be determined by the longest item's text, instead of the currently selected one's. + /// + /// > Note: For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items. + /// + final public var fitToLongestItem: Bool { + get { + return is_fit_to_longest_item () + } + + set { + set_fit_to_longest_item (newValue) + } + + } + + /// If `true`, the currently selected item can be selected again. + final public var allowReselect: Bool { + get { + return get_allow_reselect () + } + + set { + set_allow_reselect (newValue) + } + + } + + /// The number of items to select from. + final public var itemCount: Int32 { + get { + return get_item_count () + } + + set { + set_item_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_add_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2697778442)! + } + + } + + }() + + /// Adds an item, with text `label` and (optionally) `id`. If no `id` is passed, the item index will be used as the item's ID. New items are appended at the end. + public final func addItem(label: String, id: Int32 = -1) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_add_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3781678508)! + } + + } + + }() + + /// Adds an item, with a `texture` icon, text `label` and (optionally) `id`. If no `id` is passed, the item index will be used as the item's ID. New items are appended at the end. + public final func addIconItem(texture: Texture2D?, label: String, id: Int32 = -1) { + withUnsafePointer(to: texture?.handle) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_add_icon_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the text of the item at index `idx`. + public final func setItemText(idx: Int32, text: String) { + withUnsafePointer(to: idx) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Sets the icon of the item at index `idx`. + public final func setItemIcon(idx: Int32, texture: Texture2D?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_disabled") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets whether the item at index `idx` is disabled. + /// + /// Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. + /// + public final func setItemDisabled(idx: Int32, disabled: Bool) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_id") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the ID of the item at index `idx`. + public final func setItemId(idx: Int32, id: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_metadata") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. + public final func setItemMetadata(idx: Int32, metadata: Variant?) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: metadata.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tooltip") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the tooltip of the item at index `idx`. + public final func setItemTooltip(idx: Int32, tooltip: String) { + withUnsafePointer(to: idx) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the text of the item at index `idx`. + public final func getItemText(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the icon of the item at index `idx`. + public final func getItemIcon(idx: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_id") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the ID of the item at index `idx`. + public final func getItemId(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_index") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the index of the item with the given `id`. + public final func getItemIndex(id: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_metadata") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. + public final func getItemMetadata(idx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_tooltip") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the tooltip of the item at index `idx`. + public final func getItemTooltip(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_disabled") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is disabled. + public final func isItemDisabled(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_is_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_separator") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at index `idx` is marked as a separator. + public final func isItemSeparator(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_is_item_separator, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("add_separator") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3005725572)! + } + + } + + }() + + /// Adds a separator to the list of items. Separators help to group items, and can optionally be given a `text` header. A separator also gets an index assigned, and is appended at the end of the item list. + public final func addSeparator(text: String = "") { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_add_separator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears all the items in the ``OptionButton``. + public final func clear() { + gi.object_method_bind_ptrcall(OptionButton.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_select: GDExtensionMethodBindPtr = { + let methodName = StringName("select") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Selects an item by index and makes it the current item. This will work even if the item is disabled. + /// + /// Passing `-1` as the index deselects any currently selected item. + /// + public final func select(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_select, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_selected: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + public final func getSelected() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OptionButton.method_get_selected, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selected_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_id") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the ID of the selected item, or `-1` if no item is selected. + public final func getSelectedId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OptionButton.method_get_selected_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selected_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_metadata") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214101251)! + } + + } + + }() + + /// Gets the metadata of the selected item. Metadata for items can be set using ``setItemMetadata(idx:metadata:)``. + public final func getSelectedMetadata() -> Variant? { + var _result: Variant.ContentType = Variant.zero + gi.object_method_bind_ptrcall(OptionButton.method_get_selected_metadata, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Variant(takingOver: _result) + } + + fileprivate static var method_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the item at index `idx`. + public final func removeItem(idx: Int32) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_remove_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("get_popup") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229722558)! + } + + } + + }() + + /// Returns the ``PopupMenu`` contained in this button. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``Window/visible`` property. + /// + public final func getPopup() -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(OptionButton.method_get_popup, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_show_popup: GDExtensionMethodBindPtr = { + let methodName = StringName("show_popup") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adjusts popup position and sizing for the ``OptionButton``, then shows the ``PopupMenu``. Prefer this over using `get_popup().popup()`. + public final func showPopup() { + gi.object_method_bind_ptrcall(OptionButton.method_show_popup, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_count") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_item_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_count") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(OptionButton.method_get_item_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_has_selectable_items: GDExtensionMethodBindPtr = { + let methodName = StringName("has_selectable_items") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if this button contains at least one item which is not disabled, or marked as a separator. + public final func hasSelectableItems() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OptionButton.method_has_selectable_items, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selectable_item: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selectable_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 894402480)! + } + + } + + }() + + /// Returns the index of the first item which is not disabled, or marked as a separator. If `fromLast` is `true`, the items will be searched in reverse order. + /// + /// Returns `-1` if no item is found. + /// + public final func getSelectableItem(fromLast: Bool = false) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: fromLast) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_get_selectable_item, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_fit_to_longest_item: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fit_to_longest_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fit_to_longest_item(_ fit: Bool) { + withUnsafePointer(to: fit) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_fit_to_longest_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_fit_to_longest_item: GDExtensionMethodBindPtr = { + let methodName = StringName("is_fit_to_longest_item") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_fit_to_longest_item() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OptionButton.method_is_fit_to_longest_item, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_reselect: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_reselect") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_reselect(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_allow_reselect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_allow_reselect: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_reselect") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_reselect() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(OptionButton.method_get_allow_reselect, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_disable_shortcuts: GDExtensionMethodBindPtr = { + let methodName = StringName("set_disable_shortcuts") + return withUnsafePointer(to: &OptionButton.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `true`, shortcuts are disabled and cannot be used to trigger the button. + public final func setDisableShortcuts(disabled: Bool) { + withUnsafePointer(to: disabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(OptionButton.method_set_disable_shortcuts, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. + /// + /// ``allowReselect`` must be enabled to reselect an item. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemSelected.connect { index in + /// print ("caught signal") + /// } + /// ``` + public var itemSelected: Signal1 { Signal1 (target: self, signalName: "item_selected") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user navigates to an item using the ``ProjectSettings/input/uiUp`` or ``ProjectSettings/input/uiDown`` input actions. The index of the item selected is passed as argument. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.itemFocused.connect { index in + /// print ("caught signal") + /// } + /// ``` + public var itemFocused: Signal2 { Signal2 (target: self, signalName: "item_focused") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PCKPacker.swift b/Sources/SwiftGodot/Generated/Api/PCKPacker.swift new file mode 100644 index 000000000..b1eaad815 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PCKPacker.swift @@ -0,0 +1,131 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Creates packages that can be loaded into a running project. +/// +/// The ``PCKPacker`` is used to create packages that can be loaded into a running project using ``ProjectSettings/loadResourcePack(_:replaceFiles:offset:)``. +/// +/// The above ``PCKPacker`` creates package `test.pck`, then adds a file named `text.txt` at the root of the package. +/// +open class PCKPacker: RefCounted { + override open class var godotClassName: StringName { "PCKPacker" } + /* Methods */ + fileprivate static var method_pck_start: GDExtensionMethodBindPtr = { + let methodName = StringName("pck_start") + return withUnsafePointer(to: &PCKPacker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 508410629)! + } + + } + + }() + + /// Creates a new PCK file with the name `pckName`. The `.pck` file extension isn't added automatically, so it should be part of `pckName` (even though it's not required). + public final func pckStart(pckName: String, alignment: Int32 = 32, key: String = "0000000000000000000000000000000000000000000000000000000000000000", encryptDirectory: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let pckName = GString(pckName) + withUnsafePointer(to: pckName.content) { pArg0 in + withUnsafePointer(to: alignment) { pArg1 in + let key = GString(key) + withUnsafePointer(to: key.content) { pArg2 in + withUnsafePointer(to: encryptDirectory) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PCKPacker.method_pck_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_add_file: GDExtensionMethodBindPtr = { + let methodName = StringName("add_file") + return withUnsafePointer(to: &PCKPacker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2215643711)! + } + + } + + }() + + /// Adds the `sourcePath` file to the current PCK package at the `pckPath` internal path (should start with `res://`). + public final func addFile(pckPath: String, sourcePath: String, encrypt: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let pckPath = GString(pckPath) + withUnsafePointer(to: pckPath.content) { pArg0 in + let sourcePath = GString(sourcePath) + withUnsafePointer(to: sourcePath.content) { pArg1 in + withUnsafePointer(to: encrypt) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PCKPacker.method_add_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_flush: GDExtensionMethodBindPtr = { + let methodName = StringName("flush") + return withUnsafePointer(to: &PCKPacker.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1633102583)! + } + + } + + }() + + /// Writes the files specified using all ``addFile(pckPath:sourcePath:encrypt:)`` calls since the last flush. If `verbose` is `true`, a list of files added will be printed to the console for easier debugging. + public final func flush(verbose: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: verbose) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PCKPacker.method_flush, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PackedDataContainer.swift b/Sources/SwiftGodot/Generated/Api/PackedDataContainer.swift new file mode 100644 index 000000000..d24dfc9cc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PackedDataContainer.swift @@ -0,0 +1,81 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Efficiently packs and serializes ``GArray`` or ``GDictionary``. +/// +/// ``PackedDataContainer`` can be used to efficiently store data from untyped containers. The data is packed into raw bytes and can be saved to file. Only ``GArray`` and ``GDictionary`` can be stored this way. +/// +/// You can retrieve the data by iterating on the container, which will work as if iterating on the packed data itself. If the packed container is a ``GDictionary``, the data can be retrieved by key names (``String``/``StringName`` only). +/// +/// Nested containers will be packed recursively. While iterating, they will be returned as ``PackedDataContainerRef``. +/// +open class PackedDataContainer: Resource { + override open class var godotClassName: StringName { "PackedDataContainer" } + /* Methods */ + fileprivate static var method_pack: GDExtensionMethodBindPtr = { + let methodName = StringName("pack") + return withUnsafePointer(to: &PackedDataContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 966674026)! + } + + } + + }() + + /// Packs the given container into a binary representation. The `value` must be either ``GArray`` or ``GDictionary``, any other type will result in invalid data error. + /// + /// > Note: Subsequent calls to this method will overwrite the existing data. + /// + public final func pack(value: Variant?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: value.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PackedDataContainer.method_pack, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_size: GDExtensionMethodBindPtr = { + let methodName = StringName("size") + return withUnsafePointer(to: &PackedDataContainer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the size of the packed container (see ``GArray/size()`` and ``GDictionary/size()``). + public final func size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PackedDataContainer.method_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PackedDataContainerRef.swift b/Sources/SwiftGodot/Generated/Api/PackedDataContainerRef.swift new file mode 100644 index 000000000..b99d40d4a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PackedDataContainerRef.swift @@ -0,0 +1,47 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An internal class used by ``PackedDataContainer`` to pack nested arrays and dictionaries. +/// +/// When packing nested containers using ``PackedDataContainer``, they are recursively packed into ``PackedDataContainerRef`` (only applies to ``GArray`` and ``GDictionary``). Their data can be retrieved the same way as from ``PackedDataContainer``. +/// +open class PackedDataContainerRef: RefCounted { + override open class var godotClassName: StringName { "PackedDataContainerRef" } + /* Methods */ + fileprivate static var method_size: GDExtensionMethodBindPtr = { + let methodName = StringName("size") + return withUnsafePointer(to: &PackedDataContainerRef.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the size of the packed container (see ``GArray/size()`` and ``GDictionary/size()``). + public final func size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PackedDataContainerRef.method_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PackedScene.swift b/Sources/SwiftGodot/Generated/Api/PackedScene.swift new file mode 100644 index 000000000..ff38b2176 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PackedScene.swift @@ -0,0 +1,158 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// An abstraction of a serialized scene. +/// +/// A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. +/// +/// Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see ``Node/owner`` property). +/// +/// > Note: The node doesn't need to own itself. +/// +/// **Example of loading a saved scene:** +/// +/// **Example of saving a node with different owners:** The following example creates 3 objects: ``Node2D`` (`node`), ``RigidBody2D`` (`body`) and ``CollisionObject2D`` (`collision`). `collision` is a child of `body` which is a child of `node`. Only `body` is owned by `node` and ``pack(path:)`` will therefore only save those two nodes, but not `collision`. +/// +open class PackedScene: Resource { + override open class var godotClassName: StringName { "PackedScene" } + public enum GenEditState: Int64, CaseIterable, CustomDebugStringConvertible { + /// If passed to ``instantiate(editState:)``, blocks edits to the scene state. + case disabled = 0 // GEN_EDIT_STATE_DISABLED + /// If passed to ``instantiate(editState:)``, provides local scene resources to the local scene. + /// + /// > Note: Only available in editor builds. + /// + case instance = 1 // GEN_EDIT_STATE_INSTANCE + /// If passed to ``instantiate(editState:)``, provides local scene resources to the local scene. Only the main scene should receive the main edit state. + /// + /// > Note: Only available in editor builds. + /// + case main = 2 // GEN_EDIT_STATE_MAIN + /// It's similar to ``GenEditState/main``, but for the case where the scene is being instantiated to be the base of another one. + /// + /// > Note: Only available in editor builds. + /// + case mainInherited = 3 // GEN_EDIT_STATE_MAIN_INHERITED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .instance: return ".instance" + case .main: return ".main" + case .mainInherited: return ".mainInherited" + } + + } + + } + + /* Methods */ + fileprivate static var method_pack: GDExtensionMethodBindPtr = { + let methodName = StringName("pack") + return withUnsafePointer(to: &PackedScene.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2584678054)! + } + + } + + }() + + /// Packs the `path` node, and all owned sub-nodes, into this ``PackedScene``. Any existing data will be cleared. See ``Node/owner``. + public final func pack(path: Node?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: path?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PackedScene.method_pack, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_instantiate: GDExtensionMethodBindPtr = { + let methodName = StringName("instantiate") + return withUnsafePointer(to: &PackedScene.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2628778455)! + } + + } + + }() + + /// Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a ``Node/notificationSceneInstantiated`` notification on the root node. + public final func instantiate(editState: PackedScene.GenEditState = .disabled) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: editState.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PackedScene.method_instantiate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_can_instantiate: GDExtensionMethodBindPtr = { + let methodName = StringName("can_instantiate") + return withUnsafePointer(to: &PackedScene.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the scene file has nodes. + public final func canInstantiate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PackedScene.method_can_instantiate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_state") + return withUnsafePointer(to: &PackedScene.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3479783971)! + } + + } + + }() + + /// Returns the ``SceneState`` representing the scene file contents. + public final func getState() -> SceneState? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PackedScene.method_get_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PacketPeer.swift b/Sources/SwiftGodot/Generated/Api/PacketPeer.swift new file mode 100644 index 000000000..35eb49cdf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PacketPeer.swift @@ -0,0 +1,239 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstraction and base class for packet-based protocols. +/// +/// PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +open class PacketPeer: RefCounted { + override open class var godotClassName: StringName { "PacketPeer" } + + /* Properties */ + + /// Maximum buffer size allowed when encoding ``Variant``s. Raise this value to support heavier memory allocations. + /// + /// The ``putVar(_:fullObjects:)`` method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the ``Variant``. If the ``Variant`` is bigger than ``encodeBufferMaxSize``, the method will error out with ``GodotError/errOutOfMemory``. + /// + final public var encodeBufferMaxSize: Int32 { + get { + return get_encode_buffer_max_size () + } + + set { + set_encode_buffer_max_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_var: GDExtensionMethodBindPtr = { + let methodName = StringName("get_var") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3442865206)! + } + + } + + }() + + /// Gets a Variant. If `allowObjects` is `true`, decoding objects is allowed. + /// + /// Internally, this uses the same decoding mechanism as the ``@GlobalScope.bytes_to_var`` method. + /// + /// > Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + /// + public final func getVar(allowObjects: Bool = false) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: allowObjects) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeer.method_get_var, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_put_var: GDExtensionMethodBindPtr = { + let methodName = StringName("put_var") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2436251611)! + } + + } + + }() + + /// Sends a ``Variant`` as a packet. If `fullObjects` is `true`, encoding objects is allowed (and can potentially include code). + /// + /// Internally, this uses the same encoding mechanism as the ``@GlobalScope.var_to_bytes`` method. + /// + public final func putVar(_ `var`: Variant?, fullObjects: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: `var`.content) { pArg0 in + withUnsafePointer(to: fullObjects) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PacketPeer.method_put_var, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_packet: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2115431945)! + } + + } + + }() + + /// Gets a raw packet. + public final func getPacket() -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + gi.object_method_bind_ptrcall(PacketPeer.method_get_packet, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_put_packet: GDExtensionMethodBindPtr = { + let methodName = StringName("put_packet") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 680677267)! + } + + } + + }() + + /// Sends a raw packet. + public final func putPacket(buffer: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeer.method_put_packet, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_packet_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_error") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3185525595)! + } + + } + + }() + + /// Returns the error state of the last packet received (via ``getPacket()`` and ``getVar(allowObjects:)``). + public final func getPacketError() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PacketPeer.method_get_packet_error, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_available_packet_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_available_packet_count") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of packets currently available in the ring-buffer. + public final func getAvailablePacketCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeer.method_get_available_packet_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_encode_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_encode_buffer_max_size") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_encode_buffer_max_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeer.method_get_encode_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_encode_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_encode_buffer_max_size") + return withUnsafePointer(to: &PacketPeer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_encode_buffer_max_size(_ maxSize: Int32) { + withUnsafePointer(to: maxSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeer.method_set_encode_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PacketPeerDTLS.swift b/Sources/SwiftGodot/Generated/Api/PacketPeerDTLS.swift new file mode 100644 index 000000000..5dad9d1e1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PacketPeerDTLS.swift @@ -0,0 +1,144 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// DTLS packet peer. +/// +/// This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by ``DTLSServer/takeConnection(udpPeer:)``. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +/// > Warning: TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. +/// +open class PacketPeerDTLS: PacketPeer { + override open class var godotClassName: StringName { "PacketPeerDTLS" } + public enum Status: Int64, CaseIterable, CustomDebugStringConvertible { + /// A status representing a ``PacketPeerDTLS`` that is disconnected. + case disconnected = 0 // STATUS_DISCONNECTED + /// A status representing a ``PacketPeerDTLS`` that is currently performing the handshake with a remote peer. + case handshaking = 1 // STATUS_HANDSHAKING + /// A status representing a ``PacketPeerDTLS`` that is connected to a remote peer. + case connected = 2 // STATUS_CONNECTED + /// A status representing a ``PacketPeerDTLS`` in a generic error state. + case error = 3 // STATUS_ERROR + /// An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. + case errorHostnameMismatch = 4 // STATUS_ERROR_HOSTNAME_MISMATCH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disconnected: return ".disconnected" + case .handshaking: return ".handshaking" + case .connected: return ".connected" + case .error: return ".error" + case .errorHostnameMismatch: return ".errorHostnameMismatch" + } + + } + + } + + /* Methods */ + fileprivate static var method_poll: GDExtensionMethodBindPtr = { + let methodName = StringName("poll") + return withUnsafePointer(to: &PacketPeerDTLS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. + public final func poll() { + gi.object_method_bind_ptrcall(PacketPeerDTLS.method_poll, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_connect_to_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_to_peer") + return withUnsafePointer(to: &PacketPeerDTLS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2880188099)! + } + + } + + }() + + /// Connects a `packetPeer` beginning the DTLS handshake using the underlying ``PacketPeerUDP`` which must be connected (see ``PacketPeerUDP/connectToHost(_:port:)``). You can optionally specify the `clientOptions` to be used while verifying the TLS connections. See ``TLSOptions/client(trustedChain:commonNameOverride:)`` and ``TLSOptions/clientUnsafe(trustedChain:)``. + public final func connectToPeer(packetPeer: PacketPeerUDP?, hostname: String, clientOptions: TLSOptions? = nil) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: packetPeer?.handle) { pArg0 in + let hostname = GString(hostname) + withUnsafePointer(to: hostname.content) { pArg1 in + withUnsafePointer(to: clientOptions?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerDTLS.method_connect_to_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_status: GDExtensionMethodBindPtr = { + let methodName = StringName("get_status") + return withUnsafePointer(to: &PacketPeerDTLS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3248654679)! + } + + } + + }() + + /// Returns the status of the connection. See ``PacketPeerDTLS/Status`` for values. + public final func getStatus() -> PacketPeerDTLS.Status { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PacketPeerDTLS.method_get_status, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PacketPeerDTLS.Status (rawValue: _result)! + } + + fileprivate static var method_disconnect_from_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_from_peer") + return withUnsafePointer(to: &PacketPeerDTLS.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Disconnects this peer, terminating the DTLS session. + public final func disconnectFromPeer() { + gi.object_method_bind_ptrcall(PacketPeerDTLS.method_disconnect_from_peer, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PacketPeerExtension.swift b/Sources/SwiftGodot/Generated/Api/PacketPeerExtension.swift new file mode 100644 index 000000000..0ce629810 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PacketPeerExtension.swift @@ -0,0 +1,65 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class PacketPeerExtension: PacketPeer { + override open class var godotClassName: StringName { "PacketPeerExtension" } + /* Methods */ + /// + @_documentation(visibility: public) + open func _getAvailablePacketCount() -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getMaxPacketSize() -> Int32 { + return 0 + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_available_packet_count": + return _PacketPeerExtension_proxy_get_available_packet_count + case "_get_max_packet_size": + return _PacketPeerExtension_proxy_get_max_packet_size + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PacketPeerExtension_proxy_get_available_packet_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAvailablePacketCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PacketPeerExtension_proxy_get_max_packet_size (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getMaxPacketSize () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PacketPeerStream.swift b/Sources/SwiftGodot/Generated/Api/PacketPeerStream.swift new file mode 100644 index 000000000..c5320477c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PacketPeerStream.swift @@ -0,0 +1,200 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Wrapper to use a PacketPeer over a StreamPeer. +/// +/// PacketStreamPeer provides a wrapper for working using packets over a stream. This allows for using packet based code with StreamPeers. PacketPeerStream implements a custom protocol over the StreamPeer, so the user should not read or write to the wrapped StreamPeer directly. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +open class PacketPeerStream: PacketPeer { + override open class var godotClassName: StringName { "PacketPeerStream" } + + /* Properties */ + + final public var inputBufferMaxSize: Int32 { + get { + return get_input_buffer_max_size () + } + + set { + set_input_buffer_max_size (newValue) + } + + } + + final public var outputBufferMaxSize: Int32 { + get { + return get_output_buffer_max_size () + } + + set { + set_output_buffer_max_size (newValue) + } + + } + + /// The wrapped ``StreamPeer`` object. + final public var streamPeer: StreamPeer? { + get { + return get_stream_peer () + } + + set { + set_stream_peer (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stream_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stream_peer") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3281897016)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stream_peer(_ peer: StreamPeer?) { + withUnsafePointer(to: peer?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerStream.method_set_stream_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stream_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stream_peer") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2741655269)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stream_peer() -> StreamPeer? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PacketPeerStream.method_get_stream_peer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_input_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_buffer_max_size") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_input_buffer_max_size(_ maxSizeBytes: Int32) { + withUnsafePointer(to: maxSizeBytes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerStream.method_set_input_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_output_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_output_buffer_max_size") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_output_buffer_max_size(_ maxSizeBytes: Int32) { + withUnsafePointer(to: maxSizeBytes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerStream.method_set_output_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_input_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_buffer_max_size") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_input_buffer_max_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeerStream.method_get_input_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_output_buffer_max_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_output_buffer_max_size") + return withUnsafePointer(to: &PacketPeerStream.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_output_buffer_max_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeerStream.method_get_output_buffer_max_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PacketPeerUDP.swift b/Sources/SwiftGodot/Generated/Api/PacketPeerUDP.swift new file mode 100644 index 000000000..ccb892af2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PacketPeerUDP.swift @@ -0,0 +1,366 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// UDP packet peer. +/// +/// UDP packet peer. Can be used to send raw UDP packets as well as ``Variant``s. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +open class PacketPeerUDP: PacketPeer { + override open class var godotClassName: StringName { "PacketPeerUDP" } + /* Methods */ + fileprivate static var method_bind: GDExtensionMethodBindPtr = { + let methodName = StringName("bind") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051239242)! + } + + } + + }() + + /// Binds this ``PacketPeerUDP`` to the specified `port` and `bindAddress` with a buffer size `recvBufSize`, allowing it to receive incoming packets. + /// + /// If `bindAddress` is set to `"*"` (default), the peer will be bound on all available addresses (both IPv4 and IPv6). + /// + /// If `bindAddress` is set to `"0.0.0.0"` (for IPv4) or `"::"` (for IPv6), the peer will be bound to all available addresses matching that IP type. + /// + /// If `bindAddress` is set to any valid address (e.g. `"192.168.1.101"`, `"::1"`, etc.), the peer will only be bound to the interface with that address (or fail if no interface with the given address exists). + /// + public final func bind(port: Int32, bindAddress: String = "*", recvBufSize: Int32 = 65536) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: port) { pArg0 in + let bindAddress = GString(bindAddress) + withUnsafePointer(to: bindAddress.content) { pArg1 in + withUnsafePointer(to: recvBufSize) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_bind, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_close: GDExtensionMethodBindPtr = { + let methodName = StringName("close") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Closes the ``PacketPeerUDP``'s underlying UDP socket. + public final func close() { + gi.object_method_bind_ptrcall(PacketPeerUDP.method_close, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_wait: GDExtensionMethodBindPtr = { + let methodName = StringName("wait") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Waits for a packet to arrive on the bound address. See ``bind(port:bindAddress:recvBufSize:)``. + /// + /// > Note: ``wait()`` can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: + /// + public final func wait() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PacketPeerUDP.method_wait, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_bound: GDExtensionMethodBindPtr = { + let methodName = StringName("is_bound") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether this ``PacketPeerUDP`` is bound to an address and can receive packets. + public final func isBound() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PacketPeerUDP.method_is_bound, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_connect_to_host: GDExtensionMethodBindPtr = { + let methodName = StringName("connect_to_host") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 993915709)! + } + + } + + }() + + /// Calling this method connects this UDP peer to the given `host`/`port` pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to ``setDestAddress(host:port:)`` are not allowed). This method does not send any data to the remote peer, to do that, use ``PacketPeer/putVar(_:fullObjects:)`` or ``PacketPeer/putPacket(buffer:)`` as usual. See also ``UDPServer``. + /// + /// > Note: Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information. + /// + public final func connectToHost(_ host: String, port: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_connect_to_host, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_is_socket_connected: GDExtensionMethodBindPtr = { + let methodName = StringName("is_socket_connected") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the UDP socket is open and has been connected to a remote address. See ``connectToHost(_:port:)``. + public final func isSocketConnected() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PacketPeerUDP.method_is_socket_connected, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_packet_ip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_ip") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the IP of the remote peer that sent the last packet(that was received with ``PacketPeer/getPacket()`` or ``PacketPeer/getVar(allowObjects:)``). + public final func getPacketIp() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(PacketPeerUDP.method_get_packet_ip, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_packet_port: GDExtensionMethodBindPtr = { + let methodName = StringName("get_packet_port") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the port of the remote peer that sent the last packet(that was received with ``PacketPeer/getPacket()`` or ``PacketPeer/getVar(allowObjects:)``). + public final func getPacketPort() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeerUDP.method_get_packet_port, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_local_port: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_port") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the local port to which this peer is bound. + public final func getLocalPort() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PacketPeerUDP.method_get_local_port, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_dest_address: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dest_address") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 993915709)! + } + + } + + }() + + /// Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. + /// + /// > Note: ``setBroadcastEnabled(_:)`` must be enabled before sending packets to a broadcast address (e.g. `255.255.255.255`). + /// + public final func setDestAddress(host: String, port: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let host = GString(host) + withUnsafePointer(to: host.content) { pArg0 in + withUnsafePointer(to: port) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_set_dest_address, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_broadcast_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_broadcast_enabled") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Enable or disable sending of broadcast packets (e.g. `set_dest_address("255.255.255.255", 4343)`. This option is disabled by default. + /// + /// > Note: Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission and this option to be enabled to receive broadcast packets too. + /// + public final func setBroadcastEnabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_set_broadcast_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_join_multicast_group: GDExtensionMethodBindPtr = { + let methodName = StringName("join_multicast_group") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Joins the multicast group specified by `multicastAddress` using the interface identified by `interfaceName`. + /// + /// You can join the same multicast group with multiple interfaces. Use ``IP/getLocalInterfaces()`` to know which are available. + /// + /// > Note: Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission for multicast to work. + /// + public final func joinMulticastGroup(multicastAddress: String, interfaceName: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let multicastAddress = GString(multicastAddress) + withUnsafePointer(to: multicastAddress.content) { pArg0 in + let interfaceName = GString(interfaceName) + withUnsafePointer(to: interfaceName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_join_multicast_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_leave_multicast_group: GDExtensionMethodBindPtr = { + let methodName = StringName("leave_multicast_group") + return withUnsafePointer(to: &PacketPeerUDP.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 852856452)! + } + + } + + }() + + /// Removes the interface identified by `interfaceName` from the multicast group specified by `multicastAddress`. + public final func leaveMulticastGroup(multicastAddress: String, interfaceName: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let multicastAddress = GString(multicastAddress) + withUnsafePointer(to: multicastAddress.content) { pArg0 in + let interfaceName = GString(interfaceName) + withUnsafePointer(to: interfaceName.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PacketPeerUDP.method_leave_multicast_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Panel.swift b/Sources/SwiftGodot/Generated/Api/Panel.swift new file mode 100644 index 000000000..a3e062f38 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Panel.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A GUI control that displays a ``StyleBox``. +/// +/// ``Panel`` is a GUI control that displays a ``StyleBox``. See also ``PanelContainer``. +open class Panel: Control { + override open class var godotClassName: StringName { "Panel" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PanelContainer.swift b/Sources/SwiftGodot/Generated/Api/PanelContainer.swift new file mode 100644 index 000000000..60e4e878c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PanelContainer.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A container that keeps its child controls within the area of a ``StyleBox``. +/// +/// A container that keeps its child controls within the area of a ``StyleBox``. Useful for giving controls an outline. +open class PanelContainer: Container { + override open class var godotClassName: StringName { "PanelContainer" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PanoramaSkyMaterial.swift b/Sources/SwiftGodot/Generated/Api/PanoramaSkyMaterial.swift new file mode 100644 index 000000000..42db62461 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PanoramaSkyMaterial.swift @@ -0,0 +1,204 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A material that provides a special texture to a ``Sky``, usually an HDR panorama. +/// +/// A resource referenced in a ``Sky`` that is used to draw a background. ``PanoramaSkyMaterial`` functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a ``Cubemap``. +/// +/// Using an HDR panorama is strongly recommended for accurate, high-quality reflections. Godot supports the Radiance HDR (`.hdr`) and OpenEXR (`.exr`) image formats for this purpose. +/// +/// You can use this tool to convert a cubemap to an equirectangular sky map. +/// +open class PanoramaSkyMaterial: Material { + override open class var godotClassName: StringName { "PanoramaSkyMaterial" } + + /* Properties */ + + /// ``Texture2D`` to be applied to the ``PanoramaSkyMaterial``. + final public var panorama: Texture2D? { + get { + return get_panorama () + } + + set { + set_panorama (newValue) + } + + } + + /// A boolean value to determine if the background texture should be filtered or not. + final public var filter: Bool { + get { + return is_filtering_enabled () + } + + set { + set_filtering_enabled (newValue) + } + + } + + /// The sky's overall brightness multiplier. Higher values result in a brighter sky. + final public var energyMultiplier: Double { + get { + return get_energy_multiplier () + } + + set { + set_energy_multiplier (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_panorama: GDExtensionMethodBindPtr = { + let methodName = StringName("set_panorama") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_panorama(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_set_panorama, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_panorama: GDExtensionMethodBindPtr = { + let methodName = StringName("get_panorama") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_panorama() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_get_panorama, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_filtering_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_filtering_enabled") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_filtering_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_set_filtering_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_filtering_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_filtering_enabled") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_filtering_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_is_filtering_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_energy_multiplier") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_energy_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_set_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_energy_multiplier") + return withUnsafePointer(to: &PanoramaSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PanoramaSkyMaterial.method_get_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Parallax2D.swift b/Sources/SwiftGodot/Generated/Api/Parallax2D.swift new file mode 100644 index 000000000..f48ff25b6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Parallax2D.swift @@ -0,0 +1,600 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used to create a parallax scrolling background. +/// +/// A ``Parallax2D`` is used to create a parallax effect. It can move at a different speed relative to the camera movement using ``scrollScale``. This creates an illusion of depth in a 2D game. If manual scrolling is desired, the ``Camera2D`` position can be ignored with ``ignoreCameraScroll``. +/// +/// > Note: Any changes to this node's position made after it enters the scene tree will be overridden if ``ignoreCameraScroll`` is `false` or ``screenOffset`` is modified. +/// +open class Parallax2D: Node2D { + override open class var godotClassName: StringName { "Parallax2D" } + + /* Properties */ + + /// Multiplier to the final ``Parallax2D``'s offset. Can be used to simulate distance from the camera. + /// + /// For example, a value of `1` scrolls at the same speed as the camera. A value greater than `1` scrolls faster, making objects appear closer. Less than `1` scrolls slower, making objects appear further, and a value of `0` stops the objects completely. + /// + final public var scrollScale: Vector2 { + get { + return get_scroll_scale () + } + + set { + set_scroll_scale (newValue) + } + + } + + /// The ``Parallax2D``'s offset. Similar to ``screenOffset`` and ``Node2D/position``, but will not be overridden. + /// + /// > Note: Values will loop if ``repeatSize`` is set higher than `0`. + /// + final public var scrollOffset: Vector2 { + get { + return get_scroll_offset () + } + + set { + set_scroll_offset (newValue) + } + + } + + /// Repeats the ``Texture2D`` of each of this node's children and offsets them by this value. When scrolling, the node's position loops, giving the illusion of an infinite scrolling background if the values are larger than the screen size. If an axis is set to `0`, the ``Texture2D`` will not be repeated. + final public var repeatSize: Vector2 { + get { + return get_repeat_size () + } + + set { + set_repeat_size (newValue) + } + + } + + /// Velocity at which the offset scrolls automatically, in pixels per second. + final public var autoscroll: Vector2 { + get { + return get_autoscroll () + } + + set { + set_autoscroll (newValue) + } + + } + + /// Overrides the amount of times the texture repeats. Each texture copy spreads evenly from the original by ``repeatSize``. Useful for when zooming out with a camera. + final public var repeatTimes: Int32 { + get { + return get_repeat_times () + } + + set { + set_repeat_times (newValue) + } + + } + + /// Top-left limits for scrolling to begin. If the camera is outside of this limit, the ``Parallax2D`` stops scrolling. Must be lower than ``limitEnd`` minus the viewport size to work. + final public var limitBegin: Vector2 { + get { + return get_limit_begin () + } + + set { + set_limit_begin (newValue) + } + + } + + /// Bottom-right limits for scrolling to end. If the camera is outside of this limit, the ``Parallax2D`` will stop scrolling. Must be higher than ``limitBegin`` and the viewport size combined to work. + final public var limitEnd: Vector2 { + get { + return get_limit_end () + } + + set { + set_limit_end (newValue) + } + + } + + /// If `true`, this ``Parallax2D`` is offset by the current camera's position. If the ``Parallax2D`` is in a ``CanvasLayer`` separate from the current camera, it may be desired to match the value with ``CanvasLayer/followViewportEnabled``. + final public var followViewport: Bool { + get { + return get_follow_viewport () + } + + set { + set_follow_viewport (newValue) + } + + } + + /// If `true`, ``Parallax2D``'s position is not affected by the position of the camera. + final public var ignoreCameraScroll: Bool { + get { + return is_ignore_camera_scroll () + } + + set { + set_ignore_camera_scroll (newValue) + } + + } + + /// Offset used to scroll this ``Parallax2D``. This value is updated automatically unless ``ignoreCameraScroll`` is `true`. + final public var screenOffset: Vector2 { + get { + return get_screen_offset () + } + + set { + set_screen_offset (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_scroll_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_scale") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_scroll_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scroll_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_scale") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_scroll_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_repeat_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat_size") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat_size(_ repeatSize: Vector2) { + withUnsafePointer(to: repeatSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_repeat_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat_size") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_repeat_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_repeat_times: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat_times") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat_times(_ repeatTimes: Int32) { + withUnsafePointer(to: repeatTimes) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_repeat_times, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat_times: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat_times") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat_times() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Parallax2D.method_get_repeat_times, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_autoscroll: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autoscroll") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autoscroll(_ autoscroll: Vector2) { + withUnsafePointer(to: autoscroll) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_autoscroll, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autoscroll: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autoscroll") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autoscroll() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_autoscroll, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_offset") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_scroll_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_offset") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_scroll_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_screen_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_offset") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_screen_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_offset") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_screen_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_begin") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_begin(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_limit_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_limit_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_limit_begin") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_limit_begin() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_limit_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_end") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_end(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_limit_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_limit_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_limit_end") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_limit_end() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Parallax2D.method_get_limit_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_follow_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("set_follow_viewport") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_follow_viewport(_ follow: Bool) { + withUnsafePointer(to: follow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_follow_viewport, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_follow_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("get_follow_viewport") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_follow_viewport() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Parallax2D.method_get_follow_viewport, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ignore_camera_scroll: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_camera_scroll") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ignore_camera_scroll(_ ignore: Bool) { + withUnsafePointer(to: ignore) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Parallax2D.method_set_ignore_camera_scroll, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ignore_camera_scroll: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ignore_camera_scroll") + return withUnsafePointer(to: &Parallax2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ignore_camera_scroll() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Parallax2D.method_is_ignore_camera_scroll, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ParallaxBackground.swift b/Sources/SwiftGodot/Generated/Api/ParallaxBackground.swift new file mode 100644 index 000000000..e18b0af09 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ParallaxBackground.swift @@ -0,0 +1,370 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used to create a parallax scrolling background. +/// +/// A ParallaxBackground uses one or more ``ParallaxLayer`` child nodes to create a parallax effect. Each ``ParallaxLayer`` can move at a different speed using ``ParallaxLayer/motionOffset``. This creates an illusion of depth in a 2D game. If not used with a ``Camera2D``, you must manually calculate the ``scrollOffset``. +/// +/// > Note: Each ``ParallaxBackground`` is drawn on one specific ``Viewport`` and cannot be shared between multiple ``Viewport``s, see ``CanvasLayer/customViewport``. When using multiple ``Viewport``s, for example in a split-screen game, you need create an individual ``ParallaxBackground`` for each ``Viewport`` you want it to be drawn on. +/// +open class ParallaxBackground: CanvasLayer { + override open class var godotClassName: StringName { "ParallaxBackground" } + + /* Properties */ + + /// The ParallaxBackground's scroll value. Calculated automatically when using a ``Camera2D``, but can be used to manually manage scrolling when no camera is present. + final public var scrollOffset: Vector2 { + get { + return get_scroll_offset () + } + + set { + set_scroll_offset (newValue) + } + + } + + /// The base position offset for all ``ParallaxLayer`` children. + final public var scrollBaseOffset: Vector2 { + get { + return get_scroll_base_offset () + } + + set { + set_scroll_base_offset (newValue) + } + + } + + /// The base motion scale for all ``ParallaxLayer`` children. + final public var scrollBaseScale: Vector2 { + get { + return get_scroll_base_scale () + } + + set { + set_scroll_base_scale (newValue) + } + + } + + /// Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than ``scrollLimitEnd`` to work. + final public var scrollLimitBegin: Vector2 { + get { + return get_limit_begin () + } + + set { + set_limit_begin (newValue) + } + + } + + /// Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than ``scrollLimitBegin`` to work. + final public var scrollLimitEnd: Vector2 { + get { + return get_limit_end () + } + + set { + set_limit_end (newValue) + } + + } + + /// If `true`, elements in ``ParallaxLayer`` child aren't affected by the zoom level of the camera. + final public var scrollIgnoreCameraZoom: Bool { + get { + return is_ignore_camera_zoom () + } + + set { + set_ignore_camera_zoom (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_offset") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_scroll_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scroll_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_offset") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxBackground.method_get_scroll_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_base_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_base_offset") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_base_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_scroll_base_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scroll_base_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_base_offset") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_base_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxBackground.method_get_scroll_base_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_base_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_base_scale") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_base_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_scroll_base_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scroll_base_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scroll_base_scale") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scroll_base_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxBackground.method_get_scroll_base_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_begin") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_begin(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_limit_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_limit_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_limit_begin") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_limit_begin() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxBackground.method_get_limit_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_limit_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_limit_end") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_limit_end(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_limit_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_limit_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_limit_end") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_limit_end() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxBackground.method_get_limit_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ignore_camera_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ignore_camera_zoom") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ignore_camera_zoom(_ ignore: Bool) { + withUnsafePointer(to: ignore) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxBackground.method_set_ignore_camera_zoom, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ignore_camera_zoom: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ignore_camera_zoom") + return withUnsafePointer(to: &ParallaxBackground.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ignore_camera_zoom() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ParallaxBackground.method_is_ignore_camera_zoom, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ParallaxLayer.swift b/Sources/SwiftGodot/Generated/Api/ParallaxLayer.swift new file mode 100644 index 000000000..5f3a8f580 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ParallaxLayer.swift @@ -0,0 +1,211 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A parallax scrolling layer to be used with ``ParallaxBackground``. +/// +/// A ParallaxLayer must be the child of a ``ParallaxBackground`` node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the ``ParallaxBackground/scrollOffset`` value. +/// +/// This node's children will be affected by its scroll offset. +/// +/// > Note: Any changes to this node's position and scale made after it enters the scene will be ignored. +/// +open class ParallaxLayer: Node2D { + override open class var godotClassName: StringName { "ParallaxLayer" } + + /* Properties */ + + /// Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll. + final public var motionScale: Vector2 { + get { + return get_motion_scale () + } + + set { + set_motion_scale (newValue) + } + + } + + /// The ParallaxLayer's offset relative to the parent ParallaxBackground's ``ParallaxBackground/scrollOffset``. + final public var motionOffset: Vector2 { + get { + return get_motion_offset () + } + + set { + set_motion_offset (newValue) + } + + } + + /// The interval, in pixels, at which the ``ParallaxLayer`` is drawn repeatedly. Useful for creating an infinitely scrolling background. If an axis is set to `0`, the ``ParallaxLayer`` will be drawn only once along that direction. + /// + /// > Note: If you want the repetition to pixel-perfect match a ``Texture2D`` displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child ``Sprite2D`` scaled to `0.5` to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to `Vector2(300, 0)`. + /// + /// > Note: If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the layer at any given time. The visibility window is calculated from the parent ``ParallaxBackground``'s position, not the layer's own position. So, if you use mirroring, **do not** change the ``ParallaxLayer`` position relative to its parent. Instead, if you need to adjust the background's position, set the ``CanvasLayer/offset`` property in the parent ``ParallaxBackground``. + /// + /// > Note: Despite the name, the layer will not be mirrored, it will only be repeated. + /// + final public var motionMirroring: Vector2 { + get { + return get_mirroring () + } + + set { + set_mirroring (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_motion_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_scale") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion_scale(_ scale: Vector2) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxLayer.method_set_motion_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_scale") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxLayer.method_get_motion_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motion_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion_offset") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxLayer.method_set_motion_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion_offset") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxLayer.method_get_motion_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mirroring: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mirroring") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mirroring(_ mirror: Vector2) { + withUnsafePointer(to: mirror) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParallaxLayer.method_set_mirroring, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mirroring: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mirroring") + return withUnsafePointer(to: &ParallaxLayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mirroring() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(ParallaxLayer.method_get_mirroring, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ParticleProcessMaterial.swift b/Sources/SwiftGodot/Generated/Api/ParticleProcessMaterial.swift new file mode 100644 index 000000000..55c4a8f6f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ParticleProcessMaterial.swift @@ -0,0 +1,3719 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds a particle configuration for ``GPUParticles2D`` or ``GPUParticles3D`` nodes. +/// +/// ``ParticleProcessMaterial`` defines particle properties and behavior. It is used in the `process_material` of the ``GPUParticles2D`` and ``GPUParticles3D`` nodes. Some of this material's properties are applied to each particle when emitted, while others can have a ``CurveTexture`` or a ``GradientTexture1D`` applied to vary numerical or color values over the lifetime of the particle. +open class ParticleProcessMaterial: Material { + override open class var godotClassName: StringName { "ParticleProcessMaterial" } + public enum Parameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set initial velocity properties. + case initialLinearVelocity = 0 // PARAM_INITIAL_LINEAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set angular velocity properties. + case angularVelocity = 1 // PARAM_ANGULAR_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set orbital velocity properties. + case orbitVelocity = 2 // PARAM_ORBIT_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set linear acceleration properties. + case linearAccel = 3 // PARAM_LINEAR_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set radial acceleration properties. + case radialAccel = 4 // PARAM_RADIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set tangential acceleration properties. + case tangentialAccel = 5 // PARAM_TANGENTIAL_ACCEL + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set damping properties. + case damping = 6 // PARAM_DAMPING + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set angle properties. + case angle = 7 // PARAM_ANGLE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set scale properties. + case scale = 8 // PARAM_SCALE + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set hue variation properties. + case hueVariation = 9 // PARAM_HUE_VARIATION + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set animation speed properties. + case animSpeed = 10 // PARAM_ANIM_SPEED + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set animation offset properties. + case animOffset = 11 // PARAM_ANIM_OFFSET + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set radial velocity properties. + case radialVelocity = 15 // PARAM_RADIAL_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set directional velocity properties. + case directionalVelocity = 16 // PARAM_DIRECTIONAL_VELOCITY + /// Use with ``setParamMin(param:value:)``, ``setParamMax(param:value:)``, and ``setParamTexture(param:texture:)`` to set scale over velocity properties. + case scaleOverVelocity = 17 // PARAM_SCALE_OVER_VELOCITY + /// Represents the size of the ``ParticleProcessMaterial/Parameter`` enum. + case max = 18 // PARAM_MAX + /// Use with ``setParamMin(param:value:)`` and ``setParamMax(param:value:)`` to set the turbulence minimum und maximum influence on each particles velocity. + case turbVelInfluence = 13 // PARAM_TURB_VEL_INFLUENCE + /// Use with ``setParamMin(param:value:)`` and ``setParamMax(param:value:)`` to set the turbulence minimum and maximum displacement of the particles spawn position. + case turbInitDisplacement = 14 // PARAM_TURB_INIT_DISPLACEMENT + /// Use with ``setParamTexture(param:texture:)`` to set the turbulence influence over the particles life time. + case turbInfluenceOverLife = 12 // PARAM_TURB_INFLUENCE_OVER_LIFE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .initialLinearVelocity: return ".initialLinearVelocity" + case .angularVelocity: return ".angularVelocity" + case .orbitVelocity: return ".orbitVelocity" + case .linearAccel: return ".linearAccel" + case .radialAccel: return ".radialAccel" + case .tangentialAccel: return ".tangentialAccel" + case .damping: return ".damping" + case .angle: return ".angle" + case .scale: return ".scale" + case .hueVariation: return ".hueVariation" + case .animSpeed: return ".animSpeed" + case .animOffset: return ".animOffset" + case .radialVelocity: return ".radialVelocity" + case .directionalVelocity: return ".directionalVelocity" + case .scaleOverVelocity: return ".scaleOverVelocity" + case .max: return ".max" + case .turbVelInfluence: return ".turbVelInfluence" + case .turbInitDisplacement: return ".turbInitDisplacement" + case .turbInfluenceOverLife: return ".turbInfluenceOverLife" + } + + } + + } + + public enum ParticleFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagAlignY``. + case alignYToVelocity = 0 // PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagRotateY``. + case rotateY = 1 // PARTICLE_FLAG_ROTATE_Y + /// Use with ``setParticleFlag(_:enable:)`` to set ``particleFlagDisableZ``. + case disableZ = 2 // PARTICLE_FLAG_DISABLE_Z + /// + case dampingAsFriction = 3 // PARTICLE_FLAG_DAMPING_AS_FRICTION + /// Represents the size of the ``ParticleProcessMaterial/ParticleFlags`` enum. + case max = 4 // PARTICLE_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .alignYToVelocity: return ".alignYToVelocity" + case .rotateY: return ".rotateY" + case .disableZ: return ".disableZ" + case .dampingAsFriction: return ".dampingAsFriction" + case .max: return ".max" + } + + } + + } + + public enum EmissionShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// All particles will be emitted from a single point. + case point = 0 // EMISSION_SHAPE_POINT + /// Particles will be emitted in the volume of a sphere. + case sphere = 1 // EMISSION_SHAPE_SPHERE + /// Particles will be emitted on the surface of a sphere. + case sphereSurface = 2 // EMISSION_SHAPE_SPHERE_SURFACE + /// Particles will be emitted in the volume of a box. + case box = 3 // EMISSION_SHAPE_BOX + /// Particles will be emitted at a position determined by sampling a random point on the ``emissionPointTexture``. Particle color will be modulated by ``emissionColorTexture``. + case points = 4 // EMISSION_SHAPE_POINTS + /// Particles will be emitted at a position determined by sampling a random point on the ``emissionPointTexture``. Particle velocity and rotation will be set based on ``emissionNormalTexture``. Particle color will be modulated by ``emissionColorTexture``. + case directedPoints = 5 // EMISSION_SHAPE_DIRECTED_POINTS + /// Particles will be emitted in a ring or cylinder. + case ring = 6 // EMISSION_SHAPE_RING + /// Represents the size of the ``ParticleProcessMaterial/EmissionShape`` enum. + case max = 7 // EMISSION_SHAPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .point: return ".point" + case .sphere: return ".sphere" + case .sphereSurface: return ".sphereSurface" + case .box: return ".box" + case .points: return ".points" + case .directedPoints: return ".directedPoints" + case .ring: return ".ring" + case .max: return ".max" + } + + } + + } + + public enum SubEmitterMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case disabled = 0 // SUB_EMITTER_DISABLED + /// + case constant = 1 // SUB_EMITTER_CONSTANT + /// + case atEnd = 2 // SUB_EMITTER_AT_END + /// + case atCollision = 3 // SUB_EMITTER_AT_COLLISION + /// Represents the size of the ``ParticleProcessMaterial/SubEmitterMode`` enum. + case max = 4 // SUB_EMITTER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .constant: return ".constant" + case .atEnd: return ".atEnd" + case .atCollision: return ".atCollision" + case .max: return ".max" + } + + } + + } + + public enum CollisionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// No collision for particles. Particles will go through ``GPUParticlesCollision3D`` nodes. + case disabled = 0 // COLLISION_DISABLED + /// ``RigidBody3D``-style collision for particles using ``GPUParticlesCollision3D`` nodes. + case rigid = 1 // COLLISION_RIGID + /// Hide particles instantly when colliding with a ``GPUParticlesCollision3D`` node. This can be combined with a subemitter that uses the ``CollisionMode/rigid`` collision mode to "replace" the parent particle with the subemitter on impact. + case hideOnContact = 2 // COLLISION_HIDE_ON_CONTACT + /// Represents the size of the ``ParticleProcessMaterial/CollisionMode`` enum. + case max = 3 // COLLISION_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .rigid: return ".rigid" + case .hideOnContact: return ".hideOnContact" + case .max: return ".max" + } + + } + + } + + + /* Properties */ + + /// Particle lifetime randomness ratio. The equation for the lifetime of a particle is `lifetime * (1.0 - randf() * lifetime_randomness)`. For example, a ``lifetimeRandomness`` of `0.4` scales the lifetime between `0.6` to `1.0` of its original value. + final public var lifetimeRandomness: Double { + get { + return get_lifetime_randomness () + } + + set { + set_lifetime_randomness (newValue) + } + + } + + /// Align Y axis of particle with the direction of its velocity. + final public var particleFlagAlignY: Bool { + get { + return get_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 0)!) + } + + set { + set_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 0)!, newValue) + } + + } + + /// If `true`, particles rotate around Y axis by ``angleMin``. + final public var particleFlagRotateY: Bool { + get { + return get_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 1)!) + } + + set { + set_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 1)!, newValue) + } + + } + + /// If `true`, particles will not move on the z axis. + final public var particleFlagDisableZ: Bool { + get { + return get_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 2)!) + } + + set { + set_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 2)!, newValue) + } + + } + + /// Changes the behavior of the damping properties from a linear deceleration to a deceleration based on speed percentage. + final public var particleFlagDampingAsFriction: Bool { + get { + return get_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 3)!) + } + + set { + set_particle_flag (ParticleProcessMaterial.ParticleFlags (rawValue: 3)!, newValue) + } + + } + + /// The offset for the ``emissionShape``, in local space. + final public var emissionShapeOffset: Vector3 { + get { + return get_emission_shape_offset () + } + + set { + set_emission_shape_offset (newValue) + } + + } + + /// The scale of the ``emissionShape``, in local space. + final public var emissionShapeScale: Vector3 { + get { + return get_emission_shape_scale () + } + + set { + set_emission_shape_scale (newValue) + } + + } + + /// Particles will be emitted inside this region. Use ``ParticleProcessMaterial/EmissionShape`` constants for values. + final public var emissionShape: ParticleProcessMaterial.EmissionShape { + get { + return get_emission_shape () + } + + set { + set_emission_shape (newValue) + } + + } + + /// The sphere's radius if ``emissionShape`` is set to ``EmissionShape/sphere``. + final public var emissionSphereRadius: Double { + get { + return get_emission_sphere_radius () + } + + set { + set_emission_sphere_radius (newValue) + } + + } + + /// The box's extents if ``emissionShape`` is set to ``EmissionShape/box``. + /// + /// > Note: ``emissionBoxExtents`` starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents. + /// + final public var emissionBoxExtents: Vector3 { + get { + return get_emission_box_extents () + } + + set { + set_emission_box_extents (newValue) + } + + } + + /// Particles will be emitted at positions determined by sampling this texture at a random position. Used with ``EmissionShape/points`` and ``EmissionShape/directedPoints``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. + final public var emissionPointTexture: Texture2D? { + get { + return get_emission_point_texture () + } + + set { + set_emission_point_texture (newValue) + } + + } + + /// Particle velocity and rotation will be set by sampling this texture at the same point as the ``emissionPointTexture``. Used only in ``EmissionShape/directedPoints``. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. + final public var emissionNormalTexture: Texture2D? { + get { + return get_emission_normal_texture () + } + + set { + set_emission_normal_texture (newValue) + } + + } + + /// Particle color will be modulated by color determined by sampling this texture at the same point as the ``emissionPointTexture``. + /// + /// > Note: ``emissionColorTexture`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``emissionColorTexture`` will have no visible effect. + /// + final public var emissionColorTexture: Texture2D? { + get { + return get_emission_color_texture () + } + + set { + set_emission_color_texture (newValue) + } + + } + + /// The number of emission points if ``emissionShape`` is set to ``EmissionShape/points`` or ``EmissionShape/directedPoints``. + final public var emissionPointCount: Int32 { + get { + return get_emission_point_count () + } + + set { + set_emission_point_count (newValue) + } + + } + + /// The axis of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingAxis: Vector3 { + get { + return get_emission_ring_axis () + } + + set { + set_emission_ring_axis (newValue) + } + + } + + /// The height of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingHeight: Double { + get { + return get_emission_ring_height () + } + + set { + set_emission_ring_height (newValue) + } + + } + + /// The radius of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingRadius: Double { + get { + return get_emission_ring_radius () + } + + set { + set_emission_ring_radius (newValue) + } + + } + + /// The inner radius of the ring when using the emitter ``EmissionShape/ring``. + final public var emissionRingInnerRadius: Double { + get { + return get_emission_ring_inner_radius () + } + + set { + set_emission_ring_inner_radius (newValue) + } + + } + + final public var angle: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 7)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Minimum equivalent of ``angleMax``. + final public var angleMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 7)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Maximum initial rotation applied to each particle, in degrees. + /// + /// Only applied when ``particleFlagDisableZ`` or ``particleFlagRotateY`` are `true` or the ``BaseMaterial3D`` being used to draw the particle is using ``BaseMaterial3D/BillboardMode/particles``. + /// + final public var angleMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 7)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Each particle's rotation will be animated along this ``CurveTexture``. + final public var angleCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 7)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 7)!, newValue) + } + + } + + /// Percentage of the velocity of the respective ``GPUParticles2D`` or ``GPUParticles3D`` inherited by each particle when spawning. + final public var inheritVelocityRatio: Double { + get { + return get_inherit_velocity_ratio () + } + + set { + set_inherit_velocity_ratio (newValue) + } + + } + + /// A pivot point used to calculate radial and orbital velocity of particles. + final public var velocityPivot: Vector3 { + get { + return get_velocity_pivot () + } + + set { + set_velocity_pivot (newValue) + } + + } + + /// Unit vector specifying the particles' emission direction. + final public var direction: Vector3 { + get { + return get_direction () + } + + set { + set_direction (newValue) + } + + } + + /// Each particle's initial direction range from `+spread` to `-spread` degrees. + final public var spread: Double { + get { + return get_spread () + } + + set { + set_spread (newValue) + } + + } + + /// Amount of ``spread`` along the Y axis. + final public var flatness: Double { + get { + return get_flatness () + } + + set { + set_flatness (newValue) + } + + } + + final public var initialVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 0)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Minimum equivalent of ``initialVelocityMax``. + final public var initialVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 0)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 0)!, newValue) + } + + } + + /// Maximum initial velocity magnitude for each particle. Direction comes from ``direction`` and ``spread``. + final public var initialVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 0)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 0)!, newValue) + } + + } + + final public var angularVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 1)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Minimum equivalent of ``angularVelocityMax``. + final public var angularVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 1)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Maximum initial angular velocity (rotation speed) applied to each particle in _degrees_ per second. + /// + /// Only applied when ``particleFlagDisableZ`` or ``particleFlagRotateY`` are `true` or the ``BaseMaterial3D`` being used to draw the particle is using ``BaseMaterial3D/BillboardMode/particles``. + /// + final public var angularVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 1)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 1)!, newValue) + } + + } + + /// Each particle's angular velocity (rotation speed) will vary along this ``CurveTexture`` over its lifetime. + final public var angularVelocityCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 1)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 1)!, newValue) + } + + } + + final public var directionalVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 16)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 16)!, newValue) + } + + } + + /// Minimum directional velocity value, which is multiplied by ``directionalVelocityCurve``. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var directionalVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 16)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 16)!, newValue) + } + + } + + /// Maximum directional velocity value, which is multiplied by ``directionalVelocityCurve``. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var directionalVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 16)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 16)!, newValue) + } + + } + + /// A curve that specifies the velocity along each of the axes of the particle system along its lifetime. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var directionalVelocityCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 16)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 16)!, newValue) + } + + } + + final public var orbitVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 2)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Minimum equivalent of ``orbitVelocityMax``. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var orbitVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 2)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var orbitVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 2)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 2)!, newValue) + } + + } + + /// Each particle's orbital velocity will vary along this ``CurveTexture``. + /// + /// > Note: For 3D orbital velocity, use a ``CurveXYZTexture``. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var orbitVelocityCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 2)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 2)!, newValue) + } + + } + + final public var radialVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 15)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 15)!, newValue) + } + + } + + /// Minimum radial velocity applied to each particle. Makes particles move away from the ``velocityPivot``, or toward it if negative. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var radialVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 15)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 15)!, newValue) + } + + } + + /// Maximum radial velocity applied to each particle. Makes particles move away from the ``velocityPivot``, or toward it if negative. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var radialVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 15)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 15)!, newValue) + } + + } + + /// A ``CurveTexture`` that defines the velocity over the particle's lifetime away (or toward) the ``velocityPivot``. + /// + /// > Note: Animated velocities will not be affected by damping, use ``velocityLimitCurve`` instead. + /// + final public var radialVelocityCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 15)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 15)!, newValue) + } + + } + + /// A ``CurveTexture`` that defines the maximum velocity of a particle during its lifetime. + final public var velocityLimitCurve: Texture2D? { + get { + return get_velocity_limit_curve () + } + + set { + set_velocity_limit_curve (newValue) + } + + } + + /// Gravity applied to every particle. + final public var gravity: Vector3 { + get { + return get_gravity () + } + + set { + set_gravity (newValue) + } + + } + + final public var linearAccel: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 3)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Minimum equivalent of ``linearAccelMax``. + final public var linearAccelMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 3)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Maximum linear acceleration applied to each particle in the direction of motion. + final public var linearAccelMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 3)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 3)!, newValue) + } + + } + + /// Each particle's linear acceleration will vary along this ``CurveTexture``. + final public var linearAccelCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 3)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 3)!, newValue) + } + + } + + final public var radialAccel: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 4)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Minimum equivalent of ``radialAccelMax``. + final public var radialAccelMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 4)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. + final public var radialAccelMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 4)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 4)!, newValue) + } + + } + + /// Each particle's radial acceleration will vary along this ``CurveTexture``. + final public var radialAccelCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 4)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 4)!, newValue) + } + + } + + final public var tangentialAccel: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 5)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Minimum equivalent of ``tangentialAccelMax``. + final public var tangentialAccelMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 5)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. + final public var tangentialAccelMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 5)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 5)!, newValue) + } + + } + + /// Each particle's tangential acceleration will vary along this ``CurveTexture``. + final public var tangentialAccelCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 5)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 5)!, newValue) + } + + } + + final public var damping: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 6)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Minimum equivalent of ``dampingMax``. + final public var dampingMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 6)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 6)!, newValue) + } + + } + + /// The maximum rate at which particles lose velocity. For example value of `100` means that the particle will go from `100` velocity to `0` in `1` second. + final public var dampingMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 6)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 6)!, newValue) + } + + } + + /// Damping will vary along this ``CurveTexture``. + final public var dampingCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 6)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 6)!, newValue) + } + + } + + /// If `true`, interaction with particle attractors is enabled. In 3D, attraction only occurs within the area defined by the ``GPUParticles3D`` node's ``GPUParticles3D/visibilityAabb``. + final public var attractorInteractionEnabled: Bool { + get { + return is_attractor_interaction_enabled () + } + + set { + set_attractor_interaction_enabled (newValue) + } + + } + + final public var scale: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 8)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Minimum equivalent of ``scaleMax``. + final public var scaleMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 8)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Maximum initial scale applied to each particle. + final public var scaleMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 8)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 8)!, newValue) + } + + } + + /// Each particle's scale will vary along this ``CurveTexture`` over its lifetime. If a ``CurveXYZTexture`` is supplied instead, the scale will be separated per-axis. + final public var scaleCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 8)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 8)!, newValue) + } + + } + + final public var scaleOverVelocity: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 17)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 17)!, newValue) + } + + } + + /// Minimum velocity value reference for ``scaleOverVelocityCurve``. + /// + /// ``scaleOverVelocityCurve`` will be interpolated between ``scaleOverVelocityMin`` and ``scaleOverVelocityMax``. + /// + final public var scaleOverVelocityMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 17)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 17)!, newValue) + } + + } + + /// Maximum velocity value reference for ``scaleOverVelocityCurve``. + /// + /// ``scaleOverVelocityCurve`` will be interpolated between ``scaleOverVelocityMin`` and ``scaleOverVelocityMax``. + /// + final public var scaleOverVelocityMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 17)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 17)!, newValue) + } + + } + + /// Either a ``CurveTexture`` or a ``CurveXYZTexture`` that scales each particle based on its velocity. + final public var scaleOverVelocityCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 17)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 17)!, newValue) + } + + } + + /// Each particle's initial color. If the ``GPUParticles2D``'s `texture` is defined, it will be multiplied by this color. + /// + /// > Note: ``color`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``color`` will have no visible effect. + /// + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// Each particle's color will vary along this ``GradientTexture1D`` over its lifetime (multiplied with ``color``). + /// + /// > Note: ``colorRamp`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``colorRamp`` will have no visible effect. + /// + final public var colorRamp: Texture2D? { + get { + return get_color_ramp () + } + + set { + set_color_ramp (newValue) + } + + } + + /// Each particle's initial color will vary along this ``GradientTexture1D`` (multiplied with ``color``). + /// + /// > Note: ``colorInitialRamp`` multiplies the particle mesh's vertex colors. To have a visible effect on a ``BaseMaterial3D``, ``BaseMaterial3D/vertexColorUseAsAlbedo`` _must_ be `true`. For a ``ShaderMaterial``, `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, ``colorInitialRamp`` will have no visible effect. + /// + final public var colorInitialRamp: Texture2D? { + get { + return get_color_initial_ramp () + } + + set { + set_color_initial_ramp (newValue) + } + + } + + /// The alpha value of each particle's color will be multiplied by this ``CurveTexture`` over its lifetime. + final public var alphaCurve: Texture2D? { + get { + return get_alpha_curve () + } + + set { + set_alpha_curve (newValue) + } + + } + + /// Each particle's color will be multiplied by this ``CurveTexture`` over its lifetime. + /// + /// > Note: This property won't have a visible effect unless the render material is marked as unshaded. + /// + final public var emissionCurve: Texture2D? { + get { + return get_emission_curve () + } + + set { + set_emission_curve (newValue) + } + + } + + final public var hueVariation: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 9)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Minimum equivalent of ``hueVariationMax``. + final public var hueVariationMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 9)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Maximum initial hue variation applied to each particle. It will shift the particle color's hue. + final public var hueVariationMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 9)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 9)!, newValue) + } + + } + + /// Each particle's hue will vary along this ``CurveTexture``. + final public var hueVariationCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 9)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 9)!, newValue) + } + + } + + final public var animSpeed: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 10)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Minimum equivalent of ``animSpeedMax``. + final public var animSpeedMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 10)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Maximum particle animation speed. Animation speed of `1` means that the particles will make full `0` to `1` offset cycle during lifetime, `2` means `2` cycles etc. + /// + /// With animation speed greater than `1`, remember to enable ``CanvasItemMaterial/particlesAnimLoop`` property if you want the animation to repeat. + /// + final public var animSpeedMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 10)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 10)!, newValue) + } + + } + + /// Each particle's animation speed will vary along this ``CurveTexture``. + final public var animSpeedCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 10)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 10)!, newValue) + } + + } + + final public var animOffset: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 11)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Minimum equivalent of ``animOffsetMax``. + final public var animOffsetMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 11)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Maximum animation offset that corresponds to frame index in the texture. `0` is the first frame, `1` is the last one. See ``CanvasItemMaterial/particlesAnimation``. + final public var animOffsetMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 11)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 11)!, newValue) + } + + } + + /// Each particle's animation offset will vary along this ``CurveTexture``. + final public var animOffsetCurve: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 11)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 11)!, newValue) + } + + } + + /// If `true`, enables turbulence for the particle system. Turbulence can be used to vary particle movement according to its position (based on a 3D noise pattern). In 3D, ``GPUParticlesAttractorVectorField3D`` with ``NoiseTexture3D`` can be used as an alternative to turbulence that works in world space and with multiple particle systems reacting in the same way. + /// + /// > Note: Enabling turbulence has a high performance cost on the GPU. Only enable turbulence on a few particle systems at once at most, and consider disabling it when targeting mobile/web platforms. + /// + final public var turbulenceEnabled: Bool { + get { + return get_turbulence_enabled () + } + + set { + set_turbulence_enabled (newValue) + } + + } + + /// The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern. + final public var turbulenceNoiseStrength: Double { + get { + return get_turbulence_noise_strength () + } + + set { + set_turbulence_noise_strength (newValue) + } + + } + + /// This value controls the overall scale/frequency of the turbulence noise pattern. + /// + /// A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features. + /// + final public var turbulenceNoiseScale: Double { + get { + return get_turbulence_noise_scale () + } + + set { + set_turbulence_noise_scale (newValue) + } + + } + + /// A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. + /// + /// The default value of `Vector3(0, 0, 0)` turns off the scrolling. + /// + final public var turbulenceNoiseSpeed: Vector3 { + get { + return get_turbulence_noise_speed () + } + + set { + set_turbulence_noise_speed (newValue) + } + + } + + /// The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. + /// + /// A value of 0.0 will result in a fixed pattern. + /// + final public var turbulenceNoiseSpeedRandom: Double { + get { + return get_turbulence_noise_speed_random () + } + + set { + set_turbulence_noise_speed_random (newValue) + } + + } + + final public var turbulenceInfluence: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 13)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 13)!, newValue) + } + + } + + /// Minimum turbulence influence on each particle. + /// + /// The actual amount of turbulence influence on each particle is calculated as a random value between ``turbulenceInfluenceMin`` and ``turbulenceInfluenceMax`` and multiplied by the amount of turbulence influence from ``turbulenceInfluenceOverLife``. + /// + final public var turbulenceInfluenceMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 13)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 13)!, newValue) + } + + } + + /// Maximum turbulence influence on each particle. + /// + /// The actual amount of turbulence influence on each particle is calculated as a random value between ``turbulenceInfluenceMin`` and ``turbulenceInfluenceMax`` and multiplied by the amount of turbulence influence from ``turbulenceInfluenceOverLife``. + /// + final public var turbulenceInfluenceMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 13)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 13)!, newValue) + } + + } + + final public var turbulenceInitialDisplacement: Vector2 { + get { + return get_param (ParticleProcessMaterial.Parameter (rawValue: 14)!) + } + + set { + set_param (ParticleProcessMaterial.Parameter (rawValue: 14)!, newValue) + } + + } + + /// Minimum displacement of each particle's spawn position by the turbulence. + /// + /// The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between ``turbulenceInitialDisplacementMin`` and ``turbulenceInitialDisplacementMax``. + /// + final public var turbulenceInitialDisplacementMin: Double { + get { + return get_param_min (ParticleProcessMaterial.Parameter (rawValue: 14)!) + } + + set { + set_param_min (ParticleProcessMaterial.Parameter (rawValue: 14)!, newValue) + } + + } + + /// Maximum displacement of each particle's spawn position by the turbulence. + /// + /// The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between ``turbulenceInitialDisplacementMin`` and ``turbulenceInitialDisplacementMax``. + /// + final public var turbulenceInitialDisplacementMax: Double { + get { + return get_param_max (ParticleProcessMaterial.Parameter (rawValue: 14)!) + } + + set { + set_param_max (ParticleProcessMaterial.Parameter (rawValue: 14)!, newValue) + } + + } + + /// Each particle's amount of turbulence will be influenced along this ``CurveTexture`` over its life time. + final public var turbulenceInfluenceOverLife: Texture2D? { + get { + return get_param_texture (ParticleProcessMaterial.Parameter (rawValue: 12)!) + } + + set { + set_param_texture (ParticleProcessMaterial.Parameter (rawValue: 12)!, newValue) + } + + } + + /// The particles' collision mode. + /// + /// > Note: 3D Particles can only collide with ``GPUParticlesCollision3D`` nodes, not ``PhysicsBody3D`` nodes. To make particles collide with various objects, you can add ``GPUParticlesCollision3D`` nodes as children of ``PhysicsBody3D`` nodes. In 3D, collisions only occur within the area defined by the ``GPUParticles3D`` node's ``GPUParticles3D/visibilityAabb``. + /// + /// > Note: 2D Particles can only collide with ``LightOccluder2D`` nodes, not ``PhysicsBody2D`` nodes. + /// + final public var collisionMode: ParticleProcessMaterial.CollisionMode { + get { + return get_collision_mode () + } + + set { + set_collision_mode (newValue) + } + + } + + /// The particles' friction. Values range from `0` (frictionless) to `1` (maximum friction). Only effective if ``collisionMode`` is ``CollisionMode/rigid``. + final public var collisionFriction: Double { + get { + return get_collision_friction () + } + + set { + set_collision_friction (newValue) + } + + } + + /// The particles' bounciness. Values range from `0` (no bounce) to `1` (full bounciness). Only effective if ``collisionMode`` is ``CollisionMode/rigid``. + final public var collisionBounce: Double { + get { + return get_collision_bounce () + } + + set { + set_collision_bounce (newValue) + } + + } + + /// If `true`, ``GPUParticles3D/collisionBaseSize`` is multiplied by the particle's effective scale (see ``scaleMin``, ``scaleMax``, ``scaleCurve``, and ``scaleOverVelocityCurve``). + final public var collisionUseScale: Bool { + get { + return is_collision_using_scale () + } + + set { + set_collision_use_scale (newValue) + } + + } + + /// The particle subemitter mode (see ``GPUParticles2D/subEmitter`` and ``GPUParticles3D/subEmitter``). + final public var subEmitterMode: ParticleProcessMaterial.SubEmitterMode { + get { + return get_sub_emitter_mode () + } + + set { + set_sub_emitter_mode (newValue) + } + + } + + /// The frequency at which particles should be emitted from the subemitter node. One particle will be spawned every ``subEmitterFrequency`` seconds. + /// + /// > Note: This value shouldn't exceed ``GPUParticles2D/amount`` or ``GPUParticles3D/amount`` defined on the _subemitter node_ (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + /// + final public var subEmitterFrequency: Double { + get { + return get_sub_emitter_frequency () + } + + set { + set_sub_emitter_frequency (newValue) + } + + } + + /// The amount of particles to spawn from the subemitter node when the particle expires. + /// + /// > Note: This value shouldn't exceed ``GPUParticles2D/amount`` or ``GPUParticles3D/amount`` defined on the _subemitter node_ (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + /// + final public var subEmitterAmountAtEnd: Int32 { + get { + return get_sub_emitter_amount_at_end () + } + + set { + set_sub_emitter_amount_at_end (newValue) + } + + } + + /// The amount of particles to spawn from the subemitter node when a collision occurs. When combined with ``CollisionMode/hideOnContact`` on the main particles material, this can be used to achieve effects such as raindrops hitting the ground. + /// + /// > Note: This value shouldn't exceed ``GPUParticles2D/amount`` or ``GPUParticles3D/amount`` defined on the _subemitter node_ (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + /// + final public var subEmitterAmountAtCollision: Int32 { + get { + return get_sub_emitter_amount_at_collision () + } + + set { + set_sub_emitter_amount_at_collision (newValue) + } + + } + + /// If `true`, the subemitter inherits the parent particle's velocity when it spawns. + final public var subEmitterKeepVelocity: Bool { + get { + return get_sub_emitter_keep_velocity () + } + + set { + set_sub_emitter_keep_velocity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_direction") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_direction(_ degrees: Vector3) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_direction") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_direction() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inherit_velocity_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inherit_velocity_ratio") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inherit_velocity_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_inherit_velocity_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inherit_velocity_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inherit_velocity_ratio") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inherit_velocity_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_inherit_velocity_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("set_spread") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_spread(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_spread, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_spread: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spread") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_spread() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_spread, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flatness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flatness") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flatness(_ amount: Double) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_flatness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_flatness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flatness") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_flatness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_flatness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 676779352)! + } + + } + + }() + + @inline(__always) + /// Sets the minimum and maximum values of the given `param`. + /// + /// The `x` component of the argument vector corresponds to minimum and the `y` component corresponds to maximum. + /// + final func set_param(_ param: ParticleProcessMaterial.Parameter, _ value: Vector2) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_param, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2623708480)! + } + + } + + }() + + @inline(__always) + /// Returns the minimum and maximum values of the given `param` as a vector. + /// + /// The `x` component of the returned vector corresponds to minimum and the `y` component corresponds to maximum. + /// + final func get_param(_ param: ParticleProcessMaterial.Parameter) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_param, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_min") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2295964248)! + } + + } + + }() + + @inline(__always) + /// Sets the minimum value range for the given parameter. + fileprivate final func set_param_min(_ param: ParticleProcessMaterial.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_min") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3903786503)! + } + + } + + }() + + @inline(__always) + /// Returns the minimum value range for the given parameter. + fileprivate final func get_param_min(_ param: ParticleProcessMaterial.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_param_min, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_max") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2295964248)! + } + + } + + }() + + @inline(__always) + /// Sets the maximum value range for the given parameter. + fileprivate final func set_param_max(_ param: ParticleProcessMaterial.Parameter, _ value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_max") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3903786503)! + } + + } + + }() + + @inline(__always) + /// Returns the maximum value range for the given parameter. + fileprivate final func get_param_max(_ param: ParticleProcessMaterial.Parameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_param_max, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_param_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 526976089)! + } + + } + + }() + + @inline(__always) + /// Sets the ``Texture2D`` for the specified ``ParticleProcessMaterial/Parameter``. + fileprivate final func set_param_texture(_ param: ParticleProcessMaterial.Parameter, _ texture: Texture2D?) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: texture?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_param_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3489372978)! + } + + } + + }() + + @inline(__always) + /// Returns the ``Texture2D`` used by the specified parameter. + fileprivate final func get_param_texture(_ param: ParticleProcessMaterial.Parameter) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_param_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_ramp") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_ramp(_ ramp: Texture2D?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_color_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_ramp") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_ramp() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_color_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_alpha_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_curve(_ curve: Texture2D?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_alpha_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_curve() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_alpha_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_emission_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_curve(_ curve: Texture2D?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_curve() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_initial_ramp") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_initial_ramp(_ ramp: Texture2D?) { + withUnsafePointer(to: ramp?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_initial_ramp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_initial_ramp") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_initial_ramp() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_color_initial_ramp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_velocity_limit_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity_limit_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity_limit_curve(_ curve: Texture2D?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_velocity_limit_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity_limit_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_limit_curve") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity_limit_curve() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_velocity_limit_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("set_particle_flag") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1711815571)! + } + + } + + }() + + @inline(__always) + /// If `true`, enables the specified particle flag. See ``ParticleProcessMaterial/ParticleFlags`` for options. + fileprivate final func set_particle_flag(_ particleFlag: ParticleProcessMaterial.ParticleFlags, _ enable: Bool) { + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_particle_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("get_particle_flag") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3895316907)! + } + + } + + }() + + @inline(__always) + /// Returns `true` if the specified particle flag is enabled. See ``ParticleProcessMaterial/ParticleFlags`` for options. + fileprivate final func get_particle_flag(_ particleFlag: ParticleProcessMaterial.ParticleFlags) -> Bool { + var _result: Bool = false + withUnsafePointer(to: particleFlag.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_particle_flag, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_velocity_pivot: GDExtensionMethodBindPtr = { + let methodName = StringName("set_velocity_pivot") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_velocity_pivot(_ pivot: Vector3) { + withUnsafePointer(to: pivot) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_velocity_pivot, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_velocity_pivot: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_pivot") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3783033775)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_velocity_pivot() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_velocity_pivot, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_shape") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 461501442)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_shape(_ shape: ParticleProcessMaterial.EmissionShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_shape") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3719733018)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_shape() -> ParticleProcessMaterial.EmissionShape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ParticleProcessMaterial.EmissionShape (rawValue: _result)! + } + + fileprivate static var method_set_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_sphere_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_sphere_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_sphere_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_sphere_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_sphere_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_box_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_box_extents") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_box_extents(_ extents: Vector3) { + withUnsafePointer(to: extents) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_box_extents, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_box_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_box_extents") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_box_extents() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_box_extents, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_point_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_point_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_point_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_point_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_point_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_point_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_point_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_point_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_emission_normal_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_normal_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_normal_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_normal_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_normal_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_normal_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_normal_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_normal_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_emission_color_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_color_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_color_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_color_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_color_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_color_texture") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_color_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_color_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_emission_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_point_count") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_point_count(_ pointCount: Int32) { + withUnsafePointer(to: pointCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_point_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_point_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_point_count") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_point_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_point_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_axis") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_axis(_ axis: Vector3) { + withUnsafePointer(to: axis) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_ring_axis, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_axis: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_axis") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_axis() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_ring_axis, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_height") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_height(_ height: Double) { + withUnsafePointer(to: height) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_ring_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_height") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_height() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_ring_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_radius(_ radius: Double) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_ring_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_ring_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_ring_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_ring_inner_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_ring_inner_radius(_ innerRadius: Double) { + withUnsafePointer(to: innerRadius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_ring_inner_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_ring_inner_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_ring_inner_radius") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_ring_inner_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_ring_inner_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_shape_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_shape_offset") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_shape_offset(_ emissionShapeOffset: Vector3) { + withUnsafePointer(to: emissionShapeOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_shape_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_shape_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_shape_offset") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_shape_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_shape_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_emission_shape_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_emission_shape_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_emission_shape_scale(_ emissionShapeScale: Vector3) { + withUnsafePointer(to: emissionShapeScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_emission_shape_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_emission_shape_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_emission_shape_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_emission_shape_scale() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_emission_shape_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_turbulence_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbulence_enabled") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbulence_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_turbulence_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbulence_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbulence_enabled") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbulence_enabled(_ turbulenceEnabled: Bool) { + withUnsafePointer(to: turbulenceEnabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_turbulence_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_turbulence_noise_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbulence_noise_strength") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbulence_noise_strength() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_turbulence_noise_strength, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbulence_noise_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbulence_noise_strength") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbulence_noise_strength(_ turbulenceNoiseStrength: Double) { + withUnsafePointer(to: turbulenceNoiseStrength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_turbulence_noise_strength, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_turbulence_noise_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbulence_noise_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbulence_noise_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_turbulence_noise_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbulence_noise_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbulence_noise_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbulence_noise_scale(_ turbulenceNoiseScale: Double) { + withUnsafePointer(to: turbulenceNoiseScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_turbulence_noise_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_turbulence_noise_speed_random: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbulence_noise_speed_random") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbulence_noise_speed_random() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_turbulence_noise_speed_random, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbulence_noise_speed_random: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbulence_noise_speed_random") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbulence_noise_speed_random(_ turbulenceNoiseSpeedRandom: Double) { + withUnsafePointer(to: turbulenceNoiseSpeedRandom) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_turbulence_noise_speed_random, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_turbulence_noise_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbulence_noise_speed") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbulence_noise_speed() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_turbulence_noise_speed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbulence_noise_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbulence_noise_speed") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbulence_noise_speed(_ turbulenceNoiseSpeed: Vector3) { + withUnsafePointer(to: turbulenceNoiseSpeed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_turbulence_noise_speed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity(_ accelVec: Vector3) { + withUnsafePointer(to: accelVec) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_gravity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lifetime_randomness") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lifetime_randomness(_ randomness: Double) { + withUnsafePointer(to: randomness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lifetime_randomness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lifetime_randomness") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lifetime_randomness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_lifetime_randomness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_sub_emitter_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter_mode") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2399052877)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter_mode() -> ParticleProcessMaterial.SubEmitterMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_sub_emitter_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ParticleProcessMaterial.SubEmitterMode (rawValue: _result)! + } + + fileprivate static var method_set_sub_emitter_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter_mode") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2161806672)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter_mode(_ mode: ParticleProcessMaterial.SubEmitterMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_sub_emitter_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter_frequency") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter_frequency() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_sub_emitter_frequency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sub_emitter_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter_frequency") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter_frequency(_ hz: Double) { + withUnsafePointer(to: hz) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_sub_emitter_frequency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter_amount_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter_amount_at_end") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter_amount_at_end() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_sub_emitter_amount_at_end, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sub_emitter_amount_at_end: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter_amount_at_end") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter_amount_at_end(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_sub_emitter_amount_at_end, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter_amount_at_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter_amount_at_collision") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter_amount_at_collision() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_sub_emitter_amount_at_collision, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sub_emitter_amount_at_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter_amount_at_collision") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter_amount_at_collision(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_sub_emitter_amount_at_collision, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sub_emitter_keep_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sub_emitter_keep_velocity") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sub_emitter_keep_velocity() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_sub_emitter_keep_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sub_emitter_keep_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sub_emitter_keep_velocity") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sub_emitter_keep_velocity(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_sub_emitter_keep_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_attractor_interaction_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attractor_interaction_enabled") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attractor_interaction_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_attractor_interaction_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_attractor_interaction_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_attractor_interaction_enabled") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_attractor_interaction_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_is_attractor_interaction_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mode") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 653804659)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mode(_ mode: ParticleProcessMaterial.CollisionMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_collision_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mode") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 139371864)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mode() -> ParticleProcessMaterial.CollisionMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_collision_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ParticleProcessMaterial.CollisionMode (rawValue: _result)! + } + + fileprivate static var method_set_collision_use_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_use_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_use_scale(_ radius: Bool) { + withUnsafePointer(to: radius) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_collision_use_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collision_using_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collision_using_scale") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collision_using_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_is_collision_using_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_friction") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_friction(_ friction: Double) { + withUnsafePointer(to: friction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_collision_friction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_friction") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_friction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_collision_friction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_bounce") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_bounce(_ bounce: Double) { + withUnsafePointer(to: bounce) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_set_collision_bounce, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_bounce") + return withUnsafePointer(to: &ParticleProcessMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_bounce() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ParticleProcessMaterial.method_get_collision_bounce, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Path2D.swift b/Sources/SwiftGodot/Generated/Api/Path2D.swift new file mode 100644 index 000000000..e934d255b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Path2D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Contains a ``Curve2D`` path for ``PathFollow2D`` nodes to follow. +/// +/// Can have ``PathFollow2D`` child nodes moving along the ``Curve2D``. See ``PathFollow2D`` for more information on usage. +/// +/// > Note: The path is considered as relative to the moved nodes (children of ``PathFollow2D``). As such, the curve should usually start with a zero vector (`(0, 0)`). +/// +open class Path2D: Node2D { + override open class var godotClassName: StringName { "Path2D" } + + /* Properties */ + + /// A ``Curve2D`` describing the path. + final public var curve: Curve2D? { + get { + return get_curve () + } + + set { + set_curve (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve") + return withUnsafePointer(to: &Path2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659985499)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve(_ curve: Curve2D?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Path2D.method_set_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve") + return withUnsafePointer(to: &Path2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 660369445)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve() -> Curve2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Path2D.method_get_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Path3D.swift b/Sources/SwiftGodot/Generated/Api/Path3D.swift new file mode 100644 index 000000000..ad5c372fc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Path3D.swift @@ -0,0 +1,112 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Contains a ``Curve3D`` path for ``PathFollow3D`` nodes to follow. +/// +/// Can have ``PathFollow3D`` child nodes moving along the ``Curve3D``. See ``PathFollow3D`` for more information on the usage. +/// +/// Note that the path is considered as relative to the moved nodes (children of ``PathFollow3D``). As such, the curve should usually start with a zero vector `(0, 0, 0)`. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``curveChanged`` +open class Path3D: Node3D { + override open class var godotClassName: StringName { "Path3D" } + + /* Properties */ + + /// A ``Curve3D`` describing the path. + final public var curve: Curve3D? { + get { + return get_curve () + } + + set { + set_curve (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve") + return withUnsafePointer(to: &Path3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408955118)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve(_ curve: Curve3D?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Path3D.method_set_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve") + return withUnsafePointer(to: &Path3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4244715212)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve() -> Curve3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Path3D.method_get_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + // Signals + /// Emitted when the ``curve`` changes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.curveChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var curveChanged: SimpleSignal { SimpleSignal (target: self, signalName: "curve_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PathFollow2D.swift b/Sources/SwiftGodot/Generated/Api/PathFollow2D.swift new file mode 100644 index 000000000..56bf69b94 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PathFollow2D.swift @@ -0,0 +1,431 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Point sampler for a ``Path2D``. +/// +/// This node takes its parent ``Path2D``, and returns the coordinates of a point within it, given a distance from the first vertex. +/// +/// It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the ``progress`` in this node. +/// +open class PathFollow2D: Node2D { + override open class var godotClassName: StringName { "PathFollow2D" } + + /* Properties */ + + /// The distance along the path, in pixels. Changing this value sets this node's position to a point within the path. + final public var progress: Double { + get { + return get_progress () + } + + set { + set_progress (newValue) + } + + } + + /// The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length. + final public var progressRatio: Double { + get { + return get_progress_ratio () + } + + set { + set_progress_ratio (newValue) + } + + } + + /// The node's offset along the curve. + final public var hOffset: Double { + get { + return get_h_offset () + } + + set { + set_h_offset (newValue) + } + + } + + /// The node's offset perpendicular to the curve. + final public var vOffset: Double { + get { + return get_v_offset () + } + + set { + set_v_offset (newValue) + } + + } + + /// If `true`, this node rotates to follow the path, with the +X direction facing forward on the path. + final public var rotates: Bool { + get { + return is_rotating () + } + + set { + set_rotates (newValue) + } + + } + + /// If `true`, the position between two cached points is interpolated cubically, and linearly otherwise. + /// + /// The points along the ``Curve2D`` of the ``Path2D`` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + /// + /// There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + /// + final public var cubicInterp: Bool { + get { + return get_cubic_interpolation () + } + + set { + set_cubic_interpolation (newValue) + } + + } + + /// If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. + final public var loop: Bool { + get { + return has_loop () + } + + set { + set_loop (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_progress") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_progress(_ progress: Double) { + withUnsafePointer(to: progress) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("get_progress") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_progress() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow2D.method_get_progress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_offset") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_offset(_ hOffset: Double) { + withUnsafePointer(to: hOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_h_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_offset") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow2D.method_get_h_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_offset") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_offset(_ vOffset: Double) { + withUnsafePointer(to: vOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_v_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_offset") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow2D.method_get_v_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_progress_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_progress_ratio") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_progress_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_progress_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_progress_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_progress_ratio") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_progress_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow2D.method_get_progress_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotates") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotates(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_rotates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_rotating: GDExtensionMethodBindPtr = { + let methodName = StringName("is_rotating") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_rotating() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow2D.method_is_rotating, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cubic_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cubic_interpolation") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cubic_interpolation(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_cubic_interpolation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cubic_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cubic_interpolation") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cubic_interpolation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow2D.method_get_cubic_interpolation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow2D.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("has_loop") + return withUnsafePointer(to: &PathFollow2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow2D.method_has_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PathFollow3D.swift b/Sources/SwiftGodot/Generated/Api/PathFollow3D.swift new file mode 100644 index 000000000..ec5da43c1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PathFollow3D.swift @@ -0,0 +1,598 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Point sampler for a ``Path3D``. +/// +/// This node takes its parent ``Path3D``, and returns the coordinates of a point within it, given a distance from the first vertex. +/// +/// It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting the ``progress`` in this node. +/// +open class PathFollow3D: Node3D { + override open class var godotClassName: StringName { "PathFollow3D" } + public enum RotationMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Forbids the PathFollow3D to rotate. + case none = 0 // ROTATION_NONE + /// Allows the PathFollow3D to rotate in the Y axis only. + case y = 1 // ROTATION_Y + /// Allows the PathFollow3D to rotate in both the X, and Y axes. + case xy = 2 // ROTATION_XY + /// Allows the PathFollow3D to rotate in any axis. + case xyz = 3 // ROTATION_XYZ + /// Uses the up vector information in a ``Curve3D`` to enforce orientation. This rotation mode requires the ``Path3D``'s ``Curve3D/upVectorEnabled`` property to be set to `true`. + case oriented = 4 // ROTATION_ORIENTED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .y: return ".y" + case .xy: return ".xy" + case .xyz: return ".xyz" + case .oriented: return ".oriented" + } + + } + + } + + + /* Properties */ + + /// The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path. + final public var progress: Double { + get { + return get_progress () + } + + set { + set_progress (newValue) + } + + } + + /// The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length. + final public var progressRatio: Double { + get { + return get_progress_ratio () + } + + set { + set_progress_ratio (newValue) + } + + } + + /// The node's offset along the curve. + final public var hOffset: Double { + get { + return get_h_offset () + } + + set { + set_h_offset (newValue) + } + + } + + /// The node's offset perpendicular to the curve. + final public var vOffset: Double { + get { + return get_v_offset () + } + + set { + set_v_offset (newValue) + } + + } + + /// Allows or forbids rotation on one or more axes, depending on the ``PathFollow3D/RotationMode`` constants being used. + final public var rotationMode: PathFollow3D.RotationMode { + get { + return get_rotation_mode () + } + + set { + set_rotation_mode (newValue) + } + + } + + /// If `true`, the node moves on the travel path with orienting the +Z axis as forward. See also ``Vector3/forward`` and ``Vector3/modelFront``. + final public var useModelFront: Bool { + get { + return is_using_model_front () + } + + set { + set_use_model_front (newValue) + } + + } + + /// If `true`, the position between two cached points is interpolated cubically, and linearly otherwise. + /// + /// The points along the ``Curve3D`` of the ``Path3D`` are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + /// + /// There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + /// + final public var cubicInterp: Bool { + get { + return get_cubic_interpolation () + } + + set { + set_cubic_interpolation (newValue) + } + + } + + /// If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. + final public var loop: Bool { + get { + return has_loop () + } + + set { + set_loop (newValue) + } + + } + + /// If `true`, the tilt property of ``Curve3D`` takes effect. + final public var tiltEnabled: Bool { + get { + return is_tilt_enabled () + } + + set { + set_tilt_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("set_progress") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_progress(_ progress: Double) { + withUnsafePointer(to: progress) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_progress, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_progress: GDExtensionMethodBindPtr = { + let methodName = StringName("get_progress") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_progress() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow3D.method_get_progress, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_h_offset") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_h_offset(_ hOffset: Double) { + withUnsafePointer(to: hOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_h_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_h_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_h_offset") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_h_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow3D.method_get_h_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_v_offset") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_v_offset(_ vOffset: Double) { + withUnsafePointer(to: vOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_v_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_v_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_offset") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_v_offset() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow3D.method_get_v_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_progress_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_progress_ratio") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_progress_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_progress_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_progress_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_progress_ratio") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_progress_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PathFollow3D.method_get_progress_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rotation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rotation_mode") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1640311967)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rotation_mode(_ rotationMode: PathFollow3D.RotationMode) { + withUnsafePointer(to: rotationMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_rotation_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rotation_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rotation_mode") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814010545)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rotation_mode() -> PathFollow3D.RotationMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PathFollow3D.method_get_rotation_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PathFollow3D.RotationMode (rawValue: _result)! + } + + fileprivate static var method_set_cubic_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cubic_interpolation") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cubic_interpolation(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_cubic_interpolation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cubic_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cubic_interpolation") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cubic_interpolation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow3D.method_get_cubic_interpolation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_model_front: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_model_front") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_model_front(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_use_model_front, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_model_front: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_model_front") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_model_front() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow3D.method_is_using_model_front, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("set_loop") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_loop(_ loop: Bool) { + withUnsafePointer(to: loop) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_loop, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_loop: GDExtensionMethodBindPtr = { + let methodName = StringName("has_loop") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func has_loop() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow3D.method_has_loop, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_tilt_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tilt_enabled") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tilt_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PathFollow3D.method_set_tilt_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_tilt_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_tilt_enabled") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_tilt_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PathFollow3D.method_is_tilt_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_correct_posture: GDExtensionMethodBindPtr = { + let methodName = StringName("correct_posture") + return withUnsafePointer(to: &PathFollow3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2686588690)! + } + + } + + }() + + /// Correct the `transform`. `rotationMode` implicitly specifies how posture (forward, up and sideway direction) is calculated. + public static func correctPosture(transform: Transform3D, rotationMode: PathFollow3D.RotationMode) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: rotationMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_correct_posture, nil, pArgs, &_result) + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Performance.swift b/Sources/SwiftGodot/Generated/Api/Performance.swift new file mode 100644 index 000000000..6dcbb4d42 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Performance.swift @@ -0,0 +1,340 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Exposes performance-related data. +/// +/// This class provides access to a number of different monitors related to performance, such as memory usage, draw calls, and FPS. These are the same as the values displayed in the **Monitor** tab in the editor's **Debugger** panel. By using the ``getMonitor(_:)`` method of this class, you can access this data from your code. +/// +/// You can add custom monitors using the ``addCustomMonitor(id:callable:arguments:)`` method. Custom monitors are available in **Monitor** tab in the editor's **Debugger** panel together with built-in monitors. +/// +/// > Note: Some of the built-in monitors are only available in debug mode and will always return `0` when used in a project exported in release mode. +/// +/// > Note: Some of the built-in monitors are not updated in real-time for performance reasons, so there may be a delay of up to 1 second between changes. +/// +/// > Note: Custom monitors do not support negative values. Negative values are clamped to 0. +/// +open class Performance: Object { + /// The shared instance of this class + public static var shared: Performance = { + return withUnsafePointer (to: &Performance.godotClassName.content) { ptr in + Performance (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "Performance" } + public enum Monitor: Int64, CaseIterable, CustomDebugStringConvertible { + /// The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. _Higher is better._ + case timeFps = 0 // TIME_FPS + /// Time it took to complete one frame, in seconds. _Lower is better._ + case timeProcess = 1 // TIME_PROCESS + /// Time it took to complete one physics frame, in seconds. _Lower is better._ + case timePhysicsProcess = 2 // TIME_PHYSICS_PROCESS + /// Time it took to complete one navigation step, in seconds. This includes navigation map updates as well as agent avoidance calculations. _Lower is better._ + case timeNavigationProcess = 3 // TIME_NAVIGATION_PROCESS + /// Static memory currently used, in bytes. Not available in release builds. _Lower is better._ + case memoryStatic = 4 // MEMORY_STATIC + /// Available static memory. Not available in release builds. _Lower is better._ + case memoryStaticMax = 5 // MEMORY_STATIC_MAX + /// Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. _Lower is better._ + case memoryMessageBufferMax = 6 // MEMORY_MESSAGE_BUFFER_MAX + /// Number of objects currently instantiated (including nodes). _Lower is better._ + case objectCount = 7 // OBJECT_COUNT + /// Number of resources currently used. _Lower is better._ + case objectResourceCount = 8 // OBJECT_RESOURCE_COUNT + /// Number of nodes currently instantiated in the scene tree. This also includes the root node. _Lower is better._ + case objectNodeCount = 9 // OBJECT_NODE_COUNT + /// Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. _Lower is better._ + case objectOrphanNodeCount = 10 // OBJECT_ORPHAN_NODE_COUNT + /// The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). _Lower is better._ + case renderTotalObjectsInFrame = 11 // RENDER_TOTAL_OBJECTS_IN_FRAME + /// The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). _Lower is better._ + case renderTotalPrimitivesInFrame = 12 // RENDER_TOTAL_PRIMITIVES_IN_FRAME + /// The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. _Lower is better._ + case renderTotalDrawCallsInFrame = 13 // RENDER_TOTAL_DRAW_CALLS_IN_FRAME + /// The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of ``Monitor/renderTextureMemUsed`` and ``Monitor/renderBufferMemUsed``. _Lower is better._ + case renderVideoMemUsed = 14 // RENDER_VIDEO_MEM_USED + /// The amount of texture memory used (in bytes). _Lower is better._ + case renderTextureMemUsed = 15 // RENDER_TEXTURE_MEM_USED + /// The amount of render buffer memory used (in bytes). _Lower is better._ + case renderBufferMemUsed = 16 // RENDER_BUFFER_MEM_USED + /// Number of active ``RigidBody2D`` nodes in the game. _Lower is better._ + case physics2dActiveObjects = 17 // PHYSICS_2D_ACTIVE_OBJECTS + /// Number of collision pairs in the 2D physics engine. _Lower is better._ + case physics2dCollisionPairs = 18 // PHYSICS_2D_COLLISION_PAIRS + /// Number of islands in the 2D physics engine. _Lower is better._ + case physics2dIslandCount = 19 // PHYSICS_2D_ISLAND_COUNT + /// Number of active ``RigidBody3D`` and ``VehicleBody3D`` nodes in the game. _Lower is better._ + case physics3dActiveObjects = 20 // PHYSICS_3D_ACTIVE_OBJECTS + /// Number of collision pairs in the 3D physics engine. _Lower is better._ + case physics3dCollisionPairs = 21 // PHYSICS_3D_COLLISION_PAIRS + /// Number of islands in the 3D physics engine. _Lower is better._ + case physics3dIslandCount = 22 // PHYSICS_3D_ISLAND_COUNT + /// Output latency of the ``AudioServer``. Equivalent to calling ``AudioServer/getOutputLatency()``, it is not recommended to call this every frame. + case audioOutputLatency = 23 // AUDIO_OUTPUT_LATENCY + /// Number of active navigation maps in the ``NavigationServer3D``. This also includes the two empty default navigation maps created by World2D and World3D. + case navigationActiveMaps = 24 // NAVIGATION_ACTIVE_MAPS + /// Number of active navigation regions in the ``NavigationServer3D``. + case navigationRegionCount = 25 // NAVIGATION_REGION_COUNT + /// Number of active navigation agents processing avoidance in the ``NavigationServer3D``. + case navigationAgentCount = 26 // NAVIGATION_AGENT_COUNT + /// Number of active navigation links in the ``NavigationServer3D``. + case navigationLinkCount = 27 // NAVIGATION_LINK_COUNT + /// Number of navigation mesh polygons in the ``NavigationServer3D``. + case navigationPolygonCount = 28 // NAVIGATION_POLYGON_COUNT + /// Number of navigation mesh polygon edges in the ``NavigationServer3D``. + case navigationEdgeCount = 29 // NAVIGATION_EDGE_COUNT + /// Number of navigation mesh polygon edges that were merged due to edge key overlap in the ``NavigationServer3D``. + case navigationEdgeMergeCount = 30 // NAVIGATION_EDGE_MERGE_COUNT + /// Number of polygon edges that are considered connected by edge proximity ``NavigationServer3D``. + case navigationEdgeConnectionCount = 31 // NAVIGATION_EDGE_CONNECTION_COUNT + /// Number of navigation mesh polygon edges that could not be merged in the ``NavigationServer3D``. The edges still may be connected by edge proximity or with links. + case navigationEdgeFreeCount = 32 // NAVIGATION_EDGE_FREE_COUNT + /// Represents the size of the ``Performance/Monitor`` enum. + case monitorMax = 33 // MONITOR_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .timeFps: return ".timeFps" + case .timeProcess: return ".timeProcess" + case .timePhysicsProcess: return ".timePhysicsProcess" + case .timeNavigationProcess: return ".timeNavigationProcess" + case .memoryStatic: return ".memoryStatic" + case .memoryStaticMax: return ".memoryStaticMax" + case .memoryMessageBufferMax: return ".memoryMessageBufferMax" + case .objectCount: return ".objectCount" + case .objectResourceCount: return ".objectResourceCount" + case .objectNodeCount: return ".objectNodeCount" + case .objectOrphanNodeCount: return ".objectOrphanNodeCount" + case .renderTotalObjectsInFrame: return ".renderTotalObjectsInFrame" + case .renderTotalPrimitivesInFrame: return ".renderTotalPrimitivesInFrame" + case .renderTotalDrawCallsInFrame: return ".renderTotalDrawCallsInFrame" + case .renderVideoMemUsed: return ".renderVideoMemUsed" + case .renderTextureMemUsed: return ".renderTextureMemUsed" + case .renderBufferMemUsed: return ".renderBufferMemUsed" + case .physics2dActiveObjects: return ".physics2dActiveObjects" + case .physics2dCollisionPairs: return ".physics2dCollisionPairs" + case .physics2dIslandCount: return ".physics2dIslandCount" + case .physics3dActiveObjects: return ".physics3dActiveObjects" + case .physics3dCollisionPairs: return ".physics3dCollisionPairs" + case .physics3dIslandCount: return ".physics3dIslandCount" + case .audioOutputLatency: return ".audioOutputLatency" + case .navigationActiveMaps: return ".navigationActiveMaps" + case .navigationRegionCount: return ".navigationRegionCount" + case .navigationAgentCount: return ".navigationAgentCount" + case .navigationLinkCount: return ".navigationLinkCount" + case .navigationPolygonCount: return ".navigationPolygonCount" + case .navigationEdgeCount: return ".navigationEdgeCount" + case .navigationEdgeMergeCount: return ".navigationEdgeMergeCount" + case .navigationEdgeConnectionCount: return ".navigationEdgeConnectionCount" + case .navigationEdgeFreeCount: return ".navigationEdgeFreeCount" + case .monitorMax: return ".monitorMax" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_monitor") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1943275655)! + } + + } + + }() + + /// Returns the value of one of the available built-in monitors. You should provide one of the ``Performance/Monitor`` constants as the argument, like this: + /// + /// See ``getCustomMonitor(id:)`` to query custom performance monitors' values. + /// + public static func getMonitor(_ monitor: Performance.Monitor) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: monitor.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_monitor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_custom_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("add_custom_monitor") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4099036814)! + } + + } + + }() + + /// Adds a custom monitor with the name `id`. You can specify the category of the monitor using slash delimiters in `id` (for example: `"Game/NumberOfNPCs"`). If there is more than one slash delimiter, then the default category is used. The default category is `"Custom"`. Prints an error if given `id` is already present. + /// + /// The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. + /// + /// Callables are called with arguments supplied in argument array. + /// + public static func addCustomMonitor(id: StringName, callable: Callable, arguments: GArray = GArray ()) { + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: arguments.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_add_custom_monitor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_remove_custom_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_custom_monitor") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the custom monitor with given `id`. Prints an error if the given `id` is already absent. + public static func removeCustomMonitor(id: StringName) { + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_custom_monitor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_custom_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("has_custom_monitor") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2041966384)! + } + + } + + }() + + /// Returns `true` if custom monitor with the given `id` is present, `false` otherwise. + public static func hasCustomMonitor(id: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_custom_monitor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_custom_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_monitor") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Returns the value of custom monitor with given `id`. The callable is called to get the value of custom monitor. See also ``hasCustomMonitor(id:)``. Prints an error if the given `id` is absent. + public static func getCustomMonitor(id: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_custom_monitor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_monitor_modification_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_monitor_modification_time") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to ``Time/getTicksUsec()`` when the monitor is updated. + public static func getMonitorModificationTime() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(method_get_monitor_modification_time, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_custom_monitor_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_monitor_names") + return withUnsafePointer(to: &Performance.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the names of active custom monitors in an ``GArray``. + public static func getCustomMonitorNames() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_custom_monitor_names, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicalBone2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicalBone2D.swift new file mode 100644 index 000000000..768db1715 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicalBone2D.swift @@ -0,0 +1,355 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``RigidBody2D``-derived node used to make ``Bone2D``s in a ``Skeleton2D`` react to physics. +/// +/// The ``PhysicalBone2D`` node is a ``RigidBody2D``-based node that can be used to make ``Bone2D``s in a ``Skeleton2D`` react to physics. +/// +/// > Note: To make the ``Bone2D``s visually follow the ``PhysicalBone2D`` node, use a ``SkeletonModification2DPhysicalBones`` modification on the ``Skeleton2D`` parent. +/// +/// > Note: The ``PhysicalBone2D`` node does not automatically create a ``Joint2D`` node to keep ``PhysicalBone2D`` nodes together. They must be created manually. For most cases, you want to use a ``PinJoint2D`` node. The ``PhysicalBone2D`` node will automatically configure the ``Joint2D`` node once it's been added as a child node. +/// +open class PhysicalBone2D: RigidBody2D { + override open class var godotClassName: StringName { "PhysicalBone2D" } + + /* Properties */ + + /// The ``NodePath`` to the ``Bone2D`` that this ``PhysicalBone2D`` should simulate. + final public var bone2dNodepath: NodePath { + get { + return get_bone2d_nodepath () + } + + set { + set_bone2d_nodepath (newValue) + } + + } + + /// The index of the ``Bone2D`` that this ``PhysicalBone2D`` should simulate. + final public var bone2dIndex: Int32 { + get { + return get_bone2d_index () + } + + set { + set_bone2d_index (newValue) + } + + } + + /// If `true`, the ``PhysicalBone2D`` will automatically configure the first ``Joint2D`` child node. The automatic configuration is limited to setting up the node properties and positioning the ``Joint2D``. + final public var autoConfigureJoint: Bool { + get { + return get_auto_configure_joint () + } + + set { + set_auto_configure_joint (newValue) + } + + } + + /// If `true`, the ``PhysicalBone2D`` will start simulating using physics. If `false`, the ``PhysicalBone2D`` will follow the transform of the ``Bone2D`` node. + /// + /// > Note: To have the ``Bone2D``s visually follow the ``PhysicalBone2D``, use a ``SkeletonModification2DPhysicalBones`` modification on the ``Skeleton2D`` node with the ``Bone2D`` nodes. + /// + final public var simulatePhysics: Bool { + get { + return get_simulate_physics () + } + + set { + set_simulate_physics (newValue) + } + + } + + /// If `true`, the ``PhysicalBone2D`` will keep the transform of the bone it is bound to when simulating physics. + final public var followBoneWhenSimulating: Bool { + get { + return get_follow_bone_when_simulating () + } + + set { + set_follow_bone_when_simulating (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_joint: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3582132112)! + } + + } + + }() + + /// Returns the first ``Joint2D`` child node, if one exists. This is mainly a helper function to make it easier to get the ``Joint2D`` that the ``PhysicalBone2D`` is autoconfiguring. + public final func getJoint() -> Joint2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_joint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_auto_configure_joint: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auto_configure_joint") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auto_configure_joint() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_auto_configure_joint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_configure_joint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_configure_joint") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_configure_joint(_ autoConfigureJoint: Bool) { + withUnsafePointer(to: autoConfigureJoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone2D.method_set_auto_configure_joint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_simulate_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("set_simulate_physics") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_simulate_physics(_ simulatePhysics: Bool) { + withUnsafePointer(to: simulatePhysics) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone2D.method_set_simulate_physics, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_simulate_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simulate_physics") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_simulate_physics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_simulate_physics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_simulating_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("is_simulating_physics") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns a boolean that indicates whether the ``PhysicalBone2D`` is running and simulating using the Godot 2D physics engine. When `true`, the PhysicalBone2D node is using physics. + public final func isSimulatingPhysics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone2D.method_is_simulating_physics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bone2d_nodepath: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone2d_nodepath") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bone2d_nodepath(_ nodepath: NodePath) { + withUnsafePointer(to: nodepath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone2D.method_set_bone2d_nodepath, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone2d_nodepath: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone2d_nodepath") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bone2d_nodepath() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_bone2d_nodepath, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_bone2d_index: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone2d_index") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bone2d_index(_ boneIndex: Int32) { + withUnsafePointer(to: boneIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone2D.method_set_bone2d_index, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bone2d_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone2d_index") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bone2d_index() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_bone2d_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_follow_bone_when_simulating: GDExtensionMethodBindPtr = { + let methodName = StringName("set_follow_bone_when_simulating") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_follow_bone_when_simulating(_ followBone: Bool) { + withUnsafePointer(to: followBone) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone2D.method_set_follow_bone_when_simulating, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_follow_bone_when_simulating: GDExtensionMethodBindPtr = { + let methodName = StringName("get_follow_bone_when_simulating") + return withUnsafePointer(to: &PhysicalBone2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_follow_bone_when_simulating() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone2D.method_get_follow_bone_when_simulating, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicalBone3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicalBone3D.swift new file mode 100644 index 000000000..d8e1219b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicalBone3D.swift @@ -0,0 +1,1121 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics body used to make bones in a ``Skeleton3D`` react to physics. +/// +/// The ``PhysicalBone3D`` node is a physics body that can be used to make bones in a ``Skeleton3D`` react to physics. +/// +/// > Note: In order to detect physical bones with raycasts, the ``SkeletonModifier3D/active`` property of the parent ``PhysicalBoneSimulator3D`` must be `true` and the ``Skeleton3D``'s bone must be assigned to ``PhysicalBone3D`` correctly; it means that ``getBoneId()`` should return a valid id (`>= 0`). +/// +open class PhysicalBone3D: PhysicsBody3D { + override open class var godotClassName: StringName { "PhysicalBone3D" } + public enum DampMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// In this mode, the body's damping value is added to any value set in areas or the default value. + case combine = 0 // DAMP_MODE_COMBINE + /// In this mode, the body's damping value replaces any value set in areas or the default value. + case replace = 1 // DAMP_MODE_REPLACE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .combine: return ".combine" + case .replace: return ".replace" + } + + } + + } + + public enum JointType: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case none = 0 // JOINT_TYPE_NONE + /// + case pin = 1 // JOINT_TYPE_PIN + /// + case cone = 2 // JOINT_TYPE_CONE + /// + case hinge = 3 // JOINT_TYPE_HINGE + /// + case slider = 4 // JOINT_TYPE_SLIDER + /// + case jointType6dof = 5 // JOINT_TYPE_6DOF + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .pin: return ".pin" + case .cone: return ".cone" + case .hinge: return ".hinge" + case .slider: return ".slider" + case .jointType6dof: return ".jointType6dof" + } + + } + + } + + + /* Properties */ + + /// Sets the joint type. See ``PhysicalBone3D/JointType`` for possible values. + final public var jointType: PhysicalBone3D.JointType { + get { + return get_joint_type () + } + + set { + set_joint_type (newValue) + } + + } + + /// Sets the joint's transform. + final public var jointOffset: Transform3D { + get { + return get_joint_offset () + } + + set { + set_joint_offset (newValue) + } + + } + + /// Sets the joint's rotation in radians. + final public var jointRotation: Vector3 { + get { + return get_joint_rotation () + } + + set { + set_joint_rotation (newValue) + } + + } + + /// Sets the body's transform. + final public var bodyOffset: Transform3D { + get { + return get_body_offset () + } + + set { + set_body_offset (newValue) + } + + } + + /// The body's mass. + final public var mass: Double { + get { + return get_mass () + } + + set { + set_mass (newValue) + } + + } + + /// The body's friction, from `0` (frictionless) to `1` (max friction). + final public var friction: Double { + get { + return get_friction () + } + + set { + set_friction (newValue) + } + + } + + /// The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness). + /// + /// > Note: Even with ``bounce`` set to `1.0`, some energy will be lost over time due to linear and angular damping. To have a ``PhysicalBone3D`` that preserves all its energy over time, set ``bounce`` to `1.0`, ``linearDampMode`` to ``DampMode/replace``, ``linearDamp`` to `0.0`, ``angularDampMode`` to ``DampMode/replace``, and ``angularDamp`` to `0.0`. + /// + final public var bounce: Double { + get { + return get_bounce () + } + + set { + set_bounce (newValue) + } + + } + + /// This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + final public var gravityScale: Double { + get { + return get_gravity_scale () + } + + set { + set_gravity_scale (newValue) + } + + } + + /// If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the ``_integrateForces(state:)`` method, if that virtual method is overridden. + /// + /// Setting this property will call the method ``PhysicsServer3D/bodySetOmitForceIntegration(body:enable:)`` internally. + /// + final public var customIntegrator: Bool { + get { + return is_using_custom_integrator () + } + + set { + set_use_custom_integrator (newValue) + } + + } + + /// Defines how ``linearDamp`` is applied. See ``PhysicalBone3D/DampMode`` for possible values. + final public var linearDampMode: PhysicalBone3D.DampMode { + get { + return get_linear_damp_mode () + } + + set { + set_linear_damp_mode (newValue) + } + + } + + /// Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an ``Area3D`` the body is in. Depending on ``linearDampMode``, you can set ``linearDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/3d/defaultLinearDamp`` for more details about damping. + /// + final public var linearDamp: Double { + get { + return get_linear_damp () + } + + set { + set_linear_damp (newValue) + } + + } + + /// Defines how ``angularDamp`` is applied. See ``PhysicalBone3D/DampMode`` for possible values. + final public var angularDampMode: PhysicalBone3D.DampMode { + get { + return get_angular_damp_mode () + } + + set { + set_angular_damp_mode (newValue) + } + + } + + /// Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an ``Area3D`` the body is in. Depending on ``angularDampMode``, you can set ``angularDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/3d/defaultAngularDamp`` for more details about damping. + /// + final public var angularDamp: Double { + get { + return get_angular_damp () + } + + set { + set_angular_damp (newValue) + } + + } + + /// The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use ``_integrateForces(state:)`` as your process loop for precise control of the body state. + final public var linearVelocity: Vector3 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// The PhysicalBone3D's rotational velocity in _radians_ per second. + final public var angularVelocity: Vector3 { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// If `true`, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force. + final public var canSleep: Bool { + get { + return is_able_to_sleep () + } + + set { + set_can_sleep (newValue) + } + + } + + /* Methods */ + /// Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the ``customIntegrator`` property allows you to disable the standard force integration and do fully custom force integration for a body. + @_documentation(visibility: public) + open func _integrateForces(state: PhysicsDirectBodyState3D?) { + } + + fileprivate static var method_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_impulse") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// + public final func applyCentralImpulse(_ impulse: Vector3) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_apply_central_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_impulse") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// + public final func applyImpulse(_ impulse: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_apply_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_joint_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_type") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2289552604)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joint_type(_ jointType: PhysicalBone3D.JointType) { + withUnsafePointer(to: jointType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_joint_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_type") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 931347320)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joint_type() -> PhysicalBone3D.JointType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_joint_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PhysicalBone3D.JointType (rawValue: _result)! + } + + fileprivate static var method_set_joint_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_offset") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joint_offset(_ offset: Transform3D) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_joint_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_offset") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joint_offset() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_joint_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_joint_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_joint_rotation") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_joint_rotation(_ euler: Vector3) { + withUnsafePointer(to: euler) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_joint_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_joint_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_joint_rotation") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_joint_rotation() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_joint_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_body_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_body_offset") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_body_offset(_ offset: Transform3D) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_body_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_body_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_body_offset") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_body_offset() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_body_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_simulate_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("get_simulate_physics") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// + public final func getSimulatePhysics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_simulate_physics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_simulating_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("is_simulating_physics") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// + public final func isSimulatingPhysics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone3D.method_is_simulating_physics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_bone_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_id") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// + public final func getBoneId() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_bone_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mass") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mass(_ mass: Double) { + withUnsafePointer(to: mass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mass") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_friction") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_friction(_ friction: Double) { + withUnsafePointer(to: friction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_friction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_friction") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_friction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_friction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bounce") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bounce(_ bounce: Double) { + withUnsafePointer(to: bounce) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_bounce, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bounce") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bounce() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_bounce, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_scale") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_scale(_ gravityScale: Double) { + withUnsafePointer(to: gravityScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_gravity_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_scale") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_gravity_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp_mode") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1244972221)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp_mode(_ linearDampMode: PhysicalBone3D.DampMode) { + withUnsafePointer(to: linearDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp_mode") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 205884699)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp_mode() -> PhysicalBone3D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PhysicalBone3D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp_mode") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1244972221)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp_mode(_ angularDampMode: PhysicalBone3D.DampMode) { + withUnsafePointer(to: angularDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp_mode") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 205884699)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp_mode() -> PhysicalBone3D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PhysicalBone3D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp(_ linearDamp: Double) { + withUnsafePointer(to: linearDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_linear_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp(_ angularDamp: Double) { + withUnsafePointer(to: angularDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_angular_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ linearVelocity: Vector3) { + withUnsafePointer(to: linearVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ angularVelocity: Vector3) { + withUnsafePointer(to: angularVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicalBone3D.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_custom_integrator") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_custom_integrator(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_use_custom_integrator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_custom_integrator") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_custom_integrator() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone3D.method_is_using_custom_integrator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_can_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("set_can_sleep") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_can_sleep(_ ableToSleep: Bool) { + withUnsafePointer(to: ableToSleep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBone3D.method_set_can_sleep, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_able_to_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("is_able_to_sleep") + return withUnsafePointer(to: &PhysicalBone3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_able_to_sleep() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBone3D.method_is_able_to_sleep, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_integrate_forces": + return _PhysicalBone3D_proxy_integrate_forces + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicalBone3D_proxy_integrate_forces (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._integrateForces (state: lookupLiveObject (handleAddress: resolved_0) as? PhysicsDirectBodyState3D ?? PhysicsDirectBodyState3D (nativeHandle: resolved_0)) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicalBoneSimulator3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicalBoneSimulator3D.swift new file mode 100644 index 000000000..b9cb3d248 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicalBoneSimulator3D.swift @@ -0,0 +1,150 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Node that can be the parent of ``PhysicalBone3D`` and can apply the simulation results to ``Skeleton3D``. +/// +/// Node that can be the parent of ``PhysicalBone3D`` and can apply the simulation results to ``Skeleton3D``. +open class PhysicalBoneSimulator3D: SkeletonModifier3D { + override open class var godotClassName: StringName { "PhysicalBoneSimulator3D" } + /* Methods */ + fileprivate static var method_is_simulating_physics: GDExtensionMethodBindPtr = { + let methodName = StringName("is_simulating_physics") + return withUnsafePointer(to: &PhysicalBoneSimulator3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns a boolean that indicates whether the ``PhysicalBoneSimulator3D`` is running and simulating. + public final func isSimulatingPhysics() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalBoneSimulator3D.method_is_simulating_physics, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_physical_bones_stop_simulation: GDExtensionMethodBindPtr = { + let methodName = StringName("physical_bones_stop_simulation") + return withUnsafePointer(to: &PhysicalBoneSimulator3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Tells the ``PhysicalBone3D`` nodes in the Skeleton to stop simulating. + public final func physicalBonesStopSimulation() { + gi.object_method_bind_ptrcall(PhysicalBoneSimulator3D.method_physical_bones_stop_simulation, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_physical_bones_start_simulation: GDExtensionMethodBindPtr = { + let methodName = StringName("physical_bones_start_simulation") + return withUnsafePointer(to: &PhysicalBoneSimulator3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2787316981)! + } + + } + + }() + + /// Tells the ``PhysicalBone3D`` nodes in the Skeleton to start simulating and reacting to the physics world. + /// + /// Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. + /// + public final func physicalBonesStartSimulation(bones: VariantCollection = VariantCollection ()) { + withUnsafePointer(to: bones.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBoneSimulator3D.method_physical_bones_start_simulation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_physical_bones_add_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("physical_bones_add_collision_exception") + return withUnsafePointer(to: &PhysicalBoneSimulator3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Adds a collision exception to the physical bone. + /// + /// Works just like the ``RigidBody3D`` node. + /// + public final func physicalBonesAddCollisionException(_ exception: RID) { + withUnsafePointer(to: exception.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBoneSimulator3D.method_physical_bones_add_collision_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_physical_bones_remove_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("physical_bones_remove_collision_exception") + return withUnsafePointer(to: &PhysicalBoneSimulator3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes a collision exception to the physical bone. + /// + /// Works just like the ``RigidBody3D`` node. + /// + public final func physicalBonesRemoveCollisionException(_ exception: RID) { + withUnsafePointer(to: exception.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalBoneSimulator3D.method_physical_bones_remove_collision_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicalSkyMaterial.swift b/Sources/SwiftGodot/Generated/Api/PhysicalSkyMaterial.swift new file mode 100644 index 000000000..db8d13227 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicalSkyMaterial.swift @@ -0,0 +1,650 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A material that defines a sky for a ``Sky`` resource by a set of physical properties. +/// +/// The ``PhysicalSkyMaterial`` uses the Preetham analytic daylight model to draw a sky based on physical properties. This results in a substantially more realistic sky than the ``ProceduralSkyMaterial``, but it is slightly slower and less flexible. +/// +/// The ``PhysicalSkyMaterial`` only supports one sun. The color, energy, and direction of the sun are taken from the first ``DirectionalLight3D`` in the scene tree. +/// +open class PhysicalSkyMaterial: Material { + override open class var godotClassName: StringName { "PhysicalSkyMaterial" } + + /* Properties */ + + /// Controls the strength of the Rayleigh scattering. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. + final public var rayleighCoefficient: Double { + get { + return get_rayleigh_coefficient () + } + + set { + set_rayleigh_coefficient (newValue) + } + + } + + /// Controls the ``Color`` of the Rayleigh scattering. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red ``Color`` results in a Mars-looking atmosphere with a corresponding blue sunset. + final public var rayleighColor: Color { + get { + return get_rayleigh_color () + } + + set { + set_rayleigh_color (newValue) + } + + } + + /// Controls the strength of Mie scattering for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, Mie scattering results in a whitish color around the sun and horizon. + final public var mieCoefficient: Double { + get { + return get_mie_coefficient () + } + + set { + set_mie_coefficient (newValue) + } + + } + + /// Controls the direction of the Mie scattering. A value of `1` means that when light hits a particle it's passing through straight forward. A value of `-1` means that all light is scatter backwards. + final public var mieEccentricity: Double { + get { + return get_mie_eccentricity () + } + + set { + set_mie_eccentricity (newValue) + } + + } + + /// Controls the ``Color`` of the Mie scattering effect. While not physically accurate, this allows for the creation of alien-looking planets. + final public var mieColor: Color { + get { + return get_mie_color () + } + + set { + set_mie_color (newValue) + } + + } + + /// Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. + final public var turbidity: Double { + get { + return get_turbidity () + } + + set { + set_turbidity (newValue) + } + + } + + /// Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. + final public var sunDiskScale: Double { + get { + return get_sun_disk_scale () + } + + set { + set_sun_disk_scale (newValue) + } + + } + + /// Modulates the ``Color`` on the bottom half of the sky to represent the ground. + final public var groundColor: Color { + get { + return get_ground_color () + } + + set { + set_ground_color (newValue) + } + + } + + /// The sky's overall brightness multiplier. Higher values result in a brighter sky. + final public var energyMultiplier: Double { + get { + return get_energy_multiplier () + } + + set { + set_energy_multiplier (newValue) + } + + } + + /// If `true`, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + final public var useDebanding: Bool { + get { + return get_use_debanding () + } + + set { + set_use_debanding (newValue) + } + + } + + /// ``Texture2D`` for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. + final public var nightSky: Texture2D? { + get { + return get_night_sky () + } + + set { + set_night_sky (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_rayleigh_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rayleigh_coefficient") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rayleigh_coefficient(_ rayleigh: Double) { + withUnsafePointer(to: rayleigh) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_rayleigh_coefficient, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rayleigh_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rayleigh_coefficient") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rayleigh_coefficient() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_rayleigh_coefficient, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rayleigh_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rayleigh_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rayleigh_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_rayleigh_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_rayleigh_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rayleigh_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_rayleigh_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_rayleigh_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mie_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mie_coefficient") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mie_coefficient(_ mie: Double) { + withUnsafePointer(to: mie) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_mie_coefficient, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mie_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mie_coefficient") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mie_coefficient() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_mie_coefficient, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mie_eccentricity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mie_eccentricity") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mie_eccentricity(_ eccentricity: Double) { + withUnsafePointer(to: eccentricity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_mie_eccentricity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mie_eccentricity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mie_eccentricity") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mie_eccentricity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_mie_eccentricity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mie_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mie_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mie_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_mie_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mie_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mie_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mie_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_mie_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_turbidity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_turbidity") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_turbidity(_ turbidity: Double) { + withUnsafePointer(to: turbidity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_turbidity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_turbidity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_turbidity") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_turbidity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_turbidity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sun_disk_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sun_disk_scale") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sun_disk_scale(_ scale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_sun_disk_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sun_disk_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sun_disk_scale") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sun_disk_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_sun_disk_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ground_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ground_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ground_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_ground_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ground_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ground_color") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ground_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_ground_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_energy_multiplier") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_energy_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_energy_multiplier") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_debanding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_debanding") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_debanding(_ useDebanding: Bool) { + withUnsafePointer(to: useDebanding) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_use_debanding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_debanding: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_debanding") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_debanding() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_use_debanding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_night_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("set_night_sky") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_night_sky(_ nightSky: Texture2D?) { + withUnsafePointer(to: nightSky?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_set_night_sky, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_night_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("get_night_sky") + return withUnsafePointer(to: &PhysicalSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_night_sky() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicalSkyMaterial.method_get_night_sky, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsBody2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsBody2D.swift new file mode 100644 index 000000000..84008d110 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsBody2D.swift @@ -0,0 +1,209 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 2D game objects affected by physics. +/// +/// ``PhysicsBody2D`` is an abstract base class for 2D game objects affected by physics. All 2D physics bodies inherit from it. +open class PhysicsBody2D: CollisionObject2D { + override open class var godotClassName: StringName { "PhysicsBody2D" } + /* Methods */ + fileprivate static var method_move_and_collide: GDExtensionMethodBindPtr = { + let methodName = StringName("move_and_collide") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3681923724)! + } + + } + + }() + + /// Moves the body along the vector `motion`. In order to be frame rate independent in ``Node/_physicsProcess(delta:)`` or ``Node/_process(delta:)``, `motion` should be computed using `delta`. + /// + /// Returns a ``KinematicCollision2D``, which contains information about the collision when stopped, or when touching another body along the motion. + /// + /// If `testOnly` is `true`, the body does not move but the would-be collision information is given. + /// + /// `safeMargin` is the extra margin used for collision recovery (see ``CharacterBody2D/safeMargin`` for more details). + /// + /// If `recoveryAsCollision` is `true`, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by ``CharacterBody2D`` for improving floor detection during floor snapping. + /// + public final func moveAndCollide(motion: Vector2, testOnly: Bool = false, safeMargin: Double = 0.08, recoveryAsCollision: Bool = false) -> KinematicCollision2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: testOnly) { pArg1 in + withUnsafePointer(to: safeMargin) { pArg2 in + withUnsafePointer(to: recoveryAsCollision) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody2D.method_move_and_collide, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_test_move: GDExtensionMethodBindPtr = { + let methodName = StringName("test_move") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3324464701)! + } + + } + + }() + + /// Checks for collisions without moving the body. In order to be frame rate independent in ``Node/_physicsProcess(delta:)`` or ``Node/_process(delta:)``, `motion` should be computed using `delta`. + /// + /// Virtually sets the node's position, scale and rotation to that of the given ``Transform2D``, then tries to move the body along the vector `motion`. Returns `true` if a collision would stop the body from moving along the whole path. + /// + /// `collision` is an optional object of type ``KinematicCollision2D``, which contains additional information about the collision when stopped, or when touching another body along the motion. + /// + /// `safeMargin` is the extra margin used for collision recovery (see ``CharacterBody2D/safeMargin`` for more details). + /// + /// If `recoveryAsCollision` is `true`, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would _touch_ any other bodies. + /// + public final func testMove(from: Transform2D, motion: Vector2, collision: KinematicCollision2D? = nil, safeMargin: Double = 0.08, recoveryAsCollision: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: motion) { pArg1 in + withUnsafePointer(to: collision?.handle) { pArg2 in + withUnsafePointer(to: safeMargin) { pArg3 in + withUnsafePointer(to: recoveryAsCollision) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody2D.method_test_move, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from ``Area2D`` nodes and the global world gravity. + public final func getGravity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsBody2D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_exceptions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_exceptions") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of nodes that were added as collision exceptions for this body. + public final func getCollisionExceptions() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsBody2D.method_get_collision_exceptions, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_add_collision_exception_with: GDExtensionMethodBindPtr = { + let methodName = StringName("add_collision_exception_with") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Adds a body to the list of bodies that this body can't collide with. + public final func addCollisionExceptionWith(body: Node?) { + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody2D.method_add_collision_exception_with, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_collision_exception_with: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_collision_exception_with") + return withUnsafePointer(to: &PhysicsBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Removes a body from the list of bodies that this body can't collide with. + public final func removeCollisionExceptionWith(body: Node?) { + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody2D.method_remove_collision_exception_with, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsBody3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsBody3D.swift new file mode 100644 index 000000000..369e9d9e7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsBody3D.swift @@ -0,0 +1,355 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for 3D game objects affected by physics. +/// +/// ``PhysicsBody3D`` is an abstract base class for 3D game objects affected by physics. All 3D physics bodies inherit from it. +/// +/// > Warning: With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead. +/// +open class PhysicsBody3D: CollisionObject3D { + override open class var godotClassName: StringName { "PhysicsBody3D" } + + /* Properties */ + + /// Lock the body's linear movement in the X axis. + final public var axisLockLinearX: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 1)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 1)!, newValue) + } + + } + + /// Lock the body's linear movement in the Y axis. + final public var axisLockLinearY: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 2)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 2)!, newValue) + } + + } + + /// Lock the body's linear movement in the Z axis. + final public var axisLockLinearZ: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 4)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 4)!, newValue) + } + + } + + /// Lock the body's rotation in the X axis. + final public var axisLockAngularX: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 8)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 8)!, newValue) + } + + } + + /// Lock the body's rotation in the Y axis. + final public var axisLockAngularY: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 16)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 16)!, newValue) + } + + } + + /// Lock the body's rotation in the Z axis. + final public var axisLockAngularZ: Bool { + get { + return get_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 32)!) + } + + set { + set_axis_lock (PhysicsServer3D.BodyAxis (rawValue: 32)!, newValue) + } + + } + + /* Methods */ + fileprivate static var method_move_and_collide: GDExtensionMethodBindPtr = { + let methodName = StringName("move_and_collide") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3208792678)! + } + + } + + }() + + /// Moves the body along the vector `motion`. In order to be frame rate independent in ``Node/_physicsProcess(delta:)`` or ``Node/_process(delta:)``, `motion` should be computed using `delta`. + /// + /// The body will stop if it collides. Returns a ``KinematicCollision3D``, which contains information about the collision when stopped, or when touching another body along the motion. + /// + /// If `testOnly` is `true`, the body does not move but the would-be collision information is given. + /// + /// `safeMargin` is the extra margin used for collision recovery (see ``CharacterBody3D/safeMargin`` for more details). + /// + /// If `recoveryAsCollision` is `true`, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by ``CharacterBody3D`` for improving floor detection during floor snapping. + /// + /// `maxCollisions` allows to retrieve more than one collision result. + /// + public final func moveAndCollide(motion: Vector3, testOnly: Bool = false, safeMargin: Double = 0.001, recoveryAsCollision: Bool = false, maxCollisions: Int32 = 1) -> KinematicCollision3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: testOnly) { pArg1 in + withUnsafePointer(to: safeMargin) { pArg2 in + withUnsafePointer(to: recoveryAsCollision) { pArg3 in + withUnsafePointer(to: maxCollisions) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_move_and_collide, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_test_move: GDExtensionMethodBindPtr = { + let methodName = StringName("test_move") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2481691619)! + } + + } + + }() + + /// Checks for collisions without moving the body. In order to be frame rate independent in ``Node/_physicsProcess(delta:)`` or ``Node/_process(delta:)``, `motion` should be computed using `delta`. + /// + /// Virtually sets the node's position, scale and rotation to that of the given ``Transform3D``, then tries to move the body along the vector `motion`. Returns `true` if a collision would stop the body from moving along the whole path. + /// + /// `collision` is an optional object of type ``KinematicCollision3D``, which contains additional information about the collision when stopped, or when touching another body along the motion. + /// + /// `safeMargin` is the extra margin used for collision recovery (see ``CharacterBody3D/safeMargin`` for more details). + /// + /// If `recoveryAsCollision` is `true`, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would _touch_ any other bodies. + /// + /// `maxCollisions` allows to retrieve more than one collision result. + /// + public final func testMove(from: Transform3D, motion: Vector3, collision: KinematicCollision3D? = nil, safeMargin: Double = 0.001, recoveryAsCollision: Bool = false, maxCollisions: Int32 = 1) -> Bool { + var _result: Bool = false + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: motion) { pArg1 in + withUnsafePointer(to: collision?.handle) { pArg2 in + withUnsafePointer(to: safeMargin) { pArg3 in + withUnsafePointer(to: recoveryAsCollision) { pArg4 in + withUnsafePointer(to: maxCollisions) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_test_move, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from ``Area3D`` nodes and the global world gravity. + public final func getGravity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsBody3D.method_get_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_axis_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("set_axis_lock") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1787895195)! + } + + } + + }() + + @inline(__always) + /// Locks or unlocks the specified linear or rotational `axis` depending on the value of `lock`. + fileprivate final func set_axis_lock(_ axis: PhysicsServer3D.BodyAxis, _ lock: Bool) { + withUnsafePointer(to: axis.rawValue) { pArg0 in + withUnsafePointer(to: lock) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_set_axis_lock, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_axis_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("get_axis_lock") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2264617709)! + } + + } + + }() + + @inline(__always) + /// Returns `true` if the specified linear or rotational `axis` is locked. + fileprivate final func get_axis_lock(_ axis: PhysicsServer3D.BodyAxis) -> Bool { + var _result: Bool = false + withUnsafePointer(to: axis.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_get_axis_lock, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collision_exceptions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_exceptions") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an array of nodes that were added as collision exceptions for this body. + public final func getCollisionExceptions() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsBody3D.method_get_collision_exceptions, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_add_collision_exception_with: GDExtensionMethodBindPtr = { + let methodName = StringName("add_collision_exception_with") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Adds a body to the list of bodies that this body can't collide with. + public final func addCollisionExceptionWith(body: Node?) { + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_add_collision_exception_with, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_collision_exception_with: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_collision_exception_with") + return withUnsafePointer(to: &PhysicsBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Removes a body from the list of bodies that this body can't collide with. + public final func removeCollisionExceptionWith(body: Node?) { + withUnsafePointer(to: body?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsBody3D.method_remove_collision_exception_with, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2D.swift new file mode 100644 index 000000000..4f39bed68 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2D.swift @@ -0,0 +1,1216 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides direct access to a physics body in the ``PhysicsServer2D``. +/// +/// Provides direct access to a physics body in the ``PhysicsServer2D``, allowing safe changes to physics properties. This object is passed via the direct state callback of ``RigidBody2D``, and is intended for changing the direct state of that body. See ``RigidBody2D/_integrateForces(state:)``. +open class PhysicsDirectBodyState2D: Object { + override open class var godotClassName: StringName { "PhysicsDirectBodyState2D" } + + /* Properties */ + + /// The timestep (delta) used for the simulation. + final public var step: Double { + get { + return get_step () + } + + } + + /// The inverse of the mass of the body. + final public var inverseMass: Double { + get { + return get_inverse_mass () + } + + } + + /// The inverse of the inertia of the body. + final public var inverseInertia: Double { + get { + return get_inverse_inertia () + } + + } + + /// The rate at which the body stops rotating, if there are not any other forces moving it. + final public var totalAngularDamp: Double { + get { + return get_total_angular_damp () + } + + } + + /// The rate at which the body stops moving, if there are not any other forces moving it. + final public var totalLinearDamp: Double { + get { + return get_total_linear_damp () + } + + } + + /// The total gravity vector being currently applied to this body. + final public var totalGravity: Vector2 { + get { + return get_total_gravity () + } + + } + + /// The body's center of mass position relative to the body's center in the global coordinate system. + final public var centerOfMass: Vector2 { + get { + return get_center_of_mass () + } + + } + + /// The body's center of mass position in the body's local coordinate system. + final public var centerOfMassLocal: Vector2 { + get { + return get_center_of_mass_local () + } + + } + + /// The body's rotational velocity in _radians_ per second. + final public var angularVelocity: Double { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// The body's linear velocity in pixels per second. + final public var linearVelocity: Vector2 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// If `true`, this body is currently sleeping (not active). + final public var sleeping: Bool { + get { + return is_sleeping () + } + + set { + set_sleep_state (newValue) + } + + } + + /// The body's transformation matrix. + final public var transform: Transform2D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_total_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_gravity") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_gravity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_total_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_total_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_linear_damp") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_total_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_total_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_angular_damp") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_total_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_center_of_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_center_of_mass_local: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass_local") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass_local() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_center_of_mass_local, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_mass") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inverse_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_inverse_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_inertia") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inverse_inertia() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_inverse_inertia, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ velocity: Vector2) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ velocity: Double) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_velocity_at_local_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_at_local_position") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// Returns the body's velocity at the given relative position, including both translation and rotation. + public final func getVelocityAtLocalPosition(_ localPosition: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: localPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_velocity_at_local_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Applies a directional impulse without affecting rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``applyImpulse(_:position:)`` at the body's center of mass. + /// + public final func applyCentralImpulse(_ impulse: Vector2) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_central_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Applies a rotational impulse to the body without affecting the position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// > Note: ``inverseInertia`` is required for this to work. To have ``inverseInertia``, an active ``CollisionShape2D`` must be a child of the node, or you can manually set ``inverseInertia``. + /// + public final func applyTorqueImpulse(_ impulse: Double) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_torque_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Applies a positioned impulse to the body. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyImpulse(_ impulse: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3862383994)! + } + + } + + }() + + /// Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``applyForce(_:position:)`` at the body's center of mass. + /// + public final func applyCentralForce(_ force: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyForce(_ force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + /// + /// > Note: ``inverseInertia`` is required for this to work. To have ``inverseInertia``, an active ``CollisionShape2D`` must be a child of the node, or you can manually set ``inverseInertia``. + /// + public final func applyTorque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_apply_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_central_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3862383994)! + } + + } + + }() + + /// Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + /// + /// This is equivalent to using ``addConstantForce(_:position:)`` at the body's center of mass. + /// + public final func addConstantCentralForce(_ force: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_add_constant_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func addConstantForce(_ force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_add_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = 0`. + public final func addConstantTorque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_add_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + public final func setConstantForce(_ force: Vector2) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + public final func getConstantForce() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_constant_force, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + public final func setConstantTorque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + public final func getConstantTorque() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_constant_torque, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sleep_state: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sleep_state") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sleep_state(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_set_sleep_state, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sleeping") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sleeping() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_is_sleeping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_count") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of contacts this body has with other bodies. + /// + /// > Note: By default, this returns 0 unless bodies are configured to monitor contacts. See ``RigidBody2D/contactMonitor``. + /// + public final func getContactCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_local_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_position") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the contact point on the body in the global coordinate system. + public final func getContactLocalPosition(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_local_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_normal") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the local normal at the contact point. + public final func getContactLocalNormal(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_local_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_shape") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the local shape index of the collision. + public final func getContactLocalShape(contactIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_local_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_velocity_at_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_velocity_at_position") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the velocity vector at the body's contact point. + public final func getContactLocalVelocityAtPosition(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_local_velocity_at_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 495598643)! + } + + } + + }() + + /// Returns the collider's ``RID``. + public final func getContactCollider(contactIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_position") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the position of the contact point on the collider in the global coordinate system. + public final func getContactColliderPosition(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_id") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the collider's object id. + public final func getContactColliderId(contactIdx: Int32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_object: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_object") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3332903315)! + } + + } + + }() + + /// Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). + public final func getContactColliderObject(contactIdx: Int32) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider_object, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_contact_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_shape") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the collider's shape index. + public final func getContactColliderShape(contactIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_velocity_at_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_velocity_at_position") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the velocity vector at the collider's contact point. + public final func getContactColliderVelocityAtPosition(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_collider_velocity_at_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2299179447)! + } + + } + + }() + + /// Returns the impulse created by the contact. + public final func getContactImpulse(contactIdx: Int32) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_contact_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_step: GDExtensionMethodBindPtr = { + let methodName = StringName("get_step") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_step() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_step, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_integrate_forces: GDExtensionMethodBindPtr = { + let methodName = StringName("integrate_forces") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. + public final func integrateForces() { + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_integrate_forces, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_space_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_space_state") + return withUnsafePointer(to: &PhysicsDirectBodyState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2506717822)! + } + + } + + }() + + /// Returns the current state of the space, useful for queries. + public final func getSpaceState() -> PhysicsDirectSpaceState2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicsDirectBodyState2D.method_get_space_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2DExtension.swift new file mode 100644 index 000000000..8e58a80f4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState2DExtension.swift @@ -0,0 +1,697 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsDirectBodyState2D`` implementations. +/// +/// This class extends ``PhysicsDirectBodyState2D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsDirectBodyState2D``. +/// +open class PhysicsDirectBodyState2DExtension: PhysicsDirectBodyState2D { + override open class var godotClassName: StringName { "PhysicsDirectBodyState2DExtension" } + /* Methods */ + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/totalGravity`` and its respective getter. + @_documentation(visibility: public) + open func _getTotalGravity() -> Vector2 { + return Vector2 () + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/totalLinearDamp`` and its respective getter. + @_documentation(visibility: public) + open func _getTotalLinearDamp() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/totalAngularDamp`` and its respective getter. + @_documentation(visibility: public) + open func _getTotalAngularDamp() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/centerOfMass`` and its respective getter. + @_documentation(visibility: public) + open func _getCenterOfMass() -> Vector2 { + return Vector2 () + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/centerOfMassLocal`` and its respective getter. + @_documentation(visibility: public) + open func _getCenterOfMassLocal() -> Vector2 { + return Vector2 () + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/inverseMass`` and its respective getter. + @_documentation(visibility: public) + open func _getInverseMass() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/inverseInertia`` and its respective getter. + @_documentation(visibility: public) + open func _getInverseInertia() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/linearVelocity`` and its respective setter. + @_documentation(visibility: public) + open func _setLinearVelocity(_ velocity: Vector2) { + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/linearVelocity`` and its respective getter. + @_documentation(visibility: public) + open func _getLinearVelocity() -> Vector2 { + return Vector2 () + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/angularVelocity`` and its respective setter. + @_documentation(visibility: public) + open func _setAngularVelocity(_ velocity: Double) { + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/angularVelocity`` and its respective getter. + @_documentation(visibility: public) + open func _getAngularVelocity() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/transform`` and its respective setter. + @_documentation(visibility: public) + open func _setTransform(_ transform: Transform2D) { + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/transform`` and its respective getter. + @_documentation(visibility: public) + open func _getTransform() -> Transform2D { + return Transform2D () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getVelocityAtLocalPosition(_:)``. + @_documentation(visibility: public) + open func _getVelocityAtLocalPosition(_ localPosition: Vector2) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyCentralImpulse(_:)``. + @_documentation(visibility: public) + open func _applyCentralImpulse(_ impulse: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyImpulse(_:position:)``. + @_documentation(visibility: public) + open func _applyImpulse(_ impulse: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyTorqueImpulse(_:)``. + @_documentation(visibility: public) + open func _applyTorqueImpulse(_ impulse: Double) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyCentralForce(_:)``. + @_documentation(visibility: public) + open func _applyCentralForce(_ force: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyForce(_:position:)``. + @_documentation(visibility: public) + open func _applyForce(_ force: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/applyTorque(_:)``. + @_documentation(visibility: public) + open func _applyTorque(_ torque: Double) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/addConstantCentralForce(_:)``. + @_documentation(visibility: public) + open func _addConstantCentralForce(_ force: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/addConstantForce(_:position:)``. + @_documentation(visibility: public) + open func _addConstantForce(_ force: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/addConstantTorque(_:)``. + @_documentation(visibility: public) + open func _addConstantTorque(_ torque: Double) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/setConstantForce(_:)``. + @_documentation(visibility: public) + open func _setConstantForce(_ force: Vector2) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getConstantForce()``. + @_documentation(visibility: public) + open func _getConstantForce() -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/setConstantTorque(_:)``. + @_documentation(visibility: public) + open func _setConstantTorque(_ torque: Double) { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getConstantTorque()``. + @_documentation(visibility: public) + open func _getConstantTorque() -> Double { + return 0.0 + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/sleeping`` and its respective setter. + @_documentation(visibility: public) + open func _setSleepState(enabled: Bool) { + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/sleeping`` and its respective getter. + @_documentation(visibility: public) + open func _isSleeping() -> Bool { + return false + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactCount()``. + @_documentation(visibility: public) + open func _getContactCount() -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactLocalPosition(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactLocalPosition(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactLocalNormal(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactLocalNormal(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactLocalShape(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactLocalShape(contactIdx: Int32) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactLocalVelocityAtPosition(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactLocalVelocityAtPosition(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactCollider(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactCollider(contactIdx: Int32) -> RID { + return RID () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactColliderPosition(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactColliderPosition(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactColliderId(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactColliderId(contactIdx: Int32) -> UInt { + return 0 + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactColliderObject(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactColliderObject(contactIdx: Int32) -> Object? { + return Object () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactColliderShape(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactColliderShape(contactIdx: Int32) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactColliderVelocityAtPosition(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactColliderVelocityAtPosition(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getContactImpulse(contactIdx:)``. + @_documentation(visibility: public) + open func _getContactImpulse(contactIdx: Int32) -> Vector2 { + return Vector2 () + } + + /// Implement to override the behavior of ``PhysicsDirectBodyState2D/step`` and its respective getter. + @_documentation(visibility: public) + open func _getStep() -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsDirectBodyState2D/integrateForces()``. + @_documentation(visibility: public) + open func _integrateForces() { + } + + /// Overridable version of ``PhysicsDirectBodyState2D/getSpaceState()``. + @_documentation(visibility: public) + open func _getSpaceState() -> PhysicsDirectSpaceState2D? { + return PhysicsDirectSpaceState2D () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_add_constant_central_force": + return _PhysicsDirectBodyState2DExtension_proxy_add_constant_central_force + case "_add_constant_force": + return _PhysicsDirectBodyState2DExtension_proxy_add_constant_force + case "_add_constant_torque": + return _PhysicsDirectBodyState2DExtension_proxy_add_constant_torque + case "_apply_central_force": + return _PhysicsDirectBodyState2DExtension_proxy_apply_central_force + case "_apply_central_impulse": + return _PhysicsDirectBodyState2DExtension_proxy_apply_central_impulse + case "_apply_force": + return _PhysicsDirectBodyState2DExtension_proxy_apply_force + case "_apply_impulse": + return _PhysicsDirectBodyState2DExtension_proxy_apply_impulse + case "_apply_torque": + return _PhysicsDirectBodyState2DExtension_proxy_apply_torque + case "_apply_torque_impulse": + return _PhysicsDirectBodyState2DExtension_proxy_apply_torque_impulse + case "_get_angular_velocity": + return _PhysicsDirectBodyState2DExtension_proxy_get_angular_velocity + case "_get_center_of_mass": + return _PhysicsDirectBodyState2DExtension_proxy_get_center_of_mass + case "_get_center_of_mass_local": + return _PhysicsDirectBodyState2DExtension_proxy_get_center_of_mass_local + case "_get_constant_force": + return _PhysicsDirectBodyState2DExtension_proxy_get_constant_force + case "_get_constant_torque": + return _PhysicsDirectBodyState2DExtension_proxy_get_constant_torque + case "_get_contact_collider": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider + case "_get_contact_collider_id": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_id + case "_get_contact_collider_object": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_object + case "_get_contact_collider_position": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_position + case "_get_contact_collider_shape": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_shape + case "_get_contact_collider_velocity_at_position": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_velocity_at_position + case "_get_contact_count": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_count + case "_get_contact_impulse": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_impulse + case "_get_contact_local_normal": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_normal + case "_get_contact_local_position": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_position + case "_get_contact_local_shape": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_shape + case "_get_contact_local_velocity_at_position": + return _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_velocity_at_position + case "_get_inverse_inertia": + return _PhysicsDirectBodyState2DExtension_proxy_get_inverse_inertia + case "_get_inverse_mass": + return _PhysicsDirectBodyState2DExtension_proxy_get_inverse_mass + case "_get_linear_velocity": + return _PhysicsDirectBodyState2DExtension_proxy_get_linear_velocity + case "_get_space_state": + return _PhysicsDirectBodyState2DExtension_proxy_get_space_state + case "_get_step": + return _PhysicsDirectBodyState2DExtension_proxy_get_step + case "_get_total_angular_damp": + return _PhysicsDirectBodyState2DExtension_proxy_get_total_angular_damp + case "_get_total_gravity": + return _PhysicsDirectBodyState2DExtension_proxy_get_total_gravity + case "_get_total_linear_damp": + return _PhysicsDirectBodyState2DExtension_proxy_get_total_linear_damp + case "_get_transform": + return _PhysicsDirectBodyState2DExtension_proxy_get_transform + case "_get_velocity_at_local_position": + return _PhysicsDirectBodyState2DExtension_proxy_get_velocity_at_local_position + case "_integrate_forces": + return _PhysicsDirectBodyState2DExtension_proxy_integrate_forces + case "_is_sleeping": + return _PhysicsDirectBodyState2DExtension_proxy_is_sleeping + case "_set_angular_velocity": + return _PhysicsDirectBodyState2DExtension_proxy_set_angular_velocity + case "_set_constant_force": + return _PhysicsDirectBodyState2DExtension_proxy_set_constant_force + case "_set_constant_torque": + return _PhysicsDirectBodyState2DExtension_proxy_set_constant_torque + case "_set_linear_velocity": + return _PhysicsDirectBodyState2DExtension_proxy_set_linear_velocity + case "_set_sleep_state": + return _PhysicsDirectBodyState2DExtension_proxy_set_sleep_state + case "_set_transform": + return _PhysicsDirectBodyState2DExtension_proxy_set_transform + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsDirectBodyState2DExtension_proxy_add_constant_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantCentralForce (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_add_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantForce (args [0]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_add_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantTorque (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyCentralForce (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_central_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyCentralImpulse (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyForce (args [0]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyImpulse (args [0]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyTorque (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_apply_torque_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyTorqueImpulse (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_angular_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAngularVelocity () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_center_of_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCenterOfMass () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_center_of_mass_local (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCenterOfMassLocal () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConstantForce () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConstantTorque () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactCollider (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderId (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_object (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderObject (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Object +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderShape (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_collider_velocity_at_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderVelocityAtPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactImpulse (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_normal (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalNormal (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalShape (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_contact_local_velocity_at_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalVelocityAtPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_inverse_inertia (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInverseInertia () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_inverse_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInverseMass () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_linear_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getLinearVelocity () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_space_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSpaceState () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectSpaceState2D +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_step (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getStep () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_total_angular_damp (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalAngularDamp () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_total_gravity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalGravity () + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_total_linear_damp (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalLinearDamp () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTransform () + retPtr!.storeBytes (of: ret, as: Transform2D.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_get_velocity_at_local_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getVelocityAtLocalPosition (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_integrate_forces (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._integrateForces () +} + +func _PhysicsDirectBodyState2DExtension_proxy_is_sleeping (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isSleeping () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_angular_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setAngularVelocity (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setConstantForce (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setConstantTorque (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_linear_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setLinearVelocity (args [0]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_sleep_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setSleepState (enabled: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsDirectBodyState2DExtension_proxy_set_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTransform (args [0]!.assumingMemoryBound (to: Transform2D.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3D.swift new file mode 100644 index 000000000..2f2760f9c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3D.swift @@ -0,0 +1,1267 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides direct access to a physics body in the ``PhysicsServer3D``. +/// +/// Provides direct access to a physics body in the ``PhysicsServer3D``, allowing safe changes to physics properties. This object is passed via the direct state callback of ``RigidBody3D``, and is intended for changing the direct state of that body. See ``RigidBody3D/_integrateForces(state:)``. +open class PhysicsDirectBodyState3D: Object { + override open class var godotClassName: StringName { "PhysicsDirectBodyState3D" } + + /* Properties */ + + /// The timestep (delta) used for the simulation. + final public var step: Double { + get { + return get_step () + } + + } + + /// The inverse of the mass of the body. + final public var inverseMass: Double { + get { + return get_inverse_mass () + } + + } + + /// The rate at which the body stops rotating, if there are not any other forces moving it. + final public var totalAngularDamp: Double { + get { + return get_total_angular_damp () + } + + } + + /// The rate at which the body stops moving, if there are not any other forces moving it. + final public var totalLinearDamp: Double { + get { + return get_total_linear_damp () + } + + } + + /// The inverse of the inertia of the body. + final public var inverseInertia: Vector3 { + get { + return get_inverse_inertia () + } + + } + + /// The inverse of the inertia tensor of the body. + final public var inverseInertiaTensor: Basis { + get { + return get_inverse_inertia_tensor () + } + + } + + /// The total gravity vector being currently applied to this body. + final public var totalGravity: Vector3 { + get { + return get_total_gravity () + } + + } + + /// The body's center of mass position relative to the body's center in the global coordinate system. + final public var centerOfMass: Vector3 { + get { + return get_center_of_mass () + } + + } + + /// The body's center of mass position in the body's local coordinate system. + final public var centerOfMassLocal: Vector3 { + get { + return get_center_of_mass_local () + } + + } + + final public var principalInertiaAxes: Basis { + get { + return get_principal_inertia_axes () + } + + } + + /// The body's rotational velocity in _radians_ per second. + final public var angularVelocity: Vector3 { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// The body's linear velocity in units per second. + final public var linearVelocity: Vector3 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// If `true`, this body is currently sleeping (not active). + final public var sleeping: Bool { + get { + return is_sleeping () + } + + set { + set_sleep_state (newValue) + } + + } + + /// The body's transformation matrix. + final public var transform: Transform3D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_total_gravity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_gravity") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_gravity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_total_gravity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_total_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_linear_damp") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_total_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_total_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_angular_damp") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_total_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_total_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_center_of_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_center_of_mass_local: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass_local") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass_local() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_center_of_mass_local, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_principal_inertia_axes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_principal_inertia_axes") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_principal_inertia_axes() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_principal_inertia_axes, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_mass") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inverse_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_inverse_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_inertia") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inverse_inertia() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_inverse_inertia, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_inertia_tensor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_inertia_tensor") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inverse_inertia_tensor() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_inverse_inertia_tensor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ velocity: Vector3) { + withUnsafePointer(to: velocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform3D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_velocity_at_local_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_at_local_position") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 192990374)! + } + + } + + }() + + /// Returns the body's velocity at the given relative position, including both translation and rotation. + public final func getVelocityAtLocalPosition(_ localPosition: Vector3) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: localPosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_velocity_at_local_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2007698547)! + } + + } + + }() + + /// Applies a directional impulse without affecting rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``applyImpulse(_:position:)`` at the body's center of mass. + /// + public final func applyCentralImpulse(_ impulse: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_central_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Applies a positioned impulse to the body. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyImpulse(_ impulse: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a rotational impulse to the body without affecting the position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// > Note: ``inverseInertia`` is required for this to work. To have ``inverseInertia``, an active ``CollisionShape3D`` must be a child of the node, or you can manually set ``inverseInertia``. + /// + public final func applyTorqueImpulse(_ impulse: Vector3) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_torque_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2007698547)! + } + + } + + }() + + /// Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``applyForce(_:position:)`` at the body's center of mass. + /// + public final func applyCentralForce(_ force: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyForce(_ force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + /// + /// > Note: ``inverseInertia`` is required for this to work. To have ``inverseInertia``, an active ``CollisionShape3D`` must be a child of the node, or you can manually set ``inverseInertia``. + /// + public final func applyTorque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_apply_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_central_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2007698547)! + } + + } + + }() + + /// Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + /// + /// This is equivalent to using ``addConstantForce(_:position:)`` at the body's center of mass. + /// + public final func addConstantCentralForce(_ force: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_add_constant_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func addConstantForce(_ force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_add_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = Vector3(0, 0, 0)`. + public final func addConstantTorque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_add_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + public final func setConstantForce(_ force: Vector3) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_force") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + public final func getConstantForce() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_constant_force, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets the body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + public final func setConstantTorque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_torque") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + public final func getConstantTorque() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_constant_torque, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sleep_state: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sleep_state") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sleep_state(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_set_sleep_state, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sleeping") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sleeping() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_is_sleeping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_count") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of contacts this body has with other bodies. + /// + /// > Note: By default, this returns 0 unless bodies are configured to monitor contacts. See ``RigidBody3D/contactMonitor``. + /// + public final func getContactCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_local_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_position") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the contact point on the body in the global coordinate system. + public final func getContactLocalPosition(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_local_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_normal") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the local normal at the contact point. + public final func getContactLocalNormal(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_local_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_impulse") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Impulse created by the contact. + public final func getContactImpulse(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_shape") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the local shape index of the collision. + public final func getContactLocalShape(contactIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_local_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_local_velocity_at_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_local_velocity_at_position") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the linear velocity vector at the body's contact point. + public final func getContactLocalVelocityAtPosition(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_local_velocity_at_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 495598643)! + } + + } + + }() + + /// Returns the collider's ``RID``. + public final func getContactCollider(contactIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_position") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the position of the contact point on the collider in the global coordinate system. + public final func getContactColliderPosition(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_id") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the collider's object id. + public final func getContactColliderId(contactIdx: Int32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_object: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_object") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3332903315)! + } + + } + + }() + + /// Returns the collider object. + public final func getContactColliderObject(contactIdx: Int32) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider_object, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_contact_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_shape") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the collider's shape index. + public final func getContactColliderShape(contactIdx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_contact_collider_velocity_at_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_collider_velocity_at_position") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the linear velocity vector at the collider's contact point. + public final func getContactColliderVelocityAtPosition(contactIdx: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: contactIdx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_contact_collider_velocity_at_position, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_step: GDExtensionMethodBindPtr = { + let methodName = StringName("get_step") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_step() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_step, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_integrate_forces: GDExtensionMethodBindPtr = { + let methodName = StringName("integrate_forces") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. + public final func integrateForces() { + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_integrate_forces, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_space_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_space_state") + return withUnsafePointer(to: &PhysicsDirectBodyState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2069328350)! + } + + } + + }() + + /// Returns the current state of the space, useful for queries. + public final func getSpaceState() -> PhysicsDirectSpaceState3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicsDirectBodyState3D.method_get_space_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3DExtension.swift new file mode 100644 index 000000000..35dbde449 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectBodyState3DExtension.swift @@ -0,0 +1,727 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsDirectBodyState3D`` implementations. +/// +/// This class extends ``PhysicsDirectBodyState3D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsDirectBodyState3D``. +/// +open class PhysicsDirectBodyState3DExtension: PhysicsDirectBodyState3D { + override open class var godotClassName: StringName { "PhysicsDirectBodyState3DExtension" } + /* Methods */ + /// + @_documentation(visibility: public) + open func _getTotalGravity() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getTotalLinearDamp() -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _getTotalAngularDamp() -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _getCenterOfMass() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getCenterOfMassLocal() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getPrincipalInertiaAxes() -> Basis { + return Basis () + } + + /// + @_documentation(visibility: public) + open func _getInverseMass() -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _getInverseInertia() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getInverseInertiaTensor() -> Basis { + return Basis () + } + + /// + @_documentation(visibility: public) + open func _setLinearVelocity(_ velocity: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _getLinearVelocity() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _setAngularVelocity(_ velocity: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _getAngularVelocity() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _setTransform(_ transform: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _getTransform() -> Transform3D { + return Transform3D () + } + + /// + @_documentation(visibility: public) + open func _getVelocityAtLocalPosition(_ localPosition: Vector3) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _applyCentralImpulse(_ impulse: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _applyImpulse(_ impulse: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _applyTorqueImpulse(_ impulse: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _applyCentralForce(_ force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _applyForce(_ force: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _applyTorque(_ torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _addConstantCentralForce(_ force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _addConstantForce(_ force: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _addConstantTorque(_ torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _setConstantForce(_ force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _getConstantForce() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _setConstantTorque(_ torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _getConstantTorque() -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _setSleepState(enabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _isSleeping() -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _getContactCount() -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getContactLocalPosition(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getContactLocalNormal(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getContactImpulse(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getContactLocalShape(contactIdx: Int32) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getContactLocalVelocityAtPosition(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getContactCollider(contactIdx: Int32) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _getContactColliderPosition(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getContactColliderId(contactIdx: Int32) -> UInt { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getContactColliderObject(contactIdx: Int32) -> Object? { + return Object () + } + + /// + @_documentation(visibility: public) + open func _getContactColliderShape(contactIdx: Int32) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _getContactColliderVelocityAtPosition(contactIdx: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _getStep() -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _integrateForces() { + } + + /// + @_documentation(visibility: public) + open func _getSpaceState() -> PhysicsDirectSpaceState3D? { + return PhysicsDirectSpaceState3D () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_add_constant_central_force": + return _PhysicsDirectBodyState3DExtension_proxy_add_constant_central_force + case "_add_constant_force": + return _PhysicsDirectBodyState3DExtension_proxy_add_constant_force + case "_add_constant_torque": + return _PhysicsDirectBodyState3DExtension_proxy_add_constant_torque + case "_apply_central_force": + return _PhysicsDirectBodyState3DExtension_proxy_apply_central_force + case "_apply_central_impulse": + return _PhysicsDirectBodyState3DExtension_proxy_apply_central_impulse + case "_apply_force": + return _PhysicsDirectBodyState3DExtension_proxy_apply_force + case "_apply_impulse": + return _PhysicsDirectBodyState3DExtension_proxy_apply_impulse + case "_apply_torque": + return _PhysicsDirectBodyState3DExtension_proxy_apply_torque + case "_apply_torque_impulse": + return _PhysicsDirectBodyState3DExtension_proxy_apply_torque_impulse + case "_get_angular_velocity": + return _PhysicsDirectBodyState3DExtension_proxy_get_angular_velocity + case "_get_center_of_mass": + return _PhysicsDirectBodyState3DExtension_proxy_get_center_of_mass + case "_get_center_of_mass_local": + return _PhysicsDirectBodyState3DExtension_proxy_get_center_of_mass_local + case "_get_constant_force": + return _PhysicsDirectBodyState3DExtension_proxy_get_constant_force + case "_get_constant_torque": + return _PhysicsDirectBodyState3DExtension_proxy_get_constant_torque + case "_get_contact_collider": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider + case "_get_contact_collider_id": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_id + case "_get_contact_collider_object": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_object + case "_get_contact_collider_position": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_position + case "_get_contact_collider_shape": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_shape + case "_get_contact_collider_velocity_at_position": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_velocity_at_position + case "_get_contact_count": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_count + case "_get_contact_impulse": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_impulse + case "_get_contact_local_normal": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_normal + case "_get_contact_local_position": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_position + case "_get_contact_local_shape": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_shape + case "_get_contact_local_velocity_at_position": + return _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_velocity_at_position + case "_get_inverse_inertia": + return _PhysicsDirectBodyState3DExtension_proxy_get_inverse_inertia + case "_get_inverse_inertia_tensor": + return _PhysicsDirectBodyState3DExtension_proxy_get_inverse_inertia_tensor + case "_get_inverse_mass": + return _PhysicsDirectBodyState3DExtension_proxy_get_inverse_mass + case "_get_linear_velocity": + return _PhysicsDirectBodyState3DExtension_proxy_get_linear_velocity + case "_get_principal_inertia_axes": + return _PhysicsDirectBodyState3DExtension_proxy_get_principal_inertia_axes + case "_get_space_state": + return _PhysicsDirectBodyState3DExtension_proxy_get_space_state + case "_get_step": + return _PhysicsDirectBodyState3DExtension_proxy_get_step + case "_get_total_angular_damp": + return _PhysicsDirectBodyState3DExtension_proxy_get_total_angular_damp + case "_get_total_gravity": + return _PhysicsDirectBodyState3DExtension_proxy_get_total_gravity + case "_get_total_linear_damp": + return _PhysicsDirectBodyState3DExtension_proxy_get_total_linear_damp + case "_get_transform": + return _PhysicsDirectBodyState3DExtension_proxy_get_transform + case "_get_velocity_at_local_position": + return _PhysicsDirectBodyState3DExtension_proxy_get_velocity_at_local_position + case "_integrate_forces": + return _PhysicsDirectBodyState3DExtension_proxy_integrate_forces + case "_is_sleeping": + return _PhysicsDirectBodyState3DExtension_proxy_is_sleeping + case "_set_angular_velocity": + return _PhysicsDirectBodyState3DExtension_proxy_set_angular_velocity + case "_set_constant_force": + return _PhysicsDirectBodyState3DExtension_proxy_set_constant_force + case "_set_constant_torque": + return _PhysicsDirectBodyState3DExtension_proxy_set_constant_torque + case "_set_linear_velocity": + return _PhysicsDirectBodyState3DExtension_proxy_set_linear_velocity + case "_set_sleep_state": + return _PhysicsDirectBodyState3DExtension_proxy_set_sleep_state + case "_set_transform": + return _PhysicsDirectBodyState3DExtension_proxy_set_transform + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsDirectBodyState3DExtension_proxy_add_constant_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantCentralForce (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_add_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantForce (args [0]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_add_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._addConstantTorque (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyCentralForce (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_central_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyCentralImpulse (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyForce (args [0]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyImpulse (args [0]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyTorque (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_apply_torque_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._applyTorqueImpulse (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_angular_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getAngularVelocity () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_center_of_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCenterOfMass () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_center_of_mass_local (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCenterOfMassLocal () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConstantForce () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getConstantTorque () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactCollider (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderId (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_object (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderObject (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // Object +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderShape (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_collider_velocity_at_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactColliderVelocityAtPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactCount () + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactImpulse (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_normal (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalNormal (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalShape (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_contact_local_velocity_at_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getContactLocalVelocityAtPosition (contactIdx: args [0]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_inverse_inertia (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInverseInertia () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_inverse_inertia_tensor (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInverseInertiaTensor () + retPtr!.storeBytes (of: ret, as: Basis.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_inverse_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getInverseMass () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_linear_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getLinearVelocity () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_principal_inertia_axes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getPrincipalInertiaAxes () + retPtr!.storeBytes (of: ret, as: Basis.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_space_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getSpaceState () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectSpaceState3D +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_step (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getStep () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_total_angular_damp (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalAngularDamp () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_total_gravity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalGravity () + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_total_linear_damp (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTotalLinearDamp () + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getTransform () + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_get_velocity_at_local_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getVelocityAtLocalPosition (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_integrate_forces (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._integrateForces () +} + +func _PhysicsDirectBodyState3DExtension_proxy_is_sleeping (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isSleeping () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_angular_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setAngularVelocity (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setConstantForce (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setConstantTorque (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_linear_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setLinearVelocity (args [0]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_sleep_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setSleepState (enabled: args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsDirectBodyState3DExtension_proxy_set_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTransform (args [0]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2D.swift new file mode 100644 index 000000000..5636fe7ce --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2D.swift @@ -0,0 +1,261 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides direct access to a physics space in the ``PhysicsServer2D``. +/// +/// Provides direct access to a physics space in the ``PhysicsServer2D``. It's used mainly to do queries against objects and areas residing in a given space. +open class PhysicsDirectSpaceState2D: Object { + override open class var godotClassName: StringName { "PhysicsDirectSpaceState2D" } + /* Methods */ + fileprivate static var method_intersect_point: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_point") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2118456068)! + } + + } + + }() + + /// Checks whether a point is inside any solid shape. Position and other parameters are defined through ``PhysicsPointQueryParameters2D``. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// The number of intersections can be limited with the `maxResults` parameter, to reduce the processing time. + /// + /// > Note: ``ConcavePolygonShape2D``s and ``CollisionPolygon2D``s in `Segments` build mode are not solid shapes. Therefore, they will not be detected. + /// + public final func intersectPoint(parameters: PhysicsPointQueryParameters2D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_intersect_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_intersect_ray: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_ray") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1590275562)! + } + + } + + }() + + /// Intersects a ray in a given space. Ray position and other parameters are defined through ``PhysicsRayQueryParameters2D``. The returned object is a dictionary with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `normal`: The object's surface normal at the intersection point, or `Vector2(0, 0)` if the ray starts inside the shape and ``PhysicsRayQueryParameters2D/hitFromInside`` is `true`. + /// + /// `position`: The intersection point. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// If the ray did not intersect anything, then an empty dictionary is returned instead. + /// + public final func intersectRay(parameters: PhysicsRayQueryParameters2D?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_intersect_ray, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_intersect_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_shape") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2488867228)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters2D`` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// The number of intersections can be limited with the `maxResults` parameter, to reduce the processing time. + /// + public final func intersectShape(parameters: PhysicsShapeQueryParameters2D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_intersect_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_cast_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("cast_motion") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711275086)! + } + + } + + }() + + /// Checks how far a ``Shape2D`` can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a ``PhysicsShapeQueryParameters2D`` object. + /// + /// Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned. + /// + /// > Note: Any ``Shape2D``s that the shape is already colliding with e.g. inside of, will be ignored. Use ``collideShape(parameters:maxResults:)`` to determine the ``Shape2D``s that the shape is already colliding with. + /// + public final func castMotion(parameters: PhysicsShapeQueryParameters2D?) -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_cast_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_collide_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("collide_shape") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2488867228)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters2D`` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with ``intersectShape(parameters:maxResults:)``, the number of returned results can be limited to save processing time. + /// + /// Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in ``PhysicsShapeQueryParameters2D`` object, second one is in the collided shape from the physics space. + /// + public final func collideShape(parameters: PhysicsShapeQueryParameters2D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_collide_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_get_rest_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rest_info") + return withUnsafePointer(to: &PhysicsDirectSpaceState2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2803666496)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters2D`` object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. + /// + /// > Note: This method does not take into account the `motion` property of the object. The returned object is a dictionary containing the following fields: + /// + /// `collider_id`: The colliding object's ID. + /// + /// `linear_velocity`: The colliding object's velocity ``Vector2``. If the object is an ``Area2D``, the result is `(0, 0)`. + /// + /// `normal`: The object's surface normal at the intersection point. + /// + /// `point`: The intersection point. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + public final func getRestInfo(parameters: PhysicsShapeQueryParameters2D?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2D.method_get_rest_info, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2DExtension.swift new file mode 100644 index 000000000..3787c37f4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState2DExtension.swift @@ -0,0 +1,58 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsDirectSpaceState2D`` implementations. +/// +/// This class extends ``PhysicsDirectSpaceState2D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsDirectSpaceState2D``. +/// +open class PhysicsDirectSpaceState2DExtension: PhysicsDirectSpaceState2D { + override open class var godotClassName: StringName { "PhysicsDirectSpaceState2DExtension" } + /* Methods */ + fileprivate static var method_is_body_excluded_from_query: GDExtensionMethodBindPtr = { + let methodName = StringName("is_body_excluded_from_query") + return withUnsafePointer(to: &PhysicsDirectSpaceState2DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// + public final func isBodyExcludedFromQuery(body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState2DExtension.method_is_body_excluded_from_query, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3D.swift new file mode 100644 index 000000000..ec98fac02 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3D.swift @@ -0,0 +1,269 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides direct access to a physics space in the ``PhysicsServer3D``. +/// +/// Provides direct access to a physics space in the ``PhysicsServer3D``. It's used mainly to do queries against objects and areas residing in a given space. +open class PhysicsDirectSpaceState3D: Object { + override open class var godotClassName: StringName { "PhysicsDirectSpaceState3D" } + /* Methods */ + fileprivate static var method_intersect_point: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_point") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 975173756)! + } + + } + + }() + + /// Checks whether a point is inside any solid shape. Position and other parameters are defined through ``PhysicsPointQueryParameters3D``. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// The number of intersections can be limited with the `maxResults` parameter, to reduce the processing time. + /// + public final func intersectPoint(parameters: PhysicsPointQueryParameters3D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_intersect_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_intersect_ray: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_ray") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3957970750)! + } + + } + + }() + + /// Intersects a ray in a given space. Ray position and other parameters are defined through ``PhysicsRayQueryParameters3D``. The returned object is a dictionary with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `normal`: The object's surface normal at the intersection point, or `Vector3(0, 0, 0)` if the ray starts inside the shape and ``PhysicsRayQueryParameters3D/hitFromInside`` is `true`. + /// + /// `position`: The intersection point. + /// + /// `face_index`: The face index at the intersection point. + /// + /// > Note: Returns a valid number only if the intersected shape is a ``ConcavePolygonShape3D``. Otherwise, `-1` is returned. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// If the ray did not intersect anything, then an empty dictionary is returned instead. + /// + public final func intersectRay(parameters: PhysicsRayQueryParameters3D?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_intersect_ray, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_intersect_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("intersect_shape") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3762137681)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters3D`` object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + /// + /// `collider`: The colliding object. + /// + /// `collider_id`: The colliding object's ID. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// The number of intersections can be limited with the `maxResults` parameter, to reduce the processing time. + /// + /// > Note: This method does not take into account the `motion` property of the object. + /// + public final func intersectShape(parameters: PhysicsShapeQueryParameters3D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_intersect_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_cast_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("cast_motion") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1778757334)! + } + + } + + }() + + /// Checks how far a ``Shape3D`` can move without colliding. All the parameters for the query, including the shape, are supplied through a ``PhysicsShapeQueryParameters3D`` object. + /// + /// Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned. + /// + /// > Note: Any ``Shape3D``s that the shape is already colliding with e.g. inside of, will be ignored. Use ``collideShape(parameters:maxResults:)`` to determine the ``Shape3D``s that the shape is already colliding with. + /// + public final func castMotion(parameters: PhysicsShapeQueryParameters3D?) -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_cast_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_collide_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("collide_shape") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3762137681)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters3D`` object, against the space. The resulting array contains a list of points where the shape intersects another. Like with ``intersectShape(parameters:maxResults:)``, the number of returned results can be limited to save processing time. + /// + /// Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in ``PhysicsShapeQueryParameters3D`` object, second one is in the collided shape from the physics space. + /// + /// > Note: This method does not take into account the `motion` property of the object. + /// + public final func collideShape(parameters: PhysicsShapeQueryParameters3D?, maxResults: Int32 = 32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: maxResults) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_collide_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_get_rest_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rest_info") + return withUnsafePointer(to: &PhysicsDirectSpaceState3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1376751592)! + } + + } + + }() + + /// Checks the intersections of a shape, given through a ``PhysicsShapeQueryParameters3D`` object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: + /// + /// `collider_id`: The colliding object's ID. + /// + /// `linear_velocity`: The colliding object's velocity ``Vector3``. If the object is an ``Area3D``, the result is `(0, 0, 0)`. + /// + /// `normal`: The object's surface normal at the intersection point. + /// + /// `point`: The intersection point. + /// + /// `rid`: The intersecting object's ``RID``. + /// + /// `shape`: The shape index of the colliding shape. + /// + /// If the shape did not intersect anything, then an empty dictionary is returned instead. + /// + /// > Note: This method does not take into account the `motion` property of the object. + /// + public final func getRestInfo(parameters: PhysicsShapeQueryParameters3D?) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: parameters?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3D.method_get_rest_info, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3DExtension.swift new file mode 100644 index 000000000..8acb998da --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsDirectSpaceState3DExtension.swift @@ -0,0 +1,84 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsDirectSpaceState3D`` implementations. +/// +/// This class extends ``PhysicsDirectSpaceState3D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsDirectSpaceState3D``. +/// +open class PhysicsDirectSpaceState3DExtension: PhysicsDirectSpaceState3D { + override open class var godotClassName: StringName { "PhysicsDirectSpaceState3DExtension" } + /* Methods */ + /// + @_documentation(visibility: public) + open func _getClosestPointToObjectVolume(object: RID, point: Vector3) -> Vector3 { + return Vector3 () + } + + fileprivate static var method_is_body_excluded_from_query: GDExtensionMethodBindPtr = { + let methodName = StringName("is_body_excluded_from_query") + return withUnsafePointer(to: &PhysicsDirectSpaceState3DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// + public final func isBodyExcludedFromQuery(body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsDirectSpaceState3DExtension.method_is_body_excluded_from_query, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_closest_point_to_object_volume": + return _PhysicsDirectSpaceState3DExtension_proxy_get_closest_point_to_object_volume + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsDirectSpaceState3DExtension_proxy_get_closest_point_to_object_volume (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getClosestPointToObjectVolume (object: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), point: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsMaterial.swift b/Sources/SwiftGodot/Generated/Api/PhysicsMaterial.swift new file mode 100644 index 000000000..a2b5f472e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsMaterial.swift @@ -0,0 +1,258 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Holds physics-related properties of a surface, namely its roughness and bounciness. +/// +/// Holds physics-related properties of a surface, namely its roughness and bounciness. This class is used to apply these properties to a physics body. +open class PhysicsMaterial: Resource { + override open class var godotClassName: StringName { "PhysicsMaterial" } + + /* Properties */ + + /// The body's friction. Values range from `0` (frictionless) to `1` (maximum friction). + final public var friction: Double { + get { + return get_friction () + } + + set { + set_friction (newValue) + } + + } + + /// If `true`, the physics engine will use the friction of the object marked as "rough" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction. + final public var rough: Bool { + get { + return is_rough () + } + + set { + set_rough (newValue) + } + + } + + /// The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness). + /// + /// > Note: Even with ``bounce`` set to `1.0`, some energy will be lost over time due to linear and angular damping. To have a physics body that preserves all its energy over time, set ``bounce`` to `1.0`, the body's linear damp mode to **Replace** (if applicable), its linear damp to `0.0`, its angular damp mode to **Replace** (if applicable), and its angular damp to `0.0`. + /// + final public var bounce: Double { + get { + return get_bounce () + } + + set { + set_bounce (newValue) + } + + } + + /// If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it. + final public var absorbent: Bool { + get { + return is_absorbent () + } + + set { + set_absorbent (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_friction") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_friction(_ friction: Double) { + withUnsafePointer(to: friction) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsMaterial.method_set_friction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_friction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_friction") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_friction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsMaterial.method_get_friction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_rough: GDExtensionMethodBindPtr = { + let methodName = StringName("set_rough") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_rough(_ rough: Bool) { + withUnsafePointer(to: rough) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsMaterial.method_set_rough, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_rough: GDExtensionMethodBindPtr = { + let methodName = StringName("is_rough") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_rough() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsMaterial.method_is_rough, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bounce") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_bounce(_ bounce: Double) { + withUnsafePointer(to: bounce) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsMaterial.method_set_bounce, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_bounce: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bounce") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_bounce() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsMaterial.method_get_bounce, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_absorbent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_absorbent") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_absorbent(_ absorbent: Bool) { + withUnsafePointer(to: absorbent) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsMaterial.method_set_absorbent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_absorbent: GDExtensionMethodBindPtr = { + let methodName = StringName("is_absorbent") + return withUnsafePointer(to: &PhysicsMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_absorbent() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsMaterial.method_is_absorbent, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters2D.swift new file mode 100644 index 000000000..8858665ce --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters2D.swift @@ -0,0 +1,370 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState2D/intersectPoint(parameters:maxResults:)``. +/// +/// By changing various properties of this object, such as the point position, you can configure the parameters for ``PhysicsDirectSpaceState2D/intersectPoint(parameters:maxResults:)``. +open class PhysicsPointQueryParameters2D: RefCounted { + override open class var godotClassName: StringName { "PhysicsPointQueryParameters2D" } + + /* Properties */ + + /// The position being queried for, in global coordinates. + final public var position: Vector2 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// If different from `0`, restricts the query to a specific canvas layer specified by its instance ID. See ``Object/getInstanceId()``. + /// + /// If `0`, restricts the query to the Viewport's default canvas layer. + /// + final public var canvasInstanceId: UInt { + get { + return get_canvas_instance_id () + } + + set { + set_canvas_instance_id (newValue) + } + + } + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject2D/getRid()`` to get the ``RID`` associated with a ``CollisionObject2D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody2D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area2D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector2) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_canvas_instance_id") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_canvas_instance_id(_ canvasInstanceId: UInt) { + withUnsafePointer(to: canvasInstanceId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_canvas_instance_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_canvas_instance_id") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_canvas_instance_id() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_get_canvas_instance_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsPointQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters2D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters3D.swift new file mode 100644 index 000000000..c98d160ba --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsPointQueryParameters3D.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState3D/intersectPoint(parameters:maxResults:)``. +/// +/// By changing various properties of this object, such as the point position, you can configure the parameters for ``PhysicsDirectSpaceState3D/intersectPoint(parameters:maxResults:)``. +open class PhysicsPointQueryParameters3D: RefCounted { + override open class var godotClassName: StringName { "PhysicsPointQueryParameters3D" } + + /* Properties */ + + /// The position being queried for, in global coordinates. + final public var position: Vector3 { + get { + return get_position () + } + + set { + set_position (newValue) + } + + } + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject3D/getRid()`` to get the ``RID`` associated with a ``CollisionObject3D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody3D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area3D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_position") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_position(_ position: Vector3) { + withUnsafePointer(to: position) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_set_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_position") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_get_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsPointQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsPointQueryParameters3D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters2D.swift new file mode 100644 index 000000000..15f026a7f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters2D.swift @@ -0,0 +1,460 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState2D/intersectRay(parameters:)``. +/// +/// By changing various properties of this object, such as the ray position, you can configure the parameters for ``PhysicsDirectSpaceState2D/intersectRay(parameters:)``. +open class PhysicsRayQueryParameters2D: RefCounted { + override open class var godotClassName: StringName { "PhysicsRayQueryParameters2D" } + + /* Properties */ + + /// The starting point of the ray being queried for, in global coordinates. + final public var from: Vector2 { + get { + return get_from () + } + + set { + set_from (newValue) + } + + } + + /// The ending point of the ray being queried for, in global coordinates. + final public var to: Vector2 { + get { + return get_to () + } + + set { + set_to (newValue) + } + + } + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject2D/getRid()`` to get the ``RID`` associated with a ``CollisionObject2D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody2D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area2D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /// If `true`, the query will detect a hit when starting inside shapes. In this case the collision normal will be `Vector2(0, 0)`. Does not affect concave polygon shapes. + final public var hitFromInside: Bool { + get { + return is_hit_from_inside_enabled () + } + + set { + set_hit_from_inside (newValue) + } + + } + + /* Methods */ + fileprivate static var method_create: GDExtensionMethodBindPtr = { + let methodName = StringName("create") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3196569324)! + } + + } + + }() + + /// Returns a new, pre-configured ``PhysicsRayQueryParameters2D`` object. Use it to quickly create query parameters using the most common options. + /// + public static func create(from: Vector2, to: Vector2, collisionMask: UInt32 = 4294967295, exclude: VariantCollection = VariantCollection ()) -> PhysicsRayQueryParameters2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: collisionMask) { pArg2 in + withUnsafePointer(to: exclude.array.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_create, nil, pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_from: GDExtensionMethodBindPtr = { + let methodName = StringName("set_from") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_from(_ from: Vector2) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_from") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_from() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_get_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_to: GDExtensionMethodBindPtr = { + let methodName = StringName("set_to") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_to(_ to: Vector2) { + withUnsafePointer(to: to) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_to, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_to") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_to() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_get_to, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_from_inside: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_from_inside") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_from_inside(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_set_hit_from_inside, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_from_inside_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_from_inside_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_from_inside_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters2D.method_is_hit_from_inside_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters3D.swift new file mode 100644 index 000000000..b4972c724 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsRayQueryParameters3D.swift @@ -0,0 +1,516 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState3D/intersectRay(parameters:)``. +/// +/// By changing various properties of this object, such as the ray position, you can configure the parameters for ``PhysicsDirectSpaceState3D/intersectRay(parameters:)``. +open class PhysicsRayQueryParameters3D: RefCounted { + override open class var godotClassName: StringName { "PhysicsRayQueryParameters3D" } + + /* Properties */ + + /// The starting point of the ray being queried for, in global coordinates. + final public var from: Vector3 { + get { + return get_from () + } + + set { + set_from (newValue) + } + + } + + /// The ending point of the ray being queried for, in global coordinates. + final public var to: Vector3 { + get { + return get_to () + } + + set { + set_to (newValue) + } + + } + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject3D/getRid()`` to get the ``RID`` associated with a ``CollisionObject3D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody3D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area3D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /// If `true`, the query will detect a hit when starting inside shapes. In this case the collision normal will be `Vector3(0, 0, 0)`. Does not affect concave polygon shapes or heightmap shapes. + final public var hitFromInside: Bool { + get { + return is_hit_from_inside_enabled () + } + + set { + set_hit_from_inside (newValue) + } + + } + + /// If `true`, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. + final public var hitBackFaces: Bool { + get { + return is_hit_back_faces_enabled () + } + + set { + set_hit_back_faces (newValue) + } + + } + + /* Methods */ + fileprivate static var method_create: GDExtensionMethodBindPtr = { + let methodName = StringName("create") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3110599579)! + } + + } + + }() + + /// Returns a new, pre-configured ``PhysicsRayQueryParameters3D`` object. Use it to quickly create query parameters using the most common options. + /// + public static func create(from: Vector3, to: Vector3, collisionMask: UInt32 = 4294967295, exclude: VariantCollection = VariantCollection ()) -> PhysicsRayQueryParameters3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: collisionMask) { pArg2 in + withUnsafePointer(to: exclude.array.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_create, nil, pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_from: GDExtensionMethodBindPtr = { + let methodName = StringName("set_from") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_from(_ from: Vector3) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_from") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_from() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_get_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_to: GDExtensionMethodBindPtr = { + let methodName = StringName("set_to") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_to(_ to: Vector3) { + withUnsafePointer(to: to) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_to, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_to") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_to() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_get_to, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_from_inside: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_from_inside") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_from_inside(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_hit_from_inside, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_from_inside_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_from_inside_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_from_inside_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_is_hit_from_inside_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_back_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_back_faces") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_back_faces(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_set_hit_back_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_back_faces_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_back_faces_enabled") + return withUnsafePointer(to: &PhysicsRayQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_back_faces_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsRayQueryParameters3D.method_is_hit_back_faces_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer2D.swift new file mode 100644 index 000000000..19c15a0a8 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer2D.swift @@ -0,0 +1,3914 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for low-level 2D physics access. +/// +/// PhysicsServer2D is the server responsible for all 2D physics. It can directly create and manipulate all physics objects: +/// +/// - A _space_ is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. +/// +/// - A _shape_ is a geometric shape such as a circle, a rectangle, a capsule, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. +/// +/// - A _body_ is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics. +/// +/// - An _area_ is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters. +/// +/// - A _joint_ is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted. +/// +/// Physics objects in ``PhysicsServer2D`` may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. +/// +/// > Note: All the 2D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. +/// +open class PhysicsServer2D: Object { + /// The shared instance of this class + public static var shared: PhysicsServer2D = { + return withUnsafePointer (to: &PhysicsServer2D.godotClassName.content) { ptr in + lookupObject (nativeHandle: gi.global_get_singleton (ptr)!)! + } + + }() + + override open class var godotClassName: StringName { "PhysicsServer2D" } + public enum SpaceParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. The default value of this parameter is ``ProjectSettings/physics/2d/solver/contactRecycleRadius``. + case contactRecycleRadius = 0 // SPACE_PARAM_CONTACT_RECYCLE_RADIUS + /// Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. The default value of this parameter is ``ProjectSettings/physics/2d/solver/contactMaxSeparation``. + case contactMaxSeparation = 1 // SPACE_PARAM_CONTACT_MAX_SEPARATION + /// Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. The default value of this parameter is ``ProjectSettings/physics/2d/solver/contactMaxAllowedPenetration``. + case contactMaxAllowedPenetration = 2 // SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION + /// Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. The default value of this parameter is ``ProjectSettings/physics/2d/solver/defaultContactBias``. + case contactDefaultBias = 3 // SPACE_PARAM_CONTACT_DEFAULT_BIAS + /// Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. The default value of this parameter is ``ProjectSettings/physics/2d/sleepThresholdLinear``. + case bodyLinearVelocitySleepThreshold = 4 // SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD + /// Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. The default value of this parameter is ``ProjectSettings/physics/2d/sleepThresholdAngular``. + case bodyAngularVelocitySleepThreshold = 5 // SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD + /// Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. The default value of this parameter is ``ProjectSettings/physics/2d/timeBeforeSleep``. + case bodyTimeToSleep = 6 // SPACE_PARAM_BODY_TIME_TO_SLEEP + /// Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. The default value of this parameter is ``ProjectSettings/physics/2d/solver/defaultConstraintBias``. + case constraintDefaultBias = 7 // SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS + /// Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. The default value of this parameter is ``ProjectSettings/physics/2d/solver/solverIterations``. + case solverIterations = 8 // SPACE_PARAM_SOLVER_ITERATIONS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .contactRecycleRadius: return ".contactRecycleRadius" + case .contactMaxSeparation: return ".contactMaxSeparation" + case .contactMaxAllowedPenetration: return ".contactMaxAllowedPenetration" + case .contactDefaultBias: return ".contactDefaultBias" + case .bodyLinearVelocitySleepThreshold: return ".bodyLinearVelocitySleepThreshold" + case .bodyAngularVelocitySleepThreshold: return ".bodyAngularVelocitySleepThreshold" + case .bodyTimeToSleep: return ".bodyTimeToSleep" + case .constraintDefaultBias: return ".constraintDefaultBias" + case .solverIterations: return ".solverIterations" + } + + } + + } + + public enum ShapeType: Int64, CaseIterable, CustomDebugStringConvertible { + /// This is the constant for creating world boundary shapes. A world boundary shape is an _infinite_ line with an origin point, and a normal. Thus, it can be used for front/behind checks. + case worldBoundary = 0 // SHAPE_WORLD_BOUNDARY + /// This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. + case separationRay = 1 // SHAPE_SEPARATION_RAY + /// This is the constant for creating segment shapes. A segment shape is a _finite_ line from a point A to a point B. It can be checked for intersections. + case segment = 2 // SHAPE_SEGMENT + /// This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. + case circle = 3 // SHAPE_CIRCLE + /// This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. + case rectangle = 4 // SHAPE_RECTANGLE + /// This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. + case capsule = 5 // SHAPE_CAPSULE + /// This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. + case convexPolygon = 6 // SHAPE_CONVEX_POLYGON + /// This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. + case concavePolygon = 7 // SHAPE_CONCAVE_POLYGON + /// This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + case custom = 8 // SHAPE_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .worldBoundary: return ".worldBoundary" + case .separationRay: return ".separationRay" + case .segment: return ".segment" + case .circle: return ".circle" + case .rectangle: return ".rectangle" + case .capsule: return ".capsule" + case .convexPolygon: return ".convexPolygon" + case .concavePolygon: return ".concavePolygon" + case .custom: return ".custom" + } + + } + + } + + public enum AreaParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get gravity override mode in an area. See ``PhysicsServer2D/AreaSpaceOverrideMode`` for possible values. The default value of this parameter is ``AreaSpaceOverrideMode/disabled``. + case gravityOverrideMode = 0 // AREA_PARAM_GRAVITY_OVERRIDE_MODE + /// Constant to set/get gravity strength in an area. The default value of this parameter is `9.80665`. + case gravity = 1 // AREA_PARAM_GRAVITY + /// Constant to set/get gravity vector/center in an area. The default value of this parameter is `Vector2(0, -1)`. + case gravityVector = 2 // AREA_PARAM_GRAVITY_VECTOR + /// Constant to set/get whether the gravity vector of an area is a direction, or a center point. The default value of this parameter is `false`. + case gravityIsPoint = 3 // AREA_PARAM_GRAVITY_IS_POINT + /// Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by ``AreaParameter/gravity``. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on. + /// + /// The above is true only when the unit distance is a positive number. When the unit distance is set to 0.0, the gravity will be constant regardless of distance. The default value of this parameter is `0.0`. + /// + case gravityPointUnitDistance = 4 // AREA_PARAM_GRAVITY_POINT_UNIT_DISTANCE + /// Constant to set/get linear damping override mode in an area. See ``PhysicsServer2D/AreaSpaceOverrideMode`` for possible values. The default value of this parameter is ``AreaSpaceOverrideMode/disabled``. + case linearDampOverrideMode = 5 // AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE + /// Constant to set/get the linear damping factor of an area. The default value of this parameter is `0.1`. + case linearDamp = 6 // AREA_PARAM_LINEAR_DAMP + /// Constant to set/get angular damping override mode in an area. See ``PhysicsServer2D/AreaSpaceOverrideMode`` for possible values. The default value of this parameter is ``AreaSpaceOverrideMode/disabled``. + case angularDampOverrideMode = 7 // AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE + /// Constant to set/get the angular damping factor of an area. The default value of this parameter is `1.0`. + case angularDamp = 8 // AREA_PARAM_ANGULAR_DAMP + /// Constant to set/get the priority (order of processing) of an area. The default value of this parameter is `0`. + case priority = 9 // AREA_PARAM_PRIORITY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .gravityOverrideMode: return ".gravityOverrideMode" + case .gravity: return ".gravity" + case .gravityVector: return ".gravityVector" + case .gravityIsPoint: return ".gravityIsPoint" + case .gravityPointUnitDistance: return ".gravityPointUnitDistance" + case .linearDampOverrideMode: return ".linearDampOverrideMode" + case .linearDamp: return ".linearDamp" + case .angularDampOverrideMode: return ".angularDampOverrideMode" + case .angularDamp: return ".angularDamp" + case .priority: return ".priority" + } + + } + + } + + public enum AreaSpaceOverrideMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + case disabled = 0 // AREA_SPACE_OVERRIDE_DISABLED + /// This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + case combine = 1 // AREA_SPACE_OVERRIDE_COMBINE + /// This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + case combineReplace = 2 // AREA_SPACE_OVERRIDE_COMBINE_REPLACE + /// This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + case replace = 3 // AREA_SPACE_OVERRIDE_REPLACE + /// This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + case replaceCombine = 4 // AREA_SPACE_OVERRIDE_REPLACE_COMBINE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .combine: return ".combine" + case .combineReplace: return ".combineReplace" + case .replace: return ".replace" + case .replaceCombine: return ".replaceCombine" + } + + } + + } + + public enum BodyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. + case `static` = 0 // BODY_MODE_STATIC + /// Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. + case kinematic = 1 // BODY_MODE_KINEMATIC + /// Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. + case rigid = 2 // BODY_MODE_RIGID + /// Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. + case rigidLinear = 3 // BODY_MODE_RIGID_LINEAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`static`: return ".`static`" + case .kinematic: return ".kinematic" + case .rigid: return ".rigid" + case .rigidLinear: return ".rigidLinear" + } + + } + + } + + public enum BodyParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get a body's bounce factor. The default value of this parameter is `0.0`. + case bounce = 0 // BODY_PARAM_BOUNCE + /// Constant to set/get a body's friction. The default value of this parameter is `1.0`. + case friction = 1 // BODY_PARAM_FRICTION + /// Constant to set/get a body's mass. The default value of this parameter is `1.0`. If the body's mode is set to ``BodyMode/rigid``, then setting this parameter will have the following additional effects: + /// + /// - If the parameter ``BodyParameter/centerOfMass`` has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes. + /// + /// - If the parameter ``BodyParameter/inertia`` is set to a value `<= 0.0`, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass. + /// + case mass = 2 // BODY_PARAM_MASS + /// Constant to set/get a body's inertia. The default value of this parameter is `0.0`. If the body's inertia is set to a value `<= 0.0`, then the inertia will be recalculated based on the body's shapes, mass, and center of mass. + case inertia = 3 // BODY_PARAM_INERTIA + /// Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is `Vector2(0,0)`. If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter ``BodyParameter/mass`` or when calling ``bodySetSpace(body:space:)``. + case centerOfMass = 4 // BODY_PARAM_CENTER_OF_MASS + /// Constant to set/get a body's gravity multiplier. The default value of this parameter is `1.0`. + case gravityScale = 5 // BODY_PARAM_GRAVITY_SCALE + /// Constant to set/get a body's linear damping mode. See ``PhysicsServer2D/BodyDampMode`` for possible values. The default value of this parameter is ``BodyDampMode/combine``. + case linearDampMode = 6 // BODY_PARAM_LINEAR_DAMP_MODE + /// Constant to set/get a body's angular damping mode. See ``PhysicsServer2D/BodyDampMode`` for possible values. The default value of this parameter is ``BodyDampMode/combine``. + case angularDampMode = 7 // BODY_PARAM_ANGULAR_DAMP_MODE + /// Constant to set/get a body's linear damping factor. The default value of this parameter is `0.0`. + case linearDamp = 8 // BODY_PARAM_LINEAR_DAMP + /// Constant to set/get a body's angular damping factor. The default value of this parameter is `0.0`. + case angularDamp = 9 // BODY_PARAM_ANGULAR_DAMP + /// Represents the size of the ``PhysicsServer2D/BodyParameter`` enum. + case max = 10 // BODY_PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bounce: return ".bounce" + case .friction: return ".friction" + case .mass: return ".mass" + case .inertia: return ".inertia" + case .centerOfMass: return ".centerOfMass" + case .gravityScale: return ".gravityScale" + case .linearDampMode: return ".linearDampMode" + case .angularDampMode: return ".angularDampMode" + case .linearDamp: return ".linearDamp" + case .angularDamp: return ".angularDamp" + case .max: return ".max" + } + + } + + } + + public enum BodyDampMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The body's damping value is added to any value set in areas or the default value. + case combine = 0 // BODY_DAMP_MODE_COMBINE + /// The body's damping value replaces any value set in areas or the default value. + case replace = 1 // BODY_DAMP_MODE_REPLACE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .combine: return ".combine" + case .replace: return ".replace" + } + + } + + } + + public enum BodyState: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get the current transform matrix of the body. + case transform = 0 // BODY_STATE_TRANSFORM + /// Constant to set/get the current linear velocity of the body. + case linearVelocity = 1 // BODY_STATE_LINEAR_VELOCITY + /// Constant to set/get the current angular velocity of the body. + case angularVelocity = 2 // BODY_STATE_ANGULAR_VELOCITY + /// Constant to sleep/wake up a body, or to get whether it is sleeping. + case sleeping = 3 // BODY_STATE_SLEEPING + /// Constant to set/get whether the body can sleep. + case canSleep = 4 // BODY_STATE_CAN_SLEEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .transform: return ".transform" + case .linearVelocity: return ".linearVelocity" + case .angularVelocity: return ".angularVelocity" + case .sleeping: return ".sleeping" + case .canSleep: return ".canSleep" + } + + } + + } + + public enum JointType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to create pin joints. + case pin = 0 // JOINT_TYPE_PIN + /// Constant to create groove joints. + case groove = 1 // JOINT_TYPE_GROOVE + /// Constant to create damped spring joints. + case dampedSpring = 2 // JOINT_TYPE_DAMPED_SPRING + /// Represents the size of the ``PhysicsServer2D/JointType`` enum. + case max = 3 // JOINT_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .pin: return ".pin" + case .groove: return ".groove" + case .dampedSpring: return ".dampedSpring" + case .max: return ".max" + } + + } + + } + + public enum JointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get how fast the joint pulls the bodies back to satisfy the joint constraint. The lower the value, the more the two bodies can pull on the joint. The default value of this parameter is `0.0`. + /// + /// > Note: In Godot Physics, this parameter is only used for pin joints and groove joints. + /// + case bias = 0 // JOINT_PARAM_BIAS + /// Constant to set/get the maximum speed with which the joint can apply corrections. The default value of this parameter is `3.40282e+38`. + /// + /// > Note: In Godot Physics, this parameter is only used for groove joints. + /// + case maxBias = 1 // JOINT_PARAM_MAX_BIAS + /// Constant to set/get the maximum force that the joint can use to act on the two bodies. The default value of this parameter is `3.40282e+38`. + /// + /// > Note: In Godot Physics, this parameter is only used for groove joints. + /// + case maxForce = 2 // JOINT_PARAM_MAX_FORCE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bias: return ".bias" + case .maxBias: return ".maxBias" + case .maxForce: return ".maxForce" + } + + } + + } + + public enum PinJointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get a how much the bond of the pin joint can flex. The default value of this parameter is `0.0`. + case softness = 0 // PIN_JOINT_SOFTNESS + /// The maximum rotation around the pin. + case limitUpper = 1 // PIN_JOINT_LIMIT_UPPER + /// The minimum rotation around the pin. + case limitLower = 2 // PIN_JOINT_LIMIT_LOWER + /// Target speed for the motor. In radians per second. + case motorTargetVelocity = 3 // PIN_JOINT_MOTOR_TARGET_VELOCITY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .softness: return ".softness" + case .limitUpper: return ".limitUpper" + case .limitLower: return ".limitLower" + case .motorTargetVelocity: return ".motorTargetVelocity" + } + + } + + } + + public enum PinJointFlag: Int64, CaseIterable, CustomDebugStringConvertible { + /// If `true`, the pin has a maximum and a minimum rotation. + case angularLimitEnabled = 0 // PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED + /// If `true`, a motor turns the pin. + case motorEnabled = 1 // PIN_JOINT_FLAG_MOTOR_ENABLED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .angularLimitEnabled: return ".angularLimitEnabled" + case .motorEnabled: return ".motorEnabled" + } + + } + + } + + public enum DampedSpringParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. The default value of this parameter is the distance between the joint's anchor points. + case restLength = 0 // DAMPED_SPRING_REST_LENGTH + /// Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. The default value of this parameter is `20.0`. + case stiffness = 1 // DAMPED_SPRING_STIFFNESS + /// Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). The default value of this parameter is `1.5`. + case damping = 2 // DAMPED_SPRING_DAMPING + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .restLength: return ".restLength" + case .stiffness: return ".stiffness" + case .damping: return ".damping" + } + + } + + } + + public enum CCDMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables continuous collision detection. This is the fastest way to detect body collisions, but it can miss small and/or fast-moving objects. + case disabled = 0 // CCD_MODE_DISABLED + /// Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. + case castRay = 1 // CCD_MODE_CAST_RAY + /// Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. + case castShape = 2 // CCD_MODE_CAST_SHAPE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .castRay: return ".castRay" + case .castShape: return ".castShape" + } + + } + + } + + public enum AreaBodyStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// The value of the first parameter and area callback function receives, when an object enters one of its shapes. + case added = 0 // AREA_BODY_ADDED + /// The value of the first parameter and area callback function receives, when an object exits one of its shapes. + case removed = 1 // AREA_BODY_REMOVED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .added: return ".added" + case .removed: return ".removed" + } + + } + + } + + public enum ProcessInfo: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to get the number of objects that are not sleeping. + case activeObjects = 0 // INFO_ACTIVE_OBJECTS + /// Constant to get the number of possible collisions. + case collisionPairs = 1 // INFO_COLLISION_PAIRS + /// Constant to get the number of space regions where a collision could occur. + case islandCount = 2 // INFO_ISLAND_COUNT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .activeObjects: return ".activeObjects" + case .collisionPairs: return ".collisionPairs" + case .islandCount: return ".islandCount" + } + + } + + } + + /* Methods */ + fileprivate static var method_world_boundary_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("world_boundary_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D world boundary shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the shape's normal direction and distance properties. + public static func worldBoundaryShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_world_boundary_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_separation_ray_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("separation_ray_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D separation ray shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the shape's `length` and `slide_on_slope` properties. + public static func separationRayShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_separation_ray_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_segment_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("segment_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D segment shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the segment's start and end points. + public static func segmentShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_segment_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_circle_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("circle_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D circle shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the circle's radius. + public static func circleShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_circle_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_rectangle_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("rectangle_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D rectangle shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the rectangle's half-extents. + public static func rectangleShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_rectangle_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_capsule_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("capsule_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D capsule shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the capsule's height and radius. + public static func capsuleShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_capsule_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_convex_polygon_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("convex_polygon_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D convex polygon shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the convex polygon's points. + public static func convexPolygonShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_convex_polygon_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_concave_polygon_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("concave_polygon_shape_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D concave polygon shape in the physics server, and returns the ``RID`` that identifies it. Use ``shapeSetData(shape:data:)`` to set the concave polygon's segments. + public static func concavePolygonShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_concave_polygon_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shape_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_set_data") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175752987)! + } + + } + + }() + + /// Sets the shape data that defines the configuration of the shape. The `data` to be passed depends on the shape's type (see ``shapeGetType(shape:)``): + /// + /// - ``ShapeType/worldBoundary``: an array of length two containing a ``Vector2`` `normal` direction and a float distance `d`, + /// + /// - ``ShapeType/separationRay``: a dictionary containing the key `length` with a float value and the key `slide_on_slope` with a [bool] value, + /// + /// - ``ShapeType/segment``: a ``Rect2`` `rect` containing the first point of the segment in `rect.position` and the second point of the segment in `rect.size`, + /// + /// - ``ShapeType/circle``: a float `radius`, + /// + /// - ``ShapeType/rectangle``: a ``Vector2`` `half_extents`, + /// + /// - ``ShapeType/capsule``: an array of length two (or a ``Vector2``) containing a float `height` and a float `radius`, + /// + /// - ``ShapeType/convexPolygon``: either a ``PackedVector2Array`` of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a ``PackedFloat32Array`` of length divisible by four so that every 4-tuple of floats contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point, + /// + /// - ``ShapeType/concavePolygon``: a ``PackedVector2Array`` of length divisible by two (each pair of points forms one segment). + /// + /// > Warning: In the case of ``ShapeType/convexPolygon``, this method does not check if the points supplied actually form a convex polygon (unlike the ``CollisionPolygon2D/polygon`` property). + /// + public static func shapeSetData(shape: RID, data: Variant?) { + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shape_set_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_get_type") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1240598777)! + } + + } + + }() + + /// Returns the shape's type (see ``PhysicsServer2D/ShapeType``). + public static func shapeGetType(shape: RID) -> PhysicsServer2D.ShapeType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shape_get_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer2D.ShapeType (rawValue: _result)! + } + + fileprivate static var method_shape_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_get_data") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4171304767)! + } + + } + + }() + + /// Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See ``shapeSetData(shape:data:)`` for the precise format of this data in each case. + public static func shapeGetData(shape: RID) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shape_get_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_space_create: GDExtensionMethodBindPtr = { + let methodName = StringName("space_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D space in the physics server, and returns the ``RID`` that identifies it. A space contains bodies and areas, and controls the stepping of the physics simulation of the objects in it. + public static func spaceCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_space_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_space_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("space_set_active") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Activates or deactivates the space. If `active` is `false`, then the physics server will not do anything with this space in its physics step. + public static func spaceSetActive(space: RID, active: Bool) { + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_space_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_space_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("space_is_active") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the space is active. + public static func spaceIsActive(space: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_space_is_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_space_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("space_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 949194586)! + } + + } + + }() + + /// Sets the value of the given space parameter. See ``PhysicsServer2D/SpaceParameter`` for the list of available parameters. + public static func spaceSetParam(space: RID, param: PhysicsServer2D.SpaceParameter, value: Double) { + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_space_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_space_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("space_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 874111783)! + } + + } + + }() + + /// Returns the value of the given space parameter. See ``PhysicsServer2D/SpaceParameter`` for the list of available parameters. + public static func spaceGetParam(space: RID, param: PhysicsServer2D.SpaceParameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_space_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_space_get_direct_state: GDExtensionMethodBindPtr = { + let methodName = StringName("space_get_direct_state") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160173886)! + } + + } + + }() + + /// Returns the state of a space, a ``PhysicsDirectSpaceState2D``. This object can be used for collision/intersection queries. + public static func spaceGetDirectState(space: RID) -> PhysicsDirectSpaceState2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_space_get_direct_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_area_create: GDExtensionMethodBindPtr = { + let methodName = StringName("area_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D area object in the physics server, and returns the ``RID`` that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and `monitorable` set to `false`. + /// + /// Use ``areaAddShape(area:shape:transform:disabled:)`` to add shapes to it, use ``areaSetTransform(area:transform:)`` to set its transform, and use ``areaSetSpace(area:space:)`` to add the area to a space. If you want the area to be detectable use ``areaSetMonitorable(area:monitorable:)``. + /// + public static func areaCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_area_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_area_set_space: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_space") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Adds the area to the given space, after removing the area from the previously assigned space (if any). + /// + /// > Note: To remove an area from a space without immediately adding it back elsewhere, use `PhysicsServer2D.area_set_space(area, RID())`. + /// + public static func areaSetSpace(area: RID, space: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: space.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_space: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_space") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the ``RID`` of the space assigned to the area. Returns an empty ``RID`` if no space is assigned. + public static func areaGetSpace(area: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_area_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_add_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 339056240)! + } + + } + + }() + + /// Adds a shape to the area, with the given local transform. The shape (together with its `transform` and `disabled` properties) is added to an array of shapes, and the shapes of an area are usually referenced by their index in this array. + public static func areaAddShape(area: RID, shape: RID, transform: Transform2D = Transform2D (xAxis: Vector2 (x: 1, y: 0), yAxis: Vector2 (x: 0, y: 1), origin: Vector2 (x: 0, y: 0)), disabled: Bool = false) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shape.content) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: disabled) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_area_add_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Replaces the area's shape at the given index by another shape, while not affecting the `transform` and `disabled` properties at the same index. + public static func areaSetShape(area: RID, shapeIdx: Int32, shape: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: shape.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 736082694)! + } + + } + + }() + + /// Sets the local transform matrix of the area's shape with the given index. + public static func areaSetShapeTransform(area: RID, shapeIdx: Int32, transform: Transform2D) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape_disabled") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Sets the disabled property of the area's shape with the given index. If `disabled` is `true`, then the shape will not detect any other shapes entering or exiting it. + public static func areaSetShapeDisabled(area: RID, shapeIdx: Int32, disabled: Bool) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape_count") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of shapes added to the area. + public static func areaGetShapeCount(area: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns the ``RID`` of the shape with the given index in the area's array of shapes. + public static func areaGetShape(area: RID, shapeIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_area_get_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1324854622)! + } + + } + + }() + + /// Returns the local transform matrix of the shape with the given index in the area's array of shapes. + public static func areaGetShapeTransform(area: RID, shapeIdx: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_area_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_remove_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Removes the shape with the given index from the area's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the area's shapes which used to have indices higher than `shapeIdx` will have their index decreased by one. + public static func areaRemoveShape(area: RID, shapeIdx: Int32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_remove_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("area_clear_shapes") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all shapes from the area. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. + public static func areaClearShapes(area: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_clear_shapes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_area_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_collision_layer") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Assigns the area to one or many physics layers, via a bitmask. + public static func areaSetCollisionLayer(area: RID, layer: UInt32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_collision_layer") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers the area belongs to, as a bitmask. + public static func areaGetCollisionLayer(area: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_collision_mask") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets which physics layers the area will monitor, via a bitmask. + public static func areaSetCollisionMask(area: RID, mask: UInt32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_collision_mask") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers the area can contact with, as a bitmask. + public static func areaGetCollisionMask(area: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1257146028)! + } + + } + + }() + + /// Sets the value of the given area parameter. See ``PhysicsServer2D/AreaParameter`` for the list of available parameters. + public static func areaSetParam(area: RID, param: PhysicsServer2D.AreaParameter, value: Variant?) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets the transform matrix of the area. + public static func areaSetTransform(area: RID, transform: Transform2D) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3047435120)! + } + + } + + }() + + /// Returns the value of the given area parameter. See ``PhysicsServer2D/AreaParameter`` for the list of available parameters. + public static func areaGetParam(area: RID, param: PhysicsServer2D.AreaParameter) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_area_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 213527486)! + } + + } + + }() + + /// Returns the transform matrix of the area. + public static func areaGetTransform(area: RID) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_attach_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_attach_object_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Attaches the `ObjectID` of an ``Object`` to the area. Use ``Object/getInstanceId()`` to get the `ObjectID` of a ``CollisionObject2D``. + public static func areaAttachObjectInstanceId(area: RID, id: UInt) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_attach_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_object_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` attached to the area. Use ``@GlobalScope.instance_from_id`` to retrieve an ``Object`` from a nonzero `ObjectID`. + public static func areaGetObjectInstanceId(area: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_attach_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_attach_canvas_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Attaches the `ObjectID` of a canvas to the area. Use ``Object/getInstanceId()`` to get the `ObjectID` of a ``CanvasLayer``. + public static func areaAttachCanvasInstanceId(area: RID, id: UInt) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_attach_canvas_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_canvas_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the canvas attached to the area. Use ``@GlobalScope.instance_from_id`` to retrieve a ``CanvasLayer`` from a nonzero `ObjectID`. + public static func areaGetCanvasInstanceId(area: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_canvas_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_monitor_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_monitor_callback") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + /// + /// 1. an integer `status`: either ``AreaBodyStatus/added`` or ``AreaBodyStatus/removed`` depending on whether the other body shape entered or exited the area, + /// + /// 2. an ``RID`` `body_rid`: the ``RID`` of the body that entered or exited the area, + /// + /// 3. an integer `instance_id`: the `ObjectID` attached to the body, + /// + /// 4. an integer `body_shape_idx`: the index of the shape of the body that entered or exited the area, + /// + /// 5. an integer `self_shape_idx`: the index of the shape of the area where the body entered or exited. + /// + /// By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. + /// + public static func areaSetMonitorCallback(area: RID, callback: Callable) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_monitor_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_area_monitor_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_area_monitor_callback") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: + /// + /// 1. an integer `status`: either ``AreaBodyStatus/added`` or ``AreaBodyStatus/removed`` depending on whether the other area's shape entered or exited the area, + /// + /// 2. an ``RID`` `area_rid`: the ``RID`` of the other area that entered or exited the area, + /// + /// 3. an integer `instance_id`: the `ObjectID` attached to the other area, + /// + /// 4. an integer `area_shape_idx`: the index of the shape of the other area that entered or exited the area, + /// + /// 5. an integer `self_shape_idx`: the index of the shape of the area where the other area entered or exited. + /// + /// By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. + /// + public static func areaSetAreaMonitorCallback(area: RID, callback: Callable) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_area_monitor_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_monitorable") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the area is monitorable or not. If `monitorable` is `true`, the area monitoring callback of other areas will be called when this area enters or exits them. + public static func areaSetMonitorable(area: RID, monitorable: Bool) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: monitorable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_monitorable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_create: GDExtensionMethodBindPtr = { + let methodName = StringName("body_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D body object in the physics server, and returns the ``RID`` that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and body mode set to ``BodyMode/rigid``. + /// + /// Use ``bodyAddShape(body:shape:transform:disabled:)`` to add shapes to it, use ``bodySetState(body:state:value:)`` to set its transform, and use ``bodySetSpace(body:space:)`` to add the body to a space. + /// + public static func bodyCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_body_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_body_set_space: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_space") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Adds the body to the given space, after removing the body from the previously assigned space (if any). If the body's mode is set to ``BodyMode/rigid``, then adding the body to a space will have the following additional effects: + /// + /// - If the parameter ``BodyParameter/centerOfMass`` has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes. + /// + /// - If the parameter ``BodyParameter/inertia`` is set to a value `<= 0.0`, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass. + /// + /// > Note: To remove a body from a space without immediately adding it back elsewhere, use `PhysicsServer2D.body_set_space(body, RID())`. + /// + public static func bodySetSpace(body: RID, space: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: space.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_space: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_space") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the ``RID`` of the space assigned to the body. Returns an empty ``RID`` if no space is assigned. + public static func bodyGetSpace(body: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_mode") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1658067650)! + } + + } + + }() + + /// Sets the body's mode. See ``PhysicsServer2D/BodyMode`` for the list of available modes. + public static func bodySetMode(body: RID, mode: PhysicsServer2D.BodyMode) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_mode") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3261702585)! + } + + } + + }() + + /// Returns the body's mode (see ``PhysicsServer2D/BodyMode``). + public static func bodyGetMode(body: RID) -> PhysicsServer2D.BodyMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer2D.BodyMode (rawValue: _result)! + } + + fileprivate static var method_body_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 339056240)! + } + + } + + }() + + /// Adds a shape to the area, with the given local transform. The shape (together with its `transform` and `disabled` properties) is added to an array of shapes, and the shapes of a body are usually referenced by their index in this array. + public static func bodyAddShape(body: RID, shape: RID, transform: Transform2D = Transform2D (xAxis: Vector2 (x: 1, y: 0), yAxis: Vector2 (x: 0, y: 1), origin: Vector2 (x: 0, y: 0)), disabled: Bool = false) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shape.content) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: disabled) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Replaces the body's shape at the given index by another shape, while not affecting the `transform`, `disabled`, and one-way collision properties at the same index. + public static func bodySetShape(body: RID, shapeIdx: Int32, shape: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: shape.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 736082694)! + } + + } + + }() + + /// Sets the local transform matrix of the body's shape with the given index. + public static func bodySetShapeTransform(body: RID, shapeIdx: Int32, transform: Transform2D) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape_count") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of shapes added to the body. + public static func bodyGetShapeCount(body: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns the ``RID`` of the shape with the given index in the body's array of shapes. + public static func bodyGetShape(body: RID, shapeIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape_transform") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1324854622)! + } + + } + + }() + + /// Returns the local transform matrix of the shape with the given index in the area's array of shapes. + public static func bodyGetShapeTransform(body: RID, shapeIdx: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_remove_shape") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Removes the shape with the given index from the body's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the body's shapes which used to have indices higher than `shapeIdx` will have their index decreased by one. + public static func bodyRemoveShape(body: RID, shapeIdx: Int32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_remove_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("body_clear_shapes") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all shapes from the body. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. + public static func bodyClearShapes(body: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_clear_shapes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_body_set_shape_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape_disabled") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Sets the disabled property of the body's shape with the given index. If `disabled` is `true`, then the shape will be ignored in all collision detection. + public static func bodySetShapeDisabled(body: RID, shapeIdx: Int32, disabled: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape_as_one_way_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape_as_one_way_collision") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2556489974)! + } + + } + + }() + + /// Sets the one-way collision properties of the body's shape with the given index. If `enable` is `true`, the one-way collision direction given by the shape's local upward axis `body_get_shape_transform(body, shape_idx).y` will be used to ignore collisions with the shape in the opposite direction, and to ensure depenetration of kinematic bodies happens in this direction. + public static func bodySetShapeAsOneWayCollision(body: RID, shapeIdx: Int32, enable: Bool, margin: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: enable) { pArg2 in + withUnsafePointer(to: margin) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape_as_one_way_collision, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_attach_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_attach_object_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Attaches the `ObjectID` of an ``Object`` to the body. Use ``Object/getInstanceId()`` to get the `ObjectID` of a ``CollisionObject2D``. + public static func bodyAttachObjectInstanceId(body: RID, id: UInt) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_attach_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_object_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` attached to the body. Use ``@GlobalScope.instance_from_id`` to retrieve an ``Object`` from a nonzero `ObjectID`. + public static func bodyGetObjectInstanceId(body: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_attach_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_attach_canvas_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Attaches the `ObjectID` of a canvas to the body. Use ``Object/getInstanceId()`` to get the `ObjectID` of a ``CanvasLayer``. + public static func bodyAttachCanvasInstanceId(body: RID, id: UInt) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_attach_canvas_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_canvas_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_canvas_instance_id") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the `ObjectID` of the canvas attached to the body. Use ``@GlobalScope.instance_from_id`` to retrieve a ``CanvasLayer`` from a nonzero `ObjectID`. + public static func bodyGetCanvasInstanceId(body: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_canvas_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_continuous_collision_detection_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_continuous_collision_detection_mode") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1882257015)! + } + + } + + }() + + /// Sets the continuous collision detection mode using one of the ``PhysicsServer2D/CCDMode`` constants. + /// + /// Continuous collision detection tries to predict where a moving body would collide in between physics updates, instead of moving it and correcting its movement if it collided. + /// + public static func bodySetContinuousCollisionDetectionMode(body: RID, mode: PhysicsServer2D.CCDMode) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_continuous_collision_detection_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_continuous_collision_detection_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_continuous_collision_detection_mode") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2661282217)! + } + + } + + }() + + /// Returns the body's continuous collision detection mode (see ``PhysicsServer2D/CCDMode``). + public static func bodyGetContinuousCollisionDetectionMode(body: RID) -> PhysicsServer2D.CCDMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_continuous_collision_detection_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer2D.CCDMode (rawValue: _result)! + } + + fileprivate static var method_body_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_layer") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers the body belongs to, via a bitmask. + public static func bodySetCollisionLayer(body: RID, layer: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_layer") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers the body belongs to, as a bitmask. + public static func bodyGetCollisionLayer(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_mask") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers the body can collide with, via a bitmask. + public static func bodySetCollisionMask(body: RID, mask: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_mask") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers the body can collide with, as a bitmask. + public static func bodyGetCollisionMask(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_priority") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the body's collision priority. This is used in the depenetration phase of ``bodyTestMotion(body:parameters:result:)``. The higher the priority is, the lower the penetration into the body will be. + public static func bodySetCollisionPriority(body: RID, priority: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_priority") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the body's collision priority. This is used in the depenetration phase of ``bodyTestMotion(body:parameters:result:)``. The higher the priority is, the lower the penetration into the body will be. + public static func bodyGetCollisionPriority(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2715630609)! + } + + } + + }() + + /// Sets the value of the given body parameter. See ``PhysicsServer2D/BodyParameter`` for the list of available parameters. + public static func bodySetParam(body: RID, param: PhysicsServer2D.BodyParameter, value: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3208033526)! + } + + } + + }() + + /// Returns the value of the given body parameter. See ``PhysicsServer2D/BodyParameter`` for the list of available parameters. + public static func bodyGetParam(body: RID, param: PhysicsServer2D.BodyParameter) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_body_reset_mass_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("body_reset_mass_properties") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using ``bodySetParam(body:param:value:)``. + public static func bodyResetMassProperties(body: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_reset_mass_properties, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_body_set_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_state") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1706355209)! + } + + } + + }() + + /// Sets the value of a body's state. See ``PhysicsServer2D/BodyState`` for the list of available states. + /// + /// > Note: The state change doesn't take effect immediately. The state will change on the next physics frame. + /// + public static func bodySetState(body: RID, state: PhysicsServer2D.BodyState, value: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_state") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4036367961)! + } + + } + + }() + + /// Returns the value of the given state of the body. See ``PhysicsServer2D/BodyState`` for the list of available states. + public static func bodyGetState(body: RID, state: PhysicsServer2D.BodyState) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_body_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_central_impulse") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Applies a directional impulse to the body, at the body's center of mass. The impulse does not affect rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``bodyApplyImpulse(body:impulse:position:)`` at the body's center of mass. + /// + public static func bodyApplyCentralImpulse(body: RID, impulse: Vector2) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_central_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_torque_impulse") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Applies a rotational impulse to the body. The impulse does not affect position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + public static func bodyApplyTorqueImpulse(body: RID, impulse: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_torque_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_impulse") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 205485391)! + } + + } + + }() + + /// Applies a positioned impulse to the body. The impulse can affect rotation if `position` is different from the body's center of mass. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyApplyImpulse(body: RID, impulse: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_central_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Applies a directional force to the body, at the body's center of mass. The force does not affect rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``bodyApplyForce(body:force:position:)`` at the body's center of mass. + /// + public static func bodyApplyCentralForce(body: RID, force: Vector2) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_central_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 205485391)! + } + + } + + }() + + /// Applies a positioned force to the body. The force can affect rotation if `position` is different from the body's center of mass. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyApplyForce(body: RID, force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_torque") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Applies a rotational force to the body. The force does not affect position. A force is time dependent and meant to be applied every physics update. + public static func bodyApplyTorque(body: RID, torque: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_central_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Adds a constant directional force to the body. The force does not affect rotation. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))`. + /// + /// This is equivalent to using ``bodyAddConstantForce(body:force:position:)`` at the body's center of mass. + /// + public static func bodyAddConstantCentralForce(body: RID, force: Vector2) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_central_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 205485391)! + } + + } + + }() + + /// Adds a constant positioned force to the body. The force can affect rotation if `position` is different from the body's center of mass. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyAddConstantForce(body: RID, force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_torque") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Adds a constant rotational force to the body. The force does not affect position. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_torque(body, 0)`. + public static func bodyAddConstantTorque(body: RID, torque: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_constant_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the body's total constant positional force applied during each physics update. + /// + /// See ``bodyAddConstantForce(body:force:position:)`` and ``bodyAddConstantCentralForce(body:force:)``. + /// + public static func bodySetConstantForce(body: RID, force: Vector2) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_constant_force") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2440833711)! + } + + } + + }() + + /// Returns the body's total constant positional force applied during each physics update. + /// + /// See ``bodyAddConstantForce(body:force:position:)`` and ``bodyAddConstantCentralForce(body:force:)``. + /// + public static func bodyGetConstantForce(body: RID) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_constant_torque") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the body's total constant rotational force applied during each physics update. + /// + /// See ``bodyAddConstantTorque(body:torque:)``. + /// + public static func bodySetConstantTorque(body: RID, torque: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_constant_torque") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the body's total constant rotational force applied during each physics update. + /// + /// See ``bodyAddConstantTorque(body:torque:)``. + /// + public static func bodyGetConstantTorque(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_axis_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_axis_velocity") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Modifies the body's linear velocity so that its projection to the axis `axis_velocity.normalized()` is exactly `axis_velocity.length()`. This is useful for jumping behavior. + public static func bodySetAxisVelocity(body: RID, axisVelocity: Vector2) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: axisVelocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_axis_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_collision_exception") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Adds `exceptedBody` to the body's list of collision exceptions, so that collisions with it are ignored. + public static func bodyAddCollisionException(body: RID, exceptedBody: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: exceptedBody.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_remove_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("body_remove_collision_exception") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Removes `exceptedBody` from the body's list of collision exceptions, so that collisions with it are no longer ignored. + public static func bodyRemoveCollisionException(body: RID, exceptedBody: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: exceptedBody.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_remove_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_max_contacts_reported") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum number of contacts that the body can report. If `amount` is greater than zero, then the body will keep track of at most this many contacts with other bodies. + public static func bodySetMaxContactsReported(body: RID, amount: Int32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_max_contacts_reported, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_max_contacts_reported") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the maximum number of contacts that the body can report. See ``bodySetMaxContactsReported(body:amount:)``. + public static func bodyGetMaxContactsReported(body: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_max_contacts_reported, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_omit_force_integration: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_omit_force_integration") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the body omits the standard force integration. If `enable` is `true`, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, ``bodySetForceIntegrationCallback(body:callable:userdata:)`` can be used to manually update the linear and angular velocity instead. + /// + /// This method is called when the property ``RigidBody2D/customIntegrator`` is set. + /// + public static func bodySetOmitForceIntegration(body: RID, enable: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_omit_force_integration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_is_omitting_force_integration: GDExtensionMethodBindPtr = { + let methodName = StringName("body_is_omitting_force_integration") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the body is omitting the standard force integration. See ``bodySetOmitForceIntegration(body:enable:)``. + public static func bodyIsOmittingForceIntegration(body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_is_omitting_force_integration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_force_integration_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_force_integration_callback") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3059434249)! + } + + } + + }() + + /// Sets the body's custom force integration callback function to `callable`. Use an empty ``Callable`` ([code skip-lint]Callable()`) to clear the custom callback. + /// + /// The function `callable` will be called every physics tick, before the standard force integration (see ``bodySetOmitForceIntegration(body:enable:)``). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. + /// + /// If `userdata` is not `null`, the function `callable` must take the following two parameters: + /// + /// 1. `state`: a ``PhysicsDirectBodyState2D`` used to retrieve and modify the body's state, + /// + /// 2. [code skip-lint]userdata`: a ``Variant``; its value will be the `userdata` passed into this method. + /// + /// If `userdata` is `null`, then `callable` must take only the `state` parameter. + /// + public static func bodySetForceIntegrationCallback(body: RID, callable: Callable, userdata: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: userdata.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_force_integration_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_test_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1699844009)! + } + + } + + }() + + /// Returns `true` if a collision would result from moving the body along a motion vector from a given point in space. See ``PhysicsTestMotionParameters2D`` for the available motion parameters. Optionally a ``PhysicsTestMotionResult2D`` object can be passed, which will be used to store the information about the resulting collision. + public static func bodyTestMotion(body: RID, parameters: PhysicsTestMotionParameters2D?, result: PhysicsTestMotionResult2D? = nil) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: parameters?.handle) { pArg1 in + withUnsafePointer(to: result?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_test_motion, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_direct_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_direct_state") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1191931871)! + } + + } + + }() + + /// Returns the ``PhysicsDirectBodyState2D`` of the body. Returns `null` if the body is destroyed or not assigned to a space. + public static func bodyGetDirectState(body: RID) -> PhysicsDirectBodyState2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_direct_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_joint_create: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_create") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 2D joint in the physics server, and returns the ``RID`` that identifies it. To set the joint type, use ``jointMakeDampedSpring(joint:anchorA:anchorB:bodyA:bodyB:)``, ``jointMakeGroove(joint:groove1A:groove2A:anchorB:bodyA:bodyB:)`` or ``jointMakePin(joint:anchor:bodyA:bodyB:)``. Use ``jointSetParam(joint:param:value:)`` to set generic joint parameters. + public static func jointCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_joint_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_joint_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_clear") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Destroys the joint with the given ``RID``, creates a new uninitialized joint, and makes the ``RID`` refer to this new joint. + public static func jointClear(joint: RID) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3972556514)! + } + + } + + }() + + /// Sets the value of the given joint parameter. See ``PhysicsServer2D/JointParam`` for the list of available parameters. + public static func jointSetParam(joint: RID, param: PhysicsServer2D.JointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4016448949)! + } + + } + + }() + + /// Returns the value of the given joint parameter. See ``PhysicsServer2D/JointParam`` for the list of available parameters. + public static func jointGetParam(joint: RID, param: PhysicsServer2D.JointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_disable_collisions_between_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_disable_collisions_between_bodies") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the bodies attached to the ``Joint2D`` will collide with each other. + public static func jointDisableCollisionsBetweenBodies(joint: RID, disable: Bool) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_joint_disable_collisions_between_bodies, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_joint_is_disabled_collisions_between_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_is_disabled_collisions_between_bodies") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether the bodies attached to the ``Joint2D`` will collide with each other. + public static func jointIsDisabledCollisionsBetweenBodies(joint: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_is_disabled_collisions_between_bodies, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_joint_make_pin: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_pin") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1612646186)! + } + + } + + }() + + /// Makes the joint a pin joint. If `bodyB` is an empty ``RID``, then `bodyA` is pinned to the point `anchor` (given in global coordinates); otherwise, `bodyA` is pinned to `bodyB` at the point `anchor` (given in global coordinates). To set the parameters which are specific to the pin joint, see ``pinJointSetParam(joint:param:value:)``. + public static func jointMakePin(joint: RID, anchor: Vector2, bodyA: RID, bodyB: RID = RID()) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: anchor) { pArg1 in + withUnsafePointer(to: bodyA.content) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_pin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_joint_make_groove: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_groove") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 481430435)! + } + + } + + }() + + /// Makes the joint a groove joint. + public static func jointMakeGroove(joint: RID, groove1A: Vector2, groove2A: Vector2, anchorB: Vector2, bodyA: RID = RID(), bodyB: RID = RID()) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: groove1A) { pArg1 in + withUnsafePointer(to: groove2A) { pArg2 in + withUnsafePointer(to: anchorB) { pArg3 in + withUnsafePointer(to: bodyA.content) { pArg4 in + withUnsafePointer(to: bodyB.content) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_groove, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_joint_make_damped_spring: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_damped_spring") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1994657646)! + } + + } + + }() + + /// Makes the joint a damped spring joint, attached at the point `anchorA` (given in global coordinates) on the body `bodyA` and at the point `anchorB` (given in global coordinates) on the body `bodyB`. To set the parameters which are specific to the damped spring, see ``dampedSpringJointSetParam(joint:param:value:)``. + public static func jointMakeDampedSpring(joint: RID, anchorA: Vector2, anchorB: Vector2, bodyA: RID, bodyB: RID = RID()) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: anchorA) { pArg1 in + withUnsafePointer(to: anchorB) { pArg2 in + withUnsafePointer(to: bodyA.content) { pArg3 in + withUnsafePointer(to: bodyB.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_damped_spring, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_set_flag") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3520002352)! + } + + } + + }() + + /// Sets a pin joint flag (see ``PhysicsServer2D/PinJointFlag`` constants). + public static func pinJointSetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: Bool) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: enabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_get_flag") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2647867364)! + } + + } + + }() + + /// Gets a pin joint flag (see ``PhysicsServer2D/PinJointFlag`` constants). + public static func pinJointGetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_get_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_pin_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 550574241)! + } + + } + + }() + + /// Sets a pin joint parameter. See ``PhysicsServer2D/PinJointParam`` for a list of available parameters. + public static func pinJointSetParam(joint: RID, param: PhysicsServer2D.PinJointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 348281383)! + } + + } + + }() + + /// Returns the value of a pin joint parameter. See ``PhysicsServer2D/PinJointParam`` for a list of available parameters. + public static func pinJointGetParam(joint: RID, param: PhysicsServer2D.PinJointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_damped_spring_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("damped_spring_joint_set_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 220564071)! + } + + } + + }() + + /// Sets the value of the given damped spring joint parameter. See ``PhysicsServer2D/DampedSpringParam`` for the list of available parameters. + public static func dampedSpringJointSetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_damped_spring_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_damped_spring_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("damped_spring_joint_get_param") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2075871277)! + } + + } + + }() + + /// Returns the value of the given damped spring joint parameter. See ``PhysicsServer2D/DampedSpringParam`` for the list of available parameters. + public static func dampedSpringJointGetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_damped_spring_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_get_type") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4262502231)! + } + + } + + }() + + /// Returns the joint's type (see ``PhysicsServer2D/JointType``). + public static func jointGetType(joint: RID) -> PhysicsServer2D.JointType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_get_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer2D.JointType (rawValue: _result)! + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Destroys any of the objects created by PhysicsServer2D. If the ``RID`` passed is not one of the objects that can be created by PhysicsServer2D, an error will be printed to the console. + public static func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_rid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_active") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Activates or deactivates the 2D physics server. If `active` is `false`, then the physics server will not do anything in its physics step. + public static func setActive(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_info") + return withUnsafePointer(to: &PhysicsServer2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 576496006)! + } + + } + + }() + + /// Returns information about the current state of the 2D physics engine. See ``PhysicsServer2D/ProcessInfo`` for the list of available states. + public static func getProcessInfo(_ processInfo: PhysicsServer2D.ProcessInfo) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: processInfo.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_process_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer2DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer2DExtension.swift new file mode 100644 index 000000000..9f41cf02a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer2DExtension.swift @@ -0,0 +1,2158 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsServer2D`` implementations. +/// +/// This class extends ``PhysicsServer2D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsServer2D``. +/// +open class PhysicsServer2DExtension: PhysicsServer2D { + override open class var godotClassName: StringName { "PhysicsServer2DExtension" } + /* Methods */ + /// Overridable version of ``PhysicsServer2D/worldBoundaryShapeCreate()``. + @_documentation(visibility: public) + open func _worldBoundaryShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/separationRayShapeCreate()``. + @_documentation(visibility: public) + open func _separationRayShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/segmentShapeCreate()``. + @_documentation(visibility: public) + open func _segmentShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/circleShapeCreate()``. + @_documentation(visibility: public) + open func _circleShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/rectangleShapeCreate()``. + @_documentation(visibility: public) + open func _rectangleShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/capsuleShapeCreate()``. + @_documentation(visibility: public) + open func _capsuleShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/convexPolygonShapeCreate()``. + @_documentation(visibility: public) + open func _convexPolygonShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/concavePolygonShapeCreate()``. + @_documentation(visibility: public) + open func _concavePolygonShapeCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/shapeSetData(shape:data:)``. + @_documentation(visibility: public) + open func _shapeSetData(shape: RID, data: Variant?) { + } + + /// Should set the custom solver bias for the given `shape`. It defines how much bodies are forced to separate on contact. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `shape_get_custom_solver_bias` method. Corresponds to ``Shape2D/customSolverBias``. + /// + @_documentation(visibility: public) + open func _shapeSetCustomSolverBias(shape: RID, bias: Double) { + } + + /// Overridable version of ``PhysicsServer2D/shapeGetType(shape:)``. + @_documentation(visibility: public) + open func _shapeGetType(shape: RID) -> PhysicsServer2D.ShapeType { + return PhysicsServer2D.ShapeType(rawValue: 0)! + } + + /// Overridable version of ``PhysicsServer2D/shapeGetData(shape:)``. + @_documentation(visibility: public) + open func _shapeGetData(shape: RID) -> Variant? { + return nil + } + + /// Should return the custom solver bias of the given `shape`, which defines how much bodies are forced to separate on contact when this shape is involved. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `shape_get_custom_solver_bias` method. Corresponds to ``Shape2D/customSolverBias``. + /// + @_documentation(visibility: public) + open func _shapeGetCustomSolverBias(shape: RID) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/spaceCreate()``. + @_documentation(visibility: public) + open func _spaceCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/spaceSetActive(space:active:)``. + @_documentation(visibility: public) + open func _spaceSetActive(space: RID, active: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/spaceIsActive(space:)``. + @_documentation(visibility: public) + open func _spaceIsActive(space: RID) -> Bool { + return false + } + + /// Overridable version of ``PhysicsServer2D/spaceSetParam(space:param:value:)``. + @_documentation(visibility: public) + open func _spaceSetParam(space: RID, param: PhysicsServer2D.SpaceParameter, value: Double) { + } + + /// Overridable version of ``PhysicsServer2D/spaceGetParam(space:param:)``. + @_documentation(visibility: public) + open func _spaceGetParam(space: RID, param: PhysicsServer2D.SpaceParameter) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/spaceGetDirectState(space:)``. + @_documentation(visibility: public) + open func _spaceGetDirectState(space: RID) -> PhysicsDirectSpaceState2D? { + return PhysicsDirectSpaceState2D () + } + + /// Used internally to allow the given `space` to store contact points, up to `maxContacts`. This is automatically set for the main ``World2D``'s space when ``SceneTree/debugCollisionsHint`` is `true`, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `space_set_debug_contacts` method. + /// + @_documentation(visibility: public) + open func _spaceSetDebugContacts(space: RID, maxContacts: Int32) { + } + + /// Should return the positions of all contacts that have occurred during the last physics step in the given `space`. See also ``_spaceGetContactCount(space:)`` and ``_spaceSetDebugContacts(space:maxContacts:)``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `space_get_contacts` method. + /// + @_documentation(visibility: public) + open func _spaceGetContacts(space: RID) -> PackedVector2Array { + return PackedVector2Array () + } + + /// Should return how many contacts have occurred during the last physics step in the given `space`. See also ``_spaceGetContacts(space:)`` and ``_spaceSetDebugContacts(space:maxContacts:)``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `space_get_contact_count` method. + /// + @_documentation(visibility: public) + open func _spaceGetContactCount(space: RID) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaCreate()``. + @_documentation(visibility: public) + open func _areaCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/areaSetSpace(area:space:)``. + @_documentation(visibility: public) + open func _areaSetSpace(area: RID, space: RID) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetSpace(area:)``. + @_documentation(visibility: public) + open func _areaGetSpace(area: RID) -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/areaAddShape(area:shape:transform:disabled:)``. + @_documentation(visibility: public) + open func _areaAddShape(area: RID, shape: RID, transform: Transform2D, disabled: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetShape(area:shapeIdx:shape:)``. + @_documentation(visibility: public) + open func _areaSetShape(area: RID, shapeIdx: Int32, shape: RID) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetShapeTransform(area:shapeIdx:transform:)``. + @_documentation(visibility: public) + open func _areaSetShapeTransform(area: RID, shapeIdx: Int32, transform: Transform2D) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetShapeDisabled(area:shapeIdx:disabled:)``. + @_documentation(visibility: public) + open func _areaSetShapeDisabled(area: RID, shapeIdx: Int32, disabled: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetShapeCount(area:)``. + @_documentation(visibility: public) + open func _areaGetShapeCount(area: RID) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaGetShape(area:shapeIdx:)``. + @_documentation(visibility: public) + open func _areaGetShape(area: RID, shapeIdx: Int32) -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/areaGetShapeTransform(area:shapeIdx:)``. + @_documentation(visibility: public) + open func _areaGetShapeTransform(area: RID, shapeIdx: Int32) -> Transform2D { + return Transform2D () + } + + /// Overridable version of ``PhysicsServer2D/areaRemoveShape(area:shapeIdx:)``. + @_documentation(visibility: public) + open func _areaRemoveShape(area: RID, shapeIdx: Int32) { + } + + /// Overridable version of ``PhysicsServer2D/areaClearShapes(area:)``. + @_documentation(visibility: public) + open func _areaClearShapes(area: RID) { + } + + /// Overridable version of ``PhysicsServer2D/areaAttachObjectInstanceId(area:id:)``. + @_documentation(visibility: public) + open func _areaAttachObjectInstanceId(area: RID, id: UInt) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetObjectInstanceId(area:)``. + @_documentation(visibility: public) + open func _areaGetObjectInstanceId(area: RID) -> UInt { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaAttachCanvasInstanceId(area:id:)``. + @_documentation(visibility: public) + open func _areaAttachCanvasInstanceId(area: RID, id: UInt) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetCanvasInstanceId(area:)``. + @_documentation(visibility: public) + open func _areaGetCanvasInstanceId(area: RID) -> UInt { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaSetParam(area:param:value:)``. + @_documentation(visibility: public) + open func _areaSetParam(area: RID, param: PhysicsServer2D.AreaParameter, value: Variant?) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetTransform(area:transform:)``. + @_documentation(visibility: public) + open func _areaSetTransform(area: RID, transform: Transform2D) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetParam(area:param:)``. + @_documentation(visibility: public) + open func _areaGetParam(area: RID, param: PhysicsServer2D.AreaParameter) -> Variant? { + return nil + } + + /// Overridable version of ``PhysicsServer2D/areaGetTransform(area:)``. + @_documentation(visibility: public) + open func _areaGetTransform(area: RID) -> Transform2D { + return Transform2D () + } + + /// Overridable version of ``PhysicsServer2D/areaSetCollisionLayer(area:layer:)``. + @_documentation(visibility: public) + open func _areaSetCollisionLayer(area: RID, layer: UInt32) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetCollisionLayer(area:)``. + @_documentation(visibility: public) + open func _areaGetCollisionLayer(area: RID) -> UInt32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaSetCollisionMask(area:mask:)``. + @_documentation(visibility: public) + open func _areaSetCollisionMask(area: RID, mask: UInt32) { + } + + /// Overridable version of ``PhysicsServer2D/areaGetCollisionMask(area:)``. + @_documentation(visibility: public) + open func _areaGetCollisionMask(area: RID) -> UInt32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/areaSetMonitorable(area:monitorable:)``. + @_documentation(visibility: public) + open func _areaSetMonitorable(area: RID, monitorable: Bool) { + } + + /// If set to `true`, allows the area with the given ``RID`` to detect mouse inputs when the mouse cursor is hovering on it. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `area_set_pickable` method. Corresponds to ``CollisionObject2D/inputPickable``. + /// + @_documentation(visibility: public) + open func _areaSetPickable(area: RID, pickable: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetMonitorCallback(area:callback:)``. + @_documentation(visibility: public) + open func _areaSetMonitorCallback(area: RID, callback: Callable) { + } + + /// Overridable version of ``PhysicsServer2D/areaSetAreaMonitorCallback(area:callback:)``. + @_documentation(visibility: public) + open func _areaSetAreaMonitorCallback(area: RID, callback: Callable) { + } + + /// Overridable version of ``PhysicsServer2D/bodyCreate()``. + @_documentation(visibility: public) + open func _bodyCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/bodySetSpace(body:space:)``. + @_documentation(visibility: public) + open func _bodySetSpace(body: RID, space: RID) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetSpace(body:)``. + @_documentation(visibility: public) + open func _bodyGetSpace(body: RID) -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/bodySetMode(body:mode:)``. + @_documentation(visibility: public) + open func _bodySetMode(body: RID, mode: PhysicsServer2D.BodyMode) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetMode(body:)``. + @_documentation(visibility: public) + open func _bodyGetMode(body: RID) -> PhysicsServer2D.BodyMode { + return PhysicsServer2D.BodyMode(rawValue: 0)! + } + + /// Overridable version of ``PhysicsServer2D/bodyAddShape(body:shape:transform:disabled:)``. + @_documentation(visibility: public) + open func _bodyAddShape(body: RID, shape: RID, transform: Transform2D, disabled: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetShape(body:shapeIdx:shape:)``. + @_documentation(visibility: public) + open func _bodySetShape(body: RID, shapeIdx: Int32, shape: RID) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetShapeTransform(body:shapeIdx:transform:)``. + @_documentation(visibility: public) + open func _bodySetShapeTransform(body: RID, shapeIdx: Int32, transform: Transform2D) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetShapeCount(body:)``. + @_documentation(visibility: public) + open func _bodyGetShapeCount(body: RID) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/bodyGetShape(body:shapeIdx:)``. + @_documentation(visibility: public) + open func _bodyGetShape(body: RID, shapeIdx: Int32) -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/bodyGetShapeTransform(body:shapeIdx:)``. + @_documentation(visibility: public) + open func _bodyGetShapeTransform(body: RID, shapeIdx: Int32) -> Transform2D { + return Transform2D () + } + + /// Overridable version of ``PhysicsServer2D/bodySetShapeDisabled(body:shapeIdx:disabled:)``. + @_documentation(visibility: public) + open func _bodySetShapeDisabled(body: RID, shapeIdx: Int32, disabled: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetShapeAsOneWayCollision(body:shapeIdx:enable:margin:)``. + @_documentation(visibility: public) + open func _bodySetShapeAsOneWayCollision(body: RID, shapeIdx: Int32, enable: Bool, margin: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodyRemoveShape(body:shapeIdx:)``. + @_documentation(visibility: public) + open func _bodyRemoveShape(body: RID, shapeIdx: Int32) { + } + + /// Overridable version of ``PhysicsServer2D/bodyClearShapes(body:)``. + @_documentation(visibility: public) + open func _bodyClearShapes(body: RID) { + } + + /// Overridable version of ``PhysicsServer2D/bodyAttachObjectInstanceId(body:id:)``. + @_documentation(visibility: public) + open func _bodyAttachObjectInstanceId(body: RID, id: UInt) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetObjectInstanceId(body:)``. + @_documentation(visibility: public) + open func _bodyGetObjectInstanceId(body: RID) -> UInt { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/bodyAttachCanvasInstanceId(body:id:)``. + @_documentation(visibility: public) + open func _bodyAttachCanvasInstanceId(body: RID, id: UInt) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetCanvasInstanceId(body:)``. + @_documentation(visibility: public) + open func _bodyGetCanvasInstanceId(body: RID) -> UInt { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetContinuousCollisionDetectionMode(body:mode:)``. + @_documentation(visibility: public) + open func _bodySetContinuousCollisionDetectionMode(body: RID, mode: PhysicsServer2D.CCDMode) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetContinuousCollisionDetectionMode(body:)``. + @_documentation(visibility: public) + open func _bodyGetContinuousCollisionDetectionMode(body: RID) -> PhysicsServer2D.CCDMode { + return PhysicsServer2D.CCDMode(rawValue: 0)! + } + + /// Overridable version of ``PhysicsServer2D/bodySetCollisionLayer(body:layer:)``. + @_documentation(visibility: public) + open func _bodySetCollisionLayer(body: RID, layer: UInt32) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetCollisionLayer(body:)``. + @_documentation(visibility: public) + open func _bodyGetCollisionLayer(body: RID) -> UInt32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetCollisionMask(body:mask:)``. + @_documentation(visibility: public) + open func _bodySetCollisionMask(body: RID, mask: UInt32) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetCollisionMask(body:)``. + @_documentation(visibility: public) + open func _bodyGetCollisionMask(body: RID) -> UInt32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetCollisionPriority(body:priority:)``. + @_documentation(visibility: public) + open func _bodySetCollisionPriority(body: RID, priority: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetCollisionPriority(body:)``. + @_documentation(visibility: public) + open func _bodyGetCollisionPriority(body: RID) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetParam(body:param:value:)``. + @_documentation(visibility: public) + open func _bodySetParam(body: RID, param: PhysicsServer2D.BodyParameter, value: Variant?) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetParam(body:param:)``. + @_documentation(visibility: public) + open func _bodyGetParam(body: RID, param: PhysicsServer2D.BodyParameter) -> Variant? { + return nil + } + + /// Overridable version of ``PhysicsServer2D/bodyResetMassProperties(body:)``. + @_documentation(visibility: public) + open func _bodyResetMassProperties(body: RID) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetState(body:state:value:)``. + @_documentation(visibility: public) + open func _bodySetState(body: RID, state: PhysicsServer2D.BodyState, value: Variant?) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetState(body:state:)``. + @_documentation(visibility: public) + open func _bodyGetState(body: RID, state: PhysicsServer2D.BodyState) -> Variant? { + return nil + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyCentralImpulse(body:impulse:)``. + @_documentation(visibility: public) + open func _bodyApplyCentralImpulse(body: RID, impulse: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyTorqueImpulse(body:impulse:)``. + @_documentation(visibility: public) + open func _bodyApplyTorqueImpulse(body: RID, impulse: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyImpulse(body:impulse:position:)``. + @_documentation(visibility: public) + open func _bodyApplyImpulse(body: RID, impulse: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyCentralForce(body:force:)``. + @_documentation(visibility: public) + open func _bodyApplyCentralForce(body: RID, force: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyForce(body:force:position:)``. + @_documentation(visibility: public) + open func _bodyApplyForce(body: RID, force: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyApplyTorque(body:torque:)``. + @_documentation(visibility: public) + open func _bodyApplyTorque(body: RID, torque: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodyAddConstantCentralForce(body:force:)``. + @_documentation(visibility: public) + open func _bodyAddConstantCentralForce(body: RID, force: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyAddConstantForce(body:force:position:)``. + @_documentation(visibility: public) + open func _bodyAddConstantForce(body: RID, force: Vector2, position: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyAddConstantTorque(body:torque:)``. + @_documentation(visibility: public) + open func _bodyAddConstantTorque(body: RID, torque: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetConstantForce(body:force:)``. + @_documentation(visibility: public) + open func _bodySetConstantForce(body: RID, force: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetConstantForce(body:)``. + @_documentation(visibility: public) + open func _bodyGetConstantForce(body: RID) -> Vector2 { + return Vector2 () + } + + /// Overridable version of ``PhysicsServer2D/bodySetConstantTorque(body:torque:)``. + @_documentation(visibility: public) + open func _bodySetConstantTorque(body: RID, torque: Double) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetConstantTorque(body:)``. + @_documentation(visibility: public) + open func _bodyGetConstantTorque(body: RID) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetAxisVelocity(body:axisVelocity:)``. + @_documentation(visibility: public) + open func _bodySetAxisVelocity(body: RID, axisVelocity: Vector2) { + } + + /// Overridable version of ``PhysicsServer2D/bodyAddCollisionException(body:exceptedBody:)``. + @_documentation(visibility: public) + open func _bodyAddCollisionException(body: RID, exceptedBody: RID) { + } + + /// Overridable version of ``PhysicsServer2D/bodyRemoveCollisionException(body:exceptedBody:)``. + @_documentation(visibility: public) + open func _bodyRemoveCollisionException(body: RID, exceptedBody: RID) { + } + + /// Returns the ``RID``s of all bodies added as collision exceptions for the given `body`. See also ``_bodyAddCollisionException(body:exceptedBody:)`` and ``_bodyRemoveCollisionException(body:exceptedBody:)``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `body_get_collision_exceptions` method. Corresponds to ``PhysicsBody2D/getCollisionExceptions()``. + /// + @_documentation(visibility: public) + open func _bodyGetCollisionExceptions(body: RID) -> VariantCollection { + return VariantCollection() + } + + /// Overridable version of ``PhysicsServer2D/bodySetMaxContactsReported(body:amount:)``. + @_documentation(visibility: public) + open func _bodySetMaxContactsReported(body: RID, amount: Int32) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetMaxContactsReported(body:)``. + @_documentation(visibility: public) + open func _bodyGetMaxContactsReported(body: RID) -> Int32 { + return 0 + } + + /// Overridable version of ``PhysicsServer2D``'s internal `body_set_contacts_reported_depth_threshold` method. + /// + /// > Note: This method is currently unused by Godot's default physics implementation. + /// + @_documentation(visibility: public) + open func _bodySetContactsReportedDepthThreshold(body: RID, threshold: Double) { + } + + /// Overridable version of ``PhysicsServer2D``'s internal `body_get_contacts_reported_depth_threshold` method. + /// + /// > Note: This method is currently unused by Godot's default physics implementation. + /// + @_documentation(visibility: public) + open func _bodyGetContactsReportedDepthThreshold(body: RID) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/bodySetOmitForceIntegration(body:enable:)``. + @_documentation(visibility: public) + open func _bodySetOmitForceIntegration(body: RID, enable: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/bodyIsOmittingForceIntegration(body:)``. + @_documentation(visibility: public) + open func _bodyIsOmittingForceIntegration(body: RID) -> Bool { + return false + } + + /// Assigns the `body` to call the given `callable` during the synchronization phase of the loop, before ``_step(_:)`` is called. See also ``_sync()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `body_set_state_sync_callback` method. + /// + @_documentation(visibility: public) + open func _bodySetStateSyncCallback(body: RID, callable: Callable) { + } + + /// Overridable version of ``PhysicsServer2D/bodySetForceIntegrationCallback(body:callable:userdata:)``. + @_documentation(visibility: public) + open func _bodySetForceIntegrationCallback(body: RID, callable: Callable, userdata: Variant?) { + } + + /// If set to `true`, allows the body with the given ``RID`` to detect mouse inputs when the mouse cursor is hovering on it. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `body_set_pickable` method. Corresponds to ``CollisionObject2D/inputPickable``. + /// + @_documentation(visibility: public) + open func _bodySetPickable(body: RID, pickable: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/bodyGetDirectState(body:)``. + @_documentation(visibility: public) + open func _bodyGetDirectState(body: RID) -> PhysicsDirectBodyState2D? { + return PhysicsDirectBodyState2D () + } + + /// Overridable version of ``PhysicsServer2D/jointCreate()``. + @_documentation(visibility: public) + open func _jointCreate() -> RID { + return RID () + } + + /// Overridable version of ``PhysicsServer2D/jointClear(joint:)``. + @_documentation(visibility: public) + open func _jointClear(joint: RID) { + } + + /// Overridable version of ``PhysicsServer2D/jointSetParam(joint:param:value:)``. + @_documentation(visibility: public) + open func _jointSetParam(joint: RID, param: PhysicsServer2D.JointParam, value: Double) { + } + + /// Overridable version of ``PhysicsServer2D/jointGetParam(joint:param:)``. + @_documentation(visibility: public) + open func _jointGetParam(joint: RID, param: PhysicsServer2D.JointParam) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/jointDisableCollisionsBetweenBodies(joint:disable:)``. + @_documentation(visibility: public) + open func _jointDisableCollisionsBetweenBodies(joint: RID, disable: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/jointIsDisabledCollisionsBetweenBodies(joint:)``. + @_documentation(visibility: public) + open func _jointIsDisabledCollisionsBetweenBodies(joint: RID) -> Bool { + return false + } + + /// Overridable version of ``PhysicsServer2D/jointMakePin(joint:anchor:bodyA:bodyB:)``. + @_documentation(visibility: public) + open func _jointMakePin(joint: RID, anchor: Vector2, bodyA: RID, bodyB: RID) { + } + + /// Overridable version of ``PhysicsServer2D/jointMakeGroove(joint:groove1A:groove2A:anchorB:bodyA:bodyB:)``. + @_documentation(visibility: public) + open func _jointMakeGroove(joint: RID, aGroove1: Vector2, aGroove2: Vector2, bAnchor: Vector2, bodyA: RID, bodyB: RID) { + } + + /// Overridable version of ``PhysicsServer2D/jointMakeDampedSpring(joint:anchorA:anchorB:bodyA:bodyB:)``. + @_documentation(visibility: public) + open func _jointMakeDampedSpring(joint: RID, anchorA: Vector2, anchorB: Vector2, bodyA: RID, bodyB: RID) { + } + + /// Overridable version of ``PhysicsServer2D/pinJointSetFlag(joint:flag:enabled:)``. + @_documentation(visibility: public) + open func _pinJointSetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: Bool) { + } + + /// Overridable version of ``PhysicsServer2D/pinJointGetFlag(joint:flag:)``. + @_documentation(visibility: public) + open func _pinJointGetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag) -> Bool { + return false + } + + /// Overridable version of ``PhysicsServer2D/pinJointSetParam(joint:param:value:)``. + @_documentation(visibility: public) + open func _pinJointSetParam(joint: RID, param: PhysicsServer2D.PinJointParam, value: Double) { + } + + /// Overridable version of ``PhysicsServer2D/pinJointGetParam(joint:param:)``. + @_documentation(visibility: public) + open func _pinJointGetParam(joint: RID, param: PhysicsServer2D.PinJointParam) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/dampedSpringJointSetParam(joint:param:value:)``. + @_documentation(visibility: public) + open func _dampedSpringJointSetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: Double) { + } + + /// Overridable version of ``PhysicsServer2D/dampedSpringJointGetParam(joint:param:)``. + @_documentation(visibility: public) + open func _dampedSpringJointGetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam) -> Double { + return 0.0 + } + + /// Overridable version of ``PhysicsServer2D/jointGetType(joint:)``. + @_documentation(visibility: public) + open func _jointGetType(joint: RID) -> PhysicsServer2D.JointType { + return PhysicsServer2D.JointType(rawValue: 0)! + } + + /// Overridable version of ``PhysicsServer2D/freeRid(_:)``. + @_documentation(visibility: public) + open func _freeRid(_ rid: RID) { + } + + /// Overridable version of ``PhysicsServer2D/setActive(_:)``. + @_documentation(visibility: public) + open func _setActive(_ active: Bool) { + } + + /// Called when the main loop is initialized and creates a new instance of this physics server. See also ``MainLoop/_initialize()`` and ``_finish()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `init` method. + /// + @_documentation(visibility: public) + open func _init() { + } + + /// Called every physics step to process the physics simulation. `step` is the time elapsed since the last physics step, in seconds. It is usually the same as ``Node/getPhysicsProcessDeltaTime()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal [code skip-lint]step` method. + /// + @_documentation(visibility: public) + open func _step(_ step: Double) { + } + + /// Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also ``_endSync()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `sync` method. + /// + @_documentation(visibility: public) + open func _sync() { + } + + /// Called every physics step before ``_step(_:)`` to process all remaining queries. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `flush_queries` method. + /// + @_documentation(visibility: public) + open func _flushQueries() { + } + + /// Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also ``_sync()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `end_sync` method. + /// + @_documentation(visibility: public) + open func _endSync() { + } + + /// Called when the main loop finalizes to shut down the physics server. See also ``MainLoop/_finalize()`` and ``_init()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `finish` method. + /// + @_documentation(visibility: public) + open func _finish() { + } + + /// Overridable method that should return `true` when the physics server is processing queries. See also ``_flushQueries()``. + /// + /// Overridable version of ``PhysicsServer2D``'s internal `is_flushing_queries` method. + /// + @_documentation(visibility: public) + open func _isFlushingQueries() -> Bool { + return false + } + + /// Overridable version of ``PhysicsServer2D/getProcessInfo(_:)``. + @_documentation(visibility: public) + open func _getProcessInfo(_ processInfo: PhysicsServer2D.ProcessInfo) -> Int32 { + return 0 + } + + fileprivate static var method_body_test_motion_is_excluding_body: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion_is_excluding_body") + return withUnsafePointer(to: &PhysicsServer2DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the body with the given ``RID`` is being excluded from ``_bodyTestMotion(body:from:motion:margin:collideSeparationRay:recoveryAsCollision:result:)``. See also ``Object/getInstanceId()``. + public final func bodyTestMotionIsExcludingBody(_ body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer2DExtension.method_body_test_motion_is_excluding_body, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_test_motion_is_excluding_object: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion_is_excluding_object") + return withUnsafePointer(to: &PhysicsServer2DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the object with the given instance ID is being excluded from ``_bodyTestMotion(body:from:motion:margin:collideSeparationRay:recoveryAsCollision:result:)``. See also ``Object/getInstanceId()``. + public final func bodyTestMotionIsExcludingObject(_ object: UInt) -> Bool { + var _result: Bool = false + withUnsafePointer(to: object) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer2DExtension.method_body_test_motion_is_excluding_object, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_area_add_shape": + return _PhysicsServer2DExtension_proxy_area_add_shape + case "_area_attach_canvas_instance_id": + return _PhysicsServer2DExtension_proxy_area_attach_canvas_instance_id + case "_area_attach_object_instance_id": + return _PhysicsServer2DExtension_proxy_area_attach_object_instance_id + case "_area_clear_shapes": + return _PhysicsServer2DExtension_proxy_area_clear_shapes + case "_area_create": + return _PhysicsServer2DExtension_proxy_area_create + case "_area_get_canvas_instance_id": + return _PhysicsServer2DExtension_proxy_area_get_canvas_instance_id + case "_area_get_collision_layer": + return _PhysicsServer2DExtension_proxy_area_get_collision_layer + case "_area_get_collision_mask": + return _PhysicsServer2DExtension_proxy_area_get_collision_mask + case "_area_get_object_instance_id": + return _PhysicsServer2DExtension_proxy_area_get_object_instance_id + case "_area_get_param": + return _PhysicsServer2DExtension_proxy_area_get_param + case "_area_get_shape": + return _PhysicsServer2DExtension_proxy_area_get_shape + case "_area_get_shape_count": + return _PhysicsServer2DExtension_proxy_area_get_shape_count + case "_area_get_shape_transform": + return _PhysicsServer2DExtension_proxy_area_get_shape_transform + case "_area_get_space": + return _PhysicsServer2DExtension_proxy_area_get_space + case "_area_get_transform": + return _PhysicsServer2DExtension_proxy_area_get_transform + case "_area_remove_shape": + return _PhysicsServer2DExtension_proxy_area_remove_shape + case "_area_set_area_monitor_callback": + return _PhysicsServer2DExtension_proxy_area_set_area_monitor_callback + case "_area_set_collision_layer": + return _PhysicsServer2DExtension_proxy_area_set_collision_layer + case "_area_set_collision_mask": + return _PhysicsServer2DExtension_proxy_area_set_collision_mask + case "_area_set_monitor_callback": + return _PhysicsServer2DExtension_proxy_area_set_monitor_callback + case "_area_set_monitorable": + return _PhysicsServer2DExtension_proxy_area_set_monitorable + case "_area_set_param": + return _PhysicsServer2DExtension_proxy_area_set_param + case "_area_set_pickable": + return _PhysicsServer2DExtension_proxy_area_set_pickable + case "_area_set_shape": + return _PhysicsServer2DExtension_proxy_area_set_shape + case "_area_set_shape_disabled": + return _PhysicsServer2DExtension_proxy_area_set_shape_disabled + case "_area_set_shape_transform": + return _PhysicsServer2DExtension_proxy_area_set_shape_transform + case "_area_set_space": + return _PhysicsServer2DExtension_proxy_area_set_space + case "_area_set_transform": + return _PhysicsServer2DExtension_proxy_area_set_transform + case "_body_add_collision_exception": + return _PhysicsServer2DExtension_proxy_body_add_collision_exception + case "_body_add_constant_central_force": + return _PhysicsServer2DExtension_proxy_body_add_constant_central_force + case "_body_add_constant_force": + return _PhysicsServer2DExtension_proxy_body_add_constant_force + case "_body_add_constant_torque": + return _PhysicsServer2DExtension_proxy_body_add_constant_torque + case "_body_add_shape": + return _PhysicsServer2DExtension_proxy_body_add_shape + case "_body_apply_central_force": + return _PhysicsServer2DExtension_proxy_body_apply_central_force + case "_body_apply_central_impulse": + return _PhysicsServer2DExtension_proxy_body_apply_central_impulse + case "_body_apply_force": + return _PhysicsServer2DExtension_proxy_body_apply_force + case "_body_apply_impulse": + return _PhysicsServer2DExtension_proxy_body_apply_impulse + case "_body_apply_torque": + return _PhysicsServer2DExtension_proxy_body_apply_torque + case "_body_apply_torque_impulse": + return _PhysicsServer2DExtension_proxy_body_apply_torque_impulse + case "_body_attach_canvas_instance_id": + return _PhysicsServer2DExtension_proxy_body_attach_canvas_instance_id + case "_body_attach_object_instance_id": + return _PhysicsServer2DExtension_proxy_body_attach_object_instance_id + case "_body_clear_shapes": + return _PhysicsServer2DExtension_proxy_body_clear_shapes + case "_body_create": + return _PhysicsServer2DExtension_proxy_body_create + case "_body_get_canvas_instance_id": + return _PhysicsServer2DExtension_proxy_body_get_canvas_instance_id + case "_body_get_collision_exceptions": + return _PhysicsServer2DExtension_proxy_body_get_collision_exceptions + case "_body_get_collision_layer": + return _PhysicsServer2DExtension_proxy_body_get_collision_layer + case "_body_get_collision_mask": + return _PhysicsServer2DExtension_proxy_body_get_collision_mask + case "_body_get_collision_priority": + return _PhysicsServer2DExtension_proxy_body_get_collision_priority + case "_body_get_constant_force": + return _PhysicsServer2DExtension_proxy_body_get_constant_force + case "_body_get_constant_torque": + return _PhysicsServer2DExtension_proxy_body_get_constant_torque + case "_body_get_contacts_reported_depth_threshold": + return _PhysicsServer2DExtension_proxy_body_get_contacts_reported_depth_threshold + case "_body_get_continuous_collision_detection_mode": + return _PhysicsServer2DExtension_proxy_body_get_continuous_collision_detection_mode + case "_body_get_direct_state": + return _PhysicsServer2DExtension_proxy_body_get_direct_state + case "_body_get_max_contacts_reported": + return _PhysicsServer2DExtension_proxy_body_get_max_contacts_reported + case "_body_get_mode": + return _PhysicsServer2DExtension_proxy_body_get_mode + case "_body_get_object_instance_id": + return _PhysicsServer2DExtension_proxy_body_get_object_instance_id + case "_body_get_param": + return _PhysicsServer2DExtension_proxy_body_get_param + case "_body_get_shape": + return _PhysicsServer2DExtension_proxy_body_get_shape + case "_body_get_shape_count": + return _PhysicsServer2DExtension_proxy_body_get_shape_count + case "_body_get_shape_transform": + return _PhysicsServer2DExtension_proxy_body_get_shape_transform + case "_body_get_space": + return _PhysicsServer2DExtension_proxy_body_get_space + case "_body_get_state": + return _PhysicsServer2DExtension_proxy_body_get_state + case "_body_is_omitting_force_integration": + return _PhysicsServer2DExtension_proxy_body_is_omitting_force_integration + case "_body_remove_collision_exception": + return _PhysicsServer2DExtension_proxy_body_remove_collision_exception + case "_body_remove_shape": + return _PhysicsServer2DExtension_proxy_body_remove_shape + case "_body_reset_mass_properties": + return _PhysicsServer2DExtension_proxy_body_reset_mass_properties + case "_body_set_axis_velocity": + return _PhysicsServer2DExtension_proxy_body_set_axis_velocity + case "_body_set_collision_layer": + return _PhysicsServer2DExtension_proxy_body_set_collision_layer + case "_body_set_collision_mask": + return _PhysicsServer2DExtension_proxy_body_set_collision_mask + case "_body_set_collision_priority": + return _PhysicsServer2DExtension_proxy_body_set_collision_priority + case "_body_set_constant_force": + return _PhysicsServer2DExtension_proxy_body_set_constant_force + case "_body_set_constant_torque": + return _PhysicsServer2DExtension_proxy_body_set_constant_torque + case "_body_set_contacts_reported_depth_threshold": + return _PhysicsServer2DExtension_proxy_body_set_contacts_reported_depth_threshold + case "_body_set_continuous_collision_detection_mode": + return _PhysicsServer2DExtension_proxy_body_set_continuous_collision_detection_mode + case "_body_set_force_integration_callback": + return _PhysicsServer2DExtension_proxy_body_set_force_integration_callback + case "_body_set_max_contacts_reported": + return _PhysicsServer2DExtension_proxy_body_set_max_contacts_reported + case "_body_set_mode": + return _PhysicsServer2DExtension_proxy_body_set_mode + case "_body_set_omit_force_integration": + return _PhysicsServer2DExtension_proxy_body_set_omit_force_integration + case "_body_set_param": + return _PhysicsServer2DExtension_proxy_body_set_param + case "_body_set_pickable": + return _PhysicsServer2DExtension_proxy_body_set_pickable + case "_body_set_shape": + return _PhysicsServer2DExtension_proxy_body_set_shape + case "_body_set_shape_as_one_way_collision": + return _PhysicsServer2DExtension_proxy_body_set_shape_as_one_way_collision + case "_body_set_shape_disabled": + return _PhysicsServer2DExtension_proxy_body_set_shape_disabled + case "_body_set_shape_transform": + return _PhysicsServer2DExtension_proxy_body_set_shape_transform + case "_body_set_space": + return _PhysicsServer2DExtension_proxy_body_set_space + case "_body_set_state": + return _PhysicsServer2DExtension_proxy_body_set_state + case "_body_set_state_sync_callback": + return _PhysicsServer2DExtension_proxy_body_set_state_sync_callback + case "_capsule_shape_create": + return _PhysicsServer2DExtension_proxy_capsule_shape_create + case "_circle_shape_create": + return _PhysicsServer2DExtension_proxy_circle_shape_create + case "_concave_polygon_shape_create": + return _PhysicsServer2DExtension_proxy_concave_polygon_shape_create + case "_convex_polygon_shape_create": + return _PhysicsServer2DExtension_proxy_convex_polygon_shape_create + case "_damped_spring_joint_get_param": + return _PhysicsServer2DExtension_proxy_damped_spring_joint_get_param + case "_damped_spring_joint_set_param": + return _PhysicsServer2DExtension_proxy_damped_spring_joint_set_param + case "_end_sync": + return _PhysicsServer2DExtension_proxy_end_sync + case "_finish": + return _PhysicsServer2DExtension_proxy_finish + case "_flush_queries": + return _PhysicsServer2DExtension_proxy_flush_queries + case "_free_rid": + return _PhysicsServer2DExtension_proxy_free_rid + case "_get_process_info": + return _PhysicsServer2DExtension_proxy_get_process_info + case "_init": + return _PhysicsServer2DExtension_proxy_init + case "_is_flushing_queries": + return _PhysicsServer2DExtension_proxy_is_flushing_queries + case "_joint_clear": + return _PhysicsServer2DExtension_proxy_joint_clear + case "_joint_create": + return _PhysicsServer2DExtension_proxy_joint_create + case "_joint_disable_collisions_between_bodies": + return _PhysicsServer2DExtension_proxy_joint_disable_collisions_between_bodies + case "_joint_get_param": + return _PhysicsServer2DExtension_proxy_joint_get_param + case "_joint_get_type": + return _PhysicsServer2DExtension_proxy_joint_get_type + case "_joint_is_disabled_collisions_between_bodies": + return _PhysicsServer2DExtension_proxy_joint_is_disabled_collisions_between_bodies + case "_joint_make_damped_spring": + return _PhysicsServer2DExtension_proxy_joint_make_damped_spring + case "_joint_make_groove": + return _PhysicsServer2DExtension_proxy_joint_make_groove + case "_joint_make_pin": + return _PhysicsServer2DExtension_proxy_joint_make_pin + case "_joint_set_param": + return _PhysicsServer2DExtension_proxy_joint_set_param + case "_pin_joint_get_flag": + return _PhysicsServer2DExtension_proxy_pin_joint_get_flag + case "_pin_joint_get_param": + return _PhysicsServer2DExtension_proxy_pin_joint_get_param + case "_pin_joint_set_flag": + return _PhysicsServer2DExtension_proxy_pin_joint_set_flag + case "_pin_joint_set_param": + return _PhysicsServer2DExtension_proxy_pin_joint_set_param + case "_rectangle_shape_create": + return _PhysicsServer2DExtension_proxy_rectangle_shape_create + case "_segment_shape_create": + return _PhysicsServer2DExtension_proxy_segment_shape_create + case "_separation_ray_shape_create": + return _PhysicsServer2DExtension_proxy_separation_ray_shape_create + case "_set_active": + return _PhysicsServer2DExtension_proxy_set_active + case "_shape_get_custom_solver_bias": + return _PhysicsServer2DExtension_proxy_shape_get_custom_solver_bias + case "_shape_get_data": + return _PhysicsServer2DExtension_proxy_shape_get_data + case "_shape_get_type": + return _PhysicsServer2DExtension_proxy_shape_get_type + case "_shape_set_custom_solver_bias": + return _PhysicsServer2DExtension_proxy_shape_set_custom_solver_bias + case "_shape_set_data": + return _PhysicsServer2DExtension_proxy_shape_set_data + case "_space_create": + return _PhysicsServer2DExtension_proxy_space_create + case "_space_get_contact_count": + return _PhysicsServer2DExtension_proxy_space_get_contact_count + case "_space_get_contacts": + return _PhysicsServer2DExtension_proxy_space_get_contacts + case "_space_get_direct_state": + return _PhysicsServer2DExtension_proxy_space_get_direct_state + case "_space_get_param": + return _PhysicsServer2DExtension_proxy_space_get_param + case "_space_is_active": + return _PhysicsServer2DExtension_proxy_space_is_active + case "_space_set_active": + return _PhysicsServer2DExtension_proxy_space_set_active + case "_space_set_debug_contacts": + return _PhysicsServer2DExtension_proxy_space_set_debug_contacts + case "_space_set_param": + return _PhysicsServer2DExtension_proxy_space_set_param + case "_step": + return _PhysicsServer2DExtension_proxy_step + case "_sync": + return _PhysicsServer2DExtension_proxy_sync + case "_world_boundary_shape_create": + return _PhysicsServer2DExtension_proxy_world_boundary_shape_create + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsServer2DExtension_proxy_area_add_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaAddShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shape: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [2]!.assumingMemoryBound (to: Transform2D.self).pointee, disabled: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_attach_canvas_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaAttachCanvasInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_attach_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaAttachObjectInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_clear_shapes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaClearShapes (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_area_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_area_get_canvas_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetCanvasInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetCollisionLayer (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetCollisionMask (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetObjectInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetParam (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.AreaParameter.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer2DExtension_proxy_area_get_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_area_get_shape_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShapeCount (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShapeTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform2D.self) +} + +func _PhysicsServer2DExtension_proxy_area_get_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetSpace (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_area_get_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Transform2D.self) +} + +func _PhysicsServer2DExtension_proxy_area_remove_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaRemoveShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_area_monitor_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetAreaMonitorCallback (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callback: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_area_set_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetCollisionLayer (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), layer: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetCollisionMask (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mask: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_monitor_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetMonitorCallback (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callback: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_area_set_monitorable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetMonitorable (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), monitorable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetParam (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.AreaParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_pickable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetPickable (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pickable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, shape: RID (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_area_set_shape_disabled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShapeDisabled (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, disabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShapeTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [2]!.assumingMemoryBound (to: Transform2D.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_area_set_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetSpace (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), space: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_area_set_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [1]!.assumingMemoryBound (to: Transform2D.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_add_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), exceptedBody: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_add_constant_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantCentralForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_add_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_add_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_add_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shape: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [2]!.assumingMemoryBound (to: Transform2D.self).pointee, disabled: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyCentralForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_central_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyCentralImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_apply_torque_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyTorqueImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_attach_canvas_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAttachCanvasInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_attach_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAttachObjectInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_clear_shapes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyClearShapes (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_body_get_canvas_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCanvasInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_collision_exceptions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionExceptions (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::RID +} + +func _PhysicsServer2DExtension_proxy_body_get_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_collision_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionPriority (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Vector2.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_contacts_reported_depth_threshold (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetContactsReportedDepthThreshold (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_continuous_collision_detection_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetContinuousCollisionDetectionMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_direct_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetDirectState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectBodyState2D +} + +func _PhysicsServer2DExtension_proxy_body_get_max_contacts_reported (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetMaxContactsReported (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetObjectInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetParam (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.BodyParameter.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer2DExtension_proxy_body_get_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_body_get_shape_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShapeCount (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShapeTransform (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform2D.self) +} + +func _PhysicsServer2DExtension_proxy_body_get_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_body_get_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer2D.BodyState.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer2DExtension_proxy_body_is_omitting_force_integration (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyIsOmittingForceIntegration (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer2DExtension_proxy_body_remove_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyRemoveCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), exceptedBody: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_remove_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyRemoveShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_reset_mass_properties (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyResetMassProperties (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_set_axis_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetAxisVelocity (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axisVelocity: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), layer: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mask: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_collision_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionPriority (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), priority: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector2.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_contacts_reported_depth_threshold (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetContactsReportedDepthThreshold (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), threshold: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_continuous_collision_detection_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetContinuousCollisionDetectionMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mode: args [1]!.assumingMemoryBound (to: PhysicsServer2D.CCDMode.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_force_integration_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetForceIntegrationCallback (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callable: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), userdata: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_max_contacts_reported (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetMaxContactsReported (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), amount: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mode: args [1]!.assumingMemoryBound (to: PhysicsServer2D.BodyMode.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_omit_force_integration (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetOmitForceIntegration (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetParam (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.BodyParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_pickable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetPickable (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pickable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, shape: RID (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_set_shape_as_one_way_collision (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShapeAsOneWayCollision (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, enable: args [2]!.assumingMemoryBound (to: Bool.self).pointee, margin: args [3]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_shape_disabled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShapeDisabled (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, disabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShapeTransform (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [2]!.assumingMemoryBound (to: Transform2D.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), space: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_body_set_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer2D.BodyState.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_body_set_state_sync_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetStateSyncCallback (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callable: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_capsule_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._capsuleShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_circle_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._circleShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_concave_polygon_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._concavePolygonShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_convex_polygon_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._convexPolygonShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_damped_spring_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._dampedSpringJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.DampedSpringParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_damped_spring_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._dampedSpringJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.DampedSpringParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_end_sync (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._endSync () +} + +func _PhysicsServer2DExtension_proxy_finish (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._finish () +} + +func _PhysicsServer2DExtension_proxy_flush_queries (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._flushQueries () +} + +func _PhysicsServer2DExtension_proxy_free_rid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._freeRid (RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_get_process_info (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getProcessInfo (args [0]!.assumingMemoryBound (to: PhysicsServer2D.ProcessInfo.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_init (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._init () +} + +func _PhysicsServer2DExtension_proxy_is_flushing_queries (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isFlushingQueries () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer2DExtension_proxy_joint_clear (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointClear (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_joint_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_joint_disable_collisions_between_bodies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointDisableCollisionsBetweenBodies (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), disable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.JointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_joint_get_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointGetType (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_joint_is_disabled_collisions_between_bodies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointIsDisabledCollisionsBetweenBodies (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer2DExtension_proxy_joint_make_damped_spring (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeDampedSpring (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), anchorA: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, anchorB: args [2]!.assumingMemoryBound (to: Vector2.self).pointee, bodyA: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), bodyB: RID (content: args [4]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_joint_make_groove (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeGroove (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), aGroove1: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, aGroove2: args [2]!.assumingMemoryBound (to: Vector2.self).pointee, bAnchor: args [3]!.assumingMemoryBound (to: Vector2.self).pointee, bodyA: RID (content: args [4]!.assumingMemoryBound (to: Int64.self).pointee), bodyB: RID (content: args [5]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_joint_make_pin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakePin (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), anchor: args [1]!.assumingMemoryBound (to: Vector2.self).pointee, bodyA: RID (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee), bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer2DExtension_proxy_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.JointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_pin_joint_get_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._pinJointGetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), flag: args [1]!.assumingMemoryBound (to: PhysicsServer2D.PinJointFlag.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer2DExtension_proxy_pin_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._pinJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.PinJointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_pin_joint_set_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pinJointSetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), flag: args [1]!.assumingMemoryBound (to: PhysicsServer2D.PinJointFlag.self).pointee, enabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_pin_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pinJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.PinJointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_rectangle_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._rectangleShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_segment_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._segmentShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_separation_ray_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._separationRayShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_set_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setActive (args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_shape_get_custom_solver_bias (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetCustomSolverBias (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_shape_get_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetData (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer2DExtension_proxy_shape_get_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetType (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_shape_set_custom_solver_bias (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._shapeSetCustomSolverBias (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bias: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_shape_set_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._shapeSetData (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), data: args [1]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_space_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer2DExtension_proxy_space_get_contact_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetContactCount (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer2DExtension_proxy_space_get_contacts (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetContacts (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedVector2Array + ret.content = PackedVector2Array.zero +} + +func _PhysicsServer2DExtension_proxy_space_get_direct_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetDirectState (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectSpaceState2D +} + +func _PhysicsServer2DExtension_proxy_space_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetParam (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.SpaceParameter.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer2DExtension_proxy_space_is_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceIsActive (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer2DExtension_proxy_space_set_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetActive (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), active: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_space_set_debug_contacts (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetDebugContacts (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), maxContacts: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_space_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetParam (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer2D.SpaceParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_step (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._step (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer2DExtension_proxy_sync (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._sync () +} + +func _PhysicsServer2DExtension_proxy_world_boundary_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._worldBoundaryShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer2DManager.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer2DManager.swift new file mode 100644 index 000000000..5d070f999 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer2DManager.swift @@ -0,0 +1,99 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton for managing ``PhysicsServer2D`` implementations. +/// +/// ``PhysicsServer2DManager`` is the API for registering ``PhysicsServer2D`` implementations and for setting the default implementation. +/// +/// > Note: It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. +/// +open class PhysicsServer2DManager: Object { + /// The shared instance of this class + public static var shared: PhysicsServer2DManager = { + return withUnsafePointer (to: &PhysicsServer2DManager.godotClassName.content) { ptr in + PhysicsServer2DManager (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "PhysicsServer2DManager" } + /* Methods */ + fileprivate static var method_register_server: GDExtensionMethodBindPtr = { + let methodName = StringName("register_server") + return withUnsafePointer(to: &PhysicsServer2DManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2137474292)! + } + + } + + }() + + /// Register a ``PhysicsServer2D`` implementation by passing a `name` and a ``Callable`` that returns a ``PhysicsServer2D`` object. + public static func registerServer(name: String, createCallback: Callable) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: createCallback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_server, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_default_server: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_server") + return withUnsafePointer(to: &PhysicsServer2DManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Set the default ``PhysicsServer2D`` implementation to the one identified by `name`, if `priority` is greater than the priority of the current default implementation. + public static func setDefaultServer(name: String, priority: Int32) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_default_server, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer3D.swift new file mode 100644 index 000000000..08baee6b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer3D.swift @@ -0,0 +1,5587 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A server interface for low-level 3D physics access. +/// +/// PhysicsServer3D is the server responsible for all 3D physics. It can directly create and manipulate all physics objects: +/// +/// - A _space_ is a self-contained world for a physics simulation. It contains bodies, areas, and joints. Its state can be queried for collision and intersection information, and several parameters of the simulation can be modified. +/// +/// - A _shape_ is a geometric shape such as a sphere, a box, a cylinder, or a polygon. It can be used for collision detection by adding it to a body/area, possibly with an extra transformation relative to the body/area's origin. Bodies/areas can have multiple (transformed) shapes added to them, and a single shape can be added to bodies/areas multiple times with different local transformations. +/// +/// - A _body_ is a physical object which can be in static, kinematic, or rigid mode. Its state (such as position and velocity) can be queried and updated. A force integration callback can be set to customize the body's physics. +/// +/// - An _area_ is a region in space which can be used to detect bodies and areas entering and exiting it. A body monitoring callback can be set to report entering/exiting body shapes, and similarly an area monitoring callback can be set. Gravity and damping can be overridden within the area by setting area parameters. +/// +/// - A _joint_ is a constraint, either between two bodies or on one body relative to a point. Parameters such as the joint bias and the rest length of a spring joint can be adjusted. +/// +/// Physics objects in ``PhysicsServer3D`` may be created and manipulated independently; they do not have to be tied to nodes in the scene tree. +/// +/// > Note: All the 3D physics nodes use the physics server internally. Adding a physics node to the scene tree will cause a corresponding physics object to be created in the physics server. A rigid body node registers a callback that updates the node's transform with the transform of the respective body object in the physics server (every physics update). An area node registers a callback to inform the area node about overlaps with the respective area object in the physics server. The raycast node queries the direct state of the relevant space in the physics server. +/// +open class PhysicsServer3D: Object { + /// The shared instance of this class + public static var shared: PhysicsServer3D = { + return withUnsafePointer (to: &PhysicsServer3D.godotClassName.content) { ptr in + lookupObject (nativeHandle: gi.global_get_singleton (ptr)!)! + } + + }() + + override open class var godotClassName: StringName { "PhysicsServer3D" } + public enum JointType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``Joint3D`` is a ``PinJoint3D``. + case pin = 0 // JOINT_TYPE_PIN + /// The ``Joint3D`` is a ``HingeJoint3D``. + case hinge = 1 // JOINT_TYPE_HINGE + /// The ``Joint3D`` is a ``SliderJoint3D``. + case slider = 2 // JOINT_TYPE_SLIDER + /// The ``Joint3D`` is a ``ConeTwistJoint3D``. + case coneTwist = 3 // JOINT_TYPE_CONE_TWIST + /// The ``Joint3D`` is a ``Generic6DOFJoint3D``. + case jointType6dof = 4 // JOINT_TYPE_6DOF + /// Represents the size of the ``PhysicsServer3D/JointType`` enum. + case max = 5 // JOINT_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .pin: return ".pin" + case .hinge: return ".hinge" + case .slider: return ".slider" + case .coneTwist: return ".coneTwist" + case .jointType6dof: return ".jointType6dof" + case .max: return ".max" + } + + } + + } + + public enum PinJointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// The strength with which the pinned objects try to stay in positional relation to each other. + /// + /// The higher, the stronger. + /// + case bias = 0 // PIN_JOINT_BIAS + /// The strength with which the pinned objects try to stay in velocity relation to each other. + /// + /// The higher, the stronger. + /// + case damping = 1 // PIN_JOINT_DAMPING + /// If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. + case impulseClamp = 2 // PIN_JOINT_IMPULSE_CLAMP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bias: return ".bias" + case .damping: return ".damping" + case .impulseClamp: return ".impulseClamp" + } + + } + + } + + public enum HingeJointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// The speed with which the two bodies get pulled together when they move in different directions. + case bias = 0 // HINGE_JOINT_BIAS + /// The maximum rotation across the Hinge. + case limitUpper = 1 // HINGE_JOINT_LIMIT_UPPER + /// The minimum rotation across the Hinge. + case limitLower = 2 // HINGE_JOINT_LIMIT_LOWER + /// The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + case limitBias = 3 // HINGE_JOINT_LIMIT_BIAS + /// + case limitSoftness = 4 // HINGE_JOINT_LIMIT_SOFTNESS + /// The lower this value, the more the rotation gets slowed down. + case limitRelaxation = 5 // HINGE_JOINT_LIMIT_RELAXATION + /// Target speed for the motor. + case motorTargetVelocity = 6 // HINGE_JOINT_MOTOR_TARGET_VELOCITY + /// Maximum acceleration for the motor. + case motorMaxImpulse = 7 // HINGE_JOINT_MOTOR_MAX_IMPULSE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bias: return ".bias" + case .limitUpper: return ".limitUpper" + case .limitLower: return ".limitLower" + case .limitBias: return ".limitBias" + case .limitSoftness: return ".limitSoftness" + case .limitRelaxation: return ".limitRelaxation" + case .motorTargetVelocity: return ".motorTargetVelocity" + case .motorMaxImpulse: return ".motorMaxImpulse" + } + + } + + } + + public enum HingeJointFlag: Int64, CaseIterable, CustomDebugStringConvertible { + /// If `true`, the Hinge has a maximum and a minimum rotation. + case useLimit = 0 // HINGE_JOINT_FLAG_USE_LIMIT + /// If `true`, a motor turns the Hinge. + case enableMotor = 1 // HINGE_JOINT_FLAG_ENABLE_MOTOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .useLimit: return ".useLimit" + case .enableMotor: return ".enableMotor" + } + + } + + } + + public enum SliderJointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// The maximum difference between the pivot points on their X axis before damping happens. + case linearLimitUpper = 0 // SLIDER_JOINT_LINEAR_LIMIT_UPPER + /// The minimum difference between the pivot points on their X axis before damping happens. + case linearLimitLower = 1 // SLIDER_JOINT_LINEAR_LIMIT_LOWER + /// A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + case linearLimitSoftness = 2 // SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS + /// The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. + case linearLimitRestitution = 3 // SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION + /// The amount of damping once the slider limits are surpassed. + case linearLimitDamping = 4 // SLIDER_JOINT_LINEAR_LIMIT_DAMPING + /// A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + case linearMotionSoftness = 5 // SLIDER_JOINT_LINEAR_MOTION_SOFTNESS + /// The amount of restitution inside the slider limits. + case linearMotionRestitution = 6 // SLIDER_JOINT_LINEAR_MOTION_RESTITUTION + /// The amount of damping inside the slider limits. + case linearMotionDamping = 7 // SLIDER_JOINT_LINEAR_MOTION_DAMPING + /// A factor applied to the movement across axes orthogonal to the slider. + case linearOrthogonalSoftness = 8 // SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS + /// The amount of restitution when movement is across axes orthogonal to the slider. + case linearOrthogonalRestitution = 9 // SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION + /// The amount of damping when movement is across axes orthogonal to the slider. + case linearOrthogonalDamping = 10 // SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING + /// The upper limit of rotation in the slider. + case angularLimitUpper = 11 // SLIDER_JOINT_ANGULAR_LIMIT_UPPER + /// The lower limit of rotation in the slider. + case angularLimitLower = 12 // SLIDER_JOINT_ANGULAR_LIMIT_LOWER + /// A factor applied to the all rotation once the limit is surpassed. + case angularLimitSoftness = 13 // SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS + /// The amount of restitution of the rotation when the limit is surpassed. + case angularLimitRestitution = 14 // SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION + /// The amount of damping of the rotation when the limit is surpassed. + case angularLimitDamping = 15 // SLIDER_JOINT_ANGULAR_LIMIT_DAMPING + /// A factor that gets applied to the all rotation in the limits. + case angularMotionSoftness = 16 // SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS + /// The amount of restitution of the rotation in the limits. + case angularMotionRestitution = 17 // SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION + /// The amount of damping of the rotation in the limits. + case angularMotionDamping = 18 // SLIDER_JOINT_ANGULAR_MOTION_DAMPING + /// A factor that gets applied to the all rotation across axes orthogonal to the slider. + case angularOrthogonalSoftness = 19 // SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS + /// The amount of restitution of the rotation across axes orthogonal to the slider. + case angularOrthogonalRestitution = 20 // SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION + /// The amount of damping of the rotation across axes orthogonal to the slider. + case angularOrthogonalDamping = 21 // SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING + /// Represents the size of the ``PhysicsServer3D/SliderJointParam`` enum. + case max = 22 // SLIDER_JOINT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linearLimitUpper: return ".linearLimitUpper" + case .linearLimitLower: return ".linearLimitLower" + case .linearLimitSoftness: return ".linearLimitSoftness" + case .linearLimitRestitution: return ".linearLimitRestitution" + case .linearLimitDamping: return ".linearLimitDamping" + case .linearMotionSoftness: return ".linearMotionSoftness" + case .linearMotionRestitution: return ".linearMotionRestitution" + case .linearMotionDamping: return ".linearMotionDamping" + case .linearOrthogonalSoftness: return ".linearOrthogonalSoftness" + case .linearOrthogonalRestitution: return ".linearOrthogonalRestitution" + case .linearOrthogonalDamping: return ".linearOrthogonalDamping" + case .angularLimitUpper: return ".angularLimitUpper" + case .angularLimitLower: return ".angularLimitLower" + case .angularLimitSoftness: return ".angularLimitSoftness" + case .angularLimitRestitution: return ".angularLimitRestitution" + case .angularLimitDamping: return ".angularLimitDamping" + case .angularMotionSoftness: return ".angularMotionSoftness" + case .angularMotionRestitution: return ".angularMotionRestitution" + case .angularMotionDamping: return ".angularMotionDamping" + case .angularOrthogonalSoftness: return ".angularOrthogonalSoftness" + case .angularOrthogonalRestitution: return ".angularOrthogonalRestitution" + case .angularOrthogonalDamping: return ".angularOrthogonalDamping" + case .max: return ".max" + } + + } + + } + + public enum ConeTwistJointParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// Swing is rotation from side to side, around the axis perpendicular to the twist axis. + /// + /// The swing span defines, how much rotation will not get corrected along the swing axis. + /// + /// Could be defined as looseness in the ``ConeTwistJoint3D``. + /// + /// If below 0.05, this behavior is locked. + /// + case swingSpan = 0 // CONE_TWIST_JOINT_SWING_SPAN + /// Twist is the rotation around the twist axis, this value defined how far the joint can twist. + /// + /// Twist is locked if below 0.05. + /// + case twistSpan = 1 // CONE_TWIST_JOINT_TWIST_SPAN + /// The speed with which the swing or twist will take place. + /// + /// The higher, the faster. + /// + case bias = 2 // CONE_TWIST_JOINT_BIAS + /// The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. + case softness = 3 // CONE_TWIST_JOINT_SOFTNESS + /// Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + case relaxation = 4 // CONE_TWIST_JOINT_RELAXATION + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .swingSpan: return ".swingSpan" + case .twistSpan: return ".twistSpan" + case .bias: return ".bias" + case .softness: return ".softness" + case .relaxation: return ".relaxation" + } + + } + + } + + public enum G6DOFJointAxisParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// The minimum difference between the pivot points' axes. + case linearLowerLimit = 0 // G6DOF_JOINT_LINEAR_LOWER_LIMIT + /// The maximum difference between the pivot points' axes. + case linearUpperLimit = 1 // G6DOF_JOINT_LINEAR_UPPER_LIMIT + /// A factor that gets applied to the movement across the axes. The lower, the slower the movement. + case linearLimitSoftness = 2 // G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS + /// The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. + case linearRestitution = 3 // G6DOF_JOINT_LINEAR_RESTITUTION + /// The amount of damping that happens at the linear motion across the axes. + case linearDamping = 4 // G6DOF_JOINT_LINEAR_DAMPING + /// The velocity that the joint's linear motor will attempt to reach. + case linearMotorTargetVelocity = 5 // G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY + /// The maximum force that the linear motor can apply while trying to reach the target velocity. + case linearMotorForceLimit = 6 // G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT + /// + case linearSpringStiffness = 7 // G6DOF_JOINT_LINEAR_SPRING_STIFFNESS + /// + case linearSpringDamping = 8 // G6DOF_JOINT_LINEAR_SPRING_DAMPING + /// + case linearSpringEquilibriumPoint = 9 // G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT + /// The minimum rotation in negative direction to break loose and rotate around the axes. + case angularLowerLimit = 10 // G6DOF_JOINT_ANGULAR_LOWER_LIMIT + /// The minimum rotation in positive direction to break loose and rotate around the axes. + case angularUpperLimit = 11 // G6DOF_JOINT_ANGULAR_UPPER_LIMIT + /// A factor that gets multiplied onto all rotations across the axes. + case angularLimitSoftness = 12 // G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS + /// The amount of rotational damping across the axes. The lower, the more damping occurs. + case angularDamping = 13 // G6DOF_JOINT_ANGULAR_DAMPING + /// The amount of rotational restitution across the axes. The lower, the more restitution occurs. + case angularRestitution = 14 // G6DOF_JOINT_ANGULAR_RESTITUTION + /// The maximum amount of force that can occur, when rotating around the axes. + case angularForceLimit = 15 // G6DOF_JOINT_ANGULAR_FORCE_LIMIT + /// When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + case angularErp = 16 // G6DOF_JOINT_ANGULAR_ERP + /// Target speed for the motor at the axes. + case angularMotorTargetVelocity = 17 // G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY + /// Maximum acceleration for the motor at the axes. + case angularMotorForceLimit = 18 // G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT + /// + case angularSpringStiffness = 19 // G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS + /// + case angularSpringDamping = 20 // G6DOF_JOINT_ANGULAR_SPRING_DAMPING + /// + case angularSpringEquilibriumPoint = 21 // G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT + /// Represents the size of the ``PhysicsServer3D/G6DOFJointAxisParam`` enum. + case max = 22 // G6DOF_JOINT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linearLowerLimit: return ".linearLowerLimit" + case .linearUpperLimit: return ".linearUpperLimit" + case .linearLimitSoftness: return ".linearLimitSoftness" + case .linearRestitution: return ".linearRestitution" + case .linearDamping: return ".linearDamping" + case .linearMotorTargetVelocity: return ".linearMotorTargetVelocity" + case .linearMotorForceLimit: return ".linearMotorForceLimit" + case .linearSpringStiffness: return ".linearSpringStiffness" + case .linearSpringDamping: return ".linearSpringDamping" + case .linearSpringEquilibriumPoint: return ".linearSpringEquilibriumPoint" + case .angularLowerLimit: return ".angularLowerLimit" + case .angularUpperLimit: return ".angularUpperLimit" + case .angularLimitSoftness: return ".angularLimitSoftness" + case .angularDamping: return ".angularDamping" + case .angularRestitution: return ".angularRestitution" + case .angularForceLimit: return ".angularForceLimit" + case .angularErp: return ".angularErp" + case .angularMotorTargetVelocity: return ".angularMotorTargetVelocity" + case .angularMotorForceLimit: return ".angularMotorForceLimit" + case .angularSpringStiffness: return ".angularSpringStiffness" + case .angularSpringDamping: return ".angularSpringDamping" + case .angularSpringEquilibriumPoint: return ".angularSpringEquilibriumPoint" + case .max: return ".max" + } + + } + + } + + public enum G6DOFJointAxisFlag: Int64, CaseIterable, CustomDebugStringConvertible { + /// If set, linear motion is possible within the given limits. + case enableLinearLimit = 0 // G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT + /// If set, rotational motion is possible. + case enableAngularLimit = 1 // G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT + /// + case enableAngularSpring = 2 // G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING + /// + case enableLinearSpring = 3 // G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING + /// If set, there is a rotational motor across these axes. + case enableMotor = 4 // G6DOF_JOINT_FLAG_ENABLE_MOTOR + /// If set, there is a linear motor on this axis that targets a specific velocity. + case enableLinearMotor = 5 // G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR + /// Represents the size of the ``PhysicsServer3D/G6DOFJointAxisFlag`` enum. + case max = 6 // G6DOF_JOINT_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .enableLinearLimit: return ".enableLinearLimit" + case .enableAngularLimit: return ".enableAngularLimit" + case .enableAngularSpring: return ".enableAngularSpring" + case .enableLinearSpring: return ".enableLinearSpring" + case .enableMotor: return ".enableMotor" + case .enableLinearMotor: return ".enableLinearMotor" + case .max: return ".max" + } + + } + + } + + public enum ShapeType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The ``Shape3D`` is a ``WorldBoundaryShape3D``. + case worldBoundary = 0 // SHAPE_WORLD_BOUNDARY + /// The ``Shape3D`` is a ``SeparationRayShape3D``. + case separationRay = 1 // SHAPE_SEPARATION_RAY + /// The ``Shape3D`` is a ``SphereShape3D``. + case sphere = 2 // SHAPE_SPHERE + /// The ``Shape3D`` is a ``BoxShape3D``. + case box = 3 // SHAPE_BOX + /// The ``Shape3D`` is a ``CapsuleShape3D``. + case capsule = 4 // SHAPE_CAPSULE + /// The ``Shape3D`` is a ``CylinderShape3D``. + case cylinder = 5 // SHAPE_CYLINDER + /// The ``Shape3D`` is a ``ConvexPolygonShape3D``. + case convexPolygon = 6 // SHAPE_CONVEX_POLYGON + /// The ``Shape3D`` is a ``ConcavePolygonShape3D``. + case concavePolygon = 7 // SHAPE_CONCAVE_POLYGON + /// The ``Shape3D`` is a ``HeightMapShape3D``. + case heightmap = 8 // SHAPE_HEIGHTMAP + /// The ``Shape3D`` is used internally for a soft body. Any attempt to create this kind of shape results in an error. + case softBody = 9 // SHAPE_SOFT_BODY + /// This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + case custom = 10 // SHAPE_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .worldBoundary: return ".worldBoundary" + case .separationRay: return ".separationRay" + case .sphere: return ".sphere" + case .box: return ".box" + case .capsule: return ".capsule" + case .cylinder: return ".cylinder" + case .convexPolygon: return ".convexPolygon" + case .concavePolygon: return ".concavePolygon" + case .heightmap: return ".heightmap" + case .softBody: return ".softBody" + case .custom: return ".custom" + } + + } + + } + + public enum AreaParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get gravity override mode in an area. See ``PhysicsServer3D/AreaSpaceOverrideMode`` for possible values. + case gravityOverrideMode = 0 // AREA_PARAM_GRAVITY_OVERRIDE_MODE + /// Constant to set/get gravity strength in an area. + case gravity = 1 // AREA_PARAM_GRAVITY + /// Constant to set/get gravity vector/center in an area. + case gravityVector = 2 // AREA_PARAM_GRAVITY_VECTOR + /// Constant to set/get whether the gravity vector of an area is a direction, or a center point. + case gravityIsPoint = 3 // AREA_PARAM_GRAVITY_IS_POINT + /// Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by ``AreaParameter/gravity``. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on. + /// + /// The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + /// + case gravityPointUnitDistance = 4 // AREA_PARAM_GRAVITY_POINT_UNIT_DISTANCE + /// Constant to set/get linear damping override mode in an area. See ``PhysicsServer3D/AreaSpaceOverrideMode`` for possible values. + case linearDampOverrideMode = 5 // AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE + /// Constant to set/get the linear damping factor of an area. + case linearDamp = 6 // AREA_PARAM_LINEAR_DAMP + /// Constant to set/get angular damping override mode in an area. See ``PhysicsServer3D/AreaSpaceOverrideMode`` for possible values. + case angularDampOverrideMode = 7 // AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE + /// Constant to set/get the angular damping factor of an area. + case angularDamp = 8 // AREA_PARAM_ANGULAR_DAMP + /// Constant to set/get the priority (order of processing) of an area. + case priority = 9 // AREA_PARAM_PRIORITY + /// Constant to set/get the magnitude of area-specific wind force. This wind force only applies to ``SoftBody3D`` nodes. Other physics bodies are currently not affected by wind. + case windForceMagnitude = 10 // AREA_PARAM_WIND_FORCE_MAGNITUDE + /// Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. + case windSource = 11 // AREA_PARAM_WIND_SOURCE + /// Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. + case windDirection = 12 // AREA_PARAM_WIND_DIRECTION + /// Constant to set/get the exponential rate at which wind force decreases with distance from its origin. + case windAttenuationFactor = 13 // AREA_PARAM_WIND_ATTENUATION_FACTOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .gravityOverrideMode: return ".gravityOverrideMode" + case .gravity: return ".gravity" + case .gravityVector: return ".gravityVector" + case .gravityIsPoint: return ".gravityIsPoint" + case .gravityPointUnitDistance: return ".gravityPointUnitDistance" + case .linearDampOverrideMode: return ".linearDampOverrideMode" + case .linearDamp: return ".linearDamp" + case .angularDampOverrideMode: return ".angularDampOverrideMode" + case .angularDamp: return ".angularDamp" + case .priority: return ".priority" + case .windForceMagnitude: return ".windForceMagnitude" + case .windSource: return ".windSource" + case .windDirection: return ".windDirection" + case .windAttenuationFactor: return ".windAttenuationFactor" + } + + } + + } + + public enum AreaSpaceOverrideMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. + case disabled = 0 // AREA_SPACE_OVERRIDE_DISABLED + /// This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects. + case combine = 1 // AREA_SPACE_OVERRIDE_COMBINE + /// This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one. + case combineReplace = 2 // AREA_SPACE_OVERRIDE_COMBINE_REPLACE + /// This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. + case replace = 3 // AREA_SPACE_OVERRIDE_REPLACE + /// This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + case replaceCombine = 4 // AREA_SPACE_OVERRIDE_REPLACE_COMBINE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .combine: return ".combine" + case .combineReplace: return ".combineReplace" + case .replace: return ".replace" + case .replaceCombine: return ".replaceCombine" + } + + } + + } + + public enum BodyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. + case `static` = 0 // BODY_MODE_STATIC + /// Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. + case kinematic = 1 // BODY_MODE_KINEMATIC + /// Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. + case rigid = 2 // BODY_MODE_RIGID + /// Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. + case rigidLinear = 3 // BODY_MODE_RIGID_LINEAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`static`: return ".`static`" + case .kinematic: return ".kinematic" + case .rigid: return ".rigid" + case .rigidLinear: return ".rigidLinear" + } + + } + + } + + public enum BodyParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get a body's bounce factor. + case bounce = 0 // BODY_PARAM_BOUNCE + /// Constant to set/get a body's friction. + case friction = 1 // BODY_PARAM_FRICTION + /// Constant to set/get a body's mass. + case mass = 2 // BODY_PARAM_MASS + /// Constant to set/get a body's inertia. + case inertia = 3 // BODY_PARAM_INERTIA + /// Constant to set/get a body's center of mass position in the body's local coordinate system. + case centerOfMass = 4 // BODY_PARAM_CENTER_OF_MASS + /// Constant to set/get a body's gravity multiplier. + case gravityScale = 5 // BODY_PARAM_GRAVITY_SCALE + /// Constant to set/get a body's linear damping mode. See ``PhysicsServer3D/BodyDampMode`` for possible values. + case linearDampMode = 6 // BODY_PARAM_LINEAR_DAMP_MODE + /// Constant to set/get a body's angular damping mode. See ``PhysicsServer3D/BodyDampMode`` for possible values. + case angularDampMode = 7 // BODY_PARAM_ANGULAR_DAMP_MODE + /// Constant to set/get a body's linear damping factor. + case linearDamp = 8 // BODY_PARAM_LINEAR_DAMP + /// Constant to set/get a body's angular damping factor. + case angularDamp = 9 // BODY_PARAM_ANGULAR_DAMP + /// Represents the size of the ``PhysicsServer3D/BodyParameter`` enum. + case max = 10 // BODY_PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bounce: return ".bounce" + case .friction: return ".friction" + case .mass: return ".mass" + case .inertia: return ".inertia" + case .centerOfMass: return ".centerOfMass" + case .gravityScale: return ".gravityScale" + case .linearDampMode: return ".linearDampMode" + case .angularDampMode: return ".angularDampMode" + case .linearDamp: return ".linearDamp" + case .angularDamp: return ".angularDamp" + case .max: return ".max" + } + + } + + } + + public enum BodyDampMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The body's damping value is added to any value set in areas or the default value. + case combine = 0 // BODY_DAMP_MODE_COMBINE + /// The body's damping value replaces any value set in areas or the default value. + case replace = 1 // BODY_DAMP_MODE_REPLACE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .combine: return ".combine" + case .replace: return ".replace" + } + + } + + } + + public enum BodyState: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get the current transform matrix of the body. + case transform = 0 // BODY_STATE_TRANSFORM + /// Constant to set/get the current linear velocity of the body. + case linearVelocity = 1 // BODY_STATE_LINEAR_VELOCITY + /// Constant to set/get the current angular velocity of the body. + case angularVelocity = 2 // BODY_STATE_ANGULAR_VELOCITY + /// Constant to sleep/wake up a body, or to get whether it is sleeping. + case sleeping = 3 // BODY_STATE_SLEEPING + /// Constant to set/get whether the body can sleep. + case canSleep = 4 // BODY_STATE_CAN_SLEEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .transform: return ".transform" + case .linearVelocity: return ".linearVelocity" + case .angularVelocity: return ".angularVelocity" + case .sleeping: return ".sleeping" + case .canSleep: return ".canSleep" + } + + } + + } + + public enum AreaBodyStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// The value of the first parameter and area callback function receives, when an object enters one of its shapes. + case added = 0 // AREA_BODY_ADDED + /// The value of the first parameter and area callback function receives, when an object exits one of its shapes. + case removed = 1 // AREA_BODY_REMOVED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .added: return ".added" + case .removed: return ".removed" + } + + } + + } + + public enum ProcessInfo: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to get the number of objects that are not sleeping. + case activeObjects = 0 // INFO_ACTIVE_OBJECTS + /// Constant to get the number of possible collisions. + case collisionPairs = 1 // INFO_COLLISION_PAIRS + /// Constant to get the number of space regions where a collision could occur. + case islandCount = 2 // INFO_ISLAND_COUNT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .activeObjects: return ".activeObjects" + case .collisionPairs: return ".collisionPairs" + case .islandCount: return ".islandCount" + } + + } + + } + + public enum SpaceParameter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + case contactRecycleRadius = 0 // SPACE_PARAM_CONTACT_RECYCLE_RADIUS + /// Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. + case contactMaxSeparation = 1 // SPACE_PARAM_CONTACT_MAX_SEPARATION + /// Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + case contactMaxAllowedPenetration = 2 // SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION + /// Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. + case contactDefaultBias = 3 // SPACE_PARAM_CONTACT_DEFAULT_BIAS + /// Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + case bodyLinearVelocitySleepThreshold = 4 // SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD + /// Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + case bodyAngularVelocitySleepThreshold = 5 // SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD + /// Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + case bodyTimeToSleep = 6 // SPACE_PARAM_BODY_TIME_TO_SLEEP + /// Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. + case solverIterations = 7 // SPACE_PARAM_SOLVER_ITERATIONS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .contactRecycleRadius: return ".contactRecycleRadius" + case .contactMaxSeparation: return ".contactMaxSeparation" + case .contactMaxAllowedPenetration: return ".contactMaxAllowedPenetration" + case .contactDefaultBias: return ".contactDefaultBias" + case .bodyLinearVelocitySleepThreshold: return ".bodyLinearVelocitySleepThreshold" + case .bodyAngularVelocitySleepThreshold: return ".bodyAngularVelocitySleepThreshold" + case .bodyTimeToSleep: return ".bodyTimeToSleep" + case .solverIterations: return ".solverIterations" + } + + } + + } + + public enum BodyAxis: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case linearX = 1 // BODY_AXIS_LINEAR_X + /// + case linearY = 2 // BODY_AXIS_LINEAR_Y + /// + case linearZ = 4 // BODY_AXIS_LINEAR_Z + /// + case angularX = 8 // BODY_AXIS_ANGULAR_X + /// + case angularY = 16 // BODY_AXIS_ANGULAR_Y + /// + case angularZ = 32 // BODY_AXIS_ANGULAR_Z + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linearX: return ".linearX" + case .linearY: return ".linearY" + case .linearZ: return ".linearZ" + case .angularX: return ".angularX" + case .angularY: return ".angularY" + case .angularZ: return ".angularZ" + } + + } + + } + + /* Methods */ + fileprivate static var method_world_boundary_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("world_boundary_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func worldBoundaryShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_world_boundary_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_separation_ray_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("separation_ray_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func separationRayShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_separation_ray_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_sphere_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("sphere_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func sphereShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_sphere_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_box_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("box_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func boxShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_box_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_capsule_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("capsule_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func capsuleShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_capsule_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_cylinder_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("cylinder_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func cylinderShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_cylinder_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_convex_polygon_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("convex_polygon_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func convexPolygonShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_convex_polygon_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_concave_polygon_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("concave_polygon_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func concavePolygonShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_concave_polygon_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_heightmap_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("heightmap_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func heightmapShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_heightmap_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_custom_shape_create: GDExtensionMethodBindPtr = { + let methodName = StringName("custom_shape_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func customShapeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_custom_shape_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shape_set_data: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_set_data") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3175752987)! + } + + } + + }() + + /// Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created ``shapeGetType(shape:)``. + public static func shapeSetData(shape: RID, data: Variant?) { + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shape_set_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_set_margin") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the collision margin for the shape. + /// + /// > Note: This is not used in Godot Physics. + /// + public static func shapeSetMargin(shape: RID, margin: Double) { + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: margin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shape_set_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shape_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_get_type") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3418923367)! + } + + } + + }() + + /// Returns the type of shape (see ``PhysicsServer3D/ShapeType`` constants). + public static func shapeGetType(shape: RID) -> PhysicsServer3D.ShapeType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shape_get_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer3D.ShapeType (rawValue: _result)! + } + + fileprivate static var method_shape_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_get_data") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4171304767)! + } + + } + + }() + + /// Returns the shape data. + public static func shapeGetData(shape: RID) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shape_get_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_shape_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("shape_get_margin") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the collision margin for the shape. + /// + /// > Note: This is not used in Godot Physics, so will always return `0`. + /// + public static func shapeGetMargin(shape: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shape_get_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_space_create: GDExtensionMethodBindPtr = { + let methodName = StringName("space_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with ``areaSetSpace(area:space:)``, or to a body with ``bodySetSpace(body:space:)``. + public static func spaceCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_space_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_space_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("space_set_active") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Marks a space as active. It will not have an effect, unless it is assigned to an area or body. + public static func spaceSetActive(space: RID, active: Bool) { + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_space_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_space_is_active: GDExtensionMethodBindPtr = { + let methodName = StringName("space_is_active") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether the space is active. + public static func spaceIsActive(space: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_space_is_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_space_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("space_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2406017470)! + } + + } + + }() + + /// Sets the value for a space parameter. A list of available parameters is on the ``PhysicsServer3D/SpaceParameter`` constants. + public static func spaceSetParam(space: RID, param: PhysicsServer3D.SpaceParameter, value: Double) { + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_space_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_space_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("space_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1523206731)! + } + + } + + }() + + /// Returns the value of a space parameter. + public static func spaceGetParam(space: RID, param: PhysicsServer3D.SpaceParameter) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_space_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_space_get_direct_state: GDExtensionMethodBindPtr = { + let methodName = StringName("space_get_direct_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2048616813)! + } + + } + + }() + + /// Returns the state of a space, a ``PhysicsDirectSpaceState3D``. This object can be used to make collision/intersection queries. + public static func spaceGetDirectState(space: RID) -> PhysicsDirectSpaceState3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: space.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_space_get_direct_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_area_create: GDExtensionMethodBindPtr = { + let methodName = StringName("area_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 3D area object in the physics server, and returns the ``RID`` that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and `monitorable` set to `false`. + /// + /// Use ``areaAddShape(area:shape:transform:disabled:)`` to add shapes to it, use ``areaSetTransform(area:transform:)`` to set its transform, and use ``areaSetSpace(area:space:)`` to add the area to a space. If you want the area to be detectable use ``areaSetMonitorable(area:monitorable:)``. + /// + public static func areaCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_area_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_area_set_space: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Assigns a space to the area. + public static func areaSetSpace(area: RID, space: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: space.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_space: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the space assigned to the area. + public static func areaGetSpace(area: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_area_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_add_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3711419014)! + } + + } + + }() + + /// Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + public static func areaAddShape(area: RID, shape: RID, transform: Transform3D = Transform3D (xAxis: Vector3 (x: 1, y: 0, z: 0), yAxis: Vector3 (x: 0, y: 1, z: 0), zAxis: Vector3(x: 0, y: 0, z: 1), origin: Vector3 (x: 0, y: 0, z: 0)), disabled: Bool = false) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shape.content) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: disabled) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_area_add_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Substitutes a given area shape by another. The old shape is selected by its index, the new one by its ``RID``. + public static func areaSetShape(area: RID, shapeIdx: Int32, shape: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: shape.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675327471)! + } + + } + + }() + + /// Sets the transform matrix for an area shape. + public static func areaSetShapeTransform(area: RID, shapeIdx: Int32, transform: Transform3D) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_shape_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_shape_disabled") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// + public static func areaSetShapeDisabled(area: RID, shapeIdx: Int32, disabled: Bool) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_shape_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape_count") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of shapes assigned to an area. + public static func areaGetShapeCount(area: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns the ``RID`` of the nth shape of an area. + public static func areaGetShape(area: RID, shapeIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_area_get_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_shape_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1050775521)! + } + + } + + }() + + /// Returns the transform matrix of a shape within an area. + public static func areaGetShapeTransform(area: RID, shapeIdx: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_area_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("area_remove_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Removes a shape from an area. It does not delete the shape, so it can be reassigned later. + public static func areaRemoveShape(area: RID, shapeIdx: Int32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_remove_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("area_clear_shapes") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. + public static func areaClearShapes(area: RID) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_clear_shapes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_area_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Assigns the area to one or many physics layers. + public static func areaSetCollisionLayer(area: RID, layer: UInt32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers an area belongs to. + public static func areaGetCollisionLayer(area: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets which physics layers the area will monitor. + public static func areaSetCollisionMask(area: RID, mask: UInt32) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers an area can contact with. + public static func areaGetCollisionMask(area: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2980114638)! + } + + } + + }() + + /// Sets the value for an area parameter. A list of available parameters is on the ``PhysicsServer3D/AreaParameter`` constants. + public static func areaSetParam(area: RID, param: PhysicsServer3D.AreaParameter, value: Variant?) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets the transform matrix for an area. + public static func areaSetTransform(area: RID, transform: Transform3D) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 890056067)! + } + + } + + }() + + /// Returns an area parameter value. A list of available parameters is on the ``PhysicsServer3D/AreaParameter`` constants. + public static func areaGetParam(area: RID, param: PhysicsServer3D.AreaParameter) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_area_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1128465797)! + } + + } + + }() + + /// Returns the transform matrix for an area. + public static func areaGetTransform(area: RID) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_attach_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_attach_object_instance_id") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Assigns the area to a descendant of ``Object``, so it can exist in the node tree. + public static func areaAttachObjectInstanceId(area: RID, id: UInt) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_attach_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_get_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("area_get_object_instance_id") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Gets the instance ID of the object the area is assigned to. + public static func areaGetObjectInstanceId(area: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_area_get_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_area_set_monitor_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_monitor_callback") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + /// + /// 1. an integer `status`: either ``AreaBodyStatus/added`` or ``AreaBodyStatus/removed`` depending on whether the other body shape entered or exited the area, + /// + /// 2. an ``RID`` `body_rid`: the ``RID`` of the body that entered or exited the area, + /// + /// 3. an integer `instance_id`: the `ObjectID` attached to the body, + /// + /// 4. an integer `body_shape_idx`: the index of the shape of the body that entered or exited the area, + /// + /// 5. an integer `self_shape_idx`: the index of the shape of the area where the body entered or exited. + /// + /// By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. + /// + public static func areaSetMonitorCallback(area: RID, callback: Callable) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_monitor_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_area_monitor_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_area_monitor_callback") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3379118538)! + } + + } + + }() + + /// Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: + /// + /// 1. an integer `status`: either ``AreaBodyStatus/added`` or ``AreaBodyStatus/removed`` depending on whether the other area's shape entered or exited the area, + /// + /// 2. an ``RID`` `area_rid`: the ``RID`` of the other area that entered or exited the area, + /// + /// 3. an integer `instance_id`: the `ObjectID` attached to the other area, + /// + /// 4. an integer `area_shape_idx`: the index of the shape of the other area that entered or exited the area, + /// + /// 5. an integer `self_shape_idx`: the index of the shape of the area where the other area entered or exited. + /// + /// By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. + /// + public static func areaSetAreaMonitorCallback(area: RID, callback: Callable) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: callback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_area_monitor_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_monitorable: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_monitorable") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// + public static func areaSetMonitorable(area: RID, monitorable: Bool) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: monitorable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_monitorable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_area_set_ray_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("area_set_ray_pickable") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets object pickable with rays. + public static func areaSetRayPickable(area: RID, enable: Bool) { + withUnsafePointer(to: area.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_area_set_ray_pickable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_create: GDExtensionMethodBindPtr = { + let methodName = StringName("body_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 3D body object in the physics server, and returns the ``RID`` that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and body mode set to ``BodyMode/rigid``. + /// + /// Use ``bodyAddShape(body:shape:transform:disabled:)`` to add shapes to it, use ``bodySetState(body:state:value:)`` to set its transform, and use ``bodySetSpace(body:space:)`` to add the body to a space. + /// + public static func bodyCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_body_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_body_set_space: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Assigns a space to the body (see ``spaceCreate()``). + public static func bodySetSpace(body: RID, space: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: space.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_space: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the ``RID`` of the space assigned to a body. + public static func bodyGetSpace(body: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_mode") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 606803466)! + } + + } + + }() + + /// Sets the body mode, from one of the ``PhysicsServer3D/BodyMode`` constants. + public static func bodySetMode(body: RID, mode: PhysicsServer3D.BodyMode) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_mode") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2488819728)! + } + + } + + }() + + /// Returns the body mode. + public static func bodyGetMode(body: RID) -> PhysicsServer3D.BodyMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer3D.BodyMode (rawValue: _result)! + } + + fileprivate static var method_body_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers a body belongs to. + public static func bodySetCollisionLayer(body: RID, layer: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers a body belongs to. + public static func bodyGetCollisionLayer(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers a body can collide with. + public static func bodySetCollisionMask(body: RID, mask: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers a body can collide with. + public static func bodyGetCollisionMask(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_collision_priority") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the body's collision priority. + public static func bodySetCollisionPriority(body: RID, priority: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_collision_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_collision_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_collision_priority") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the body's collision priority. + public static func bodyGetCollisionPriority(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_collision_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_add_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3711419014)! + } + + } + + }() + + /// Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + public static func bodyAddShape(body: RID, shape: RID, transform: Transform3D = Transform3D (xAxis: Vector3 (x: 1, y: 0, z: 0), yAxis: Vector3 (x: 0, y: 1, z: 0), zAxis: Vector3(x: 0, y: 0, z: 1), origin: Vector3 (x: 0, y: 0, z: 0)), disabled: Bool = false) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shape.content) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: disabled) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Substitutes a given body shape by another. The old shape is selected by its index, the new one by its ``RID``. + public static func bodySetShape(body: RID, shapeIdx: Int32, shape: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: shape.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675327471)! + } + + } + + }() + + /// Sets the transform matrix for a body shape. + public static func bodySetShapeTransform(body: RID, shapeIdx: Int32, transform: Transform3D) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_shape_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_shape_disabled") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// + public static func bodySetShapeDisabled(body: RID, shapeIdx: Int32, disabled: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: disabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_shape_disabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape_count") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of shapes assigned to a body. + public static func bodyGetShapeCount(body: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns the ``RID`` of the nth shape of a body. + public static func bodyGetShape(body: RID, shapeIdx: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_shape_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_shape_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1050775521)! + } + + } + + }() + + /// Returns the transform matrix of a body shape. + public static func bodyGetShapeTransform(body: RID, shapeIdx: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_shape_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_remove_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("body_remove_shape") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. + public static func bodyRemoveShape(body: RID, shapeIdx: Int32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: shapeIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_remove_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_clear_shapes: GDExtensionMethodBindPtr = { + let methodName = StringName("body_clear_shapes") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all shapes from a body. + public static func bodyClearShapes(body: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_clear_shapes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_body_attach_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_attach_object_instance_id") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Assigns the area to a descendant of ``Object``, so it can exist in the node tree. + public static func bodyAttachObjectInstanceId(body: RID, id: UInt) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_attach_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_object_instance_id") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Gets the instance ID of the object the area is assigned to. + public static func bodyGetObjectInstanceId(body: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_enable_continuous_collision_detection: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_enable_continuous_collision_detection") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the continuous collision detection mode is enabled. + /// + /// Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + /// + public static func bodySetEnableContinuousCollisionDetection(body: RID, enable: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_enable_continuous_collision_detection, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_is_continuous_collision_detection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("body_is_continuous_collision_detection_enabled") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// If `true`, the continuous collision detection mode is enabled. + public static func bodyIsContinuousCollisionDetectionEnabled(body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_is_continuous_collision_detection_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 910941953)! + } + + } + + }() + + /// Sets a body parameter. A list of available parameters is on the ``PhysicsServer3D/BodyParameter`` constants. + public static func bodySetParam(body: RID, param: PhysicsServer3D.BodyParameter, value: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385027841)! + } + + } + + }() + + /// Returns the value of a body parameter. A list of available parameters is on the ``PhysicsServer3D/BodyParameter`` constants. + public static func bodyGetParam(body: RID, param: PhysicsServer3D.BodyParameter) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_body_reset_mass_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("body_reset_mass_properties") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using ``bodySetParam(body:param:value:)``. + public static func bodyResetMassProperties(body: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_reset_mass_properties, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_body_set_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 599977762)! + } + + } + + }() + + /// Sets a body state (see ``PhysicsServer3D/BodyState`` constants). + public static func bodySetState(body: RID, state: PhysicsServer3D.BodyState, value: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1850449534)! + } + + } + + }() + + /// Returns a body state. + public static func bodyGetState(body: RID, state: PhysicsServer3D.BodyState) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_body_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_central_impulse") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Applies a directional impulse without affecting rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``bodyApplyImpulse(body:impulse:position:)`` at the body's center of mass. + /// + public static func bodyApplyCentralImpulse(body: RID, impulse: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_central_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_impulse") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 390416203)! + } + + } + + }() + + /// Applies a positioned impulse to the body. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyApplyImpulse(body: RID, impulse: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_torque_impulse") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Applies a rotational impulse to the body without affecting the position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + public static func bodyApplyTorqueImpulse(body: RID, impulse: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: impulse) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_torque_impulse, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_central_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``bodyApplyForce(body:force:position:)`` at the body's center of mass. + /// + public static func bodyApplyCentralForce(body: RID, force: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_central_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 390416203)! + } + + } + + }() + + /// Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyApplyForce(body: RID, force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_apply_torque") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + public static func bodyApplyTorque(body: RID, torque: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_apply_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_central_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `body_set_constant_force(body, Vector3(0, 0, 0))`. + /// + /// This is equivalent to using ``bodyAddConstantForce(body:force:position:)`` at the body's center of mass. + /// + public static func bodyAddConstantCentralForce(body: RID, force: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_central_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 390416203)! + } + + } + + }() + + /// Adds a constant positioned force to the body that keeps being applied over time until cleared with `body_set_constant_force(body, Vector3(0, 0, 0))`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public static func bodyAddConstantForce(body: RID, force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: position) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_constant_torque") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `body_set_constant_torque(body, Vector3(0, 0, 0))`. + public static func bodyAddConstantTorque(body: RID, torque: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_constant_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the body's total constant positional forces applied during each physics update. + /// + /// See ``bodyAddConstantForce(body:force:position:)`` and ``bodyAddConstantCentralForce(body:force:)``. + /// + public static func bodySetConstantForce(body: RID, force: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: force) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_constant_force") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the body's total constant positional forces applied during each physics update. + /// + /// See ``bodyAddConstantForce(body:force:position:)`` and ``bodyAddConstantCentralForce(body:force:)``. + /// + public static func bodyGetConstantForce(body: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_constant_force, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_constant_torque") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the body's total constant rotational forces applied during each physics update. + /// + /// See ``bodyAddConstantTorque(body:torque:)``. + /// + public static func bodySetConstantTorque(body: RID, torque: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: torque) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_constant_torque") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns the body's total constant rotational forces applied during each physics update. + /// + /// See ``bodyAddConstantTorque(body:torque:)``. + /// + public static func bodyGetConstantTorque(body: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_constant_torque, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_axis_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_axis_velocity") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + public static func bodySetAxisVelocity(body: RID, axisVelocity: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: axisVelocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_axis_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_axis_lock: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_axis_lock") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2020836892)! + } + + } + + }() + + /// + public static func bodySetAxisLock(body: RID, axis: PhysicsServer3D.BodyAxis, lock: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: lock) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_axis_lock, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_is_axis_locked: GDExtensionMethodBindPtr = { + let methodName = StringName("body_is_axis_locked") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 587853580)! + } + + } + + }() + + /// + public static func bodyIsAxisLocked(body: RID, axis: PhysicsServer3D.BodyAxis) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_is_axis_locked, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_add_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("body_add_collision_exception") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Adds a body to the list of bodies exempt from collisions. + public static func bodyAddCollisionException(body: RID, exceptedBody: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: exceptedBody.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_add_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_remove_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("body_remove_collision_exception") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Removes a body from the list of bodies exempt from collisions. + /// + /// Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. + /// + public static func bodyRemoveCollisionException(body: RID, exceptedBody: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: exceptedBody.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_remove_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_max_contacts_reported") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. + public static func bodySetMaxContactsReported(body: RID, amount: Int32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_max_contacts_reported, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_get_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_max_contacts_reported") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the maximum contacts that can be reported. See ``bodySetMaxContactsReported(body:amount:)``. + public static func bodyGetMaxContactsReported(body: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_max_contacts_reported, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_omit_force_integration: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_omit_force_integration") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the body omits the standard force integration. If `enable` is `true`, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, ``bodySetForceIntegrationCallback(body:callable:userdata:)`` can be used to manually update the linear and angular velocity instead. + /// + /// This method is called when the property ``RigidBody3D/customIntegrator`` is set. + /// + public static func bodySetOmitForceIntegration(body: RID, enable: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_omit_force_integration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_is_omitting_force_integration: GDExtensionMethodBindPtr = { + let methodName = StringName("body_is_omitting_force_integration") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the body is omitting the standard force integration. See ``bodySetOmitForceIntegration(body:enable:)``. + public static func bodyIsOmittingForceIntegration(body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_is_omitting_force_integration, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_set_force_integration_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_force_integration_callback") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3059434249)! + } + + } + + }() + + /// Sets the body's custom force integration callback function to `callable`. Use an empty ``Callable`` ([code skip-lint]Callable()`) to clear the custom callback. + /// + /// The function `callable` will be called every physics tick, before the standard force integration (see ``bodySetOmitForceIntegration(body:enable:)``). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. + /// + /// If `userdata` is not `null`, the function `callable` must take the following two parameters: + /// + /// 1. `state`: a ``PhysicsDirectBodyState3D``, used to retrieve and modify the body's state, + /// + /// 2. [code skip-lint]userdata`: a ``Variant``; its value will be the `userdata` passed into this method. + /// + /// If `userdata` is `null`, then `callable` must take only the `state` parameter. + /// + public static func bodySetForceIntegrationCallback(body: RID, callable: Callable, userdata: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: callable.content) { pArg1 in + withUnsafePointer(to: userdata.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_force_integration_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_body_set_ray_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("body_set_ray_pickable") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the body pickable with rays if `enable` is set. + public static func bodySetRayPickable(body: RID, enable: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_body_set_ray_pickable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_body_test_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1944921792)! + } + + } + + }() + + /// Returns `true` if a collision would result from moving along a motion vector from a given point in space. ``PhysicsTestMotionParameters3D`` is passed to set motion parameters. ``PhysicsTestMotionResult3D`` can be passed to return additional information. + public static func bodyTestMotion(body: RID, parameters: PhysicsTestMotionParameters3D?, result: PhysicsTestMotionResult3D? = nil) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: parameters?.handle) { pArg1 in + withUnsafePointer(to: result?.handle) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_body_test_motion, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_body_get_direct_state: GDExtensionMethodBindPtr = { + let methodName = StringName("body_get_direct_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3029727957)! + } + + } + + }() + + /// Returns the ``PhysicsDirectBodyState3D`` of the body. Returns `null` if the body is destroyed or removed from the physics space. + public static func bodyGetDirectState(body: RID) -> PhysicsDirectBodyState3D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_body_get_direct_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_soft_body_create: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new soft body and returns its internal ``RID``. + public static func softBodyCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_soft_body_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_soft_body_update_rendering_server: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_update_rendering_server") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2218179753)! + } + + } + + }() + + /// Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the `renderingServerHandler` interface. + public static func softBodyUpdateRenderingServer(body: RID, renderingServerHandler: PhysicsServer3DRenderingServerHandler?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: renderingServerHandler?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_update_rendering_server, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_set_space: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Assigns a space to the given soft body (see ``spaceCreate()``). + public static func softBodySetSpace(body: RID, space: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: space.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_space: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_space") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the ``RID`` of the space assigned to the given soft body. + public static func softBodyGetSpace(body: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_space, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_mesh") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the mesh of the given soft body. + public static func softBodySetMesh(body: RID, mesh: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mesh.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_bounds: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_bounds") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974181306)! + } + + } + + }() + + /// Returns the bounds of the given soft body in global coordinates. + public static func softBodyGetBounds(body: RID) -> AABB { + var _result: AABB = AABB () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_bounds, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers the given soft body belongs to. + public static func softBodySetCollisionLayer(body: RID, layer: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_collision_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_collision_layer") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers that the given soft body belongs to. + public static func softBodyGetCollisionLayer(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_collision_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the physics layer or layers the given soft body can collide with. + public static func softBodySetCollisionMask(body: RID, mask: UInt32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_collision_mask") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the physics layer or layers that the given soft body can collide with. + public static func softBodyGetCollisionMask(body: RID) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_collision_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_add_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_add_collision_exception") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Adds the given body to the list of bodies exempt from collisions. + public static func softBodyAddCollisionException(body: RID, bodyB: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: bodyB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_add_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_remove_collision_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_remove_collision_exception") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Removes the given body from the list of bodies exempt from collisions. + public static func softBodyRemoveCollisionException(body: RID, bodyB: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: bodyB.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_remove_collision_exception, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_set_state: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 599977762)! + } + + } + + }() + + /// Sets the given body state for the given body (see ``PhysicsServer3D/BodyState`` constants). + /// + /// > Note: Godot's default physics implementation does not support ``BodyState/linearVelocity``, ``BodyState/angularVelocity``, ``BodyState/sleeping``, or ``BodyState/canSleep``. + /// + public static func softBodySetState(body: RID, state: PhysicsServer3D.BodyState, variant: Variant?) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: variant.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_state") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1850449534)! + } + + } + + }() + + /// Returns the given soft body state (see ``PhysicsServer3D/BodyState`` constants). + /// + /// > Note: Godot's default physics implementation does not support ``BodyState/linearVelocity``, ``BodyState/angularVelocity``, ``BodyState/sleeping``, or ``BodyState/canSleep``. + /// + public static func softBodyGetState(body: RID, state: PhysicsServer3D.BodyState) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: state.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_state, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_soft_body_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_transform") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets the global transform of the given soft body. + public static func softBodySetTransform(body: RID, transform: Transform3D) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_set_ray_pickable: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_ray_pickable") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the given soft body will be pickable when using object picking. + public static func softBodySetRayPickable(body: RID, enable: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_ray_pickable, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_set_simulation_precision: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_simulation_precision") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care. + public static func softBodySetSimulationPrecision(body: RID, simulationPrecision: Int32) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: simulationPrecision) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_simulation_precision, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_simulation_precision: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_simulation_precision") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the simulation precision of the given soft body. + public static func softBodyGetSimulationPrecision(body: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_simulation_precision, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_total_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_total_mass") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the total mass for the given soft body. + public static func softBodySetTotalMass(body: RID, totalMass: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: totalMass) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_total_mass, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_total_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_total_mass") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the total mass assigned to the given soft body. + public static func softBodyGetTotalMass(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_total_mass, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_linear_stiffness: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_linear_stiffness") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between `0.0` and `1.0` (inclusive). + public static func softBodySetLinearStiffness(body: RID, stiffness: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: stiffness) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_linear_stiffness, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_linear_stiffness: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_linear_stiffness") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the linear stiffness of the given soft body. + public static func softBodyGetLinearStiffness(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_linear_stiffness, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_pressure_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_pressure_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect. + public static func softBodySetPressureCoefficient(body: RID, pressureCoefficient: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: pressureCoefficient) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_pressure_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_pressure_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_pressure_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the pressure coefficient of the given soft body. + public static func softBodyGetPressureCoefficient(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_pressure_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_damping_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_damping_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied. + public static func softBodySetDampingCoefficient(body: RID, dampingCoefficient: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: dampingCoefficient) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_damping_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_damping_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_damping_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the damping coefficient of the given soft body. + public static func softBodyGetDampingCoefficient(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_damping_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_set_drag_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_set_drag_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance. + /// + /// > Note: This value is currently unused by Godot's default physics implementation. + /// + public static func softBodySetDragCoefficient(body: RID, dragCoefficient: Double) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: dragCoefficient) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_set_drag_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_drag_coefficient: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_drag_coefficient") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the drag coefficient of the given soft body. + public static func softBodyGetDragCoefficient(body: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_drag_coefficient, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_move_point: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_move_point") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 831953689)! + } + + } + + }() + + /// Moves the given soft body point to a position in global coordinates. + public static func softBodyMovePoint(body: RID, pointIndex: Int32, globalPosition: Vector3) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: pointIndex) { pArg1 in + withUnsafePointer(to: globalPosition) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_move_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_get_point_global_position: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_get_point_global_position") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3440143363)! + } + + } + + }() + + /// Returns the current position of the given soft body point in global coordinates. + public static func softBodyGetPointGlobalPosition(body: RID, pointIndex: Int32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: pointIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_get_point_global_position, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_soft_body_remove_all_pinned_points: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_remove_all_pinned_points") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Unpins all points of the given soft body. + public static func softBodyRemoveAllPinnedPoints(body: RID) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_remove_all_pinned_points, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_soft_body_pin_point: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_pin_point") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2658558584)! + } + + } + + }() + + /// Pins or unpins the given soft body point based on the value of `pin`. + /// + /// > Note: Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using ``softBodyMovePoint(body:pointIndex:globalPosition:)``. + /// + public static func softBodyPinPoint(body: RID, pointIndex: Int32, pin: Bool) { + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: pointIndex) { pArg1 in + withUnsafePointer(to: pin) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_pin_point, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_soft_body_is_point_pinned: GDExtensionMethodBindPtr = { + let methodName = StringName("soft_body_is_point_pinned") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3120086654)! + } + + } + + }() + + /// Returns whether the given soft body point is pinned. + public static func softBodyIsPointPinned(body: RID, pointIndex: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: pointIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_soft_body_is_point_pinned, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_create: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_create") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// + public static func jointCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_joint_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_joint_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_clear") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// + public static func jointClear(joint: RID) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_joint_make_pin: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_pin") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4280171926)! + } + + } + + }() + + /// + public static func jointMakePin(joint: RID, bodyA: RID, localA: Vector3, bodyB: RID, localB: Vector3) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: bodyA.content) { pArg1 in + withUnsafePointer(to: localA) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: localB) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_pin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 810685294)! + } + + } + + }() + + /// Sets a pin_joint parameter (see ``PhysicsServer3D/PinJointParam`` constants). + public static func pinJointSetParam(joint: RID, param: PhysicsServer3D.PinJointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2817972347)! + } + + } + + }() + + /// Gets a pin_joint parameter (see ``PhysicsServer3D/PinJointParam`` constants). + public static func pinJointGetParam(joint: RID, param: PhysicsServer3D.PinJointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_pin_joint_set_local_a: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_set_local_a") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets position of the joint in the local space of body a of the joint. + public static func pinJointSetLocalA(joint: RID, localA: Vector3) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: localA) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_set_local_a, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_get_local_a: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_get_local_a") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns position of the joint in the local space of body a of the joint. + public static func pinJointGetLocalA(joint: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_get_local_a, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_pin_joint_set_local_b: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_set_local_b") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets position of the joint in the local space of body b of the joint. + public static func pinJointSetLocalB(joint: RID, localB: Vector3) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: localB) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_set_local_b, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_pin_joint_get_local_b: GDExtensionMethodBindPtr = { + let methodName = StringName("pin_joint_get_local_b") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 531438156)! + } + + } + + }() + + /// Returns position of the joint in the local space of body b of the joint. + public static func pinJointGetLocalB(joint: RID) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_pin_joint_get_local_b, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_joint_make_hinge: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_hinge") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1684107643)! + } + + } + + }() + + /// + public static func jointMakeHinge(joint: RID, bodyA: RID, hingeA: Transform3D, bodyB: RID, hingeB: Transform3D) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: bodyA.content) { pArg1 in + withUnsafePointer(to: hingeA) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: hingeB) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_hinge, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_hinge_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("hinge_joint_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3165502333)! + } + + } + + }() + + /// Sets a hinge_joint parameter (see ``PhysicsServer3D/HingeJointParam`` constants). + public static func hingeJointSetParam(joint: RID, param: PhysicsServer3D.HingeJointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_hinge_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_hinge_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("hinge_joint_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2129207581)! + } + + } + + }() + + /// Gets a hinge_joint parameter (see ``PhysicsServer3D/HingeJointParam``). + public static func hingeJointGetParam(joint: RID, param: PhysicsServer3D.HingeJointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_hinge_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_hinge_joint_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("hinge_joint_set_flag") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1601626188)! + } + + } + + }() + + /// Sets a hinge_joint flag (see ``PhysicsServer3D/HingeJointFlag`` constants). + public static func hingeJointSetFlag(joint: RID, flag: PhysicsServer3D.HingeJointFlag, enabled: Bool) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: enabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_hinge_joint_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_hinge_joint_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("hinge_joint_get_flag") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4165147865)! + } + + } + + }() + + /// Gets a hinge_joint flag (see ``PhysicsServer3D/HingeJointFlag`` constants). + public static func hingeJointGetFlag(joint: RID, flag: PhysicsServer3D.HingeJointFlag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_hinge_joint_get_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_make_slider: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_slider") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1684107643)! + } + + } + + }() + + /// + public static func jointMakeSlider(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: bodyA.content) { pArg1 in + withUnsafePointer(to: localRefA) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: localRefB) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_slider, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_slider_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("slider_joint_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2264833593)! + } + + } + + }() + + /// Gets a slider_joint parameter (see ``PhysicsServer3D/SliderJointParam`` constants). + public static func sliderJointSetParam(joint: RID, param: PhysicsServer3D.SliderJointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_slider_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_slider_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("slider_joint_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3498644957)! + } + + } + + }() + + /// Gets a slider_joint parameter (see ``PhysicsServer3D/SliderJointParam`` constants). + public static func sliderJointGetParam(joint: RID, param: PhysicsServer3D.SliderJointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_slider_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_make_cone_twist: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_cone_twist") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1684107643)! + } + + } + + }() + + /// + public static func jointMakeConeTwist(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: bodyA.content) { pArg1 in + withUnsafePointer(to: localRefA) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: localRefB) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_cone_twist, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_cone_twist_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("cone_twist_joint_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 808587618)! + } + + } + + }() + + /// Sets a cone_twist_joint parameter (see ``PhysicsServer3D/ConeTwistJointParam`` constants). + public static func coneTwistJointSetParam(joint: RID, param: PhysicsServer3D.ConeTwistJointParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_cone_twist_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_cone_twist_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("cone_twist_joint_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1134789658)! + } + + } + + }() + + /// Gets a cone_twist_joint parameter (see ``PhysicsServer3D/ConeTwistJointParam`` constants). + public static func coneTwistJointGetParam(joint: RID, param: PhysicsServer3D.ConeTwistJointParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_cone_twist_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_joint_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_get_type") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4290791900)! + } + + } + + }() + + /// Returns the type of the Joint3D. + public static func jointGetType(joint: RID) -> PhysicsServer3D.JointType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_get_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return PhysicsServer3D.JointType (rawValue: _result)! + } + + fileprivate static var method_joint_set_solver_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_set_solver_priority") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the priority value of the Joint3D. + public static func jointSetSolverPriority(joint: RID, priority: Int32) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_joint_set_solver_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_joint_get_solver_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_get_solver_priority") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Gets the priority value of the Joint3D. + public static func jointGetSolverPriority(joint: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_get_solver_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_joint_disable_collisions_between_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_disable_collisions_between_bodies") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether the bodies attached to the ``Joint3D`` will collide with each other. + public static func jointDisableCollisionsBetweenBodies(joint: RID, disable: Bool) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_joint_disable_collisions_between_bodies, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_joint_is_disabled_collisions_between_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_is_disabled_collisions_between_bodies") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns whether the bodies attached to the ``Joint3D`` will collide with each other. + public static func jointIsDisabledCollisionsBetweenBodies(joint: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_joint_is_disabled_collisions_between_bodies, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_joint_make_generic_6dof: GDExtensionMethodBindPtr = { + let methodName = StringName("joint_make_generic_6dof") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1684107643)! + } + + } + + }() + + /// Make the joint a generic six degrees of freedom (6DOF) joint. Use ``generic6dofJointSetFlag(joint:axis:flag:enable:)`` and ``generic6dofJointSetParam(joint:axis:param:value:)`` to set the joint's flags and parameters respectively. + public static func jointMakeGeneric6dof(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: bodyA.content) { pArg1 in + withUnsafePointer(to: localRefA) { pArg2 in + withUnsafePointer(to: bodyB.content) { pArg3 in + withUnsafePointer(to: localRefB) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_joint_make_generic_6dof, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_generic_6dof_joint_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("generic_6dof_joint_set_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2600081391)! + } + + } + + }() + + /// Sets the value of a given generic 6DOF joint parameter. See ``PhysicsServer3D/G6DOFJointAxisParam`` for the list of available parameters. + public static func generic6dofJointSetParam(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam, value: Double) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: param.rawValue) { pArg2 in + withUnsafePointer(to: value) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_generic_6dof_joint_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_generic_6dof_joint_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("generic_6dof_joint_get_param") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 467122058)! + } + + } + + }() + + /// Returns the value of a generic 6DOF joint parameter. See ``PhysicsServer3D/G6DOFJointAxisParam`` for the list of available parameters. + public static func generic6dofJointGetParam(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: param.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_generic_6dof_joint_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_generic_6dof_joint_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("generic_6dof_joint_set_flag") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3570926903)! + } + + } + + }() + + /// Sets the value of a given generic 6DOF joint flag. See ``PhysicsServer3D/G6DOFJointAxisFlag`` for the list of available flags. + public static func generic6dofJointSetFlag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag, enable: Bool) { + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: flag.rawValue) { pArg2 in + withUnsafePointer(to: enable) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_generic_6dof_joint_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_generic_6dof_joint_get_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("generic_6dof_joint_get_flag") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4158090196)! + } + + } + + }() + + /// Returns the value of a generic 6DOF joint flag. See ``PhysicsServer3D/G6DOFJointAxisFlag`` for the list of available flags. + public static func generic6dofJointGetFlag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag) -> Bool { + var _result: Bool = false + withUnsafePointer(to: joint.content) { pArg0 in + withUnsafePointer(to: axis.rawValue) { pArg1 in + withUnsafePointer(to: flag.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_generic_6dof_joint_get_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Destroys any of the objects created by PhysicsServer3D. If the ``RID`` passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. + public static func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_rid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_active") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Activates or deactivates the 3D physics engine. + public static func setActive(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_process_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_process_info") + return withUnsafePointer(to: &PhysicsServer3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1332958745)! + } + + } + + }() + + /// Returns information about the current state of the 3D physics engine. See ``PhysicsServer3D/ProcessInfo`` for a list of available states. + public static func getProcessInfo(_ processInfo: PhysicsServer3D.ProcessInfo) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: processInfo.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_process_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer3DExtension.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DExtension.swift new file mode 100644 index 000000000..a08233e7a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DExtension.swift @@ -0,0 +1,2884 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides virtual methods that can be overridden to create custom ``PhysicsServer3D`` implementations. +/// +/// This class extends ``PhysicsServer3D`` by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server. +/// +/// Intended for use with GDExtension to create custom implementations of ``PhysicsServer3D``. +/// +open class PhysicsServer3DExtension: PhysicsServer3D { + override open class var godotClassName: StringName { "PhysicsServer3DExtension" } + /* Methods */ + /// + @_documentation(visibility: public) + open func _worldBoundaryShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _separationRayShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _sphereShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _boxShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _capsuleShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _cylinderShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _convexPolygonShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _concavePolygonShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _heightmapShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _customShapeCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _shapeSetData(shape: RID, data: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _shapeSetCustomSolverBias(shape: RID, bias: Double) { + } + + /// + @_documentation(visibility: public) + open func _shapeSetMargin(shape: RID, margin: Double) { + } + + /// + @_documentation(visibility: public) + open func _shapeGetMargin(shape: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _shapeGetType(shape: RID) -> PhysicsServer3D.ShapeType { + return PhysicsServer3D.ShapeType(rawValue: 0)! + } + + /// + @_documentation(visibility: public) + open func _shapeGetData(shape: RID) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _shapeGetCustomSolverBias(shape: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _spaceCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _spaceSetActive(space: RID, active: Bool) { + } + + /// + @_documentation(visibility: public) + open func _spaceIsActive(space: RID) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _spaceSetParam(space: RID, param: PhysicsServer3D.SpaceParameter, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _spaceGetParam(space: RID, param: PhysicsServer3D.SpaceParameter) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _spaceGetDirectState(space: RID) -> PhysicsDirectSpaceState3D? { + return PhysicsDirectSpaceState3D () + } + + /// + @_documentation(visibility: public) + open func _spaceSetDebugContacts(space: RID, maxContacts: Int32) { + } + + /// + @_documentation(visibility: public) + open func _spaceGetContacts(space: RID) -> PackedVector3Array { + return PackedVector3Array () + } + + /// + @_documentation(visibility: public) + open func _spaceGetContactCount(space: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _areaCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _areaSetSpace(area: RID, space: RID) { + } + + /// + @_documentation(visibility: public) + open func _areaGetSpace(area: RID) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _areaAddShape(area: RID, shape: RID, transform: Transform3D, disabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _areaSetShape(area: RID, shapeIdx: Int32, shape: RID) { + } + + /// + @_documentation(visibility: public) + open func _areaSetShapeTransform(area: RID, shapeIdx: Int32, transform: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _areaSetShapeDisabled(area: RID, shapeIdx: Int32, disabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _areaGetShapeCount(area: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _areaGetShape(area: RID, shapeIdx: Int32) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _areaGetShapeTransform(area: RID, shapeIdx: Int32) -> Transform3D { + return Transform3D () + } + + /// + @_documentation(visibility: public) + open func _areaRemoveShape(area: RID, shapeIdx: Int32) { + } + + /// + @_documentation(visibility: public) + open func _areaClearShapes(area: RID) { + } + + /// + @_documentation(visibility: public) + open func _areaAttachObjectInstanceId(area: RID, id: UInt) { + } + + /// + @_documentation(visibility: public) + open func _areaGetObjectInstanceId(area: RID) -> UInt { + return 0 + } + + /// + @_documentation(visibility: public) + open func _areaSetParam(area: RID, param: PhysicsServer3D.AreaParameter, value: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _areaSetTransform(area: RID, transform: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _areaGetParam(area: RID, param: PhysicsServer3D.AreaParameter) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _areaGetTransform(area: RID) -> Transform3D { + return Transform3D () + } + + /// + @_documentation(visibility: public) + open func _areaSetCollisionLayer(area: RID, layer: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _areaGetCollisionLayer(area: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _areaSetCollisionMask(area: RID, mask: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _areaGetCollisionMask(area: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _areaSetMonitorable(area: RID, monitorable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _areaSetRayPickable(area: RID, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _areaSetMonitorCallback(area: RID, callback: Callable) { + } + + /// + @_documentation(visibility: public) + open func _areaSetAreaMonitorCallback(area: RID, callback: Callable) { + } + + /// + @_documentation(visibility: public) + open func _bodyCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _bodySetSpace(body: RID, space: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetSpace(body: RID) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _bodySetMode(body: RID, mode: PhysicsServer3D.BodyMode) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetMode(body: RID) -> PhysicsServer3D.BodyMode { + return PhysicsServer3D.BodyMode(rawValue: 0)! + } + + /// + @_documentation(visibility: public) + open func _bodyAddShape(body: RID, shape: RID, transform: Transform3D, disabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodySetShape(body: RID, shapeIdx: Int32, shape: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodySetShapeTransform(body: RID, shapeIdx: Int32, transform: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _bodySetShapeDisabled(body: RID, shapeIdx: Int32, disabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetShapeCount(body: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodyGetShape(body: RID, shapeIdx: Int32) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _bodyGetShapeTransform(body: RID, shapeIdx: Int32) -> Transform3D { + return Transform3D () + } + + /// + @_documentation(visibility: public) + open func _bodyRemoveShape(body: RID, shapeIdx: Int32) { + } + + /// + @_documentation(visibility: public) + open func _bodyClearShapes(body: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodyAttachObjectInstanceId(body: RID, id: UInt) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetObjectInstanceId(body: RID) -> UInt { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodySetEnableContinuousCollisionDetection(body: RID, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodyIsContinuousCollisionDetectionEnabled(body: RID) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _bodySetCollisionLayer(body: RID, layer: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetCollisionLayer(body: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodySetCollisionMask(body: RID, mask: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetCollisionMask(body: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodySetCollisionPriority(body: RID, priority: Double) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetCollisionPriority(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _bodySetUserFlags(body: RID, flags: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetUserFlags(body: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodySetParam(body: RID, param: PhysicsServer3D.BodyParameter, value: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetParam(body: RID, param: PhysicsServer3D.BodyParameter) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _bodyResetMassProperties(body: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodySetState(body: RID, state: PhysicsServer3D.BodyState, value: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetState(body: RID, state: PhysicsServer3D.BodyState) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _bodyApplyCentralImpulse(body: RID, impulse: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyApplyImpulse(body: RID, impulse: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyApplyTorqueImpulse(body: RID, impulse: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyApplyCentralForce(body: RID, force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyApplyForce(body: RID, force: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyApplyTorque(body: RID, torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyAddConstantCentralForce(body: RID, force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyAddConstantForce(body: RID, force: Vector3, position: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyAddConstantTorque(body: RID, torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodySetConstantForce(body: RID, force: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetConstantForce(body: RID) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _bodySetConstantTorque(body: RID, torque: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetConstantTorque(body: RID) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _bodySetAxisVelocity(body: RID, axisVelocity: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _bodySetAxisLock(body: RID, axis: PhysicsServer3D.BodyAxis, lock: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodyIsAxisLocked(body: RID, axis: PhysicsServer3D.BodyAxis) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _bodyAddCollisionException(body: RID, exceptedBody: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodyRemoveCollisionException(body: RID, exceptedBody: RID) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetCollisionExceptions(body: RID) -> VariantCollection { + return VariantCollection() + } + + /// + @_documentation(visibility: public) + open func _bodySetMaxContactsReported(body: RID, amount: Int32) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetMaxContactsReported(body: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _bodySetContactsReportedDepthThreshold(body: RID, threshold: Double) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetContactsReportedDepthThreshold(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _bodySetOmitForceIntegration(body: RID, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodyIsOmittingForceIntegration(body: RID) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _bodySetStateSyncCallback(body: RID, callable: Callable) { + } + + /// + @_documentation(visibility: public) + open func _bodySetForceIntegrationCallback(body: RID, callable: Callable, userdata: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _bodySetRayPickable(body: RID, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _bodyGetDirectState(body: RID) -> PhysicsDirectBodyState3D? { + return PhysicsDirectBodyState3D () + } + + /// + @_documentation(visibility: public) + open func _softBodyCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _softBodyUpdateRenderingServer(body: RID, renderingServerHandler: PhysicsServer3DRenderingServerHandler?) { + } + + /// + @_documentation(visibility: public) + open func _softBodySetSpace(body: RID, space: RID) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetSpace(body: RID) -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _softBodySetRayPickable(body: RID, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _softBodySetCollisionLayer(body: RID, layer: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetCollisionLayer(body: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetCollisionMask(body: RID, mask: UInt32) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetCollisionMask(body: RID) -> UInt32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _softBodyAddCollisionException(body: RID, bodyB: RID) { + } + + /// + @_documentation(visibility: public) + open func _softBodyRemoveCollisionException(body: RID, bodyB: RID) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetCollisionExceptions(body: RID) -> VariantCollection { + return VariantCollection() + } + + /// + @_documentation(visibility: public) + open func _softBodySetState(body: RID, state: PhysicsServer3D.BodyState, variant: Variant?) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetState(body: RID, state: PhysicsServer3D.BodyState) -> Variant? { + return nil + } + + /// + @_documentation(visibility: public) + open func _softBodySetTransform(body: RID, transform: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _softBodySetSimulationPrecision(body: RID, simulationPrecision: Int32) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetSimulationPrecision(body: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetTotalMass(body: RID, totalMass: Double) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetTotalMass(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetLinearStiffness(body: RID, linearStiffness: Double) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetLinearStiffness(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetPressureCoefficient(body: RID, pressureCoefficient: Double) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetPressureCoefficient(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetDampingCoefficient(body: RID, dampingCoefficient: Double) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetDampingCoefficient(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetDragCoefficient(body: RID, dragCoefficient: Double) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetDragCoefficient(body: RID) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _softBodySetMesh(body: RID, mesh: RID) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetBounds(body: RID) -> AABB { + return AABB () + } + + /// + @_documentation(visibility: public) + open func _softBodyMovePoint(body: RID, pointIndex: Int32, globalPosition: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _softBodyGetPointGlobalPosition(body: RID, pointIndex: Int32) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _softBodyRemoveAllPinnedPoints(body: RID) { + } + + /// + @_documentation(visibility: public) + open func _softBodyPinPoint(body: RID, pointIndex: Int32, pin: Bool) { + } + + /// + @_documentation(visibility: public) + open func _softBodyIsPointPinned(body: RID, pointIndex: Int32) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _jointCreate() -> RID { + return RID () + } + + /// + @_documentation(visibility: public) + open func _jointClear(joint: RID) { + } + + /// + @_documentation(visibility: public) + open func _jointMakePin(joint: RID, bodyA: RID, localA: Vector3, bodyB: RID, localB: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _pinJointSetParam(joint: RID, param: PhysicsServer3D.PinJointParam, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _pinJointGetParam(joint: RID, param: PhysicsServer3D.PinJointParam) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _pinJointSetLocalA(joint: RID, localA: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _pinJointGetLocalA(joint: RID) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _pinJointSetLocalB(joint: RID, localB: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _pinJointGetLocalB(joint: RID) -> Vector3 { + return Vector3 () + } + + /// + @_documentation(visibility: public) + open func _jointMakeHinge(joint: RID, bodyA: RID, hingeA: Transform3D, bodyB: RID, hingeB: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _jointMakeHingeSimple(joint: RID, bodyA: RID, pivotA: Vector3, axisA: Vector3, bodyB: RID, pivotB: Vector3, axisB: Vector3) { + } + + /// + @_documentation(visibility: public) + open func _hingeJointSetParam(joint: RID, param: PhysicsServer3D.HingeJointParam, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _hingeJointGetParam(joint: RID, param: PhysicsServer3D.HingeJointParam) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _hingeJointSetFlag(joint: RID, flag: PhysicsServer3D.HingeJointFlag, enabled: Bool) { + } + + /// + @_documentation(visibility: public) + open func _hingeJointGetFlag(joint: RID, flag: PhysicsServer3D.HingeJointFlag) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _jointMakeSlider(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _sliderJointSetParam(joint: RID, param: PhysicsServer3D.SliderJointParam, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _sliderJointGetParam(joint: RID, param: PhysicsServer3D.SliderJointParam) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _jointMakeConeTwist(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _coneTwistJointSetParam(joint: RID, param: PhysicsServer3D.ConeTwistJointParam, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _coneTwistJointGetParam(joint: RID, param: PhysicsServer3D.ConeTwistJointParam) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _jointMakeGeneric6dof(joint: RID, bodyA: RID, localRefA: Transform3D, bodyB: RID, localRefB: Transform3D) { + } + + /// + @_documentation(visibility: public) + open func _generic6dofJointSetParam(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam, value: Double) { + } + + /// + @_documentation(visibility: public) + open func _generic6dofJointGetParam(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam) -> Double { + return 0.0 + } + + /// + @_documentation(visibility: public) + open func _generic6dofJointSetFlag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag, enable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _generic6dofJointGetFlag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _jointGetType(joint: RID) -> PhysicsServer3D.JointType { + return PhysicsServer3D.JointType(rawValue: 0)! + } + + /// + @_documentation(visibility: public) + open func _jointSetSolverPriority(joint: RID, priority: Int32) { + } + + /// + @_documentation(visibility: public) + open func _jointGetSolverPriority(joint: RID) -> Int32 { + return 0 + } + + /// + @_documentation(visibility: public) + open func _jointDisableCollisionsBetweenBodies(joint: RID, disable: Bool) { + } + + /// + @_documentation(visibility: public) + open func _jointIsDisabledCollisionsBetweenBodies(joint: RID) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _freeRid(_ rid: RID) { + } + + /// + @_documentation(visibility: public) + open func _setActive(_ active: Bool) { + } + + /// + @_documentation(visibility: public) + open func _init() { + } + + /// + @_documentation(visibility: public) + open func _step(_ step: Double) { + } + + /// + @_documentation(visibility: public) + open func _sync() { + } + + /// + @_documentation(visibility: public) + open func _flushQueries() { + } + + /// + @_documentation(visibility: public) + open func _endSync() { + } + + /// + @_documentation(visibility: public) + open func _finish() { + } + + /// + @_documentation(visibility: public) + open func _isFlushingQueries() -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _getProcessInfo(_ processInfo: PhysicsServer3D.ProcessInfo) -> Int32 { + return 0 + } + + fileprivate static var method_body_test_motion_is_excluding_body: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion_is_excluding_body") + return withUnsafePointer(to: &PhysicsServer3DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// + public final func bodyTestMotionIsExcludingBody(_ body: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: body.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer3DExtension.method_body_test_motion_is_excluding_body, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_body_test_motion_is_excluding_object: GDExtensionMethodBindPtr = { + let methodName = StringName("body_test_motion_is_excluding_object") + return withUnsafePointer(to: &PhysicsServer3DExtension.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// + public final func bodyTestMotionIsExcludingObject(_ object: UInt) -> Bool { + var _result: Bool = false + withUnsafePointer(to: object) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer3DExtension.method_body_test_motion_is_excluding_object, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_area_add_shape": + return _PhysicsServer3DExtension_proxy_area_add_shape + case "_area_attach_object_instance_id": + return _PhysicsServer3DExtension_proxy_area_attach_object_instance_id + case "_area_clear_shapes": + return _PhysicsServer3DExtension_proxy_area_clear_shapes + case "_area_create": + return _PhysicsServer3DExtension_proxy_area_create + case "_area_get_collision_layer": + return _PhysicsServer3DExtension_proxy_area_get_collision_layer + case "_area_get_collision_mask": + return _PhysicsServer3DExtension_proxy_area_get_collision_mask + case "_area_get_object_instance_id": + return _PhysicsServer3DExtension_proxy_area_get_object_instance_id + case "_area_get_param": + return _PhysicsServer3DExtension_proxy_area_get_param + case "_area_get_shape": + return _PhysicsServer3DExtension_proxy_area_get_shape + case "_area_get_shape_count": + return _PhysicsServer3DExtension_proxy_area_get_shape_count + case "_area_get_shape_transform": + return _PhysicsServer3DExtension_proxy_area_get_shape_transform + case "_area_get_space": + return _PhysicsServer3DExtension_proxy_area_get_space + case "_area_get_transform": + return _PhysicsServer3DExtension_proxy_area_get_transform + case "_area_remove_shape": + return _PhysicsServer3DExtension_proxy_area_remove_shape + case "_area_set_area_monitor_callback": + return _PhysicsServer3DExtension_proxy_area_set_area_monitor_callback + case "_area_set_collision_layer": + return _PhysicsServer3DExtension_proxy_area_set_collision_layer + case "_area_set_collision_mask": + return _PhysicsServer3DExtension_proxy_area_set_collision_mask + case "_area_set_monitor_callback": + return _PhysicsServer3DExtension_proxy_area_set_monitor_callback + case "_area_set_monitorable": + return _PhysicsServer3DExtension_proxy_area_set_monitorable + case "_area_set_param": + return _PhysicsServer3DExtension_proxy_area_set_param + case "_area_set_ray_pickable": + return _PhysicsServer3DExtension_proxy_area_set_ray_pickable + case "_area_set_shape": + return _PhysicsServer3DExtension_proxy_area_set_shape + case "_area_set_shape_disabled": + return _PhysicsServer3DExtension_proxy_area_set_shape_disabled + case "_area_set_shape_transform": + return _PhysicsServer3DExtension_proxy_area_set_shape_transform + case "_area_set_space": + return _PhysicsServer3DExtension_proxy_area_set_space + case "_area_set_transform": + return _PhysicsServer3DExtension_proxy_area_set_transform + case "_body_add_collision_exception": + return _PhysicsServer3DExtension_proxy_body_add_collision_exception + case "_body_add_constant_central_force": + return _PhysicsServer3DExtension_proxy_body_add_constant_central_force + case "_body_add_constant_force": + return _PhysicsServer3DExtension_proxy_body_add_constant_force + case "_body_add_constant_torque": + return _PhysicsServer3DExtension_proxy_body_add_constant_torque + case "_body_add_shape": + return _PhysicsServer3DExtension_proxy_body_add_shape + case "_body_apply_central_force": + return _PhysicsServer3DExtension_proxy_body_apply_central_force + case "_body_apply_central_impulse": + return _PhysicsServer3DExtension_proxy_body_apply_central_impulse + case "_body_apply_force": + return _PhysicsServer3DExtension_proxy_body_apply_force + case "_body_apply_impulse": + return _PhysicsServer3DExtension_proxy_body_apply_impulse + case "_body_apply_torque": + return _PhysicsServer3DExtension_proxy_body_apply_torque + case "_body_apply_torque_impulse": + return _PhysicsServer3DExtension_proxy_body_apply_torque_impulse + case "_body_attach_object_instance_id": + return _PhysicsServer3DExtension_proxy_body_attach_object_instance_id + case "_body_clear_shapes": + return _PhysicsServer3DExtension_proxy_body_clear_shapes + case "_body_create": + return _PhysicsServer3DExtension_proxy_body_create + case "_body_get_collision_exceptions": + return _PhysicsServer3DExtension_proxy_body_get_collision_exceptions + case "_body_get_collision_layer": + return _PhysicsServer3DExtension_proxy_body_get_collision_layer + case "_body_get_collision_mask": + return _PhysicsServer3DExtension_proxy_body_get_collision_mask + case "_body_get_collision_priority": + return _PhysicsServer3DExtension_proxy_body_get_collision_priority + case "_body_get_constant_force": + return _PhysicsServer3DExtension_proxy_body_get_constant_force + case "_body_get_constant_torque": + return _PhysicsServer3DExtension_proxy_body_get_constant_torque + case "_body_get_contacts_reported_depth_threshold": + return _PhysicsServer3DExtension_proxy_body_get_contacts_reported_depth_threshold + case "_body_get_direct_state": + return _PhysicsServer3DExtension_proxy_body_get_direct_state + case "_body_get_max_contacts_reported": + return _PhysicsServer3DExtension_proxy_body_get_max_contacts_reported + case "_body_get_mode": + return _PhysicsServer3DExtension_proxy_body_get_mode + case "_body_get_object_instance_id": + return _PhysicsServer3DExtension_proxy_body_get_object_instance_id + case "_body_get_param": + return _PhysicsServer3DExtension_proxy_body_get_param + case "_body_get_shape": + return _PhysicsServer3DExtension_proxy_body_get_shape + case "_body_get_shape_count": + return _PhysicsServer3DExtension_proxy_body_get_shape_count + case "_body_get_shape_transform": + return _PhysicsServer3DExtension_proxy_body_get_shape_transform + case "_body_get_space": + return _PhysicsServer3DExtension_proxy_body_get_space + case "_body_get_state": + return _PhysicsServer3DExtension_proxy_body_get_state + case "_body_get_user_flags": + return _PhysicsServer3DExtension_proxy_body_get_user_flags + case "_body_is_axis_locked": + return _PhysicsServer3DExtension_proxy_body_is_axis_locked + case "_body_is_continuous_collision_detection_enabled": + return _PhysicsServer3DExtension_proxy_body_is_continuous_collision_detection_enabled + case "_body_is_omitting_force_integration": + return _PhysicsServer3DExtension_proxy_body_is_omitting_force_integration + case "_body_remove_collision_exception": + return _PhysicsServer3DExtension_proxy_body_remove_collision_exception + case "_body_remove_shape": + return _PhysicsServer3DExtension_proxy_body_remove_shape + case "_body_reset_mass_properties": + return _PhysicsServer3DExtension_proxy_body_reset_mass_properties + case "_body_set_axis_lock": + return _PhysicsServer3DExtension_proxy_body_set_axis_lock + case "_body_set_axis_velocity": + return _PhysicsServer3DExtension_proxy_body_set_axis_velocity + case "_body_set_collision_layer": + return _PhysicsServer3DExtension_proxy_body_set_collision_layer + case "_body_set_collision_mask": + return _PhysicsServer3DExtension_proxy_body_set_collision_mask + case "_body_set_collision_priority": + return _PhysicsServer3DExtension_proxy_body_set_collision_priority + case "_body_set_constant_force": + return _PhysicsServer3DExtension_proxy_body_set_constant_force + case "_body_set_constant_torque": + return _PhysicsServer3DExtension_proxy_body_set_constant_torque + case "_body_set_contacts_reported_depth_threshold": + return _PhysicsServer3DExtension_proxy_body_set_contacts_reported_depth_threshold + case "_body_set_enable_continuous_collision_detection": + return _PhysicsServer3DExtension_proxy_body_set_enable_continuous_collision_detection + case "_body_set_force_integration_callback": + return _PhysicsServer3DExtension_proxy_body_set_force_integration_callback + case "_body_set_max_contacts_reported": + return _PhysicsServer3DExtension_proxy_body_set_max_contacts_reported + case "_body_set_mode": + return _PhysicsServer3DExtension_proxy_body_set_mode + case "_body_set_omit_force_integration": + return _PhysicsServer3DExtension_proxy_body_set_omit_force_integration + case "_body_set_param": + return _PhysicsServer3DExtension_proxy_body_set_param + case "_body_set_ray_pickable": + return _PhysicsServer3DExtension_proxy_body_set_ray_pickable + case "_body_set_shape": + return _PhysicsServer3DExtension_proxy_body_set_shape + case "_body_set_shape_disabled": + return _PhysicsServer3DExtension_proxy_body_set_shape_disabled + case "_body_set_shape_transform": + return _PhysicsServer3DExtension_proxy_body_set_shape_transform + case "_body_set_space": + return _PhysicsServer3DExtension_proxy_body_set_space + case "_body_set_state": + return _PhysicsServer3DExtension_proxy_body_set_state + case "_body_set_state_sync_callback": + return _PhysicsServer3DExtension_proxy_body_set_state_sync_callback + case "_body_set_user_flags": + return _PhysicsServer3DExtension_proxy_body_set_user_flags + case "_box_shape_create": + return _PhysicsServer3DExtension_proxy_box_shape_create + case "_capsule_shape_create": + return _PhysicsServer3DExtension_proxy_capsule_shape_create + case "_concave_polygon_shape_create": + return _PhysicsServer3DExtension_proxy_concave_polygon_shape_create + case "_cone_twist_joint_get_param": + return _PhysicsServer3DExtension_proxy_cone_twist_joint_get_param + case "_cone_twist_joint_set_param": + return _PhysicsServer3DExtension_proxy_cone_twist_joint_set_param + case "_convex_polygon_shape_create": + return _PhysicsServer3DExtension_proxy_convex_polygon_shape_create + case "_custom_shape_create": + return _PhysicsServer3DExtension_proxy_custom_shape_create + case "_cylinder_shape_create": + return _PhysicsServer3DExtension_proxy_cylinder_shape_create + case "_end_sync": + return _PhysicsServer3DExtension_proxy_end_sync + case "_finish": + return _PhysicsServer3DExtension_proxy_finish + case "_flush_queries": + return _PhysicsServer3DExtension_proxy_flush_queries + case "_free_rid": + return _PhysicsServer3DExtension_proxy_free_rid + case "_generic_6dof_joint_get_flag": + return _PhysicsServer3DExtension_proxy_generic_6dof_joint_get_flag + case "_generic_6dof_joint_get_param": + return _PhysicsServer3DExtension_proxy_generic_6dof_joint_get_param + case "_generic_6dof_joint_set_flag": + return _PhysicsServer3DExtension_proxy_generic_6dof_joint_set_flag + case "_generic_6dof_joint_set_param": + return _PhysicsServer3DExtension_proxy_generic_6dof_joint_set_param + case "_get_process_info": + return _PhysicsServer3DExtension_proxy_get_process_info + case "_heightmap_shape_create": + return _PhysicsServer3DExtension_proxy_heightmap_shape_create + case "_hinge_joint_get_flag": + return _PhysicsServer3DExtension_proxy_hinge_joint_get_flag + case "_hinge_joint_get_param": + return _PhysicsServer3DExtension_proxy_hinge_joint_get_param + case "_hinge_joint_set_flag": + return _PhysicsServer3DExtension_proxy_hinge_joint_set_flag + case "_hinge_joint_set_param": + return _PhysicsServer3DExtension_proxy_hinge_joint_set_param + case "_init": + return _PhysicsServer3DExtension_proxy_init + case "_is_flushing_queries": + return _PhysicsServer3DExtension_proxy_is_flushing_queries + case "_joint_clear": + return _PhysicsServer3DExtension_proxy_joint_clear + case "_joint_create": + return _PhysicsServer3DExtension_proxy_joint_create + case "_joint_disable_collisions_between_bodies": + return _PhysicsServer3DExtension_proxy_joint_disable_collisions_between_bodies + case "_joint_get_solver_priority": + return _PhysicsServer3DExtension_proxy_joint_get_solver_priority + case "_joint_get_type": + return _PhysicsServer3DExtension_proxy_joint_get_type + case "_joint_is_disabled_collisions_between_bodies": + return _PhysicsServer3DExtension_proxy_joint_is_disabled_collisions_between_bodies + case "_joint_make_cone_twist": + return _PhysicsServer3DExtension_proxy_joint_make_cone_twist + case "_joint_make_generic_6dof": + return _PhysicsServer3DExtension_proxy_joint_make_generic_6dof + case "_joint_make_hinge": + return _PhysicsServer3DExtension_proxy_joint_make_hinge + case "_joint_make_hinge_simple": + return _PhysicsServer3DExtension_proxy_joint_make_hinge_simple + case "_joint_make_pin": + return _PhysicsServer3DExtension_proxy_joint_make_pin + case "_joint_make_slider": + return _PhysicsServer3DExtension_proxy_joint_make_slider + case "_joint_set_solver_priority": + return _PhysicsServer3DExtension_proxy_joint_set_solver_priority + case "_pin_joint_get_local_a": + return _PhysicsServer3DExtension_proxy_pin_joint_get_local_a + case "_pin_joint_get_local_b": + return _PhysicsServer3DExtension_proxy_pin_joint_get_local_b + case "_pin_joint_get_param": + return _PhysicsServer3DExtension_proxy_pin_joint_get_param + case "_pin_joint_set_local_a": + return _PhysicsServer3DExtension_proxy_pin_joint_set_local_a + case "_pin_joint_set_local_b": + return _PhysicsServer3DExtension_proxy_pin_joint_set_local_b + case "_pin_joint_set_param": + return _PhysicsServer3DExtension_proxy_pin_joint_set_param + case "_separation_ray_shape_create": + return _PhysicsServer3DExtension_proxy_separation_ray_shape_create + case "_set_active": + return _PhysicsServer3DExtension_proxy_set_active + case "_shape_get_custom_solver_bias": + return _PhysicsServer3DExtension_proxy_shape_get_custom_solver_bias + case "_shape_get_data": + return _PhysicsServer3DExtension_proxy_shape_get_data + case "_shape_get_margin": + return _PhysicsServer3DExtension_proxy_shape_get_margin + case "_shape_get_type": + return _PhysicsServer3DExtension_proxy_shape_get_type + case "_shape_set_custom_solver_bias": + return _PhysicsServer3DExtension_proxy_shape_set_custom_solver_bias + case "_shape_set_data": + return _PhysicsServer3DExtension_proxy_shape_set_data + case "_shape_set_margin": + return _PhysicsServer3DExtension_proxy_shape_set_margin + case "_slider_joint_get_param": + return _PhysicsServer3DExtension_proxy_slider_joint_get_param + case "_slider_joint_set_param": + return _PhysicsServer3DExtension_proxy_slider_joint_set_param + case "_soft_body_add_collision_exception": + return _PhysicsServer3DExtension_proxy_soft_body_add_collision_exception + case "_soft_body_create": + return _PhysicsServer3DExtension_proxy_soft_body_create + case "_soft_body_get_bounds": + return _PhysicsServer3DExtension_proxy_soft_body_get_bounds + case "_soft_body_get_collision_exceptions": + return _PhysicsServer3DExtension_proxy_soft_body_get_collision_exceptions + case "_soft_body_get_collision_layer": + return _PhysicsServer3DExtension_proxy_soft_body_get_collision_layer + case "_soft_body_get_collision_mask": + return _PhysicsServer3DExtension_proxy_soft_body_get_collision_mask + case "_soft_body_get_damping_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_get_damping_coefficient + case "_soft_body_get_drag_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_get_drag_coefficient + case "_soft_body_get_linear_stiffness": + return _PhysicsServer3DExtension_proxy_soft_body_get_linear_stiffness + case "_soft_body_get_point_global_position": + return _PhysicsServer3DExtension_proxy_soft_body_get_point_global_position + case "_soft_body_get_pressure_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_get_pressure_coefficient + case "_soft_body_get_simulation_precision": + return _PhysicsServer3DExtension_proxy_soft_body_get_simulation_precision + case "_soft_body_get_space": + return _PhysicsServer3DExtension_proxy_soft_body_get_space + case "_soft_body_get_state": + return _PhysicsServer3DExtension_proxy_soft_body_get_state + case "_soft_body_get_total_mass": + return _PhysicsServer3DExtension_proxy_soft_body_get_total_mass + case "_soft_body_is_point_pinned": + return _PhysicsServer3DExtension_proxy_soft_body_is_point_pinned + case "_soft_body_move_point": + return _PhysicsServer3DExtension_proxy_soft_body_move_point + case "_soft_body_pin_point": + return _PhysicsServer3DExtension_proxy_soft_body_pin_point + case "_soft_body_remove_all_pinned_points": + return _PhysicsServer3DExtension_proxy_soft_body_remove_all_pinned_points + case "_soft_body_remove_collision_exception": + return _PhysicsServer3DExtension_proxy_soft_body_remove_collision_exception + case "_soft_body_set_collision_layer": + return _PhysicsServer3DExtension_proxy_soft_body_set_collision_layer + case "_soft_body_set_collision_mask": + return _PhysicsServer3DExtension_proxy_soft_body_set_collision_mask + case "_soft_body_set_damping_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_set_damping_coefficient + case "_soft_body_set_drag_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_set_drag_coefficient + case "_soft_body_set_linear_stiffness": + return _PhysicsServer3DExtension_proxy_soft_body_set_linear_stiffness + case "_soft_body_set_mesh": + return _PhysicsServer3DExtension_proxy_soft_body_set_mesh + case "_soft_body_set_pressure_coefficient": + return _PhysicsServer3DExtension_proxy_soft_body_set_pressure_coefficient + case "_soft_body_set_ray_pickable": + return _PhysicsServer3DExtension_proxy_soft_body_set_ray_pickable + case "_soft_body_set_simulation_precision": + return _PhysicsServer3DExtension_proxy_soft_body_set_simulation_precision + case "_soft_body_set_space": + return _PhysicsServer3DExtension_proxy_soft_body_set_space + case "_soft_body_set_state": + return _PhysicsServer3DExtension_proxy_soft_body_set_state + case "_soft_body_set_total_mass": + return _PhysicsServer3DExtension_proxy_soft_body_set_total_mass + case "_soft_body_set_transform": + return _PhysicsServer3DExtension_proxy_soft_body_set_transform + case "_soft_body_update_rendering_server": + return _PhysicsServer3DExtension_proxy_soft_body_update_rendering_server + case "_space_create": + return _PhysicsServer3DExtension_proxy_space_create + case "_space_get_contact_count": + return _PhysicsServer3DExtension_proxy_space_get_contact_count + case "_space_get_contacts": + return _PhysicsServer3DExtension_proxy_space_get_contacts + case "_space_get_direct_state": + return _PhysicsServer3DExtension_proxy_space_get_direct_state + case "_space_get_param": + return _PhysicsServer3DExtension_proxy_space_get_param + case "_space_is_active": + return _PhysicsServer3DExtension_proxy_space_is_active + case "_space_set_active": + return _PhysicsServer3DExtension_proxy_space_set_active + case "_space_set_debug_contacts": + return _PhysicsServer3DExtension_proxy_space_set_debug_contacts + case "_space_set_param": + return _PhysicsServer3DExtension_proxy_space_set_param + case "_sphere_shape_create": + return _PhysicsServer3DExtension_proxy_sphere_shape_create + case "_step": + return _PhysicsServer3DExtension_proxy_step + case "_sync": + return _PhysicsServer3DExtension_proxy_sync + case "_world_boundary_shape_create": + return _PhysicsServer3DExtension_proxy_world_boundary_shape_create + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsServer3DExtension_proxy_area_add_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaAddShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shape: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, disabled: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_attach_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaAttachObjectInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_clear_shapes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaClearShapes (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_area_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_area_get_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetCollisionLayer (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_area_get_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetCollisionMask (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_area_get_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetObjectInstanceId (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer3DExtension_proxy_area_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetParam (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.AreaParameter.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer3DExtension_proxy_area_get_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_area_get_shape_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShapeCount (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_area_get_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetShapeTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _PhysicsServer3DExtension_proxy_area_get_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetSpace (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_area_get_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._areaGetTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _PhysicsServer3DExtension_proxy_area_remove_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaRemoveShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_area_monitor_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetAreaMonitorCallback (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callback: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_area_set_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetCollisionLayer (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), layer: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetCollisionMask (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mask: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_monitor_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetMonitorCallback (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callback: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_area_set_monitorable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetMonitorable (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), monitorable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetParam (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.AreaParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_ray_pickable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetRayPickable (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShape (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, shape: RID (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_area_set_shape_disabled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShapeDisabled (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, disabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetShapeTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_area_set_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetSpace (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), space: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_area_set_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._areaSetTransform (area: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [1]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_add_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), exceptedBody: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_add_constant_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantCentralForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_add_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_add_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_add_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAddShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shape: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, disabled: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_central_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyCentralForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_central_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyCentralImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Vector3.self).pointee, position: args [2]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_apply_torque_impulse (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyApplyTorqueImpulse (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), impulse: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_attach_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyAttachObjectInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), id: args [1]!.assumingMemoryBound (to: UInt.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_clear_shapes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyClearShapes (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_body_get_collision_exceptions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionExceptions (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::RID +} + +func _PhysicsServer3DExtension_proxy_body_get_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_collision_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetCollisionPriority (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_contacts_reported_depth_threshold (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetContactsReportedDepthThreshold (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_direct_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetDirectState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectBodyState3D +} + +func _PhysicsServer3DExtension_proxy_body_get_max_contacts_reported (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetMaxContactsReported (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_object_instance_id (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetObjectInstanceId (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetParam (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyParameter.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer3DExtension_proxy_body_get_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_body_get_shape_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShapeCount (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetShapeTransform (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _PhysicsServer3DExtension_proxy_body_get_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_body_get_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyState.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer3DExtension_proxy_body_get_user_flags (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyGetUserFlags (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_body_is_axis_locked (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyIsAxisLocked (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyAxis.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_body_is_continuous_collision_detection_enabled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyIsContinuousCollisionDetectionEnabled (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_body_is_omitting_force_integration (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._bodyIsOmittingForceIntegration (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_body_remove_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyRemoveCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), exceptedBody: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_remove_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyRemoveShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_reset_mass_properties (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodyResetMassProperties (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_set_axis_lock (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetAxisLock (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyAxis.self).pointee, lock: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_axis_velocity (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetAxisVelocity (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axisVelocity: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), layer: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mask: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_collision_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetCollisionPriority (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), priority: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_constant_force (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetConstantForce (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), force: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_constant_torque (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetConstantTorque (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), torque: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_contacts_reported_depth_threshold (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetContactsReportedDepthThreshold (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), threshold: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_enable_continuous_collision_detection (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetEnableContinuousCollisionDetection (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_force_integration_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetForceIntegrationCallback (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callable: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee), userdata: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_max_contacts_reported (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetMaxContactsReported (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), amount: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_mode (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetMode (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mode: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyMode.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_omit_force_integration (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetOmitForceIntegration (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetParam (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_ray_pickable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetRayPickable (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_shape (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShape (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, shape: RID (content: args [2]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_set_shape_disabled (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShapeDisabled (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, disabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_shape_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetShapeTransform (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), shapeIdx: args [1]!.assumingMemoryBound (to: Int32.self).pointee, transform: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), space: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_set_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyState.self).pointee, value: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_body_set_state_sync_callback (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetStateSyncCallback (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), callable: Callable (content: args [1]!.assumingMemoryBound (to: (Int64, Int64).self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_body_set_user_flags (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._bodySetUserFlags (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), flags: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_box_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._boxShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_capsule_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._capsuleShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_concave_polygon_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._concavePolygonShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_cone_twist_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._coneTwistJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.ConeTwistJointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_cone_twist_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._coneTwistJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.ConeTwistJointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_convex_polygon_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._convexPolygonShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_custom_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._customShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_cylinder_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._cylinderShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_end_sync (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._endSync () +} + +func _PhysicsServer3DExtension_proxy_finish (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._finish () +} + +func _PhysicsServer3DExtension_proxy_flush_queries (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._flushQueries () +} + +func _PhysicsServer3DExtension_proxy_free_rid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._freeRid (RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_generic_6dof_joint_get_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._generic6dofJointGetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: Vector3.Axis.self).pointee, flag: args [2]!.assumingMemoryBound (to: PhysicsServer3D.G6DOFJointAxisFlag.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_generic_6dof_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._generic6dofJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: Vector3.Axis.self).pointee, param: args [2]!.assumingMemoryBound (to: PhysicsServer3D.G6DOFJointAxisParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_generic_6dof_joint_set_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._generic6dofJointSetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: Vector3.Axis.self).pointee, flag: args [2]!.assumingMemoryBound (to: PhysicsServer3D.G6DOFJointAxisFlag.self).pointee, enable: args [3]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_generic_6dof_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._generic6dofJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), axis: args [1]!.assumingMemoryBound (to: Vector3.Axis.self).pointee, param: args [2]!.assumingMemoryBound (to: PhysicsServer3D.G6DOFJointAxisParam.self).pointee, value: args [3]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_get_process_info (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getProcessInfo (args [0]!.assumingMemoryBound (to: PhysicsServer3D.ProcessInfo.self).pointee) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_heightmap_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._heightmapShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_hinge_joint_get_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hingeJointGetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), flag: args [1]!.assumingMemoryBound (to: PhysicsServer3D.HingeJointFlag.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_hinge_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._hingeJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.HingeJointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_hinge_joint_set_flag (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._hingeJointSetFlag (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), flag: args [1]!.assumingMemoryBound (to: PhysicsServer3D.HingeJointFlag.self).pointee, enabled: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_hinge_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._hingeJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.HingeJointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_init (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._init () +} + +func _PhysicsServer3DExtension_proxy_is_flushing_queries (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._isFlushingQueries () + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_joint_clear (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointClear (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_joint_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_joint_disable_collisions_between_bodies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointDisableCollisionsBetweenBodies (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), disable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_get_solver_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointGetSolverPriority (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_joint_get_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointGetType (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_joint_is_disabled_collisions_between_bodies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._jointIsDisabledCollisionsBetweenBodies (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_joint_make_cone_twist (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeConeTwist (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), localRefA: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), localRefB: args [4]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_make_generic_6dof (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeGeneric6dof (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), localRefA: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), localRefB: args [4]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_make_hinge (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeHinge (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), hingeA: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), hingeB: args [4]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_make_hinge_simple (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeHingeSimple (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), pivotA: args [2]!.assumingMemoryBound (to: Vector3.self).pointee, axisA: args [3]!.assumingMemoryBound (to: Vector3.self).pointee, bodyB: RID (content: args [4]!.assumingMemoryBound (to: Int64.self).pointee), pivotB: args [5]!.assumingMemoryBound (to: Vector3.self).pointee, axisB: args [6]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_make_pin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakePin (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), localA: args [2]!.assumingMemoryBound (to: Vector3.self).pointee, bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), localB: args [4]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_make_slider (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointMakeSlider (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyA: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee), localRefA: args [2]!.assumingMemoryBound (to: Transform3D.self).pointee, bodyB: RID (content: args [3]!.assumingMemoryBound (to: Int64.self).pointee), localRefB: args [4]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_joint_set_solver_priority (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._jointSetSolverPriority (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), priority: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_get_local_a (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._pinJointGetLocalA (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_get_local_b (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._pinJointGetLocalB (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._pinJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.PinJointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_set_local_a (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pinJointSetLocalA (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), localA: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_set_local_b (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pinJointSetLocalB (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), localB: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_pin_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._pinJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.PinJointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_separation_ray_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._separationRayShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_set_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setActive (args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_shape_get_custom_solver_bias (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetCustomSolverBias (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_shape_get_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetData (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer3DExtension_proxy_shape_get_margin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetMargin (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_shape_get_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._shapeGetType (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_shape_set_custom_solver_bias (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._shapeSetCustomSolverBias (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bias: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_shape_set_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._shapeSetData (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), data: args [1]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_shape_set_margin (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._shapeSetMargin (shape: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), margin: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_slider_joint_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._sliderJointGetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.SliderJointParam.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_slider_joint_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._sliderJointSetParam (joint: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.SliderJointParam.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_add_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodyAddCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyB: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_soft_body_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_bounds (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetBounds (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: AABB.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_collision_exceptions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetCollisionExceptions (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.array.content, as: type (of: ret.array.content)) // typedarray::RID +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_damping_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetDampingCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_drag_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetDragCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_linear_stiffness (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetLinearStiffness (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_point_global_position (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetPointGlobalPosition (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pointIndex: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_pressure_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetPressureCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_simulation_precision (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetSimulationPrecision (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyState.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _PhysicsServer3DExtension_proxy_soft_body_get_total_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyGetTotalMass (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_is_point_pinned (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._softBodyIsPointPinned (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pointIndex: args [1]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_soft_body_move_point (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodyMovePoint (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pointIndex: args [1]!.assumingMemoryBound (to: Int32.self).pointee, globalPosition: args [2]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_pin_point (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodyPinPoint (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pointIndex: args [1]!.assumingMemoryBound (to: Int32.self).pointee, pin: args [2]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_remove_all_pinned_points (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodyRemoveAllPinnedPoints (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_soft_body_remove_collision_exception (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodyRemoveCollisionException (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), bodyB: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_collision_layer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetCollisionLayer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), layer: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_collision_mask (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetCollisionMask (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mask: args [1]!.assumingMemoryBound (to: UInt32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_damping_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetDampingCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), dampingCoefficient: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_drag_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetDragCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), dragCoefficient: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_linear_stiffness (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetLinearStiffness (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), linearStiffness: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_mesh (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetMesh (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), mesh: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_pressure_coefficient (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetPressureCoefficient (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), pressureCoefficient: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_ray_pickable (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetRayPickable (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), enable: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_simulation_precision (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetSimulationPrecision (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), simulationPrecision: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_space (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetSpace (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), space: RID (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetState (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), state: args [1]!.assumingMemoryBound (to: PhysicsServer3D.BodyState.self).pointee, variant: args [2]!.assumingMemoryBound (to: Variant.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_total_mass (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetTotalMass (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), totalMass: args [1]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_set_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._softBodySetTransform (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), transform: args [1]!.assumingMemoryBound (to: Transform3D.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_soft_body_update_rendering_server (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_1 = args [1]!.load (as: UnsafeRawPointer.self) + + swiftObject._softBodyUpdateRenderingServer (body: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), renderingServerHandler: lookupLiveObject (handleAddress: resolved_1) as? PhysicsServer3DRenderingServerHandler ?? PhysicsServer3DRenderingServerHandler (nativeHandle: resolved_1)) +} + +func _PhysicsServer3DExtension_proxy_space_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_space_get_contact_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetContactCount (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Int32.self) +} + +func _PhysicsServer3DExtension_proxy_space_get_contacts (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetContacts (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedVector3Array + ret.content = PackedVector3Array.zero +} + +func _PhysicsServer3DExtension_proxy_space_get_direct_state (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetDirectState (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // PhysicsDirectSpaceState3D +} + +func _PhysicsServer3DExtension_proxy_space_get_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceGetParam (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.SpaceParameter.self).pointee) + retPtr!.storeBytes (of: ret, as: Double.self) +} + +func _PhysicsServer3DExtension_proxy_space_is_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._spaceIsActive (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _PhysicsServer3DExtension_proxy_space_set_active (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetActive (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), active: args [1]!.assumingMemoryBound (to: Bool.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_space_set_debug_contacts (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetDebugContacts (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), maxContacts: args [1]!.assumingMemoryBound (to: Int32.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_space_set_param (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._spaceSetParam (space: RID (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee), param: args [1]!.assumingMemoryBound (to: PhysicsServer3D.SpaceParameter.self).pointee, value: args [2]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_sphere_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._sphereShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _PhysicsServer3DExtension_proxy_step (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._step (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _PhysicsServer3DExtension_proxy_sync (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._sync () +} + +func _PhysicsServer3DExtension_proxy_world_boundary_shape_create (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._worldBoundaryShapeCreate () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer3DManager.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DManager.swift new file mode 100644 index 000000000..e86e10382 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DManager.swift @@ -0,0 +1,99 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton for managing ``PhysicsServer3D`` implementations. +/// +/// ``PhysicsServer3DManager`` is the API for registering ``PhysicsServer3D`` implementations and for setting the default implementation. +/// +/// > Note: It is not possible to switch physics servers at runtime. This class is only used on startup at the server initialization level, by Godot itself and possibly by GDExtensions. +/// +open class PhysicsServer3DManager: Object { + /// The shared instance of this class + public static var shared: PhysicsServer3DManager = { + return withUnsafePointer (to: &PhysicsServer3DManager.godotClassName.content) { ptr in + PhysicsServer3DManager (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "PhysicsServer3DManager" } + /* Methods */ + fileprivate static var method_register_server: GDExtensionMethodBindPtr = { + let methodName = StringName("register_server") + return withUnsafePointer(to: &PhysicsServer3DManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2137474292)! + } + + } + + }() + + /// Register a ``PhysicsServer3D`` implementation by passing a `name` and a ``Callable`` that returns a ``PhysicsServer3D`` object. + public static func registerServer(name: String, createCallback: Callable) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: createCallback.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_register_server, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_default_server: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_server") + return withUnsafePointer(to: &PhysicsServer3DManager.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Set the default ``PhysicsServer3D`` implementation to the one identified by `name`, if `priority` is greater than the priority of the current default implementation. + public static func setDefaultServer(name: String, priority: Int32) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_default_server, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsServer3DRenderingServerHandler.swift b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DRenderingServerHandler.swift new file mode 100644 index 000000000..8a8430b16 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsServer3DRenderingServerHandler.swift @@ -0,0 +1,168 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class used to provide ``PhysicsServer3DExtension/_softBodyUpdateRenderingServer(body:renderingServerHandler:)`` with a rendering handler for soft bodies. +open class PhysicsServer3DRenderingServerHandler: Object { + override open class var godotClassName: StringName { "PhysicsServer3DRenderingServerHandler" } + /* Methods */ + /// Called by the ``PhysicsServer3D`` to set the position for the ``SoftBody3D`` vertex at the index specified by `vertexId`. + /// + /// > Note: The `vertex` parameter used to be of type `const void*` prior to Godot 4.2. + /// + @_documentation(visibility: public) + open func _setVertex(vertexId: Int32, vertex: Vector3) { + } + + /// Called by the ``PhysicsServer3D`` to set the normal for the ``SoftBody3D`` vertex at the index specified by `vertexId`. + /// + /// > Note: The `normal` parameter used to be of type `const void*` prior to Godot 4.2. + /// + @_documentation(visibility: public) + open func _setNormal(vertexId: Int32, normal: Vector3) { + } + + /// Called by the ``PhysicsServer3D`` to set the bounding box for the ``SoftBody3D``. + @_documentation(visibility: public) + open func _setAabb(_ aabb: AABB) { + } + + fileprivate static var method_set_vertex: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex") + return withUnsafePointer(to: &PhysicsServer3DRenderingServerHandler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the position for the ``SoftBody3D`` vertex at the index specified by `vertexId`. + public final func setVertex(vertexId: Int32, vertex: Vector3) { + withUnsafePointer(to: vertexId) { pArg0 in + withUnsafePointer(to: vertex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer3DRenderingServerHandler.method_set_vertex, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_normal") + return withUnsafePointer(to: &PhysicsServer3DRenderingServerHandler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1530502735)! + } + + } + + }() + + /// Sets the normal for the ``SoftBody3D`` vertex at the index specified by `vertexId`. + public final func setNormal(vertexId: Int32, normal: Vector3) { + withUnsafePointer(to: vertexId) { pArg0 in + withUnsafePointer(to: normal) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer3DRenderingServerHandler.method_set_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_aabb") + return withUnsafePointer(to: &PhysicsServer3DRenderingServerHandler.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + /// Sets the bounding box for the ``SoftBody3D``. + public final func setAabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsServer3DRenderingServerHandler.method_set_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_set_aabb": + return _PhysicsServer3DRenderingServerHandler_proxy_set_aabb + case "_set_normal": + return _PhysicsServer3DRenderingServerHandler_proxy_set_normal + case "_set_vertex": + return _PhysicsServer3DRenderingServerHandler_proxy_set_vertex + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PhysicsServer3DRenderingServerHandler_proxy_set_aabb (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setAabb (args [0]!.assumingMemoryBound (to: AABB.self).pointee) +} + +func _PhysicsServer3DRenderingServerHandler_proxy_set_normal (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setNormal (vertexId: args [0]!.assumingMemoryBound (to: Int32.self).pointee, normal: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + +func _PhysicsServer3DRenderingServerHandler_proxy_set_vertex (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setVertex (vertexId: args [0]!.assumingMemoryBound (to: Int32.self).pointee, vertex: args [1]!.assumingMemoryBound (to: Vector3.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters2D.swift new file mode 100644 index 000000000..3a1c234de --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters2D.swift @@ -0,0 +1,536 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState2D/intersectShape(parameters:maxResults:)``. +/// +/// By changing various properties of this object, such as the shape, you can configure the parameters for ``PhysicsDirectSpaceState2D/intersectShape(parameters:maxResults:)``. +open class PhysicsShapeQueryParameters2D: RefCounted { + override open class var godotClassName: StringName { "PhysicsShapeQueryParameters2D" } + + /* Properties */ + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject2D/getRid()`` to get the ``RID`` associated with a ``CollisionObject2D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// The collision margin for the shape. + final public var margin: Double { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /// The motion of the shape being queried for. + final public var motion: Vector2 { + get { + return get_motion () + } + + set { + set_motion (newValue) + } + + } + + /// The ``Shape2D`` that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over ``shapeRid``. + final public var shape: Resource? { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// The queried shape's ``RID`` that will be used for collision/intersection queries. Use this over ``shape`` if you want to optimize for performance using the Servers API: + /// + final public var shapeRid: RID { + get { + return get_shape_rid () + } + + set { + set_shape_rid (newValue) + } + + } + + /// The queried shape's transform matrix. + final public var transform: Transform2D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody2D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area2D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: Resource?) { + withUnsafePointer(to: shape?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_shape_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape_rid") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape_rid(_ shape: RID) { + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_shape_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_rid") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape_rid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_shape_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform2D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion(_ motion: Vector2) { + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsShapeQueryParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters2D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters3D.swift new file mode 100644 index 000000000..d3ac9b225 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsShapeQueryParameters3D.swift @@ -0,0 +1,536 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsDirectSpaceState3D/intersectShape(parameters:maxResults:)``. +/// +/// By changing various properties of this object, such as the shape, you can configure the parameters for ``PhysicsDirectSpaceState3D/intersectShape(parameters:maxResults:)``. +open class PhysicsShapeQueryParameters3D: RefCounted { + override open class var godotClassName: StringName { "PhysicsShapeQueryParameters3D" } + + /* Properties */ + + /// The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// The list of object ``RID``s that will be excluded from collisions. Use ``CollisionObject3D/getRid()`` to get the ``RID`` associated with a ``CollisionObject3D``-derived node. + final public var exclude: VariantCollection { + get { + return get_exclude () + } + + set { + set_exclude (newValue) + } + + } + + /// The collision margin for the shape. + final public var margin: Double { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /// The motion of the shape being queried for. + final public var motion: Vector3 { + get { + return get_motion () + } + + set { + set_motion (newValue) + } + + } + + /// The ``Shape3D`` that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over ``shapeRid``. + final public var shape: Resource? { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// The queried shape's ``RID`` that will be used for collision/intersection queries. Use this over ``shape`` if you want to optimize for performance using the Servers API: + /// + final public var shapeRid: RID { + get { + return get_shape_rid () + } + + set { + set_shape_rid (newValue) + } + + } + + /// The queried shape's transform matrix. + final public var transform: Transform3D { + get { + return get_transform () + } + + set { + set_transform (newValue) + } + + } + + /// If `true`, the query will take ``PhysicsBody3D``s into account. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// If `true`, the query will take ``Area3D``s into account. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 968641751)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: Resource?) { + withUnsafePointer(to: shape?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 121922552)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_shape_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape_rid") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape_rid(_ shape: RID) { + withUnsafePointer(to: shape.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_shape_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape_rid") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape_rid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_shape_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("set_transform") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_transform(_ transform: Transform3D) { + withUnsafePointer(to: transform) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_transform, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_transform") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_transform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion(_ motion: Vector3) { + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ collisionMask: UInt32) { + withUnsafePointer(to: collisionMask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude(_ exclude: VariantCollection) { + withUnsafePointer(to: exclude.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_exclude, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_get_exclude, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &PhysicsShapeQueryParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsShapeQueryParameters3D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters2D.swift new file mode 100644 index 000000000..fbab49076 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters2D.swift @@ -0,0 +1,429 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsServer2D/bodyTestMotion(body:parameters:result:)``. +/// +/// By changing various properties of this object, such as the motion, you can configure the parameters for ``PhysicsServer2D/bodyTestMotion(body:parameters:result:)``. +open class PhysicsTestMotionParameters2D: RefCounted { + override open class var godotClassName: StringName { "PhysicsTestMotionParameters2D" } + + /* Properties */ + + /// Transform in global space where the motion should start. Usually set to ``Node2D/globalTransform`` for the current body's transform. + final public var from: Transform2D { + get { + return get_from () + } + + set { + set_from (newValue) + } + + } + + /// Motion vector to define the length and direction of the motion to test. + final public var motion: Vector2 { + get { + return get_motion () + } + + set { + set_motion (newValue) + } + + } + + /// Increases the size of the shapes involved in the collision detection. + final public var margin: Double { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /// If set to `true`, shapes of type ``PhysicsServer2D/ShapeType/separationRay`` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. + /// + /// If set to `false`, shapes of type ``PhysicsServer2D/ShapeType/separationRay`` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. + /// + final public var collideSeparationRay: Bool { + get { + return is_collide_separation_ray_enabled () + } + + set { + set_collide_separation_ray_enabled (newValue) + } + + } + + /// Optional array of body ``RID`` to exclude from collision. Use ``CollisionObject2D/getRid()`` to get the ``RID`` associated with a ``CollisionObject2D``-derived node. + final public var excludeBodies: VariantCollection { + get { + return get_exclude_bodies () + } + + set { + set_exclude_bodies (newValue) + } + + } + + /// Optional array of object unique instance ID to exclude from collision. See ``Object/getInstanceId()``. + final public var excludeObjects: VariantCollection { + get { + return get_exclude_objects () + } + + set { + set_exclude_objects (newValue) + } + + } + + /// If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by ``CharacterBody2D`` for improving floor detection during floor snapping. + /// + /// If set to `false`, only collisions resulting from the motion are reported, which is generally the desired behavior. + /// + final public var recoveryAsCollision: Bool { + get { + return is_recovery_as_collision_enabled () + } + + set { + set_recovery_as_collision_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_from") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814499831)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_from() -> Transform2D { + var _result: Transform2D = Transform2D () + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_get_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_from: GDExtensionMethodBindPtr = { + let methodName = StringName("set_from") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761652528)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_from(_ from: Transform2D) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_get_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion(_ motion: Vector2) { + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_separation_ray_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_separation_ray_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_separation_ray_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_is_collide_separation_ray_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_separation_ray_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_separation_ray_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_separation_ray_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_collide_separation_ray_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_bodies") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_bodies() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_get_exclude_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_exclude_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_bodies") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_bodies(_ excludeList: VariantCollection) { + withUnsafePointer(to: excludeList.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_exclude_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_objects: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_objects") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_objects() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_get_exclude_objects, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_exclude_objects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_objects") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_objects(_ excludeList: VariantCollection) { + withUnsafePointer(to: excludeList.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_exclude_objects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_recovery_as_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_recovery_as_collision_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_recovery_as_collision_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_is_recovery_as_collision_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_recovery_as_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recovery_as_collision_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_recovery_as_collision_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters2D.method_set_recovery_as_collision_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters3D.swift new file mode 100644 index 000000000..a57db2fb7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionParameters3D.swift @@ -0,0 +1,485 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides parameters for ``PhysicsServer3D/bodyTestMotion(body:parameters:result:)``. +/// +/// By changing various properties of this object, such as the motion, you can configure the parameters for ``PhysicsServer3D/bodyTestMotion(body:parameters:result:)``. +open class PhysicsTestMotionParameters3D: RefCounted { + override open class var godotClassName: StringName { "PhysicsTestMotionParameters3D" } + + /* Properties */ + + /// Transform in global space where the motion should start. Usually set to ``Node3D/globalTransform`` for the current body's transform. + final public var from: Transform3D { + get { + return get_from () + } + + set { + set_from (newValue) + } + + } + + /// Motion vector to define the length and direction of the motion to test. + final public var motion: Vector3 { + get { + return get_motion () + } + + set { + set_motion (newValue) + } + + } + + /// Increases the size of the shapes involved in the collision detection. + final public var margin: Double { + get { + return get_margin () + } + + set { + set_margin (newValue) + } + + } + + /// Maximum number of returned collisions, between `1` and `32`. Always returns the deepest detected collisions. + final public var maxCollisions: Int32 { + get { + return get_max_collisions () + } + + set { + set_max_collisions (newValue) + } + + } + + /// If set to `true`, shapes of type ``PhysicsServer3D/ShapeType/separationRay`` are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. + /// + /// If set to `false`, shapes of type ``PhysicsServer3D/ShapeType/separationRay`` are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. + /// + final public var collideSeparationRay: Bool { + get { + return is_collide_separation_ray_enabled () + } + + set { + set_collide_separation_ray_enabled (newValue) + } + + } + + /// Optional array of body ``RID`` to exclude from collision. Use ``CollisionObject3D/getRid()`` to get the ``RID`` associated with a ``CollisionObject3D``-derived node. + final public var excludeBodies: VariantCollection { + get { + return get_exclude_bodies () + } + + set { + set_exclude_bodies (newValue) + } + + } + + /// Optional array of object unique instance ID to exclude from collision. See ``Object/getInstanceId()``. + final public var excludeObjects: VariantCollection { + get { + return get_exclude_objects () + } + + set { + set_exclude_objects (newValue) + } + + } + + /// If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by ``CharacterBody3D`` for improving floor detection during floor snapping. + /// + /// If set to `false`, only collisions resulting from the motion are reported, which is generally the desired behavior. + /// + final public var recoveryAsCollision: Bool { + get { + return is_recovery_as_collision_enabled () + } + + set { + set_recovery_as_collision_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_from") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_from() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_from: GDExtensionMethodBindPtr = { + let methodName = StringName("set_from") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2952846383)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_from(_ from: Transform3D) { + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_from, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motion") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motion() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_motion, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motion: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motion") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motion(_ motion: Vector3) { + withUnsafePointer(to: motion) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_motion, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("get_margin") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_margin() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_margin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("set_margin") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_margin(_ margin: Double) { + withUnsafePointer(to: margin) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_margin, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_collisions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_collisions") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_collisions() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_max_collisions, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_collisions: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_collisions") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_collisions(_ maxCollisions: Int32) { + withUnsafePointer(to: maxCollisions) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_max_collisions, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_separation_ray_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_separation_ray_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_separation_ray_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_is_collide_separation_ray_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_separation_ray_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_separation_ray_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_separation_ray_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_collide_separation_ray_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_bodies") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_bodies() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_exclude_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_exclude_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_bodies") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_bodies(_ excludeList: VariantCollection) { + withUnsafePointer(to: excludeList.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_exclude_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_objects: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_objects") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_objects() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_get_exclude_objects, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_exclude_objects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_objects") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_objects(_ excludeList: VariantCollection) { + withUnsafePointer(to: excludeList.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_exclude_objects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_recovery_as_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_recovery_as_collision_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_recovery_as_collision_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_is_recovery_as_collision_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_recovery_as_collision_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_recovery_as_collision_enabled") + return withUnsafePointer(to: &PhysicsTestMotionParameters3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_recovery_as_collision_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionParameters3D.method_set_recovery_as_collision_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult2D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult2D.swift new file mode 100644 index 000000000..70ce8ab12 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult2D.swift @@ -0,0 +1,262 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Describes the motion and collision result from ``PhysicsServer2D/bodyTestMotion(body:parameters:result:)``. +/// +/// Describes the motion and collision result from ``PhysicsServer2D/bodyTestMotion(body:parameters:result:)``. +open class PhysicsTestMotionResult2D: RefCounted { + override open class var godotClassName: StringName { "PhysicsTestMotionResult2D" } + /* Methods */ + fileprivate static var method_get_travel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the moving object's travel before collision. + public final func getTravel() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_travel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_remainder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remainder") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the moving object's remaining movement vector. + public final func getRemainder() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_remainder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_point") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the point of collision in global coordinates, if a collision occurred. + public final func getCollisionPoint() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_point, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_normal") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the colliding body's shape's normal at the point of collision, if a collision occurred. + public final func getCollisionNormal() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collider_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_velocity") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the colliding body's velocity, if a collision occurred. + public final func getColliderVelocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collider_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_id") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the unique instance ID of the colliding body's attached ``Object``, if a collision occurred. See ``Object/getInstanceId()``. + public final func getColliderId() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collider_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the colliding body's ``RID`` used by the ``PhysicsServer2D``, if a collision occurred. + public final func getColliderRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the colliding body's attached ``Object``, if a collision occurred. + public final func getCollider() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the colliding body's shape index, if a collision occurred. See ``CollisionObject2D``. + public final func getColliderShape() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_local_shape") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the moving object's colliding shape, if a collision occurred. + public final func getCollisionLocalShape() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_local_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_depth") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the length of overlap along the collision normal, if a collision occurred. + public final func getCollisionDepth() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_safe_fraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_safe_fraction") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the maximum fraction of the motion that can occur without a collision, between `0` and `1`. + public final func getCollisionSafeFraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_safe_fraction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_unsafe_fraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_unsafe_fraction") + return withUnsafePointer(to: &PhysicsTestMotionResult2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the minimum fraction of the motion needed to collide, if a collision occurred, between `0` and `1`. + public final func getCollisionUnsafeFraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult2D.method_get_collision_unsafe_fraction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult3D.swift b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult3D.swift new file mode 100644 index 000000000..a670538bf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PhysicsTestMotionResult3D.swift @@ -0,0 +1,361 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Describes the motion and collision result from ``PhysicsServer3D/bodyTestMotion(body:parameters:result:)``. +/// +/// Describes the motion and collision result from ``PhysicsServer3D/bodyTestMotion(body:parameters:result:)``. +open class PhysicsTestMotionResult3D: RefCounted { + override open class var godotClassName: StringName { "PhysicsTestMotionResult3D" } + /* Methods */ + fileprivate static var method_get_travel: GDExtensionMethodBindPtr = { + let methodName = StringName("get_travel") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the moving object's travel before collision. + public final func getTravel() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_travel, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_remainder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remainder") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the moving object's remaining movement vector. + public final func getRemainder() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_remainder, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_safe_fraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_safe_fraction") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the maximum fraction of the motion that can occur without a collision, between `0` and `1`. + public final func getCollisionSafeFraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_safe_fraction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_unsafe_fraction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_unsafe_fraction") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the minimum fraction of the motion needed to collide, if a collision occurred, between `0` and `1`. + public final func getCollisionUnsafeFraction() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_unsafe_fraction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_count") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of detected collisions. + public final func getCollisionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_point") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. + public final func getCollisionPoint(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collision_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_normal") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred. + public final func getCollisionNormal(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_normal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_velocity") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1914908202)! + } + + } + + }() + + /// Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. + public final func getColliderVelocity(collisionIndex: Int32 = 0) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collider_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_id") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the unique instance ID of the colliding body's attached ``Object`` given a collision index (the deepest collision by default), if a collision occurred. See ``Object/getInstanceId()``. + public final func getColliderId(collisionIndex: Int32 = 0) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collider_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1231817359)! + } + + } + + }() + + /// Returns the colliding body's ``RID`` used by the ``PhysicsServer3D`` given a collision index (the deepest collision by default), if a collision occurred. + public final func getColliderRid(collisionIndex: Int32 = 0) -> RID { + let _result: RID = RID () + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2639523548)! + } + + } + + }() + + /// Returns the colliding body's attached ``Object`` given a collision index (the deepest collision by default), if a collision occurred. + public final func getCollider(collisionIndex: Int32 = 0) -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See ``CollisionObject3D``. + public final func getColliderShape(collisionIndex: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collision_local_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_local_shape") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. + public final func getCollisionLocalShape(collisionIndex: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_local_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_collision_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_depth") + return withUnsafePointer(to: &PhysicsTestMotionResult3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 218038398)! + } + + } + + }() + + /// Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. + public final func getCollisionDepth(collisionIndex: Int32 = 0) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: collisionIndex) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PhysicsTestMotionResult3D.method_get_collision_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PinJoint2D.swift b/Sources/SwiftGodot/Generated/Api/PinJoint2D.swift new file mode 100644 index 000000000..e75d0d995 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PinJoint2D.swift @@ -0,0 +1,367 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. +/// +/// A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. For example, a ``RigidBody2D`` can be attached to a ``StaticBody2D`` to create a pendulum or a seesaw. +open class PinJoint2D: Joint2D { + override open class var godotClassName: StringName { "PinJoint2D" } + + /* Properties */ + + /// The higher this value, the more the bond to the pinned partner can flex. + final public var softness: Double { + get { + return get_softness () + } + + set { + set_softness (newValue) + } + + } + + /// If `true`, the pin maximum and minimum rotation, defined by ``angularLimitLower`` and ``angularLimitUpper`` are applied. + final public var angularLimitEnabled: Bool { + get { + return is_angular_limit_enabled () + } + + set { + set_angular_limit_enabled (newValue) + } + + } + + /// The minimum rotation. Only active if ``angularLimitEnabled`` is `true`. + final public var angularLimitLower: Double { + get { + return get_angular_limit_lower () + } + + set { + set_angular_limit_lower (newValue) + } + + } + + /// The maximum rotation. Only active if ``angularLimitEnabled`` is `true`. + final public var angularLimitUpper: Double { + get { + return get_angular_limit_upper () + } + + set { + set_angular_limit_upper (newValue) + } + + } + + /// When activated, a motor turns the pin. + final public var motorEnabled: Bool { + get { + return is_motor_enabled () + } + + set { + set_motor_enabled (newValue) + } + + } + + /// Target speed for the motor. In radians per second. + final public var motorTargetVelocity: Double { + get { + return get_motor_target_velocity () + } + + set { + set_motor_target_velocity (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_softness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_softness") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_softness(_ softness: Double) { + withUnsafePointer(to: softness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_softness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_softness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_softness") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_softness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PinJoint2D.method_get_softness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_limit_lower: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_limit_lower") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_limit_lower(_ angularLimitLower: Double) { + withUnsafePointer(to: angularLimitLower) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_angular_limit_lower, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_limit_lower: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_limit_lower") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_limit_lower() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PinJoint2D.method_get_angular_limit_lower, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_limit_upper: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_limit_upper") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_limit_upper(_ angularLimitUpper: Double) { + withUnsafePointer(to: angularLimitUpper) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_angular_limit_upper, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_limit_upper: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_limit_upper") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_limit_upper() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PinJoint2D.method_get_angular_limit_upper, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motor_target_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motor_target_velocity") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motor_target_velocity(_ motorTargetVelocity: Double) { + withUnsafePointer(to: motorTargetVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_motor_target_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_motor_target_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_motor_target_velocity") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_motor_target_velocity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PinJoint2D.method_get_motor_target_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_motor_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_motor_enabled") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_motor_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_motor_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_motor_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_motor_enabled") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_motor_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PinJoint2D.method_is_motor_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_limit_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_limit_enabled") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_limit_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint2D.method_set_angular_limit_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_angular_limit_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_angular_limit_enabled") + return withUnsafePointer(to: &PinJoint2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_angular_limit_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PinJoint2D.method_is_angular_limit_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PinJoint3D.swift b/Sources/SwiftGodot/Generated/Api/PinJoint3D.swift new file mode 100644 index 000000000..51aca80a4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PinJoint3D.swift @@ -0,0 +1,103 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. +/// +/// A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. For example, a ``RigidBody3D`` can be attached to a ``StaticBody3D`` to create a pendulum or a seesaw. +open class PinJoint3D: Joint3D { + override open class var godotClassName: StringName { "PinJoint3D" } + public enum Param: Int64, CaseIterable, CustomDebugStringConvertible { + /// The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. + case bias = 0 // PARAM_BIAS + /// The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + case damping = 1 // PARAM_DAMPING + /// If above 0, this value is the maximum value for an impulse that this Joint3D produces. + case impulseClamp = 2 // PARAM_IMPULSE_CLAMP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bias: return ".bias" + case .damping: return ".damping" + case .impulseClamp: return ".impulseClamp" + } + + } + + } + + /* Methods */ + fileprivate static var method_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("set_param") + return withUnsafePointer(to: &PinJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2059913726)! + } + + } + + }() + + /// Sets the value of the specified parameter. + public final func setParam(_ param: PinJoint3D.Param, value: Double) { + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PinJoint3D.method_set_param, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("get_param") + return withUnsafePointer(to: &PinJoint3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1758438771)! + } + + } + + }() + + /// Returns the value of the specified parameter. + public final func getParam(_ param: PinJoint3D.Param) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: param.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PinJoint3D.method_get_param, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderCubemap.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderCubemap.swift new file mode 100644 index 000000000..bacd06239 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderCubemap.swift @@ -0,0 +1,34 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``Cubemap`` without image data. +/// +/// This class replaces a ``Cubemap`` or a ``Cubemap``-derived class in 2 conditions: +/// +/// - In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. +/// +/// - When the ``Cubemap``-derived class is missing, for example when using a different engine version. +/// +/// > Note: This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. +/// +open class PlaceholderCubemap: PlaceholderTextureLayered { + override open class var godotClassName: StringName { "PlaceholderCubemap" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderCubemapArray.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderCubemapArray.swift new file mode 100644 index 000000000..33bff29e4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderCubemapArray.swift @@ -0,0 +1,34 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ``CubemapArray`` without image data. +/// +/// This class replaces a ``CubemapArray`` or a ``CubemapArray``-derived class in 2 conditions: +/// +/// - In dedicated server mode, where the image data shouldn't affect game logic. This allows reducing the exported PCK's size significantly. +/// +/// - When the ``CubemapArray``-derived class is missing, for example when using a different engine version. +/// +/// > Note: This class is not intended for rendering or for use in shaders. Operations like calculating UV are not guaranteed to work. +/// +open class PlaceholderCubemapArray: PlaceholderTextureLayered { + override open class var godotClassName: StringName { "PlaceholderCubemapArray" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderMaterial.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderMaterial.swift new file mode 100644 index 000000000..6d2f1324e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderMaterial.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a material. +/// +/// This class is used when loading a project that uses a ``Material`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +open class PlaceholderMaterial: Material { + override open class var godotClassName: StringName { "PlaceholderMaterial" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderMesh.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderMesh.swift new file mode 100644 index 000000000..d6dbd985d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderMesh.swift @@ -0,0 +1,74 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a mesh. +/// +/// This class is used when loading a project that uses a ``Mesh`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +open class PlaceholderMesh: Mesh { + override open class var godotClassName: StringName { "PlaceholderMesh" } + + /* Properties */ + + /// The smallest ``AABB`` enclosing this mesh in local space. + final public var aabb: AABB { + get { + return getAabb () + } + + set { + set_aabb (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_aabb") + return withUnsafePointer(to: &PlaceholderMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaceholderMesh.method_set_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2D.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2D.swift new file mode 100644 index 000000000..ab0510b51 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2D.swift @@ -0,0 +1,76 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a 2-dimensional texture. +/// +/// This class is used when loading a project that uses a ``Texture2D`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +/// > Note: This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +/// +open class PlaceholderTexture2D: Texture2D { + override open class var godotClassName: StringName { "PlaceholderTexture2D" } + + /* Properties */ + + /// The texture's size (in pixels). + final public var size: Vector2 { + get { + return getSize () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &PlaceholderTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaceholderTexture2D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2DArray.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2DArray.swift new file mode 100644 index 000000000..a8c535045 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture2DArray.swift @@ -0,0 +1,34 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a 2-dimensional texture array. +/// +/// This class is used when loading a project that uses a ``Texture2D`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +/// > Note: This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +/// +open class PlaceholderTexture2DArray: PlaceholderTextureLayered { + override open class var godotClassName: StringName { "PlaceholderTexture2DArray" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderTexture3D.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture3D.swift new file mode 100644 index 000000000..a27622eb3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderTexture3D.swift @@ -0,0 +1,94 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a 3-dimensional texture. +/// +/// This class is used when loading a project that uses a ``Texture3D`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +/// > Note: This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +/// +open class PlaceholderTexture3D: Texture3D { + override open class var godotClassName: StringName { "PlaceholderTexture3D" } + + /* Properties */ + + /// The texture's size (in pixels). + final public var size: Vector3i { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &PlaceholderTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 560364750)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaceholderTexture3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &PlaceholderTexture3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2785653706)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3i { + var _result: Vector3i = Vector3i () + gi.object_method_bind_ptrcall(PlaceholderTexture3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaceholderTextureLayered.swift b/Sources/SwiftGodot/Generated/Api/PlaceholderTextureLayered.swift new file mode 100644 index 000000000..e0178084f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaceholderTextureLayered.swift @@ -0,0 +1,132 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Placeholder class for a 2-dimensional texture array. +/// +/// This class is used when loading a project that uses a ``TextureLayered`` subclass in 2 conditions: +/// +/// - When running the project exported in dedicated server mode, only the texture's dimensions are kept (as they may be relied upon for gameplay purposes or positioning of other elements). This allows reducing the exported PCK's size significantly. +/// +/// - When this subclass is missing due to using a different engine version or build (e.g. modules disabled). +/// +/// > Note: This is not intended to be used as an actual texture for rendering. It is not guaranteed to work like one in shaders or materials (for example when calculating UV). +/// +open class PlaceholderTextureLayered: TextureLayered { + override open class var godotClassName: StringName { "PlaceholderTextureLayered" } + + /* Properties */ + + /// The size of each texture layer (in pixels). + final public var size: Vector2i { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The number of layers in the texture array. + final public var layers: Int32 { + get { + return getLayers () + } + + set { + set_layers (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &PlaceholderTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2i) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaceholderTextureLayered.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &PlaceholderTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(PlaceholderTextureLayered.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_layers") + return withUnsafePointer(to: &PlaceholderTextureLayered.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_layers(_ layers: Int32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaceholderTextureLayered.method_set_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PlaneMesh.swift b/Sources/SwiftGodot/Generated/Api/PlaneMesh.swift new file mode 100644 index 000000000..e87cea5c2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PlaneMesh.swift @@ -0,0 +1,333 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class representing a planar ``PrimitiveMesh``. +/// +/// Class representing a planar ``PrimitiveMesh``. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Z axes; this default rotation isn't suited for use with billboarded materials. For billboarded materials, change ``orientation`` to ``Orientation/z``. +/// +/// > Note: When using a large textured ``PlaneMesh`` (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase ``subdivideDepth`` and ``subdivideWidth`` until you no longer notice UV jittering. +/// +open class PlaneMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "PlaneMesh" } + public enum Orientation: Int64, CaseIterable, CustomDebugStringConvertible { + /// ``PlaneMesh`` will face the positive X-axis. + case x = 0 // FACE_X + /// ``PlaneMesh`` will face the positive Y-axis. This matches the behavior of the ``PlaneMesh`` in Godot 3.x. + case y = 1 // FACE_Y + /// ``PlaneMesh`` will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x. + case z = 2 // FACE_Z + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .x: return ".x" + case .y: return ".y" + case .z: return ".z" + } + + } + + } + + + /* Properties */ + + /// Size of the generated plane. + final public var size: Vector2 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// Number of subdivision along the X axis. + final public var subdivideWidth: Int32 { + get { + return get_subdivide_width () + } + + set { + set_subdivide_width (newValue) + } + + } + + /// Number of subdivision along the Z axis. + final public var subdivideDepth: Int32 { + get { + return get_subdivide_depth () + } + + set { + set_subdivide_depth (newValue) + } + + } + + /// Offset of the generated plane. Useful for particles. + final public var centerOffset: Vector3 { + get { + return get_center_offset () + } + + set { + set_center_offset (newValue) + } + + } + + /// Direction that the ``PlaneMesh`` is facing. See ``PlaneMesh/Orientation`` for options. + final public var orientation: PlaneMesh.Orientation { + get { + return get_orientation () + } + + set { + set_orientation (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaneMesh.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PlaneMesh.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_width") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_width(_ subdivide: Int32) { + withUnsafePointer(to: subdivide) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaneMesh.method_set_subdivide_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_width") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_width() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PlaneMesh.method_get_subdivide_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_depth") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_depth(_ subdivide: Int32) { + withUnsafePointer(to: subdivide) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaneMesh.method_set_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_depth") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_depth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PlaneMesh.method_get_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_center_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_offset") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_offset(_ offset: Vector3) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaneMesh.method_set_center_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_offset") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PlaneMesh.method_get_center_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_orientation") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2751399687)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_orientation(_ orientation: PlaneMesh.Orientation) { + withUnsafePointer(to: orientation.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PlaneMesh.method_set_orientation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_orientation") + return withUnsafePointer(to: &PlaneMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227599250)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_orientation() -> PlaneMesh.Orientation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PlaneMesh.method_get_orientation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PlaneMesh.Orientation (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PointLight2D.swift b/Sources/SwiftGodot/Generated/Api/PointLight2D.swift new file mode 100644 index 000000000..d67ed021d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PointLight2D.swift @@ -0,0 +1,211 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Positional 2D light source. +/// +/// Casts light in a 2D environment. This light's shape is defined by a (usually grayscale) texture. +open class PointLight2D: Light2D { + override open class var godotClassName: StringName { "PointLight2D" } + + /* Properties */ + + /// ``Texture2D`` used for the light's appearance. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// The offset of the light's ``texture``. + final public var offset: Vector2 { + get { + return get_texture_offset () + } + + set { + set_texture_offset (newValue) + } + + } + + /// The ``texture``'s scale factor. + final public var textureScale: Double { + get { + return get_texture_scale () + } + + set { + set_texture_scale (newValue) + } + + } + + /// The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane. + final public var height: Double { + get { + return getHeight () + } + + set { + setHeight (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PointLight2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PointLight2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_offset") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_offset(_ textureOffset: Vector2) { + withUnsafePointer(to: textureOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PointLight2D.method_set_texture_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_offset") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PointLight2D.method_get_texture_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_scale") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_scale(_ textureScale: Double) { + withUnsafePointer(to: textureScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PointLight2D.method_set_texture_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_scale") + return withUnsafePointer(to: &PointLight2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PointLight2D.method_get_texture_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PointMesh.swift b/Sources/SwiftGodot/Generated/Api/PointMesh.swift new file mode 100644 index 000000000..27bd4b68e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PointMesh.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Mesh with a single Point primitive. +/// +/// The PointMesh is made from a single point. Instead of relying on triangles, points are rendered as a single rectangle on the screen with a constant size. They are intended to be used with Particle systems, but can be used as a cheap way to render constant size billboarded sprites (for example in a point cloud). +/// +/// PointMeshes, must be used with a material that has a point size. Point size can be accessed in a shader with `POINT_SIZE`, or in a ``BaseMaterial3D`` by setting ``BaseMaterial3D/usePointSize`` and the variable ``BaseMaterial3D/pointSize``. +/// +/// When using PointMeshes, properties that normally alter vertices will be ignored, including billboard mode, grow, and cull face. +/// +open class PointMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "PointMesh" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/Polygon2D.swift b/Sources/SwiftGodot/Generated/Api/Polygon2D.swift new file mode 100644 index 000000000..6de37dfe3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Polygon2D.swift @@ -0,0 +1,1073 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D polygon. +/// +/// A Polygon2D is defined by a set of points. Each point is connected to the next, with the final point being connected to the first, resulting in a closed polygon. Polygon2Ds can be filled with color (solid or gradient) or filled with a given texture. +open class Polygon2D: Node2D { + override open class var godotClassName: StringName { "Polygon2D" } + + /* Properties */ + + /// The polygon's fill color. If ``texture`` is set, it will be multiplied by this color. It will also be the default color for vertices not set in ``vertexColors``. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// The offset applied to each vertex. + final public var offset: Vector2 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + /// If `true`, polygon edges will be anti-aliased. + final public var antialiased: Bool { + get { + return get_antialiased () + } + + set { + set_antialiased (newValue) + } + + } + + /// The polygon's fill texture. Use ``uv`` to set texture coordinates. + final public var texture: Texture2D? { + get { + return get_texture () + } + + set { + set_texture (newValue) + } + + } + + /// Amount to offset the polygon's ``texture``. If set to `Vector2(0, 0)`, the texture's origin (its top-left corner) will be placed at the polygon's position. + final public var textureOffset: Vector2 { + get { + return get_texture_offset () + } + + set { + set_texture_offset (newValue) + } + + } + + /// Amount to multiply the ``uv`` coordinates when using ``texture``. Larger values make the texture smaller, and vice versa. + final public var textureScale: Vector2 { + get { + return get_texture_scale () + } + + set { + set_texture_scale (newValue) + } + + } + + /// The texture's rotation in radians. + final public var textureRotation: Double { + get { + return get_texture_rotation () + } + + set { + set_texture_rotation (newValue) + } + + } + + /// Path to a ``Skeleton2D`` node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. + final public var skeleton: NodePath { + get { + return get_skeleton () + } + + set { + set_skeleton (newValue) + } + + } + + /// If `true`, the polygon will be inverted, containing the area outside the defined points and extending to the ``invertBorder``. + final public var invertEnabled: Bool { + get { + return get_invert_enabled () + } + + set { + set_invert_enabled (newValue) + } + + } + + /// Added padding applied to the bounding box when ``invertEnabled`` is set to `true`. Setting this value too small may result in a "Bad Polygon" error. + final public var invertBorder: Double { + get { + return get_invert_border () + } + + set { + set_invert_border (newValue) + } + + } + + /// The polygon's list of vertices. The final point will be connected to the first. + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /// Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use `Vector2(0, 0)`. + final public var uv: PackedVector2Array { + get { + return get_uv () + } + + set { + set_uv (newValue) + } + + } + + /// Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use ``color``. + final public var vertexColors: PackedColorArray { + get { + return get_vertex_colors () + } + + set { + set_vertex_colors (newValue) + } + + } + + /// The list of polygons, in case more than one is being represented. Every individual polygon is stored as a ``PackedInt32Array`` where each integer is an index to a point in ``polygon``. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in ``polygon``, using the order they are stored in. + final public var polygons: GArray { + get { + return get_polygons () + } + + set { + set_polygons (newValue) + } + + } + + /// Number of internal vertices, used for UV mapping. + final public var internalVertexCount: Int32 { + get { + return get_internal_vertex_count () + } + + set { + set_internal_vertex_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(Polygon2D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv(_ uv: PackedVector2Array) { + withUnsafePointer(to: uv.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_uv, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(Polygon2D.method_get_uv, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(Polygon2D.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygons") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygons(_ polygons: GArray) { + withUnsafePointer(to: polygons.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_polygons, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygons: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygons") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygons() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(Polygon2D.method_get_polygons, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_vertex_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("set_vertex_colors") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3546319833)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_vertex_colors(_ vertexColors: PackedColorArray) { + withUnsafePointer(to: vertexColors.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_vertex_colors, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_vertex_colors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_vertex_colors") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1392750486)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_vertex_colors() -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + gi.object_method_bind_ptrcall(Polygon2D.method_get_vertex_colors, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture(_ texture: Texture2D?) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Polygon2D.method_get_texture, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_texture_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_offset") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_offset(_ textureOffset: Vector2) { + withUnsafePointer(to: textureOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_texture_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_offset") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Polygon2D.method_get_texture_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_rotation") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_rotation(_ textureRotation: Double) { + withUnsafePointer(to: textureRotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_texture_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_rotation") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_rotation() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Polygon2D.method_get_texture_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_scale") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_scale(_ textureScale: Vector2) { + withUnsafePointer(to: textureScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_texture_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_scale") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_scale() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Polygon2D.method_get_texture_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_invert_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_invert_enabled") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_invert_enabled(_ invert: Bool) { + withUnsafePointer(to: invert) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_invert_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_invert_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_invert_enabled") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_invert_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Polygon2D.method_get_invert_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("set_antialiased") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_antialiased(_ antialiased: Bool) { + withUnsafePointer(to: antialiased) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_antialiased, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_antialiased: GDExtensionMethodBindPtr = { + let methodName = StringName("get_antialiased") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_antialiased() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Polygon2D.method_get_antialiased, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_invert_border: GDExtensionMethodBindPtr = { + let methodName = StringName("set_invert_border") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_invert_border(_ invertBorder: Double) { + withUnsafePointer(to: invertBorder) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_invert_border, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_invert_border: GDExtensionMethodBindPtr = { + let methodName = StringName("get_invert_border") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_invert_border() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Polygon2D.method_get_invert_border, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ offset: Vector2) { + withUnsafePointer(to: offset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(Polygon2D.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_bone: GDExtensionMethodBindPtr = { + let methodName = StringName("add_bone") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 703042815)! + } + + } + + }() + + /// Adds a bone with the specified `path` and `weights`. + public final func addBone(path: NodePath, weights: PackedFloat32Array) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: weights.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_add_bone, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_bone_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_count") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of bones in this ``Polygon2D``. + public final func getBoneCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Polygon2D.method_get_bone_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_bone_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_path") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Returns the path to the node associated with the specified bone. + public final func getBonePath(index: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_get_bone_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_bone_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bone_weights") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1542882410)! + } + + } + + }() + + /// Returns the weight values of the specified bone. + public final func getBoneWeights(index: Int32) -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_get_bone_weights, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_erase_bone: GDExtensionMethodBindPtr = { + let methodName = StringName("erase_bone") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the specified bone from this ``Polygon2D``. + public final func eraseBone(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_erase_bone, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_bones: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_bones") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all bones from this ``Polygon2D``. + public final func clearBones() { + gi.object_method_bind_ptrcall(Polygon2D.method_clear_bones, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_bone_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_path") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2761262315)! + } + + } + + }() + + /// Sets the path to the node associated with the specified bone. + public final func setBonePath(index: Int32, path: NodePath) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_bone_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_bone_weights: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bone_weights") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1345852415)! + } + + } + + }() + + /// Sets the weight values for the specified bone. + public final func setBoneWeights(index: Int32, weights: PackedFloat32Array) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: weights.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_bone_weights, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("set_skeleton") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_skeleton(_ skeleton: NodePath) { + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_skeleton, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("get_skeleton") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_skeleton() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(Polygon2D.method_get_skeleton, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_internal_vertex_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_internal_vertex_count") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_internal_vertex_count(_ internalVertexCount: Int32) { + withUnsafePointer(to: internalVertexCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Polygon2D.method_set_internal_vertex_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_internal_vertex_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_internal_vertex_count") + return withUnsafePointer(to: &Polygon2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_internal_vertex_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(Polygon2D.method_get_internal_vertex_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PolygonOccluder3D.swift b/Sources/SwiftGodot/Generated/Api/PolygonOccluder3D.swift new file mode 100644 index 000000000..14202f2a0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PolygonOccluder3D.swift @@ -0,0 +1,93 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Flat 2D polygon shape for use with occlusion culling in ``OccluderInstance3D``. +/// +/// ``PolygonOccluder3D`` stores a polygon shape that can be used by the engine's occlusion culling system. When an ``OccluderInstance3D`` with a ``PolygonOccluder3D`` is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single ``PolygonOccluder3D``. To use arbitrary 3D shapes as occluders, use ``ArrayOccluder3D`` or ``OccluderInstance3D``'s baking feature instead. +/// +/// See ``OccluderInstance3D``'s documentation for instructions on setting up occlusion culling. +/// +open class PolygonOccluder3D: Occluder3D { + override open class var godotClassName: StringName { "PolygonOccluder3D" } + + /* Properties */ + + /// The polygon to use for occlusion culling. The polygon can be convex or concave, but it should have as few points as possible to maximize performance. + /// + /// The polygon must _not_ have intersecting lines. Otherwise, triangulation will fail (with an error message printed). + /// + final public var polygon: PackedVector2Array { + get { + return get_polygon () + } + + set { + set_polygon (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_polygon") + return withUnsafePointer(to: &PolygonOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1509147220)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_polygon(_ polygon: PackedVector2Array) { + withUnsafePointer(to: polygon.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PolygonOccluder3D.method_set_polygon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_polygon") + return withUnsafePointer(to: &PolygonOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2961356807)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_polygon() -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + gi.object_method_bind_ptrcall(PolygonOccluder3D.method_get_polygon, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PolygonPathFinder.swift b/Sources/SwiftGodot/Generated/Api/PolygonPathFinder.swift new file mode 100644 index 000000000..0b25ea6b0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PolygonPathFinder.swift @@ -0,0 +1,245 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +open class PolygonPathFinder: Resource { + override open class var godotClassName: StringName { "PolygonPathFinder" } + + /* Properties */ + + /* Methods */ + fileprivate static var method_setup: GDExtensionMethodBindPtr = { + let methodName = StringName("setup") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3251786936)! + } + + } + + }() + + /// + public final func setup(points: PackedVector2Array, connections: PackedInt32Array) { + withUnsafePointer(to: points.content) { pArg0 in + withUnsafePointer(to: connections.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_setup, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_find_path: GDExtensionMethodBindPtr = { + let methodName = StringName("find_path") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1562168077)! + } + + } + + }() + + /// + public final func findPath(from: Vector2, to: Vector2) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_find_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_intersections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_intersections") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3932192302)! + } + + } + + }() + + /// + public final func getIntersections(from: Vector2, to: Vector2) -> PackedVector2Array { + let _result: PackedVector2Array = PackedVector2Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_get_intersections, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_closest_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_closest_point") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2656412154)! + } + + } + + }() + + /// + public final func getClosestPoint(_ point: Vector2) -> Vector2 { + var _result: Vector2 = Vector2 () + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_get_closest_point, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_point_inside: GDExtensionMethodBindPtr = { + let methodName = StringName("is_point_inside") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 556197845)! + } + + } + + }() + + /// + public final func isPointInside(point: Vector2) -> Bool { + var _result: Bool = false + withUnsafePointer(to: point) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_is_point_inside, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_point_penalty: GDExtensionMethodBindPtr = { + let methodName = StringName("set_point_penalty") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1602489585)! + } + + } + + }() + + /// + public final func setPointPenalty(idx: Int32, penalty: Double) { + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: penalty) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_set_point_penalty, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_point_penalty: GDExtensionMethodBindPtr = { + let methodName = StringName("get_point_penalty") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2339986948)! + } + + } + + }() + + /// + public final func getPointPenalty(idx: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PolygonPathFinder.method_get_point_penalty, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_bounds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_bounds") + return withUnsafePointer(to: &PolygonPathFinder.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1639390495)! + } + + } + + }() + + /// + public final func getBounds() -> Rect2 { + var _result: Rect2 = Rect2 () + gi.object_method_bind_ptrcall(PolygonPathFinder.method_get_bounds, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Popup.swift b/Sources/SwiftGodot/Generated/Api/Popup.swift new file mode 100644 index 000000000..91cdfd3b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Popup.swift @@ -0,0 +1,49 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for contextual windows and panels with fixed position. +/// +/// ``Popup`` is a base class for contextual windows and panels with fixed position. It's a modal by default (see ``Window/popupWindow``) and provides methods for implementing custom popup behavior. +/// +/// +/// This object emits the following signals: +/// +/// - ``popupHide`` +open class Popup: Window { + override open class var godotClassName: StringName { "Popup" } + // Signals + /// Emitted when the popup is hidden. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.popupHide.connect { + /// print ("caught signal") + /// } + /// ``` + public var popupHide: SimpleSignal { SimpleSignal (target: self, signalName: "popup_hide") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PopupMenu.swift b/Sources/SwiftGodot/Generated/Api/PopupMenu.swift new file mode 100644 index 000000000..9a3eade46 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PopupMenu.swift @@ -0,0 +1,2891 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A modal window used to display a list of options. +/// +/// ``PopupMenu`` is a modal window used to display a list of options. Useful for toolbars and context menus. +/// +/// The size of a ``PopupMenu`` can be limited by using ``Window/maxSize``. If the height of the list of items is larger than the maximum height of the ``PopupMenu``, a ``ScrollContainer`` within the popup will allow the user to scroll the contents. If no maximum size is set, or if it is set to `0`, the ``PopupMenu`` height will be limited by its parent rect. +/// +/// All `set_*` methods allow negative item indices, i.e. `-1` to access the last item, `-2` to select the second-to-last item, and so on. +/// +/// **Incremental search:** Like ``ItemList`` and ``Tree``, ``PopupMenu`` supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing ``ProjectSettings/gui/timers/incrementalSearchMaxIntervalMsec``. +/// +/// > Note: The ID values used for items are limited to 32 bits, not full 64 bits of integer. This has a range of `-2^32` to `2^32 - 1`, i.e. `-2147483648` to `2147483647`. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``idPressed`` +/// - ``idFocused`` +/// - ``indexPressed`` +/// - ``menuChanged`` +open class PopupMenu: Popup { + override open class var godotClassName: StringName { "PopupMenu" } + + /* Properties */ + + /// If `true`, hides the ``PopupMenu`` when an item is selected. + final public var hideOnItemSelection: Bool { + get { + return is_hide_on_item_selection () + } + + set { + set_hide_on_item_selection (newValue) + } + + } + + /// If `true`, hides the ``PopupMenu`` when a checkbox or radio button is selected. + final public var hideOnCheckableItemSelection: Bool { + get { + return is_hide_on_checkable_item_selection () + } + + set { + set_hide_on_checkable_item_selection (newValue) + } + + } + + /// If `true`, hides the ``PopupMenu`` when a state item is selected. + final public var hideOnStateItemSelection: Bool { + get { + return is_hide_on_state_item_selection () + } + + set { + set_hide_on_state_item_selection (newValue) + } + + } + + /// Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. + final public var submenuPopupDelay: Double { + get { + return get_submenu_popup_delay () + } + + set { + set_submenu_popup_delay (newValue) + } + + } + + /// If `true`, allows navigating ``PopupMenu`` with letter keys. + final public var allowSearch: Bool { + get { + return get_allow_search () + } + + set { + set_allow_search (newValue) + } + + } + + /// If set to one of the values of ``NativeMenu.SystemMenus``, this ``PopupMenu`` is bound to the special system menu. Only one ``PopupMenu`` can be bound to each special menu at a time. + final public var systemMenuId: NativeMenu.SystemMenus { + get { + return get_system_menu () + } + + set { + set_system_menu (newValue) + } + + } + + /// If `true`, ``MenuBar`` will use native menu when supported. + final public var preferNativeMenu: Bool { + get { + return is_prefer_native_menu () + } + + set { + set_prefer_native_menu (newValue) + } + + } + + /// The number of items currently in the list. + final public var itemCount: Int32 { + get { + return get_item_count () + } + + set { + set_item_count (newValue) + } + + } + + /* Methods */ + fileprivate static var method_activate_item_by_event: GDExtensionMethodBindPtr = { + let methodName = StringName("activate_item_by_event") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3716412023)! + } + + } + + }() + + /// Checks the provided `event` against the ``PopupMenu``'s shortcuts and accelerators, and activates the first item with matching events. If `forGlobalOnly` is `true`, only shortcuts and accelerators with `global` set to `true` will be called. + /// + /// Returns `true` if an item was successfully activated. + /// + /// > Note: Certain ``Control``s, such as ``MenuButton``, will call this method automatically. + /// + public final func activateItemByEvent(_ event: InputEvent?, forGlobalOnly: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: event?.handle) { pArg0 in + withUnsafePointer(to: forGlobalOnly) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_activate_item_by_event, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_set_prefer_native_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_prefer_native_menu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_prefer_native_menu(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_prefer_native_menu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_prefer_native_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_prefer_native_menu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_prefer_native_menu() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_is_prefer_native_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3674230041)! + } + + } + + }() + + /// Adds a new item with text `label`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + /// > Note: The provided `id` is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the `index` arguments in e.g. ``setItemChecked(index:checked:)``. + /// + public final func addItem(label: String, id: Int32 = -1, accel: Key = .none) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: accel.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1086190128)! + } + + } + + }() + + /// Adds a new item with text `label` and icon `texture`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + public final func addIconItem(texture: Texture2D?, label: String, id: Int32 = -1, accel: Key = .none) { + withUnsafePointer(to: texture?.handle) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: accel.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_check_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3674230041)! + } + + } + + }() + + /// Adds a new checkable item with text `label`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addCheckItem(label: String, id: Int32 = -1, accel: Key = .none) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: accel.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_check_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_check_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1086190128)! + } + + } + + }() + + /// Adds a new checkable item with text `label` and icon `texture`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addIconCheckItem(texture: Texture2D?, label: String, id: Int32 = -1, accel: Key = .none) { + withUnsafePointer(to: texture?.handle) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: accel.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_check_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_radio_check_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3674230041)! + } + + } + + }() + + /// Adds a new radio check button with text `label`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addRadioCheckItem(label: String, id: Int32 = -1, accel: Key = .none) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: accel.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_radio_check_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_radio_check_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_radio_check_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1086190128)! + } + + } + + }() + + /// Same as ``addIconCheckItem(texture:label:id:accel:)``, but uses a radio check button. + public final func addIconRadioCheckItem(texture: Texture2D?, label: String, id: Int32 = -1, accel: Key = .none) { + withUnsafePointer(to: texture?.handle) { pArg0 in + let label = GString(label) + withUnsafePointer(to: label.content) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: accel.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_radio_check_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_multistate_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_multistate_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 150780458)! + } + + } + + }() + + /// Adds a new multistate item with text `label`. + /// + /// Contrarily to normal binary items, multistate items can have more than two states, as defined by `maxStates`. The default value is defined by `defaultState`. + /// + /// An `id` can optionally be provided, as well as an accelerator (`accel`). If no `id` is provided, one will be created from the index. If no `accel` is provided, then the default value of 0 (corresponding to ``@GlobalScope.KEY_NONE``) will be assigned to the item (which means it won't have any accelerator). See ``getItemAccelerator(index:)`` for more info on accelerators. + /// + /// > Note: Multistate items don't update their state automatically and must be done manually. See ``toggleItemMultistate(index:)``, ``setItemMultistate(index:state:)`` and ``getItemMultistate(index:)`` for more info on how to control it. + /// + /// Example usage: + /// + public final func addMultistateItem(label: String, maxStates: Int32, defaultState: Int32 = 0, id: Int32 = -1, accel: Key = .none) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: maxStates) { pArg1 in + withUnsafePointer(to: defaultState) { pArg2 in + withUnsafePointer(to: id) { pArg3 in + withUnsafePointer(to: accel.rawValue) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_multistate_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3451850107)! + } + + } + + }() + + /// Adds a ``Shortcut``. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + /// If `allowEcho` is `true`, the shortcut can be activated with echo events. + /// + public final func addShortcut(_ shortcut: Shortcut?, id: Int32 = -1, global: Bool = false, allowEcho: Bool = false) { + withUnsafePointer(to: shortcut?.handle) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: global) { pArg2 in + withUnsafePointer(to: allowEcho) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2997871092)! + } + + } + + }() + + /// Adds a new item and assigns the specified ``Shortcut`` and icon `texture` to it. Sets the label of the checkbox to the ``Shortcut``'s name. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + /// If `allowEcho` is `true`, the shortcut can be activated with echo events. + /// + public final func addIconShortcut(texture: Texture2D?, shortcut: Shortcut?, id: Int32 = -1, global: Bool = false, allowEcho: Bool = false) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: shortcut?.handle) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: global) { pArg3 in + withUnsafePointer(to: allowEcho) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_check_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_check_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1642193386)! + } + + } + + }() + + /// Adds a new checkable item and assigns the specified ``Shortcut`` to it. Sets the label of the checkbox to the ``Shortcut``'s name. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addCheckShortcut(_ shortcut: Shortcut?, id: Int32 = -1, global: Bool = false) { + withUnsafePointer(to: shortcut?.handle) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: global) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_check_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_check_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_check_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3856247530)! + } + + } + + }() + + /// Adds a new checkable item and assigns the specified ``Shortcut`` and icon `texture` to it. Sets the label of the checkbox to the ``Shortcut``'s name. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addIconCheckShortcut(texture: Texture2D?, shortcut: Shortcut?, id: Int32 = -1, global: Bool = false) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: shortcut?.handle) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: global) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_check_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_radio_check_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_radio_check_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1642193386)! + } + + } + + }() + + /// Adds a new radio check button and assigns a ``Shortcut`` to it. Sets the label of the checkbox to the ``Shortcut``'s name. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See ``setItemChecked(index:checked:)`` for more info on how to control it. + /// + public final func addRadioCheckShortcut(_ shortcut: Shortcut?, id: Int32 = -1, global: Bool = false) { + withUnsafePointer(to: shortcut?.handle) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: global) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_radio_check_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_icon_radio_check_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("add_icon_radio_check_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3856247530)! + } + + } + + }() + + /// Same as ``addIconCheckShortcut(texture:shortcut:id:global:)``, but uses a radio check button. + public final func addIconRadioCheckShortcut(texture: Texture2D?, shortcut: Shortcut?, id: Int32 = -1, global: Bool = false) { + withUnsafePointer(to: texture?.handle) { pArg0 in + withUnsafePointer(to: shortcut?.handle) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: global) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_icon_radio_check_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_submenu_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_submenu_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2979222410)! + } + + } + + }() + + /// Adds an item that will act as a submenu of the parent ``PopupMenu`` node when clicked. The `submenu` argument must be the name of an existing ``PopupMenu`` that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the `ui_select` or `ui_right` input actions. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + public final func addSubmenuItem(label: String, submenu: String, id: Int32 = -1) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + let submenu = GString(submenu) + withUnsafePointer(to: submenu.content) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_submenu_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_add_submenu_node_item: GDExtensionMethodBindPtr = { + let methodName = StringName("add_submenu_node_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1325455216)! + } + + } + + }() + + /// Adds an item that will act as a submenu of the parent ``PopupMenu`` node when clicked. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the `ui_select` or `ui_right` input actions. + /// + /// `submenu` must be either child of this ``PopupMenu`` or has no parent node (in which case it will be automatically added as a child). If the `submenu` popup has another parent, this method will fail. + /// + /// An `id` can optionally be provided. If no `id` is provided, one will be created from the index. + /// + public final func addSubmenuNodeItem(label: String, submenu: PopupMenu?, id: Int32 = -1) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: submenu?.handle) { pArg1 in + withUnsafePointer(to: id) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_submenu_node_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the text of the item at the given `index`. + public final func setItemText(index: Int32, text: String) { + withUnsafePointer(to: index) { pArg0 in + let text = GString(text) + withUnsafePointer(to: text.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_text_direction") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1707680378)! + } + + } + + }() + + /// Sets item's text base writing direction. + public final func setItemTextDirection(index: Int32, direction: Control.TextDirection) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: direction.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_language") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + public final func setItemLanguage(index: Int32, language: String) { + withUnsafePointer(to: index) { pArg0 in + let language = GString(language) + withUnsafePointer(to: language.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 666127730)! + } + + } + + }() + + /// Replaces the ``Texture2D`` icon of the item at the given `index`. + public final func setItemIcon(index: Int32, icon: Texture2D?) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: icon?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_icon_max_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon_max_width") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the maximum allowed width of the icon for the item at the given `index`. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio. + public final func setItemIconMaxWidth(index: Int32, width: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_icon_max_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_icon_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_icon_modulate") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets a modulating ``Color`` of the item's icon at the given `index`. + public final func setItemIconModulate(index: Int32, modulate: Color) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: modulate) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_icon_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_checked") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the checkstate status of the item at the given `index`. + public final func setItemChecked(index: Int32, checked: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: checked) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_checked, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_id") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the `id` of the item at the given `index`. + /// + /// The `id` is used in [signal id_pressed] and [signal id_focused] signals. + /// + public final func setItemId(index: Int32, id: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_accelerator") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2992817551)! + } + + } + + }() + + /// Sets the accelerator of the item at the given `index`. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. `accel` is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + public final func setItemAccelerator(index: Int32, accel: Key) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: accel.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_accelerator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_metadata") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2152698145)! + } + + } + + }() + + /// Sets the metadata of an item, which may be of any type. You can later get it with ``getItemMetadata(index:)``, which provides a simple way of assigning context data to items. + public final func setItemMetadata(index: Int32, metadata: Variant?) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: metadata.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_disabled") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Enables/disables the item at the given `index`. When it is disabled, it can't be selected and its action can't be invoked. + public final func setItemDisabled(index: Int32, disabled: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_submenu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the submenu of the item at the given `index`. The submenu is the name of a child ``PopupMenu`` node that would be shown when the item is clicked. + public final func setItemSubmenu(index: Int32, submenu: String) { + withUnsafePointer(to: index) { pArg0 in + let submenu = GString(submenu) + withUnsafePointer(to: submenu.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_submenu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_submenu_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_submenu_node") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068370740)! + } + + } + + }() + + /// Sets the submenu of the item at the given `index`. The submenu is a ``PopupMenu`` node that would be shown when the item is clicked. It must either be a child of this ``PopupMenu`` or has no parent (in which case it will be automatically added as a child). If the `submenu` popup has another parent, this method will fail. + public final func setItemSubmenuNode(index: Int32, submenu: PopupMenu?) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: submenu?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_submenu_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_as_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_as_separator") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Mark the item at the given `index` as a separator, which means that it would be displayed as a line. If `false`, sets the type of the item to plain text. + public final func setItemAsSeparator(index: Int32, enable: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_as_separator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_as_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_as_checkable") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets whether the item at the given `index` has a checkbox. If `false`, sets the type of the item to plain text. + /// + /// > Note: Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + /// + public final func setItemAsCheckable(index: Int32, enable: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_as_checkable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_as_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_as_radio_checkable") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the type of the item at the given `index` to radio button. If `false`, sets the type of the item to plain text. + public final func setItemAsRadioCheckable(index: Int32, enable: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_as_radio_checkable, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_tooltip") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Sets the ``String`` tooltip of the item at the given `index`. + public final func setItemTooltip(index: Int32, tooltip: String) { + withUnsafePointer(to: index) { pArg0 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 825127832)! + } + + } + + }() + + /// Sets a ``Shortcut`` for the item at the given `index`. + public final func setItemShortcut(index: Int32, shortcut: Shortcut?, global: Bool = false) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: shortcut?.handle) { pArg1 in + withUnsafePointer(to: global) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_indent: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_indent") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the horizontal offset of the item at the given `index`. + public final func setItemIndent(index: Int32, indent: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: indent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_indent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_multistate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_multistate") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the state of a multistate item. See ``addMultistateItem(label:maxStates:defaultState:id:accel:)`` for details. + public final func setItemMultistate(index: Int32, state: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: state) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_multistate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_multistate_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_multistate_max") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the max states of a multistate item. See ``addMultistateItem(label:maxStates:defaultState:id:accel:)`` for details. + public final func setItemMultistateMax(index: Int32, maxStates: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: maxStates) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_multistate_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_item_shortcut_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_shortcut_disabled") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Disables the ``Shortcut`` of the item at the given `index`. + public final func setItemShortcutDisabled(index: Int32, disabled: Bool) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: disabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_shortcut_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_toggle_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("toggle_item_checked") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Toggles the check state of the item at the given `index`. + public final func toggleItemChecked(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_toggle_item_checked, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_toggle_item_multistate: GDExtensionMethodBindPtr = { + let methodName = StringName("toggle_item_multistate") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Cycle to the next state of a multistate item. See ``addMultistateItem(label:maxStates:defaultState:id:accel:)`` for details. + public final func toggleItemMultistate(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_toggle_item_multistate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the text of the item at the given `index`. + public final func getItemText(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_text, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_text_direction") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4235602388)! + } + + } + + }() + + /// Returns item's text base writing direction. + public final func getItemTextDirection(index: Int32) -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_get_item_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_language") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns item's text language code. + public final func getItemLanguage(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_language, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_icon: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3536238170)! + } + + } + + }() + + /// Returns the icon of the item at the given `index`. + public final func getItemIcon(index: Int32) -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_icon, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_icon_max_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon_max_width") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the maximum allowed width of the icon for the item at the given `index`. + public final func getItemIconMaxWidth(index: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_icon_max_width, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_icon_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_icon_modulate") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3457211756)! + } + + } + + }() + + /// Returns a ``Color`` modulating the item's icon at the given `index`. + public final func getItemIconModulate(index: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_icon_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_checked: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_checked") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the given `index` is checked. + public final func isItemChecked(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_checked, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_id") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the ID of the item at the given `index`. `id` can be manually assigned, while index can not. + public final func getItemId(index: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_id, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_index") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the index of the item containing the specified `id`. Index is automatically assigned to each item by the engine and can not be set manually. + public final func getItemIndex(id: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_accelerator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_accelerator") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 253789942)! + } + + } + + }() + + /// Returns the accelerator of the item at the given `index`. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of ``KeyModifierMask``s and ``Key``s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). If no accelerator is defined for the specified `index`, ``getItemAccelerator(index:)`` returns `0` (corresponding to ``@GlobalScope.KEY_NONE``). + public final func getItemAccelerator(index: Int32) -> Key { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_accelerator, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Key (rawValue: _result)! + } + + fileprivate static var method_get_item_metadata: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_metadata") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4227898402)! + } + + } + + }() + + /// Returns the metadata of the specified item, which might be of any type. You can set it with ``setItemMetadata(index:metadata:)``, which provides a simple way of assigning context data to items. + public final func getItemMetadata(index: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_metadata, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_is_item_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_disabled") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the given `index` is disabled. When it is disabled it can't be selected, or its action invoked. + /// + /// See ``setItemDisabled(index:disabled:)`` for more info on how to disable an item. + /// + public final func isItemDisabled(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_submenu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_submenu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the submenu name of the item at the given `index`. See ``addSubmenuItem(label:submenu:id:)`` for more info on how to add a submenu. + public final func getItemSubmenu(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_submenu, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_submenu_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_submenu_node") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2100501353)! + } + + } + + }() + + /// Returns the submenu of the item at the given `index`, or `null` if no submenu was added. See ``addSubmenuNodeItem(label:submenu:id:)`` for more info on how to add a submenu. + public final func getItemSubmenuNode(index: Int32) -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_submenu_node, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_item_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_separator") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item is a separator. If it is, it will be displayed as a line. See ``addSeparator(label:id:)`` for more info on how to add a separator. + public final func isItemSeparator(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_separator, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_checkable") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the given `index` is checkable in some way, i.e. if it has a checkbox or radio button. + /// + /// > Note: Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. + /// + public final func isItemCheckable(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_checkable, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_radio_checkable: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_radio_checkable") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the item at the given `index` has radio button-style checkability. + /// + /// > Note: This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + /// + public final func isItemRadioCheckable(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_radio_checkable, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_item_shortcut_disabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_item_shortcut_disabled") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the specified item's shortcut is disabled. + public final func isItemShortcutDisabled(index: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_is_item_shortcut_disabled, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_tooltip: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_tooltip") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the tooltip associated with the item at the given `index`. + public final func getItemTooltip(index: Int32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_tooltip, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_item_shortcut: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_shortcut") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1449483325)! + } + + } + + }() + + /// Returns the ``Shortcut`` associated with the item at the given `index`. + public final func getItemShortcut(index: Int32) -> Shortcut? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_shortcut, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_item_indent: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_indent") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the horizontal offset of the item at the given `index`. + public final func getItemIndent(index: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_indent, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_multistate_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_multistate_max") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the max states of the item at the given `index`. + public final func getItemMultistateMax(index: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_multistate_max, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_item_multistate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_multistate") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the state of the item at the given `index`. + public final func getItemMultistate(index: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_multistate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_focused_item: GDExtensionMethodBindPtr = { + let methodName = StringName("set_focused_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the currently focused item as the given `index`. + /// + /// Passing `-1` as the index makes so that no item is focused. + /// + public final func setFocusedItem(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_focused_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_focused_item: GDExtensionMethodBindPtr = { + let methodName = StringName("get_focused_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the index of the currently focused item. Returns `-1` if no item is focused. + public final func getFocusedItem() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PopupMenu.method_get_focused_item, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_item_count") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_item_count(_ count: Int32) { + withUnsafePointer(to: count) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_item_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_item_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_item_count") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_item_count() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PopupMenu.method_get_item_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_scroll_to_item: GDExtensionMethodBindPtr = { + let methodName = StringName("scroll_to_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Moves the scroll view to make the item at the given `index` visible. + public final func scrollToItem(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_scroll_to_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_item: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_item") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes the item at the given `index` from the menu. + /// + /// > Note: The indices of items after the removed item will be shifted by one. + /// + public final func removeItem(index: Int32) { + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_remove_item, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_separator: GDExtensionMethodBindPtr = { + let methodName = StringName("add_separator") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2266703459)! + } + + } + + }() + + /// Adds a separator between items. Separators also occupy an index, which you can set by using the `id` parameter. + /// + /// A `label` can optionally be provided, which will appear at the center of the separator. + /// + public final func addSeparator(label: String = "", id: Int32 = -1) { + let label = GString(label) + withUnsafePointer(to: label.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_add_separator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107499316)! + } + + } + + }() + + /// Removes all items from the ``PopupMenu``. If `freeSubmenus` is `true`, the submenu nodes are automatically freed. + public final func clear(freeSubmenus: Bool = false) { + withUnsafePointer(to: freeSubmenus) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_clear, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_hide_on_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hide_on_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hide_on_item_selection(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_hide_on_item_selection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hide_on_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hide_on_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hide_on_item_selection() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_is_hide_on_item_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hide_on_checkable_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hide_on_checkable_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hide_on_checkable_item_selection(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_hide_on_checkable_item_selection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hide_on_checkable_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hide_on_checkable_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hide_on_checkable_item_selection() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_is_hide_on_checkable_item_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hide_on_state_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hide_on_state_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hide_on_state_item_selection(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_hide_on_state_item_selection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hide_on_state_item_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hide_on_state_item_selection") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hide_on_state_item_selection() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_is_hide_on_state_item_selection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_submenu_popup_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_submenu_popup_delay") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_submenu_popup_delay(_ seconds: Double) { + withUnsafePointer(to: seconds) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_submenu_popup_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_submenu_popup_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_submenu_popup_delay") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_submenu_popup_delay() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PopupMenu.method_get_submenu_popup_delay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_search: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_search") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_search(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_allow_search, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_allow_search: GDExtensionMethodBindPtr = { + let methodName = StringName("get_allow_search") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_allow_search() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_get_allow_search, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("is_system_menu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the menu is bound to the special system menu. + public final func isSystemMenu() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PopupMenu.method_is_system_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("set_system_menu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 600639674)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_system_menu(_ systemMenuId: NativeMenu.SystemMenus) { + withUnsafePointer(to: systemMenuId.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PopupMenu.method_set_system_menu, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_system_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_system_menu") + return withUnsafePointer(to: &PopupMenu.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1222557358)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_system_menu() -> NativeMenu.SystemMenus { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PopupMenu.method_get_system_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return NativeMenu.SystemMenus (rawValue: _result)! + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an item of some `id` is pressed or its accelerator is activated. + /// + /// > Note: If `id` is negative (either explicitly or due to overflow), this will return the corresponding index instead. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.idPressed.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var idPressed: Signal1 { Signal1 (target: self, signalName: "id_pressed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user navigated to an item of some `id` using the ``ProjectSettings/input/uiUp`` or ``ProjectSettings/input/uiDown`` input action. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.idFocused.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var idFocused: Signal2 { Signal2 (target: self, signalName: "id_focused") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ index: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when an item of some `index` is pressed or its accelerator is activated. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.indexPressed.connect { index in + /// print ("caught signal") + /// } + /// ``` + public var indexPressed: Signal3 { Signal3 (target: self, signalName: "index_pressed") } + + /// Emitted when any item is added, modified or removed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.menuChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var menuChanged: SimpleSignal { SimpleSignal (target: self, signalName: "menu_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PopupPanel.swift b/Sources/SwiftGodot/Generated/Api/PopupPanel.swift new file mode 100644 index 000000000..4b0021327 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PopupPanel.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A popup with a panel background. +/// +/// A popup with a configurable panel background. Any child controls added to this node will be stretched to fit the panel's size (similar to how ``PanelContainer`` works). If you are making windows, see ``Window``. +open class PopupPanel: Popup { + override open class var godotClassName: StringName { "PopupPanel" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/PortableCompressedTexture2D.swift b/Sources/SwiftGodot/Generated/Api/PortableCompressedTexture2D.swift new file mode 100644 index 000000000..396a1dc38 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PortableCompressedTexture2D.swift @@ -0,0 +1,303 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides a compressed texture for disk and/or VRAM in a way that is portable. +/// +/// This class allows storing compressed textures as self contained (not imported) resources. +/// +/// For 2D usage (compressed on disk, uncompressed on VRAM), the lossy and lossless modes are recommended. For 3D usage (compressed on VRAM) it depends on the target platform. +/// +/// If you intend to only use desktop, S3TC or BPTC are recommended. For only mobile, ETC2 is recommended. +/// +/// For portable, self contained 3D textures that work on both desktop and mobile, Basis Universal is recommended (although it has a small quality cost and longer compression time as a tradeoff). +/// +/// This resource is intended to be created from code. +/// +open class PortableCompressedTexture2D: Texture2D { + override open class var godotClassName: StringName { "PortableCompressedTexture2D" } + public enum CompressionMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case lossless = 0 // COMPRESSION_MODE_LOSSLESS + /// + case lossy = 1 // COMPRESSION_MODE_LOSSY + /// + case basisUniversal = 2 // COMPRESSION_MODE_BASIS_UNIVERSAL + /// + case s3tc = 3 // COMPRESSION_MODE_S3TC + /// + case etc2 = 4 // COMPRESSION_MODE_ETC2 + /// + case bptc = 5 // COMPRESSION_MODE_BPTC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .lossless: return ".lossless" + case .lossy: return ".lossy" + case .basisUniversal: return ".basisUniversal" + case .s3tc: return ".s3tc" + case .etc2: return ".etc2" + case .bptc: return ".bptc" + } + + } + + } + + + /* Properties */ + + /// Allow overriding the texture size (for 2D only). + final public var sizeOverride: Vector2 { + get { + return get_size_override () + } + + set { + set_size_override (newValue) + } + + } + + /// When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved. + /// + /// This flag allows to keep the compressed data in memory if you intend it to persist after loading. + /// + final public var keepCompressedBuffer: Bool { + get { + return is_keeping_compressed_buffer () + } + + set { + set_keep_compressed_buffer (newValue) + } + + } + + /* Methods */ + fileprivate static var method_create_from_image: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_image") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3679243433)! + } + + } + + }() + + /// Initializes the compressed texture from a base image. The compression mode must be provided. + /// + /// `normalMap` is recommended to ensure optimum quality if this image will be used as a normal map. + /// + /// If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. + /// + public final func createFromImage(_ image: Image?, compressionMode: PortableCompressedTexture2D.CompressionMode, normalMap: Bool = false, lossyQuality: Double = 0.8) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: compressionMode.rawValue) { pArg1 in + withUnsafePointer(to: normalMap) { pArg2 in + withUnsafePointer(to: lossyQuality) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_create_from_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3847873762)! + } + + } + + }() + + /// Return the image format used (valid after initialized). + public final func getFormat() -> Image.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Image.Format (rawValue: _result)! + } + + fileprivate static var method_get_compression_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_compression_mode") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3265612739)! + } + + } + + }() + + /// Return the compression mode used (valid after initialized). + public final func getCompressionMode() -> PortableCompressedTexture2D.CompressionMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_get_compression_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return PortableCompressedTexture2D.CompressionMode (rawValue: _result)! + } + + fileprivate static var method_set_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size_override") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size_override(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_set_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size_override") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size_override() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_get_size_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_keep_compressed_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_compressed_buffer") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_keep_compressed_buffer(_ keep: Bool) { + withUnsafePointer(to: keep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_set_keep_compressed_buffer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_keeping_compressed_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("is_keeping_compressed_buffer") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_keeping_compressed_buffer() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PortableCompressedTexture2D.method_is_keeping_compressed_buffer, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_keep_all_compressed_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_keep_all_compressed_buffers") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Overrides the flag globally for all textures of this type. This is used primarily by the editor. + public static func setKeepAllCompressedBuffers(keep: Bool) { + withUnsafePointer(to: keep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_keep_all_compressed_buffers, nil, pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_keeping_all_compressed_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("is_keeping_all_compressed_buffers") + return withUnsafePointer(to: &PortableCompressedTexture2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Return whether the flag is overridden for all textures of this type. + public static func isKeepingAllCompressedBuffers() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_keeping_all_compressed_buffers, nil, nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PrimitiveMesh.swift b/Sources/SwiftGodot/Generated/Api/PrimitiveMesh.swift new file mode 100644 index 000000000..283be505d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PrimitiveMesh.swift @@ -0,0 +1,379 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for all primitive meshes. Handles applying a ``Material`` to a primitive mesh. +/// +/// Base class for all primitive meshes. Handles applying a ``Material`` to a primitive mesh. Examples include ``BoxMesh``, ``CapsuleMesh``, ``CylinderMesh``, ``PlaneMesh``, ``PrismMesh``, and ``SphereMesh``. +open class PrimitiveMesh: Mesh { + override open class var godotClassName: StringName { "PrimitiveMesh" } + + /* Properties */ + + /// The current ``Material`` of the primitive mesh. + final public var material: Material? { + get { + return get_material () + } + + set { + set_material (newValue) + } + + } + + /// Overrides the ``AABB`` with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. + final public var customAabb: AABB { + get { + return get_custom_aabb () + } + + set { + set_custom_aabb (newValue) + } + + } + + /// If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + /// + /// This gives the same result as using ``BaseMaterial3D/CullMode/front`` in ``BaseMaterial3D/cullMode``. + /// + final public var flipFaces: Bool { + get { + return get_flip_faces () + } + + set { + set_flip_faces (newValue) + } + + } + + /// If set, generates UV2 UV coordinates applying a padding using the ``uv2Padding`` setting. UV2 is needed for lightmapping. + final public var addUv2: Bool { + get { + return get_add_uv2 () + } + + set { + set_add_uv2 (newValue) + } + + } + + /// If ``addUv2`` is set, specifies the padding in pixels applied along seams of the mesh. Lower padding values allow making better use of the lightmap texture (resulting in higher texel density), but may introduce visible lightmap bleeding along edges. + /// + /// If the size of the lightmap texture can't be determined when generating the mesh, UV2 is calculated assuming a texture size of 1024x1024. + /// + final public var uv2Padding: Double { + get { + return get_uv2_padding () + } + + set { + set_uv2_padding (newValue) + } + + } + + /* Methods */ + /// Override this method to customize how this primitive mesh should be generated. Should return an ``GArray`` where each element is another Array of values required for the mesh (see the ``Mesh.ArrayType`` constants). + @_documentation(visibility: public) + open func _createMeshArray() -> GArray { + return GArray () + } + + fileprivate static var method_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("set_material") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2757459619)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_material(_ material: Material?) { + withUnsafePointer(to: material?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrimitiveMesh.method_set_material, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("get_material") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 5934680)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_material() -> Material? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_material, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_mesh_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh_arrays") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns mesh arrays used to constitute surface of ``Mesh``. The result can be passed to ``ArrayMesh/addSurfaceFromArrays(primitive:arrays:blendShapes:lods:flags:)`` to create a new surface. For example: + /// + public final func getMeshArrays() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_mesh_arrays, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_aabb") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 259215842)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_custom_aabb(_ aabb: AABB) { + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrimitiveMesh.method_set_custom_aabb, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("get_custom_aabb") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1068685055)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_custom_aabb() -> AABB { + var _result: AABB = AABB () + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_custom_aabb, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_flip_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_flip_faces") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_flip_faces(_ flipFaces: Bool) { + withUnsafePointer(to: flipFaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrimitiveMesh.method_set_flip_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_flip_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("get_flip_faces") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_flip_faces() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_flip_faces, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_add_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("set_add_uv2") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_add_uv2(_ addUv2: Bool) { + withUnsafePointer(to: addUv2) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrimitiveMesh.method_set_add_uv2, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_add_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("get_add_uv2") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_add_uv2() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_add_uv2, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_uv2_padding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uv2_padding") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uv2_padding(_ uv2Padding: Double) { + withUnsafePointer(to: uv2Padding) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrimitiveMesh.method_set_uv2_padding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uv2_padding: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uv2_padding") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uv2_padding() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PrimitiveMesh.method_get_uv2_padding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_request_update: GDExtensionMethodBindPtr = { + let methodName = StringName("request_update") + return withUnsafePointer(to: &PrimitiveMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Request an update of this primitive mesh based on its properties. + public final func requestUpdate() { + gi.object_method_bind_ptrcall(PrimitiveMesh.method_request_update, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_create_mesh_array": + return _PrimitiveMesh_proxy_create_mesh_array + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _PrimitiveMesh_proxy_create_mesh_array (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._createMeshArray () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // Array + ret.content = GArray.zero +} + diff --git a/Sources/SwiftGodot/Generated/Api/PrismMesh.swift b/Sources/SwiftGodot/Generated/Api/PrismMesh.swift new file mode 100644 index 000000000..fce206255 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PrismMesh.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class representing a prism-shaped ``PrimitiveMesh``. +/// +/// Class representing a prism-shaped ``PrimitiveMesh``. +open class PrismMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "PrismMesh" } + + /* Properties */ + + /// Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. + final public var leftToRight: Double { + get { + return get_left_to_right () + } + + set { + set_left_to_right (newValue) + } + + } + + /// Size of the prism. + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// Number of added edge loops along the X axis. + final public var subdivideWidth: Int32 { + get { + return get_subdivide_width () + } + + set { + set_subdivide_width (newValue) + } + + } + + /// Number of added edge loops along the Y axis. + final public var subdivideHeight: Int32 { + get { + return get_subdivide_height () + } + + set { + set_subdivide_height (newValue) + } + + } + + /// Number of added edge loops along the Z axis. + final public var subdivideDepth: Int32 { + get { + return get_subdivide_depth () + } + + set { + set_subdivide_depth (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_left_to_right: GDExtensionMethodBindPtr = { + let methodName = StringName("set_left_to_right") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_left_to_right(_ leftToRight: Double) { + withUnsafePointer(to: leftToRight) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrismMesh.method_set_left_to_right, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_left_to_right: GDExtensionMethodBindPtr = { + let methodName = StringName("get_left_to_right") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_left_to_right() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(PrismMesh.method_get_left_to_right, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrismMesh.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(PrismMesh.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_width") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_width(_ segments: Int32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrismMesh.method_set_subdivide_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_width") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_width() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PrismMesh.method_get_subdivide_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_height") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_height(_ segments: Int32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrismMesh.method_set_subdivide_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_height") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_height() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PrismMesh.method_get_subdivide_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_subdivide_depth") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_subdivide_depth(_ segments: Int32) { + withUnsafePointer(to: segments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PrismMesh.method_set_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_subdivide_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subdivide_depth") + return withUnsafePointer(to: &PrismMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subdivide_depth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(PrismMesh.method_get_subdivide_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ProceduralSkyMaterial.swift b/Sources/SwiftGodot/Generated/Api/ProceduralSkyMaterial.swift new file mode 100644 index 000000000..92d8c5945 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ProceduralSkyMaterial.swift @@ -0,0 +1,820 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A material that defines a simple sky for a ``Sky`` resource. +/// +/// ``ProceduralSkyMaterial`` provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are defined by a main color, a color at the horizon, and an easing curve to interpolate between them. Suns are described by a position in the sky, a color, and a max angle from the sun at which the easing curve ends. The max angle therefore defines the size of the sun in the sky. +/// +/// ``ProceduralSkyMaterial`` supports up to 4 suns, using the color, and energy, direction, and angular distance of the first four ``DirectionalLight3D`` nodes in the scene. This means that the suns are defined individually by the properties of their corresponding ``DirectionalLight3D``s and globally by ``sunAngleMax`` and ``sunCurve``. +/// +/// ``ProceduralSkyMaterial`` uses a lightweight shader to draw the sky and is therefore suited for real-time updates. This makes it a great option for a sky that is simple and computationally cheap, but unrealistic. If you need a more realistic procedural option, use ``PhysicalSkyMaterial``. +/// +open class ProceduralSkyMaterial: Material { + override open class var godotClassName: StringName { "ProceduralSkyMaterial" } + + /* Properties */ + + /// Color of the sky at the top. Blends with ``skyHorizonColor``. + final public var skyTopColor: Color { + get { + return get_sky_top_color () + } + + set { + set_sky_top_color (newValue) + } + + } + + /// Color of the sky at the horizon. Blends with ``skyTopColor``. + final public var skyHorizonColor: Color { + get { + return get_sky_horizon_color () + } + + set { + set_sky_horizon_color (newValue) + } + + } + + /// How quickly the ``skyHorizonColor`` fades into the ``skyTopColor``. + final public var skyCurve: Double { + get { + return get_sky_curve () + } + + set { + set_sky_curve (newValue) + } + + } + + /// Multiplier for sky color. A higher value will make the sky brighter. + final public var skyEnergyMultiplier: Double { + get { + return get_sky_energy_multiplier () + } + + set { + set_sky_energy_multiplier (newValue) + } + + } + + /// The sky cover texture to use. This texture must use an equirectangular projection (similar to ``PanoramaSkyMaterial``). The texture's colors will be _added_ to the existing sky color, and will be multiplied by ``skyEnergyMultiplier`` and ``skyCoverModulate``. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). + final public var skyCover: Texture2D? { + get { + return get_sky_cover () + } + + set { + set_sky_cover (newValue) + } + + } + + /// The tint to apply to the ``skyCover`` texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in ``skyCover``. + final public var skyCoverModulate: Color { + get { + return get_sky_cover_modulate () + } + + set { + set_sky_cover_modulate (newValue) + } + + } + + /// Color of the ground at the bottom. Blends with ``groundHorizonColor``. + final public var groundBottomColor: Color { + get { + return get_ground_bottom_color () + } + + set { + set_ground_bottom_color (newValue) + } + + } + + /// Color of the ground at the horizon. Blends with ``groundBottomColor``. + final public var groundHorizonColor: Color { + get { + return get_ground_horizon_color () + } + + set { + set_ground_horizon_color (newValue) + } + + } + + /// How quickly the ``groundHorizonColor`` fades into the ``groundBottomColor``. + final public var groundCurve: Double { + get { + return get_ground_curve () + } + + set { + set_ground_curve (newValue) + } + + } + + /// Multiplier for ground color. A higher value will make the ground brighter. + final public var groundEnergyMultiplier: Double { + get { + return get_ground_energy_multiplier () + } + + set { + set_ground_energy_multiplier (newValue) + } + + } + + /// Distance from center of sun where it fades out completely. + final public var sunAngleMax: Double { + get { + return get_sun_angle_max () + } + + set { + set_sun_angle_max (newValue) + } + + } + + /// How quickly the sun fades away between the edge of the sun disk and ``sunAngleMax``. + final public var sunCurve: Double { + get { + return get_sun_curve () + } + + set { + set_sun_curve (newValue) + } + + } + + /// If `true`, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. + final public var useDebanding: Bool { + get { + return get_use_debanding () + } + + set { + set_use_debanding (newValue) + } + + } + + /// The sky's overall brightness multiplier. Higher values result in a brighter sky. + final public var energyMultiplier: Double { + get { + return get_energy_multiplier () + } + + set { + set_energy_multiplier (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sky_top_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_top_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_top_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_top_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_top_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_top_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_top_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_top_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_horizon_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_horizon_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_horizon_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_horizon_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_horizon_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_horizon_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_horizon_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_horizon_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_curve(_ curve: Double) { + withUnsafePointer(to: curve) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_curve() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_energy_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sky_cover: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_cover") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4051416890)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_cover(_ skyCover: Texture2D?) { + withUnsafePointer(to: skyCover?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_cover, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_cover: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_cover") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3635182373)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_cover() -> Texture2D? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_cover, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_sky_cover_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sky_cover_modulate") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sky_cover_modulate(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sky_cover_modulate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sky_cover_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sky_cover_modulate") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sky_cover_modulate() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sky_cover_modulate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ground_bottom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ground_bottom_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ground_bottom_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_ground_bottom_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ground_bottom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ground_bottom_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ground_bottom_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_ground_bottom_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ground_horizon_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ground_horizon_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ground_horizon_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_ground_horizon_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ground_horizon_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ground_horizon_color") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ground_horizon_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_ground_horizon_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ground_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ground_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ground_curve(_ curve: Double) { + withUnsafePointer(to: curve) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_ground_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ground_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ground_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ground_curve() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_ground_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ground_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ground_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ground_energy_multiplier(_ energy: Double) { + withUnsafePointer(to: energy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_ground_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ground_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ground_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ground_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_ground_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sun_angle_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sun_angle_max") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sun_angle_max(_ degrees: Double) { + withUnsafePointer(to: degrees) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sun_angle_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sun_angle_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sun_angle_max") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sun_angle_max() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sun_angle_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sun_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sun_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sun_curve(_ curve: Double) { + withUnsafePointer(to: curve) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_sun_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sun_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sun_curve") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sun_curve() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_sun_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_debanding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_debanding") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_debanding(_ useDebanding: Bool) { + withUnsafePointer(to: useDebanding) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_use_debanding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_debanding: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_debanding") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_debanding() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_use_debanding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("set_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_energy_multiplier(_ multiplier: Double) { + withUnsafePointer(to: multiplier) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_set_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_energy_multiplier: GDExtensionMethodBindPtr = { + let methodName = StringName("get_energy_multiplier") + return withUnsafePointer(to: &ProceduralSkyMaterial.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_energy_multiplier() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ProceduralSkyMaterial.method_get_energy_multiplier, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ProgressBar.swift b/Sources/SwiftGodot/Generated/Api/ProgressBar.swift new file mode 100644 index 000000000..22166aecc --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ProgressBar.swift @@ -0,0 +1,277 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control used for visual representation of a percentage. +/// +/// A control used for visual representation of a percentage. Shows fill percentage from right to left. +open class ProgressBar: Range { + override open class var godotClassName: StringName { "ProgressBar" } + public enum FillMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The progress bar fills from begin to end horizontally, according to the language direction. If ``Control/isLayoutRtl()`` returns `false`, it fills from left to right, and if it returns `true`, it fills from right to left. + case beginToEnd = 0 // FILL_BEGIN_TO_END + /// The progress bar fills from end to begin horizontally, according to the language direction. If ``Control/isLayoutRtl()`` returns `false`, it fills from right to left, and if it returns `true`, it fills from left to right. + case endToBegin = 1 // FILL_END_TO_BEGIN + /// The progress fills from top to bottom. + case topToBottom = 2 // FILL_TOP_TO_BOTTOM + /// The progress fills from bottom to top. + case bottomToTop = 3 // FILL_BOTTOM_TO_TOP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .beginToEnd: return ".beginToEnd" + case .endToBegin: return ".endToBegin" + case .topToBottom: return ".topToBottom" + case .bottomToTop: return ".bottomToTop" + } + + } + + } + + + /* Properties */ + + /// The fill direction. See ``ProgressBar/FillMode`` for possible values. + final public var fillMode: Int32 { + get { + return get_fill_mode () + } + + set { + set_fill_mode (newValue) + } + + } + + /// If `true`, the fill percentage is displayed on the bar. + final public var showPercentage: Bool { + get { + return is_percentage_shown () + } + + set { + set_show_percentage (newValue) + } + + } + + /// When set to `true`, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value. + final public var indeterminate: Bool { + get { + return is_indeterminate () + } + + set { + set_indeterminate (newValue) + } + + } + + /// If `false`, the ``indeterminate`` animation will be paused in the editor. + final public var editorPreviewIndeterminate: Bool { + get { + return is_editor_preview_indeterminate_enabled () + } + + set { + set_editor_preview_indeterminate (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_fill_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fill_mode") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fill_mode(_ mode: Int32) { + withUnsafePointer(to: mode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProgressBar.method_set_fill_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fill_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fill_mode") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fill_mode() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(ProgressBar.method_get_fill_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_show_percentage: GDExtensionMethodBindPtr = { + let methodName = StringName("set_show_percentage") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_show_percentage(_ visible: Bool) { + withUnsafePointer(to: visible) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProgressBar.method_set_show_percentage, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_percentage_shown: GDExtensionMethodBindPtr = { + let methodName = StringName("is_percentage_shown") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_percentage_shown() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ProgressBar.method_is_percentage_shown, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_indeterminate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_indeterminate") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_indeterminate(_ indeterminate: Bool) { + withUnsafePointer(to: indeterminate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProgressBar.method_set_indeterminate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_indeterminate: GDExtensionMethodBindPtr = { + let methodName = StringName("is_indeterminate") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_indeterminate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ProgressBar.method_is_indeterminate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_editor_preview_indeterminate: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editor_preview_indeterminate") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editor_preview_indeterminate(_ previewIndeterminate: Bool) { + withUnsafePointer(to: previewIndeterminate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ProgressBar.method_set_editor_preview_indeterminate, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_editor_preview_indeterminate_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_editor_preview_indeterminate_enabled") + return withUnsafePointer(to: &ProgressBar.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_editor_preview_indeterminate_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ProgressBar.method_is_editor_preview_indeterminate_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ProjectSettings.swift b/Sources/SwiftGodot/Generated/Api/ProjectSettings.swift new file mode 100644 index 000000000..466a7bed3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ProjectSettings.swift @@ -0,0 +1,619 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Stores globally-accessible variables. +/// +/// Stores variables that can be accessed from everywhere. Use ``getSetting(name:defaultValue:)``, ``setSetting(name:value:)`` or ``hasSetting(name:)`` to access them. Variables stored in `project.godot` are also loaded into ``ProjectSettings``, making this object very useful for reading custom game configuration options. +/// +/// When naming a Project Settings property, use the full path to the setting including the category. For example, `"application/config/name"` for the project name. Category and property names can be viewed in the Project Settings dialog. +/// +/// **Feature tags:** Project settings can be overridden for specific platforms and configurations (debug, release, ...) using feature tags. +/// +/// **Overriding:** Any project setting can be overridden by creating a file named `override.cfg` in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' feature tags in account. Therefore, make sure to _also_ override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``settingsChanged`` +open class ProjectSettings: Object { + /// The shared instance of this class + public static var shared: ProjectSettings = { + return withUnsafePointer (to: &ProjectSettings.godotClassName.content) { ptr in + ProjectSettings (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "ProjectSettings" } + /* Methods */ + fileprivate static var method_has_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("has_setting") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if a configuration value is present. + public static func hasSetting(name: String) -> Bool { + var _result: Bool = false + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_setting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("set_setting") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402577236)! + } + + } + + }() + + /// Sets the value of a setting. + /// + /// **Example:** + /// + /// This can also be used to erase custom project settings. To do this change the setting value to `null`. + /// + public static func setSetting(name: String, value: Variant?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_setting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("get_setting") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 223050753)! + } + + } + + }() + + /// Returns the value of the setting identified by `name`. If the setting doesn't exist and `defaultValue` is specified, the value of `defaultValue` is returned. Otherwise, `null` is returned. + /// + /// **Example:** + /// + /// > Note: This method doesn't take potential feature overrides into account automatically. Use ``getSettingWithOverride(name:)`` to handle seamlessly. + /// + public static func getSetting(name: String, defaultValue: Variant?) -> Variant? { + var _result: Variant.ContentType = Variant.zero + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: defaultValue.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_get_setting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_setting_with_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_setting_with_override") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Similar to ``getSetting(name:defaultValue:)``, but applies feature tag overrides if any exists and is valid. + /// + /// **Example:** + /// + /// If the following setting override exists "application/config/name.windows", and the following code is executed: + /// + /// Then the overridden setting will be returned instead if the project is running on the _Windows_ operating system. + /// + public static func getSettingWithOverride(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_setting_with_override, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_global_class_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_class_list") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an ``GArray`` of registered global classes. Each global class is represented as a ``GDictionary`` that contains the following entries: + /// + /// - `base` is a name of the base class; + /// + /// - `class` is a name of the registered global class; + /// + /// - `icon` is a path to a custom icon of the global class, if it has any; + /// + /// - `language` is a name of a programming language in which the global class is written; + /// + /// - `path` is a path to a file containing the global class. + /// + /// > Note: Both the script and the icon paths are local to the project filesystem, i.e. they start with `res://`. + /// + public static func getGlobalClassList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_get_global_class_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_order: GDExtensionMethodBindPtr = { + let methodName = StringName("set_order") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2956805083)! + } + + } + + }() + + /// Sets the order of a configuration value (influences when saved to the config file). + public static func setOrder(name: String, position: Int32) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_order, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_order: GDExtensionMethodBindPtr = { + let methodName = StringName("get_order") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Returns the order of a configuration value (influences when saved to the config file). + public static func getOrder(name: String) -> Int32 { + var _result: Int32 = 0 + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_order, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_initial_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_initial_value") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 402577236)! + } + + } + + }() + + /// Sets the specified setting's initial value. This is the value the setting reverts to. + public static func setInitialValue(name: String, value: Variant?) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_initial_value, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_as_basic: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_basic") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option. + public static func setAsBasic(name: String, basic: Bool) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: basic) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_as_basic, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_as_internal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_internal") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user. + public static func setAsInternal(name: String, `internal`: Bool) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: `internal`) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_as_internal, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_property_info: GDExtensionMethodBindPtr = { + let methodName = StringName("add_property_info") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155329257)! + } + + } + + }() + + /// Adds a custom property info to a property. The dictionary must contain: + /// + /// - `"name"`: ``String`` (the property's name) + /// + /// - `"type"`: integer (see ``Variant.GType``) + /// + /// - optionally `"hint"`: integer (see ``PropertyHint``) and `"hint_string"`: ``String`` + /// + /// **Example:** + /// + public static func addPropertyInfo(hint: GDictionary) { + withUnsafePointer(to: hint.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_add_property_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_restart_if_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_restart_if_changed") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2678287736)! + } + + } + + }() + + /// Sets whether a setting requires restarting the editor to properly take effect. + /// + /// > Note: This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling ``setRestartIfChanged(name:restart:)`` does _not_ delay the setting being set when changed. + /// + public static func setRestartIfChanged(name: String, restart: Bool) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: restart) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_restart_if_changed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Clears the whole configuration (not recommended, may break things). + public static func clear(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_localize_path: GDExtensionMethodBindPtr = { + let methodName = StringName("localize_path") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3135753539)! + } + + } + + }() + + /// Returns the localized path (starting with `res://`) corresponding to the absolute, native OS `path`. See also ``globalizePath(_:)``. + public static func localizePath(_ path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_localize_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_globalize_path: GDExtensionMethodBindPtr = { + let methodName = StringName("globalize_path") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3135753539)! + } + + } + + }() + + /// Returns the absolute, native OS path corresponding to the localized `path` (starting with `res://` or `user://`). The returned path will vary depending on the operating system and user preferences. See File paths in Godot projects to see what those paths convert to. See also ``localizePath(_:)``. + /// + /// > Note: ``globalizePath(_:)`` with `res://` will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: + /// + public static func globalizePath(_ path: String) -> String { + let _result = GString () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_globalize_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_save: GDExtensionMethodBindPtr = { + let methodName = StringName("save") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Saves the configuration to the `project.godot` file. + /// + /// > Note: This method is intended to be used by editor plugins, as modified ``ProjectSettings`` can't be loaded back in the running app. If you want to change project settings in exported projects, use ``saveCustom(file:)`` to save `override.cfg` file. + /// + public static func save() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_save, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_resource_pack: GDExtensionMethodBindPtr = { + let methodName = StringName("load_resource_pack") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 708980503)! + } + + } + + }() + + /// Loads the contents of the .pck or .zip file specified by `pack` into the resource filesystem (`res://`). Returns `true` on success. + /// + /// > Note: If a file from `pack` shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from `pack` unless `replaceFiles` is set to `false`. + /// + /// > Note: The optional `offset` parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. + /// + public static func loadResourcePack(_ pack: String, replaceFiles: Bool = true, offset: Int32 = 0) -> Bool { + var _result: Bool = false + let pack = GString(pack) + withUnsafePointer(to: pack.content) { pArg0 in + withUnsafePointer(to: replaceFiles) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_load_resource_pack, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_save_custom: GDExtensionMethodBindPtr = { + let methodName = StringName("save_custom") + return withUnsafePointer(to: &ProjectSettings.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Saves the configuration to a custom file. The file extension must be `.godot` (to save in text-based ``ConfigFile`` format) or `.binary` (to save in binary format). You can also save `override.cfg` file, which is also text, but can be used in exported projects unlike other formats. + public static func saveCustom(file: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let file = GString(file) + withUnsafePointer(to: file.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_save_custom, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + // Signals + /// Emitted when any setting is changed, up to once per process frame. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.settingsChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var settingsChanged: SimpleSignal { SimpleSignal (target: self, signalName: "settings_changed") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/PropertyTweener.swift b/Sources/SwiftGodot/Generated/Api/PropertyTweener.swift new file mode 100644 index 000000000..0da6bf3d9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/PropertyTweener.swift @@ -0,0 +1,212 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Interpolates an ``Object``'s property over time. +/// +/// ``PropertyTweener`` is used to interpolate a property in an object. See ``Tween/tweenProperty(object:property:finalVal:duration:)`` for more usage information. +/// +/// > Note: ``Tween/tweenProperty(object:property:finalVal:duration:)`` is the only correct way to create ``PropertyTweener``. Any ``PropertyTweener`` created manually will not function correctly. +/// +open class PropertyTweener: Tweener { + override open class var godotClassName: StringName { "PropertyTweener" } + /* Methods */ + fileprivate static var method_from: GDExtensionMethodBindPtr = { + let methodName = StringName("from") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4190193059)! + } + + } + + }() + + /// Sets a custom initial value to the ``PropertyTweener``. + /// + /// **Example:** + /// + public final func from(value: Variant?) -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: value.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PropertyTweener.method_from, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_from_current: GDExtensionMethodBindPtr = { + let methodName = StringName("from_current") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4279177709)! + } + + } + + }() + + /// Makes the ``PropertyTweener`` use the current property value (i.e. at the time of creating this ``PropertyTweener``) as a starting point. This is equivalent of using ``from(value:)`` with the current value. These two calls will do the same: + /// + public final func fromCurrent() -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PropertyTweener.method_from_current, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_as_relative: GDExtensionMethodBindPtr = { + let methodName = StringName("as_relative") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4279177709)! + } + + } + + }() + + /// When called, the final value will be used as a relative value instead. + /// + /// **Example:** + /// + public final func asRelative() -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(PropertyTweener.method_as_relative, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_trans: GDExtensionMethodBindPtr = { + let methodName = StringName("set_trans") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1899107404)! + } + + } + + }() + + /// Sets the type of used transition from ``Tween.TransitionType``. If not set, the default transition is used from the ``Tween`` that contains this Tweener. + public final func setTrans(_ trans: Tween.TransitionType) -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: trans.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PropertyTweener.method_set_trans, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_ease: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ease") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1080455622)! + } + + } + + }() + + /// Sets the type of used easing from ``Tween.EaseType``. If not set, the default easing is used from the ``Tween`` that contains this Tweener. + public final func setEase(_ ease: Tween.EaseType) -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: ease.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PropertyTweener.method_set_ease, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_custom_interpolator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_custom_interpolator") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3174170268)! + } + + } + + }() + + /// Allows interpolating the value with a custom easing function. The provided `interpolatorMethod` will be called with a value ranging from `0.0` to `1.0` and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. + /// + /// **Example:** + /// + public final func setCustomInterpolator(interpolatorMethod: Callable) -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: interpolatorMethod.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PropertyTweener.method_set_custom_interpolator, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_delay") + return withUnsafePointer(to: &PropertyTweener.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2171559331)! + } + + } + + }() + + /// Sets the time in seconds after which the ``PropertyTweener`` will start interpolating. By default there's no delay. + public final func setDelay(_ delay: Double) -> PropertyTweener? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: delay) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(PropertyTweener.method_set_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/QuadMesh.swift b/Sources/SwiftGodot/Generated/Api/QuadMesh.swift new file mode 100644 index 000000000..e972d7a26 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/QuadMesh.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class representing a square mesh facing the camera. +/// +/// Class representing a square ``PrimitiveMesh``. This flat mesh does not have a thickness. By default, this mesh is aligned on the X and Y axes; this rotation is more suited for use with billboarded materials. A ``QuadMesh`` is equivalent to a ``PlaneMesh`` except its default ``PlaneMesh/orientation`` is ``PlaneMesh/Orientation/z``. +open class QuadMesh: PlaneMesh { + override open class var godotClassName: StringName { "QuadMesh" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/QuadOccluder3D.swift b/Sources/SwiftGodot/Generated/Api/QuadOccluder3D.swift new file mode 100644 index 000000000..4a52579c4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/QuadOccluder3D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Flat plane shape for use with occlusion culling in ``OccluderInstance3D``. +/// +/// ``QuadOccluder3D`` stores a flat plane shape that can be used by the engine's occlusion culling system. See also ``PolygonOccluder3D`` if you need to customize the quad's shape. +/// +/// See ``OccluderInstance3D``'s documentation for instructions on setting up occlusion culling. +/// +open class QuadOccluder3D: Occluder3D { + override open class var godotClassName: StringName { "QuadOccluder3D" } + + /* Properties */ + + /// The quad's size in 3D units. + final public var size: Vector2 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &QuadOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(QuadOccluder3D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &QuadOccluder3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(QuadOccluder3D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDAttachmentFormat.swift b/Sources/SwiftGodot/Generated/Api/RDAttachmentFormat.swift new file mode 100644 index 000000000..eb48b7627 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDAttachmentFormat.swift @@ -0,0 +1,199 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Attachment format (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDAttachmentFormat: RefCounted { + override open class var godotClassName: StringName { "RDAttachmentFormat" } + + /* Properties */ + + /// The attachment's data format. + final public var format: RenderingDevice.DataFormat { + get { + return get_format () + } + + set { + set_format (newValue) + } + + } + + /// The number of samples used when sampling the attachment. + final public var samples: RenderingDevice.TextureSamples { + get { + return get_samples () + } + + set { + set_samples (newValue) + } + + } + + /// The attachment's usage flags, which determine what can be done with it. + final public var usageFlags: UInt32 { + get { + return get_usage_flags () + } + + set { + set_usage_flags (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format(_ pMember: RenderingDevice.DataFormat) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_set_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2235804183)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format() -> RenderingDevice.DataFormat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.DataFormat (rawValue: _result)! + } + + fileprivate static var method_set_samples: GDExtensionMethodBindPtr = { + let methodName = StringName("set_samples") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3774171498)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_samples(_ pMember: RenderingDevice.TextureSamples) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_set_samples, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_samples: GDExtensionMethodBindPtr = { + let methodName = StringName("get_samples") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 407791724)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_samples() -> RenderingDevice.TextureSamples { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_get_samples, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSamples (rawValue: _result)! + } + + fileprivate static var method_set_usage_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("set_usage_flags") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_usage_flags(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_set_usage_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_usage_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_usage_flags") + return withUnsafePointer(to: &RDAttachmentFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_usage_flags() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDAttachmentFormat.method_get_usage_flags, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDFramebufferPass.swift b/Sources/SwiftGodot/Generated/Api/RDFramebufferPass.swift new file mode 100644 index 000000000..86849b508 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDFramebufferPass.swift @@ -0,0 +1,319 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Framebuffer pass attachment description (used by ``RenderingDevice``). +/// +/// This class contains the list of attachment descriptions for a framebuffer pass. Each points with an index to a previously supplied list of texture attachments. +/// +/// Multipass framebuffers can optimize some configurations in mobile. On desktop, they provide little to no advantage. +/// +/// This object is used by ``RenderingDevice``. +/// +open class RDFramebufferPass: RefCounted { + override open class var godotClassName: StringName { "RDFramebufferPass" } + /* Constants */ + /// Attachment is unused. + public static let attachmentUnused = -1 + + /* Properties */ + + /// Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip. + final public var colorAttachments: PackedInt32Array { + get { + return get_color_attachments () + } + + set { + set_color_attachments (newValue) + } + + } + + /// Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the ``RDUniform`` for the uniform set. + final public var inputAttachments: PackedInt32Array { + get { + return get_input_attachments () + } + + set { + set_input_attachments (newValue) + } + + } + + /// If the color attachments are multisampled, non-multisampled resolve attachments can be provided. + final public var resolveAttachments: PackedInt32Array { + get { + return get_resolve_attachments () + } + + set { + set_resolve_attachments (newValue) + } + + } + + /// Attachments to preserve in this pass (otherwise they are erased). + final public var preserveAttachments: PackedInt32Array { + get { + return get_preserve_attachments () + } + + set { + set_preserve_attachments (newValue) + } + + } + + /// Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass. + final public var depthAttachment: Int32 { + get { + return get_depth_attachment () + } + + set { + set_depth_attachment (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_color_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_attachments(_ pMember: PackedInt32Array) { + withUnsafePointer(to: pMember.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDFramebufferPass.method_set_color_attachments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_attachments() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(RDFramebufferPass.method_get_color_attachments, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_input_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_input_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_input_attachments(_ pMember: PackedInt32Array) { + withUnsafePointer(to: pMember.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDFramebufferPass.method_set_input_attachments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_input_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_input_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_input_attachments() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(RDFramebufferPass.method_get_input_attachments, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_resolve_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resolve_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_resolve_attachments(_ pMember: PackedInt32Array) { + withUnsafePointer(to: pMember.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDFramebufferPass.method_set_resolve_attachments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_resolve_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resolve_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_resolve_attachments() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(RDFramebufferPass.method_get_resolve_attachments, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_preserve_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_preserve_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614634198)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_preserve_attachments(_ pMember: PackedInt32Array) { + withUnsafePointer(to: pMember.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDFramebufferPass.method_set_preserve_attachments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_preserve_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_preserve_attachments") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1930428628)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_preserve_attachments() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(RDFramebufferPass.method_get_preserve_attachments, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_depth_attachment: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_attachment") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_attachment(_ pMember: Int32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDFramebufferPass.method_set_depth_attachment, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_attachment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_attachment") + return withUnsafePointer(to: &RDFramebufferPass.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_attachment() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RDFramebufferPass.method_get_depth_attachment, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendState.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendState.swift new file mode 100644 index 000000000..adb2f394c --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendState.swift @@ -0,0 +1,255 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline color blend state (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDPipelineColorBlendState: RefCounted { + override open class var godotClassName: StringName { "RDPipelineColorBlendState" } + + /* Properties */ + + /// If `true`, performs the logic operation defined in ``logicOp``. + final public var enableLogicOp: Bool { + get { + return get_enable_logic_op () + } + + set { + set_enable_logic_op (newValue) + } + + } + + /// The logic operation to perform for blending. Only effective if ``enableLogicOp`` is `true`. + final public var logicOp: RenderingDevice.LogicOperation { + get { + return get_logic_op () + } + + set { + set_logic_op (newValue) + } + + } + + /// The constant color to blend with. See also ``RenderingDevice/drawListSetBlendConstants(drawList:color:)``. + final public var blendConstant: Color { + get { + return get_blend_constant () + } + + set { + set_blend_constant (newValue) + } + + } + + /// The attachments that are blended together. + final public var attachments: ObjectCollection { + get { + return get_attachments () + } + + set { + set_attachments (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enable_logic_op: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_logic_op") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_logic_op(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_set_enable_logic_op, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_logic_op: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_logic_op") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_logic_op() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_get_enable_logic_op, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_logic_op: GDExtensionMethodBindPtr = { + let methodName = StringName("set_logic_op") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3610841058)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_logic_op(_ pMember: RenderingDevice.LogicOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_set_logic_op, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_logic_op: GDExtensionMethodBindPtr = { + let methodName = StringName("get_logic_op") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 988254690)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_logic_op() -> RenderingDevice.LogicOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_get_logic_op, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.LogicOperation (rawValue: _result)! + } + + fileprivate static var method_set_blend_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("set_blend_constant") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_blend_constant(_ pMember: Color) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_set_blend_constant, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_blend_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("get_blend_constant") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_blend_constant() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_get_blend_constant, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_attachments") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_attachments(_ attachments: ObjectCollection) { + withUnsafePointer(to: attachments.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_set_attachments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_attachments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_attachments") + return withUnsafePointer(to: &RDPipelineColorBlendState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_attachments() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RDPipelineColorBlendState.method_get_attachments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendStateAttachment.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendStateAttachment.swift new file mode 100644 index 000000000..af356e094 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineColorBlendStateAttachment.swift @@ -0,0 +1,677 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline color blend state attachment (used by ``RenderingDevice``). +/// +/// Controls how blending between source and destination fragments is performed when using ``RenderingDevice``. +/// +/// For reference, this is how common user-facing blend modes are implemented in Godot's 2D renderer: +/// +/// **Mix:** +/// +/// **Add:** +/// +/// **Subtract:** +/// +/// **Multiply:** +/// +/// **Pre-multiplied alpha:** +/// +open class RDPipelineColorBlendStateAttachment: RefCounted { + override open class var godotClassName: StringName { "RDPipelineColorBlendStateAttachment" } + + /* Properties */ + + /// If `true`, performs blending between the source and destination according to the factors defined in ``srcColorBlendFactor``, ``dstColorBlendFactor``, ``srcAlphaBlendFactor`` and ``dstAlphaBlendFactor``. The blend modes ``colorBlendOp`` and ``alphaBlendOp`` are also taken into account, with ``writeR``, ``writeG``, ``writeB`` and ``writeA`` controlling the output. + final public var enableBlend: Bool { + get { + return get_enable_blend () + } + + set { + set_enable_blend (newValue) + } + + } + + /// Controls how the blend factor for the color channels is determined based on the source's fragments. + final public var srcColorBlendFactor: RenderingDevice.BlendFactor { + get { + return get_src_color_blend_factor () + } + + set { + set_src_color_blend_factor (newValue) + } + + } + + /// Controls how the blend factor for the color channels is determined based on the destination's fragments. + final public var dstColorBlendFactor: RenderingDevice.BlendFactor { + get { + return get_dst_color_blend_factor () + } + + set { + set_dst_color_blend_factor (newValue) + } + + } + + /// The blend mode to use for the red/green/blue color channels. + final public var colorBlendOp: RenderingDevice.BlendOperation { + get { + return get_color_blend_op () + } + + set { + set_color_blend_op (newValue) + } + + } + + /// Controls how the blend factor for the alpha channel is determined based on the source's fragments. + final public var srcAlphaBlendFactor: RenderingDevice.BlendFactor { + get { + return get_src_alpha_blend_factor () + } + + set { + set_src_alpha_blend_factor (newValue) + } + + } + + /// Controls how the blend factor for the alpha channel is determined based on the destination's fragments. + final public var dstAlphaBlendFactor: RenderingDevice.BlendFactor { + get { + return get_dst_alpha_blend_factor () + } + + set { + set_dst_alpha_blend_factor (newValue) + } + + } + + /// The blend mode to use for the alpha channel. + final public var alphaBlendOp: RenderingDevice.BlendOperation { + get { + return get_alpha_blend_op () + } + + set { + set_alpha_blend_op (newValue) + } + + } + + /// If `true`, writes the new red color channel to the final result. + final public var writeR: Bool { + get { + return get_write_r () + } + + set { + set_write_r (newValue) + } + + } + + /// If `true`, writes the new green color channel to the final result. + final public var writeG: Bool { + get { + return get_write_g () + } + + set { + set_write_g (newValue) + } + + } + + /// If `true`, writes the new blue color channel to the final result. + final public var writeB: Bool { + get { + return get_write_b () + } + + set { + set_write_b (newValue) + } + + } + + /// If `true`, writes the new alpha channel to the final result. + final public var writeA: Bool { + get { + return get_write_a () + } + + set { + set_write_a (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_as_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_mix") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets ``enableBlend`` to `true`, ``srcColorBlendFactor`` to ``RenderingDevice/BlendFactor/srcAlpha``, ``dstColorBlendFactor`` to ``RenderingDevice/BlendFactor/oneMinusSrcAlpha``, ``srcAlphaBlendFactor`` to ``RenderingDevice/BlendFactor/srcAlpha`` and ``dstAlphaBlendFactor`` to ``RenderingDevice/BlendFactor/oneMinusSrcAlpha``. + public final func setAsMix() { + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_as_mix, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_enable_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_blend") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_blend(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_enable_blend, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_blend: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_blend") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_blend() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_enable_blend, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_src_color_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_src_color_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2251019273)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_src_color_blend_factor(_ pMember: RenderingDevice.BlendFactor) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_src_color_blend_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_src_color_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_src_color_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3691288359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_src_color_blend_factor() -> RenderingDevice.BlendFactor { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_src_color_blend_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendFactor (rawValue: _result)! + } + + fileprivate static var method_set_dst_color_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dst_color_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2251019273)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dst_color_blend_factor(_ pMember: RenderingDevice.BlendFactor) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_dst_color_blend_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dst_color_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dst_color_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3691288359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dst_color_blend_factor() -> RenderingDevice.BlendFactor { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_dst_color_blend_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendFactor (rawValue: _result)! + } + + fileprivate static var method_set_color_blend_op: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color_blend_op") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3073022720)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color_blend_op(_ pMember: RenderingDevice.BlendOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_color_blend_op, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_blend_op: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_blend_op") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1385093561)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color_blend_op() -> RenderingDevice.BlendOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_color_blend_op, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendOperation (rawValue: _result)! + } + + fileprivate static var method_set_src_alpha_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_src_alpha_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2251019273)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_src_alpha_blend_factor(_ pMember: RenderingDevice.BlendFactor) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_src_alpha_blend_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_src_alpha_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_src_alpha_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3691288359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_src_alpha_blend_factor() -> RenderingDevice.BlendFactor { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_src_alpha_blend_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendFactor (rawValue: _result)! + } + + fileprivate static var method_set_dst_alpha_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_dst_alpha_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2251019273)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_dst_alpha_blend_factor(_ pMember: RenderingDevice.BlendFactor) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_dst_alpha_blend_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dst_alpha_blend_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dst_alpha_blend_factor") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3691288359)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_dst_alpha_blend_factor() -> RenderingDevice.BlendFactor { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_dst_alpha_blend_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendFactor (rawValue: _result)! + } + + fileprivate static var method_set_alpha_blend_op: GDExtensionMethodBindPtr = { + let methodName = StringName("set_alpha_blend_op") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3073022720)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_alpha_blend_op(_ pMember: RenderingDevice.BlendOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_alpha_blend_op, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_alpha_blend_op: GDExtensionMethodBindPtr = { + let methodName = StringName("get_alpha_blend_op") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1385093561)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_alpha_blend_op() -> RenderingDevice.BlendOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_alpha_blend_op, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.BlendOperation (rawValue: _result)! + } + + fileprivate static var method_set_write_r: GDExtensionMethodBindPtr = { + let methodName = StringName("set_write_r") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_write_r(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_write_r, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_write_r: GDExtensionMethodBindPtr = { + let methodName = StringName("get_write_r") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_write_r() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_write_r, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_write_g: GDExtensionMethodBindPtr = { + let methodName = StringName("set_write_g") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_write_g(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_write_g, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_write_g: GDExtensionMethodBindPtr = { + let methodName = StringName("get_write_g") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_write_g() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_write_g, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_write_b: GDExtensionMethodBindPtr = { + let methodName = StringName("set_write_b") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_write_b(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_write_b, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_write_b: GDExtensionMethodBindPtr = { + let methodName = StringName("get_write_b") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_write_b() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_write_b, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_write_a: GDExtensionMethodBindPtr = { + let methodName = StringName("set_write_a") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_write_a(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_set_write_a, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_write_a: GDExtensionMethodBindPtr = { + let methodName = StringName("get_write_a") + return withUnsafePointer(to: &RDPipelineColorBlendStateAttachment.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_write_a() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineColorBlendStateAttachment.method_get_write_a, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineDepthStencilState.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineDepthStencilState.swift new file mode 100644 index 000000000..75c6eee01 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineDepthStencilState.swift @@ -0,0 +1,1207 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline depth/stencil state (used by ``RenderingDevice``). +/// +/// ``RDPipelineDepthStencilState`` controls the way depth and stencil comparisons are performed when sampling those values using ``RenderingDevice``. +open class RDPipelineDepthStencilState: RefCounted { + override open class var godotClassName: StringName { "RDPipelineDepthStencilState" } + + /* Properties */ + + /// If `true`, enables depth testing which allows objects to be automatically occluded by other objects based on their depth. This also allows objects to be partially occluded by other objects. If `false`, objects will appear in the order they were drawn (like in Godot's 2D renderer). + final public var enableDepthTest: Bool { + get { + return get_enable_depth_test () + } + + set { + set_enable_depth_test (newValue) + } + + } + + /// If `true`, writes to the depth buffer whenever the depth test returns true. Only works when enable_depth_test is also true. + final public var enableDepthWrite: Bool { + get { + return get_enable_depth_write () + } + + set { + set_enable_depth_write (newValue) + } + + } + + /// The method used for comparing the previous and current depth values. + final public var depthCompareOperator: RenderingDevice.CompareOperator { + get { + return get_depth_compare_operator () + } + + set { + set_depth_compare_operator (newValue) + } + + } + + /// If `true`, each depth value will be tested to see if it is between ``depthRangeMin`` and ``depthRangeMax``. If it is outside of these values, it is discarded. + final public var enableDepthRange: Bool { + get { + return get_enable_depth_range () + } + + set { + set_enable_depth_range (newValue) + } + + } + + /// The minimum depth that returns true for ``enableDepthRange``. + final public var depthRangeMin: Double { + get { + return get_depth_range_min () + } + + set { + set_depth_range_min (newValue) + } + + } + + /// The maximum depth that returns true for ``enableDepthRange``. + final public var depthRangeMax: Double { + get { + return get_depth_range_max () + } + + set { + set_depth_range_max (newValue) + } + + } + + /// If `true`, enables stencil testing. There are separate stencil buffers for front-facing triangles and back-facing triangles. See properties that begin with "front_op" and properties with "back_op" for each. + final public var enableStencil: Bool { + get { + return get_enable_stencil () + } + + set { + set_enable_stencil (newValue) + } + + } + + /// The operation to perform on the stencil buffer for front pixels that fail the stencil test. + final public var frontOpFail: RenderingDevice.StencilOperation { + get { + return get_front_op_fail () + } + + set { + set_front_op_fail (newValue) + } + + } + + /// The operation to perform on the stencil buffer for front pixels that pass the stencil test. + final public var frontOpPass: RenderingDevice.StencilOperation { + get { + return get_front_op_pass () + } + + set { + set_front_op_pass (newValue) + } + + } + + /// The operation to perform on the stencil buffer for front pixels that pass the stencil test but fail the depth test. + final public var frontOpDepthFail: RenderingDevice.StencilOperation { + get { + return get_front_op_depth_fail () + } + + set { + set_front_op_depth_fail (newValue) + } + + } + + /// The method used for comparing the previous front stencil value and ``frontOpReference``. + final public var frontOpCompare: RenderingDevice.CompareOperator { + get { + return get_front_op_compare () + } + + set { + set_front_op_compare (newValue) + } + + } + + /// Selects which bits from the front stencil value will be compared. + final public var frontOpCompareMask: UInt32 { + get { + return get_front_op_compare_mask () + } + + set { + set_front_op_compare_mask (newValue) + } + + } + + /// Selects which bits from the front stencil value will be changed. + final public var frontOpWriteMask: UInt32 { + get { + return get_front_op_write_mask () + } + + set { + set_front_op_write_mask (newValue) + } + + } + + /// The value the previous front stencil value will be compared to. + final public var frontOpReference: UInt32 { + get { + return get_front_op_reference () + } + + set { + set_front_op_reference (newValue) + } + + } + + /// The operation to perform on the stencil buffer for back pixels that fail the stencil test + final public var backOpFail: RenderingDevice.StencilOperation { + get { + return get_back_op_fail () + } + + set { + set_back_op_fail (newValue) + } + + } + + /// The operation to perform on the stencil buffer for back pixels that pass the stencil test. + final public var backOpPass: RenderingDevice.StencilOperation { + get { + return get_back_op_pass () + } + + set { + set_back_op_pass (newValue) + } + + } + + /// The operation to perform on the stencil buffer for back pixels that pass the stencil test but fail the depth test. + final public var backOpDepthFail: RenderingDevice.StencilOperation { + get { + return get_back_op_depth_fail () + } + + set { + set_back_op_depth_fail (newValue) + } + + } + + /// The method used for comparing the previous back stencil value and ``backOpReference``. + final public var backOpCompare: RenderingDevice.CompareOperator { + get { + return get_back_op_compare () + } + + set { + set_back_op_compare (newValue) + } + + } + + /// Selects which bits from the back stencil value will be compared. + final public var backOpCompareMask: UInt32 { + get { + return get_back_op_compare_mask () + } + + set { + set_back_op_compare_mask (newValue) + } + + } + + /// Selects which bits from the back stencil value will be changed. + final public var backOpWriteMask: UInt32 { + get { + return get_back_op_write_mask () + } + + set { + set_back_op_write_mask (newValue) + } + + } + + /// The value the previous back stencil value will be compared to. + final public var backOpReference: UInt32 { + get { + return get_back_op_reference () + } + + set { + set_back_op_reference (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enable_depth_test: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_depth_test") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_depth_test(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_enable_depth_test, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_depth_test: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_depth_test") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_depth_test() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_enable_depth_test, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_depth_write: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_depth_write") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_depth_write(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_enable_depth_write, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_depth_write: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_depth_write") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_depth_write() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_enable_depth_write, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_compare_operator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_compare_operator") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2573711505)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_compare_operator(_ pMember: RenderingDevice.CompareOperator) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_depth_compare_operator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_compare_operator: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_compare_operator") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 269730778)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_compare_operator() -> RenderingDevice.CompareOperator { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_depth_compare_operator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.CompareOperator (rawValue: _result)! + } + + fileprivate static var method_set_enable_depth_range: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_depth_range") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_depth_range(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_enable_depth_range, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_depth_range: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_depth_range") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_depth_range() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_enable_depth_range, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_range_min") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_range_min(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_depth_range_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_range_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_range_min") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_range_min() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_depth_range_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_range_max") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_range_max(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_depth_range_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_range_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_range_max") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_range_max() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_depth_range_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_stencil: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_stencil") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_stencil(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_enable_stencil, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_stencil: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_stencil") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_stencil() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_enable_stencil, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_front_op_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_fail(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_fail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_fail() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_fail, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_front_op_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_pass") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_pass(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_pass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_pass") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_pass() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_pass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_front_op_depth_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_depth_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_depth_fail(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_depth_fail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_depth_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_depth_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_depth_fail() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_depth_fail, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_front_op_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_compare") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2573711505)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_compare(_ pMember: RenderingDevice.CompareOperator) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_compare, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_compare") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 269730778)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_compare() -> RenderingDevice.CompareOperator { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_compare, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.CompareOperator (rawValue: _result)! + } + + fileprivate static var method_set_front_op_compare_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_compare_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_compare_mask(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_compare_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_compare_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_compare_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_compare_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_compare_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_front_op_write_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_write_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_write_mask(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_write_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_write_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_write_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_write_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_write_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_front_op_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_op_reference") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_op_reference(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_front_op_reference, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_op_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_op_reference") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_op_reference() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_front_op_reference, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_back_op_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_fail(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_fail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_fail() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_fail, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_back_op_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_pass") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_pass(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_pass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_pass") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_pass() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_pass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_back_op_depth_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_depth_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2092799566)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_depth_fail(_ pMember: RenderingDevice.StencilOperation) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_depth_fail, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_depth_fail: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_depth_fail") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1714732389)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_depth_fail() -> RenderingDevice.StencilOperation { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_depth_fail, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.StencilOperation (rawValue: _result)! + } + + fileprivate static var method_set_back_op_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_compare") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2573711505)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_compare(_ pMember: RenderingDevice.CompareOperator) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_compare, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_compare") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 269730778)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_compare() -> RenderingDevice.CompareOperator { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_compare, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.CompareOperator (rawValue: _result)! + } + + fileprivate static var method_set_back_op_compare_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_compare_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_compare_mask(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_compare_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_compare_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_compare_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_compare_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_compare_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_back_op_write_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_write_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_write_mask(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_write_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_write_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_write_mask") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_write_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_write_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_back_op_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("set_back_op_reference") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_back_op_reference(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_set_back_op_reference, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_back_op_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("get_back_op_reference") + return withUnsafePointer(to: &RDPipelineDepthStencilState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_back_op_reference() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineDepthStencilState.method_get_back_op_reference, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineMultisampleState.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineMultisampleState.swift new file mode 100644 index 000000000..4e310cef3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineMultisampleState.swift @@ -0,0 +1,367 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline multisample state (used by ``RenderingDevice``). +/// +/// ``RDPipelineMultisampleState`` is used to control how multisample or supersample antialiasing is being performed when rendering using ``RenderingDevice``. +open class RDPipelineMultisampleState: RefCounted { + override open class var godotClassName: StringName { "RDPipelineMultisampleState" } + + /* Properties */ + + /// The number of MSAA samples (or SSAA samples if ``enableSampleShading`` is `true`) to perform. Higher values result in better antialiasing, at the cost of performance. + final public var sampleCount: RenderingDevice.TextureSamples { + get { + return get_sample_count () + } + + set { + set_sample_count (newValue) + } + + } + + /// If `true`, enables per-sample shading which replaces MSAA by SSAA. This provides higher quality antialiasing that works with transparent (alpha scissor) edges. This has a very high performance cost. See also ``minSampleShading``. See the per-sample shading Vulkan documentation for more details. + final public var enableSampleShading: Bool { + get { + return get_enable_sample_shading () + } + + set { + set_enable_sample_shading (newValue) + } + + } + + /// The multiplier of ``sampleCount`` that determines how many samples are performed for each fragment. Must be between `0.0` and `1.0` (inclusive). Only effective if ``enableSampleShading`` is `true`. If ``minSampleShading`` is `1.0`, fragment invocation must only read from the coverage index sample. Tile image access must not be used if ``enableSampleShading`` is _not_ `1.0`. + final public var minSampleShading: Double { + get { + return get_min_sample_shading () + } + + set { + set_min_sample_shading (newValue) + } + + } + + /// If `true`, alpha to coverage is enabled. This generates a temporary coverage value based on the alpha component of the fragment's first color output. This allows alpha transparency to make use of multisample antialiasing. + final public var enableAlphaToCoverage: Bool { + get { + return get_enable_alpha_to_coverage () + } + + set { + set_enable_alpha_to_coverage (newValue) + } + + } + + /// If `true`, alpha is forced to either `0.0` or `1.0`. This allows hardening the edges of antialiased alpha transparencies. Only relevant if ``enableAlphaToCoverage`` is `true`. + final public var enableAlphaToOne: Bool { + get { + return get_enable_alpha_to_one () + } + + set { + set_enable_alpha_to_one (newValue) + } + + } + + /// The sample mask array. See the sample mask Vulkan documentation for more details. + final public var sampleMasks: VariantCollection { + get { + return get_sample_masks () + } + + set { + set_sample_masks (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_sample_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sample_count") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3774171498)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sample_count(_ pMember: RenderingDevice.TextureSamples) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_sample_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sample_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sample_count") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 407791724)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sample_count() -> RenderingDevice.TextureSamples { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_sample_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSamples (rawValue: _result)! + } + + fileprivate static var method_set_enable_sample_shading: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_sample_shading") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_sample_shading(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_enable_sample_shading, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_sample_shading: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_sample_shading") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_sample_shading() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_enable_sample_shading, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_min_sample_shading: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_sample_shading") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_sample_shading(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_min_sample_shading, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_sample_shading: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_sample_shading") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_sample_shading() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_min_sample_shading, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_alpha_to_coverage: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_alpha_to_coverage") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_alpha_to_coverage(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_enable_alpha_to_coverage, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_alpha_to_coverage: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_alpha_to_coverage") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_alpha_to_coverage() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_enable_alpha_to_coverage, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_alpha_to_one: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_alpha_to_one") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_alpha_to_one(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_enable_alpha_to_one, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_alpha_to_one: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_alpha_to_one") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_alpha_to_one() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_enable_alpha_to_one, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sample_masks: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sample_masks") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sample_masks(_ masks: VariantCollection) { + withUnsafePointer(to: masks.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_set_sample_masks, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sample_masks: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sample_masks") + return withUnsafePointer(to: &RDPipelineMultisampleState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sample_masks() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RDPipelineMultisampleState.method_get_sample_masks, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineRasterizationState.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineRasterizationState.swift new file mode 100644 index 000000000..cec5f092f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineRasterizationState.swift @@ -0,0 +1,647 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline rasterization state (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDPipelineRasterizationState: RefCounted { + override open class var godotClassName: StringName { "RDPipelineRasterizationState" } + + /* Properties */ + + /// If `true`, clamps depth values according to the minimum and maximum depth of the associated viewport. + final public var enableDepthClamp: Bool { + get { + return get_enable_depth_clamp () + } + + set { + set_enable_depth_clamp (newValue) + } + + } + + /// If `true`, primitives are discarded immediately before the rasterization stage. + final public var discardPrimitives: Bool { + get { + return get_discard_primitives () + } + + set { + set_discard_primitives (newValue) + } + + } + + /// If `true`, performs wireframe rendering for triangles instead of flat or textured rendering. + final public var wireframe: Bool { + get { + return get_wireframe () + } + + set { + set_wireframe (newValue) + } + + } + + /// The cull mode to use when drawing polygons, which determines whether front faces or backfaces are hidden. + final public var cullMode: RenderingDevice.PolygonCullMode { + get { + return get_cull_mode () + } + + set { + set_cull_mode (newValue) + } + + } + + /// The winding order to use to determine which face of a triangle is considered its front face. + final public var frontFace: RenderingDevice.PolygonFrontFace { + get { + return get_front_face () + } + + set { + set_front_face (newValue) + } + + } + + /// If `true`, each generated depth value will by offset by some amount. The specific amount is generated per polygon based on the values of ``depthBiasSlopeFactor`` and ``depthBiasConstantFactor``. + final public var depthBiasEnabled: Bool { + get { + return get_depth_bias_enabled () + } + + set { + set_depth_bias_enabled (newValue) + } + + } + + /// A constant offset added to each depth value. Applied after ``depthBiasSlopeFactor``. + final public var depthBiasConstantFactor: Double { + get { + return get_depth_bias_constant_factor () + } + + set { + set_depth_bias_constant_factor (newValue) + } + + } + + /// A limit for how much each depth value can be offset. If negative, it serves as a minimum value, but if positive, it serves as a maximum value. + final public var depthBiasClamp: Double { + get { + return get_depth_bias_clamp () + } + + set { + set_depth_bias_clamp (newValue) + } + + } + + /// A constant scale applied to the slope of each polygons' depth. Applied before ``depthBiasConstantFactor``. + final public var depthBiasSlopeFactor: Double { + get { + return get_depth_bias_slope_factor () + } + + set { + set_depth_bias_slope_factor (newValue) + } + + } + + /// The line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. + final public var lineWidth: Double { + get { + return get_line_width () + } + + set { + set_line_width (newValue) + } + + } + + /// The number of control points to use when drawing a patch with tessellation enabled. Higher values result in higher quality at the cost of performance. + final public var patchControlPoints: UInt32 { + get { + return get_patch_control_points () + } + + set { + set_patch_control_points (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enable_depth_clamp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_depth_clamp") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_depth_clamp(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_enable_depth_clamp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_depth_clamp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_depth_clamp") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_depth_clamp() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_enable_depth_clamp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_discard_primitives: GDExtensionMethodBindPtr = { + let methodName = StringName("set_discard_primitives") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_discard_primitives(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_discard_primitives, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_discard_primitives: GDExtensionMethodBindPtr = { + let methodName = StringName("get_discard_primitives") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_discard_primitives() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_discard_primitives, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_wireframe: GDExtensionMethodBindPtr = { + let methodName = StringName("set_wireframe") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_wireframe(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_wireframe, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_wireframe: GDExtensionMethodBindPtr = { + let methodName = StringName("get_wireframe") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_wireframe() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_wireframe, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mode") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2662586502)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mode(_ pMember: RenderingDevice.PolygonCullMode) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_cull_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mode") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2192484313)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mode() -> RenderingDevice.PolygonCullMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_cull_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.PolygonCullMode (rawValue: _result)! + } + + fileprivate static var method_set_front_face: GDExtensionMethodBindPtr = { + let methodName = StringName("set_front_face") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2637251213)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_front_face(_ pMember: RenderingDevice.PolygonFrontFace) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_front_face, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_front_face: GDExtensionMethodBindPtr = { + let methodName = StringName("get_front_face") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 708793786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_front_face() -> RenderingDevice.PolygonFrontFace { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_front_face, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.PolygonFrontFace (rawValue: _result)! + } + + fileprivate static var method_set_depth_bias_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_bias_enabled") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_bias_enabled(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_depth_bias_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_bias_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_bias_enabled") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_bias_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_depth_bias_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_bias_constant_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_bias_constant_factor") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_bias_constant_factor(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_depth_bias_constant_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_bias_constant_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_bias_constant_factor") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_bias_constant_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_depth_bias_constant_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_bias_clamp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_bias_clamp") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_bias_clamp(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_depth_bias_clamp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_bias_clamp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_bias_clamp") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_bias_clamp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_depth_bias_clamp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth_bias_slope_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth_bias_slope_factor") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth_bias_slope_factor(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_depth_bias_slope_factor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth_bias_slope_factor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_bias_slope_factor") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth_bias_slope_factor() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_depth_bias_slope_factor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_line_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_line_width") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_line_width(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_line_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_line_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_width") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_line_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_line_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_patch_control_points: GDExtensionMethodBindPtr = { + let methodName = StringName("set_patch_control_points") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_patch_control_points(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_set_patch_control_points, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_patch_control_points: GDExtensionMethodBindPtr = { + let methodName = StringName("get_patch_control_points") + return withUnsafePointer(to: &RDPipelineRasterizationState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_patch_control_points() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineRasterizationState.method_get_patch_control_points, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDPipelineSpecializationConstant.swift b/Sources/SwiftGodot/Generated/Api/RDPipelineSpecializationConstant.swift new file mode 100644 index 000000000..289f78c07 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDPipelineSpecializationConstant.swift @@ -0,0 +1,146 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Pipeline specialization constant (used by ``RenderingDevice``). +/// +/// A _specialization constant_ is a way to create additional variants of shaders without actually increasing the number of shader versions that are compiled. This allows improving performance by reducing the number of shader versions and reducing `if` branching, while still allowing shaders to be flexible for different use cases. +/// +/// This object is used by ``RenderingDevice``. +/// +open class RDPipelineSpecializationConstant: RefCounted { + override open class var godotClassName: StringName { "RDPipelineSpecializationConstant" } + + /* Properties */ + + /// The specialization constant's value. Only [bool], integer and float types are valid for specialization constants. + final public var value: Variant? { + get { + return get_value () + } + + set { + set_value (newValue) + } + + } + + /// The identifier of the specialization constant. This is a value starting from `0` and that increments for every different specialization constant for a given shader. + final public var constantId: UInt32 { + get { + return get_constant_id () + } + + set { + set_constant_id (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_value") + return withUnsafePointer(to: &RDPipelineSpecializationConstant.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1114965689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_value(_ value: Variant?) { + withUnsafePointer(to: value.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineSpecializationConstant.method_set_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_value") + return withUnsafePointer(to: &RDPipelineSpecializationConstant.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214101251)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_value() -> Variant? { + var _result: Variant.ContentType = Variant.zero + gi.object_method_bind_ptrcall(RDPipelineSpecializationConstant.method_get_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Variant(takingOver: _result) + } + + fileprivate static var method_set_constant_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_id") + return withUnsafePointer(to: &RDPipelineSpecializationConstant.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_constant_id(_ constantId: UInt32) { + withUnsafePointer(to: constantId) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDPipelineSpecializationConstant.method_set_constant_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_id") + return withUnsafePointer(to: &RDPipelineSpecializationConstant.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_constant_id() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDPipelineSpecializationConstant.method_get_constant_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDSamplerState.swift b/Sources/SwiftGodot/Generated/Api/RDSamplerState.swift new file mode 100644 index 000000000..963b376ce --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDSamplerState.swift @@ -0,0 +1,874 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Sampler state (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDSamplerState: RefCounted { + override open class var godotClassName: StringName { "RDSamplerState" } + + /* Properties */ + + /// The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels. + final public var magFilter: RenderingDevice.SamplerFilter { + get { + return get_mag_filter () + } + + set { + set_mag_filter (newValue) + } + + } + + /// The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels. + final public var minFilter: RenderingDevice.SamplerFilter { + get { + return get_min_filter () + } + + set { + set_min_filter (newValue) + } + + } + + /// The filtering method to use for mipmaps. + final public var mipFilter: RenderingDevice.SamplerFilter { + get { + return get_mip_filter () + } + + set { + set_mip_filter (newValue) + } + + } + + /// The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. + final public var repeatU: RenderingDevice.SamplerRepeatMode { + get { + return get_repeat_u () + } + + set { + set_repeat_u (newValue) + } + + } + + /// The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. + final public var repeatV: RenderingDevice.SamplerRepeatMode { + get { + return get_repeat_v () + } + + set { + set_repeat_v (newValue) + } + + } + + /// The repeat mode to use along the W axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. Only effective for 3D samplers. + final public var repeatW: RenderingDevice.SamplerRepeatMode { + get { + return get_repeat_w () + } + + set { + set_repeat_w (newValue) + } + + } + + /// The mipmap LOD bias to use. Positive values will make the sampler blurrier at a given distance, while negative values will make the sampler sharper at a given distance (at the risk of looking grainy). Recommended values are between `-0.5` and `0.0`. Only effective if the sampler has mipmaps available. + final public var lodBias: Double { + get { + return get_lod_bias () + } + + set { + set_lod_bias (newValue) + } + + } + + /// If `true`, perform anisotropic sampling. See ``anisotropyMax``. + final public var useAnisotropy: Bool { + get { + return get_use_anisotropy () + } + + set { + set_use_anisotropy (newValue) + } + + } + + /// Maximum anisotropy that can be used when sampling. Only effective if ``useAnisotropy`` is `true`. Higher values result in a sharper sampler at oblique angles, at the cost of performance (due to memory bandwidth). This value may be limited by the graphics hardware in use. Most graphics hardware only supports values up to `16.0`. + /// + /// If ``anisotropyMax`` is `1.0`, forcibly disables anisotropy even if ``useAnisotropy`` is `true`. + /// + final public var anisotropyMax: Double { + get { + return get_anisotropy_max () + } + + set { + set_anisotropy_max (newValue) + } + + } + + /// If `true`, returned values will be based on the comparison operation defined in ``compareOp``. This is a hardware-based approach and is therefore faster than performing this manually in a shader. For example, compare operations are used for shadow map rendering by comparing depth values from a shadow sampler. + final public var enableCompare: Bool { + get { + return get_enable_compare () + } + + set { + set_enable_compare (newValue) + } + + } + + /// The compare operation to use. Only effective if ``enableCompare`` is `true`. + final public var compareOp: RenderingDevice.CompareOperator { + get { + return get_compare_op () + } + + set { + set_compare_op (newValue) + } + + } + + /// The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available. + final public var minLod: Double { + get { + return get_min_lod () + } + + set { + set_min_lod (newValue) + } + + } + + /// The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available. + final public var maxLod: Double { + get { + return get_max_lod () + } + + set { + set_max_lod (newValue) + } + + } + + /// The border color that will be returned when sampling outside the sampler's bounds and the ``repeatU``, ``repeatV`` or ``repeatW`` modes have repeating disabled. + final public var borderColor: RenderingDevice.SamplerBorderColor { + get { + return get_border_color () + } + + set { + set_border_color (newValue) + } + + } + + /// If `true`, the texture will be sampled with coordinates ranging from 0 to the texture's resolution. Otherwise, the coordinates will be normalized and range from 0 to 1. + final public var unnormalizedUvw: Bool { + get { + return get_unnormalized_uvw () + } + + set { + set_unnormalized_uvw (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_mag_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mag_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1493420382)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mag_filter(_ pMember: RenderingDevice.SamplerFilter) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_mag_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mag_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mag_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2209202801)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mag_filter() -> RenderingDevice.SamplerFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_mag_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerFilter (rawValue: _result)! + } + + fileprivate static var method_set_min_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1493420382)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_filter(_ pMember: RenderingDevice.SamplerFilter) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_min_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2209202801)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_filter() -> RenderingDevice.SamplerFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_min_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerFilter (rawValue: _result)! + } + + fileprivate static var method_set_mip_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mip_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1493420382)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mip_filter(_ pMember: RenderingDevice.SamplerFilter) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_mip_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mip_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mip_filter") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2209202801)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mip_filter() -> RenderingDevice.SamplerFilter { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_mip_filter, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerFilter (rawValue: _result)! + } + + fileprivate static var method_set_repeat_u: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat_u") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 246127626)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat_u(_ pMember: RenderingDevice.SamplerRepeatMode) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_repeat_u, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat_u: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat_u") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227895872)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat_u() -> RenderingDevice.SamplerRepeatMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_repeat_u, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerRepeatMode (rawValue: _result)! + } + + fileprivate static var method_set_repeat_v: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat_v") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 246127626)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat_v(_ pMember: RenderingDevice.SamplerRepeatMode) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_repeat_v, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat_v: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat_v") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227895872)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat_v() -> RenderingDevice.SamplerRepeatMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_repeat_v, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerRepeatMode (rawValue: _result)! + } + + fileprivate static var method_set_repeat_w: GDExtensionMethodBindPtr = { + let methodName = StringName("set_repeat_w") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 246127626)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_repeat_w(_ pMember: RenderingDevice.SamplerRepeatMode) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_repeat_w, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_repeat_w: GDExtensionMethodBindPtr = { + let methodName = StringName("get_repeat_w") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227895872)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_repeat_w() -> RenderingDevice.SamplerRepeatMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_repeat_w, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerRepeatMode (rawValue: _result)! + } + + fileprivate static var method_set_lod_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lod_bias") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lod_bias(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_lod_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_lod_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_lod_bias") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_lod_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDSamplerState.method_get_lod_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_anisotropy") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_anisotropy(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_use_anisotropy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_anisotropy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_anisotropy") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_anisotropy() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDSamplerState.method_get_use_anisotropy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_anisotropy_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_anisotropy_max") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_anisotropy_max(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_anisotropy_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_anisotropy_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_anisotropy_max") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_anisotropy_max() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDSamplerState.method_get_anisotropy_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_compare") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_compare(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_enable_compare, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_enable_compare: GDExtensionMethodBindPtr = { + let methodName = StringName("get_enable_compare") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_enable_compare() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDSamplerState.method_get_enable_compare, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_compare_op: GDExtensionMethodBindPtr = { + let methodName = StringName("set_compare_op") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2573711505)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_compare_op(_ pMember: RenderingDevice.CompareOperator) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_compare_op, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_compare_op: GDExtensionMethodBindPtr = { + let methodName = StringName("get_compare_op") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 269730778)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_compare_op() -> RenderingDevice.CompareOperator { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_compare_op, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.CompareOperator (rawValue: _result)! + } + + fileprivate static var method_set_min_lod: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min_lod") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min_lod(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_min_lod, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_min_lod: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min_lod") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min_lod() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDSamplerState.method_get_min_lod, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_lod: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_lod") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_lod(_ pMember: Double) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_max_lod, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_lod: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_lod") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_lod() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RDSamplerState.method_get_max_lod, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_border_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_border_color") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1115869595)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_border_color(_ pMember: RenderingDevice.SamplerBorderColor) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_border_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_border_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_border_color") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3514246478)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_border_color() -> RenderingDevice.SamplerBorderColor { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDSamplerState.method_get_border_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.SamplerBorderColor (rawValue: _result)! + } + + fileprivate static var method_set_unnormalized_uvw: GDExtensionMethodBindPtr = { + let methodName = StringName("set_unnormalized_uvw") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_unnormalized_uvw(_ pMember: Bool) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDSamplerState.method_set_unnormalized_uvw, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_unnormalized_uvw: GDExtensionMethodBindPtr = { + let methodName = StringName("get_unnormalized_uvw") + return withUnsafePointer(to: &RDSamplerState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_unnormalized_uvw() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RDSamplerState.method_get_unnormalized_uvw, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDShaderFile.swift b/Sources/SwiftGodot/Generated/Api/RDShaderFile.swift new file mode 100644 index 000000000..0e405beed --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDShaderFile.swift @@ -0,0 +1,165 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Compiled shader file in SPIR-V form (used by ``RenderingDevice``). Not to be confused with Godot's own ``Shader``. +/// +/// Compiled shader file in SPIR-V form. +/// +/// See also ``RDShaderSource``. ``RDShaderFile`` is only meant to be used with the ``RenderingDevice`` API. It should not be confused with Godot's own ``Shader`` resource, which is what Godot's various nodes use for high-level shader programming. +/// +open class RDShaderFile: Resource { + override open class var godotClassName: StringName { "RDShaderFile" } + + /* Properties */ + + /// The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check ``RDShaderSPIRV``'s error message members). + final public var baseError: String { + get { + return get_base_error () + } + + set { + set_base_error (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_bytecode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_bytecode") + return withUnsafePointer(to: &RDShaderFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1558064255)! + } + + } + + }() + + /// Sets the SPIR-V `bytecode` that will be compiled for the specified `version`. + public final func setBytecode(_ bytecode: RDShaderSPIRV?, version: StringName = StringName ("")) { + withUnsafePointer(to: bytecode?.handle) { pArg0 in + withUnsafePointer(to: version.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RDShaderFile.method_set_bytecode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_spirv: GDExtensionMethodBindPtr = { + let methodName = StringName("get_spirv") + return withUnsafePointer(to: &RDShaderFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3340165340)! + } + + } + + }() + + /// Returns the SPIR-V intermediate representation for the specified shader `version`. + public final func getSpirv(version: StringName = StringName ("")) -> RDShaderSPIRV? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: version.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderFile.method_get_spirv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_version_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_version_list") + return withUnsafePointer(to: &RDShaderFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the list of compiled versions for this shader. + public final func getVersionList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RDShaderFile.method_get_version_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_set_base_error: GDExtensionMethodBindPtr = { + let methodName = StringName("set_base_error") + return withUnsafePointer(to: &RDShaderFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_base_error(_ error: String) { + let error = GString(error) + withUnsafePointer(to: error.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderFile.method_set_base_error, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_base_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_error") + return withUnsafePointer(to: &RDShaderFile.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_base_error() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RDShaderFile.method_get_base_error, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDShaderSPIRV.swift b/Sources/SwiftGodot/Generated/Api/RDShaderSPIRV.swift new file mode 100644 index 000000000..accb08a6d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDShaderSPIRV.swift @@ -0,0 +1,271 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// SPIR-V intermediate representation as part of a ``RDShaderFile`` (used by ``RenderingDevice``). +/// +/// ``RDShaderSPIRV`` represents a ``RDShaderFile``'s SPIR-V code for various shader stages, as well as possible compilation error messages. SPIR-V is a low-level intermediate shader representation. This intermediate representation is not used directly by GPUs for rendering, but it can be compiled into binary shaders that GPUs can understand. Unlike compiled shaders, SPIR-V is portable across GPU models and driver versions. +/// +/// This object is used by ``RenderingDevice``. +/// +open class RDShaderSPIRV: Resource { + override open class var godotClassName: StringName { "RDShaderSPIRV" } + + /* Properties */ + + /// The SPIR-V bytecode for the vertex shader stage. + final public var bytecodeVertex: PackedByteArray { + get { + return get_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 0)!) + } + + set { + set_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 0)!, newValue) + } + + } + + /// The SPIR-V bytecode for the fragment shader stage. + final public var bytecodeFragment: PackedByteArray { + get { + return get_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 1)!) + } + + set { + set_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 1)!, newValue) + } + + } + + /// The SPIR-V bytecode for the tessellation control shader stage. + final public var bytecodeTesselationControl: PackedByteArray { + get { + return get_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 2)!) + } + + set { + set_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 2)!, newValue) + } + + } + + /// The SPIR-V bytecode for the tessellation evaluation shader stage. + final public var bytecodeTesselationEvaluation: PackedByteArray { + get { + return get_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 3)!) + } + + set { + set_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 3)!, newValue) + } + + } + + /// The SPIR-V bytecode for the compute shader stage. + final public var bytecodeCompute: PackedByteArray { + get { + return get_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 4)!) + } + + set { + set_stage_bytecode (RenderingDevice.ShaderStage (rawValue: 4)!, newValue) + } + + } + + /// The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. + final public var compileErrorVertex: String { + get { + return get_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 0)!) + } + + set { + set_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 0)!, newValue) + } + + } + + /// The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. + final public var compileErrorFragment: String { + get { + return get_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 1)!) + } + + set { + set_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 1)!, newValue) + } + + } + + /// The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. + final public var compileErrorTesselationControl: String { + get { + return get_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 2)!) + } + + set { + set_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 2)!, newValue) + } + + } + + /// The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. + final public var compileErrorTesselationEvaluation: String { + get { + return get_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 3)!) + } + + set { + set_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 3)!, newValue) + } + + } + + /// The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. + final public var compileErrorCompute: String { + get { + return get_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 4)!) + } + + set { + set_stage_compile_error (RenderingDevice.ShaderStage (rawValue: 4)!, newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stage_bytecode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stage_bytecode") + return withUnsafePointer(to: &RDShaderSPIRV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3514097977)! + } + + } + + }() + + @inline(__always) + /// Sets the SPIR-V `bytecode` for the given shader `stage`. Equivalent to setting one of ``bytecodeCompute``, ``bytecodeFragment``, ``bytecodeTesselationControl``, ``bytecodeTesselationEvaluation``, ``bytecodeVertex``. + fileprivate final func set_stage_bytecode(_ stage: RenderingDevice.ShaderStage, _ bytecode: PackedByteArray) { + withUnsafePointer(to: stage.rawValue) { pArg0 in + withUnsafePointer(to: bytecode.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSPIRV.method_set_stage_bytecode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_stage_bytecode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stage_bytecode") + return withUnsafePointer(to: &RDShaderSPIRV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3816765404)! + } + + } + + }() + + @inline(__always) + /// Equivalent to getting one of ``bytecodeCompute``, ``bytecodeFragment``, ``bytecodeTesselationControl``, ``bytecodeTesselationEvaluation``, ``bytecodeVertex``. + fileprivate final func get_stage_bytecode(_ stage: RenderingDevice.ShaderStage) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: stage.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSPIRV.method_get_stage_bytecode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_stage_compile_error: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stage_compile_error") + return withUnsafePointer(to: &RDShaderSPIRV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 620821314)! + } + + } + + }() + + @inline(__always) + /// Sets the compilation error message for the given shader `stage` to `compileError`. Equivalent to setting one of ``compileErrorCompute``, ``compileErrorFragment``, ``compileErrorTesselationControl``, ``compileErrorTesselationEvaluation``, ``compileErrorVertex``. + fileprivate final func set_stage_compile_error(_ stage: RenderingDevice.ShaderStage, _ compileError: String) { + withUnsafePointer(to: stage.rawValue) { pArg0 in + let compileError = GString(compileError) + withUnsafePointer(to: compileError.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSPIRV.method_set_stage_compile_error, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_stage_compile_error: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stage_compile_error") + return withUnsafePointer(to: &RDShaderSPIRV.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3354920045)! + } + + } + + }() + + @inline(__always) + /// Returns the compilation error message for the given shader `stage`. Equivalent to getting one of ``compileErrorCompute``, ``compileErrorFragment``, ``compileErrorTesselationControl``, ``compileErrorTesselationEvaluation``, ``compileErrorVertex``. + fileprivate final func get_stage_compile_error(_ stage: RenderingDevice.ShaderStage) -> String { + let _result = GString () + withUnsafePointer(to: stage.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSPIRV.method_get_stage_compile_error, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDShaderSource.swift b/Sources/SwiftGodot/Generated/Api/RDShaderSource.swift new file mode 100644 index 000000000..c656dd4b2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDShaderSource.swift @@ -0,0 +1,209 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Shader source code (used by ``RenderingDevice``). +/// +/// Shader source code in text form. +/// +/// See also ``RDShaderFile``. ``RDShaderSource`` is only meant to be used with the ``RenderingDevice`` API. It should not be confused with Godot's own ``Shader`` resource, which is what Godot's various nodes use for high-level shader programming. +/// +open class RDShaderSource: RefCounted { + override open class var godotClassName: StringName { "RDShaderSource" } + + /* Properties */ + + /// Source code for the shader's vertex stage. + final public var sourceVertex: String { + get { + return get_stage_source (RenderingDevice.ShaderStage (rawValue: 0)!) + } + + set { + set_stage_source (RenderingDevice.ShaderStage (rawValue: 0)!, newValue) + } + + } + + /// Source code for the shader's fragment stage. + final public var sourceFragment: String { + get { + return get_stage_source (RenderingDevice.ShaderStage (rawValue: 1)!) + } + + set { + set_stage_source (RenderingDevice.ShaderStage (rawValue: 1)!, newValue) + } + + } + + /// Source code for the shader's tessellation control stage. + final public var sourceTesselationControl: String { + get { + return get_stage_source (RenderingDevice.ShaderStage (rawValue: 2)!) + } + + set { + set_stage_source (RenderingDevice.ShaderStage (rawValue: 2)!, newValue) + } + + } + + /// Source code for the shader's tessellation evaluation stage. + final public var sourceTesselationEvaluation: String { + get { + return get_stage_source (RenderingDevice.ShaderStage (rawValue: 3)!) + } + + set { + set_stage_source (RenderingDevice.ShaderStage (rawValue: 3)!, newValue) + } + + } + + /// Source code for the shader's compute stage. + final public var sourceCompute: String { + get { + return get_stage_source (RenderingDevice.ShaderStage (rawValue: 4)!) + } + + set { + set_stage_source (RenderingDevice.ShaderStage (rawValue: 4)!, newValue) + } + + } + + /// The language the shader is written in. + final public var language: RenderingDevice.ShaderLanguage { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_stage_source: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stage_source") + return withUnsafePointer(to: &RDShaderSource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 620821314)! + } + + } + + }() + + @inline(__always) + /// Sets `source` code for the specified shader `stage`. Equivalent to setting one of ``sourceCompute``, ``sourceFragment``, ``sourceTesselationControl``, ``sourceTesselationEvaluation`` or ``sourceVertex``. + fileprivate final func set_stage_source(_ stage: RenderingDevice.ShaderStage, _ source: String) { + withUnsafePointer(to: stage.rawValue) { pArg0 in + let source = GString(source) + withUnsafePointer(to: source.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSource.method_set_stage_source, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_stage_source: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stage_source") + return withUnsafePointer(to: &RDShaderSource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3354920045)! + } + + } + + }() + + @inline(__always) + /// Returns source code for the specified shader `stage`. Equivalent to getting one of ``sourceCompute``, ``sourceFragment``, ``sourceTesselationControl``, ``sourceTesselationEvaluation`` or ``sourceVertex``. + fileprivate final func get_stage_source(_ stage: RenderingDevice.ShaderStage) -> String { + let _result = GString () + withUnsafePointer(to: stage.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSource.method_get_stage_source, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &RDShaderSource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3422186742)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: RenderingDevice.ShaderLanguage) { + withUnsafePointer(to: language.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDShaderSource.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &RDShaderSource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1063538261)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> RenderingDevice.ShaderLanguage { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDShaderSource.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.ShaderLanguage (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDTextureFormat.swift b/Sources/SwiftGodot/Generated/Api/RDTextureFormat.swift new file mode 100644 index 000000000..3512be88d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDTextureFormat.swift @@ -0,0 +1,587 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture format (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDTextureFormat: RefCounted { + override open class var godotClassName: StringName { "RDTextureFormat" } + + /* Properties */ + + /// The texture's pixel data format. + final public var format: RenderingDevice.DataFormat { + get { + return get_format () + } + + set { + set_format (newValue) + } + + } + + /// The texture's width (in pixels). + final public var width: UInt32 { + get { + return get_width () + } + + set { + set_width (newValue) + } + + } + + /// The texture's height (in pixels). + final public var height: UInt32 { + get { + return get_height () + } + + set { + set_height (newValue) + } + + } + + /// The texture's depth (in pixels). This is always `1` for 2D textures. + final public var depth: UInt32 { + get { + return get_depth () + } + + set { + set_depth (newValue) + } + + } + + /// The number of layers in the texture. Only relevant for 2D texture arrays. + final public var arrayLayers: UInt32 { + get { + return get_array_layers () + } + + set { + set_array_layers (newValue) + } + + } + + /// The number of mipmaps available in the texture. + final public var mipmaps: UInt32 { + get { + return get_mipmaps () + } + + set { + set_mipmaps (newValue) + } + + } + + /// The texture type. + final public var textureType: RenderingDevice.TextureType { + get { + return get_texture_type () + } + + set { + set_texture_type (newValue) + } + + } + + /// The number of samples used when sampling the texture. + final public var samples: RenderingDevice.TextureSamples { + get { + return get_samples () + } + + set { + set_samples (newValue) + } + + } + + /// The texture's usage bits, which determine what can be done using the texture. + final public var usageBits: RenderingDevice.TextureUsageBits { + get { + return get_usage_bits () + } + + set { + set_usage_bits (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format(_ pMember: RenderingDevice.DataFormat) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2235804183)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format() -> RenderingDevice.DataFormat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.DataFormat (rawValue: _result)! + } + + fileprivate static var method_set_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_width") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_width(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_width") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_width() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("set_height") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_height(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_height, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_height") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_height() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("set_depth") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_depth(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_depth, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_depth: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_depth() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_depth, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_array_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("set_array_layers") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_array_layers(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_array_layers, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_array_layers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_array_layers") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_array_layers() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_array_layers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mipmaps") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mipmaps(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_mipmaps, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mipmaps: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mipmaps") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mipmaps() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_mipmaps, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_type") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 652343381)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_type(_ pMember: RenderingDevice.TextureType) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_texture_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_type") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4036357416)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_type() -> RenderingDevice.TextureType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_texture_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureType (rawValue: _result)! + } + + fileprivate static var method_set_samples: GDExtensionMethodBindPtr = { + let methodName = StringName("set_samples") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3774171498)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_samples(_ pMember: RenderingDevice.TextureSamples) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_samples, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_samples: GDExtensionMethodBindPtr = { + let methodName = StringName("get_samples") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 407791724)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_samples() -> RenderingDevice.TextureSamples { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_samples, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSamples (rawValue: _result)! + } + + fileprivate static var method_set_usage_bits: GDExtensionMethodBindPtr = { + let methodName = StringName("set_usage_bits") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 245642367)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_usage_bits(_ pMember: RenderingDevice.TextureUsageBits) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_set_usage_bits, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_usage_bits: GDExtensionMethodBindPtr = { + let methodName = StringName("get_usage_bits") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1313398998)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_usage_bits() -> RenderingDevice.TextureUsageBits { + var _result: RenderingDevice.TextureUsageBits = RenderingDevice.TextureUsageBits () + gi.object_method_bind_ptrcall(RDTextureFormat.method_get_usage_bits, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_shareable_format: GDExtensionMethodBindPtr = { + let methodName = StringName("add_shareable_format") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + /// + public final func addShareableFormat(_ format: RenderingDevice.DataFormat) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_add_shareable_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_shareable_format: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_shareable_format") + return withUnsafePointer(to: &RDTextureFormat.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + /// + public final func removeShareableFormat(_ format: RenderingDevice.DataFormat) { + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureFormat.method_remove_shareable_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDTextureView.swift b/Sources/SwiftGodot/Generated/Api/RDTextureView.swift new file mode 100644 index 000000000..d2c31ea47 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDTextureView.swift @@ -0,0 +1,311 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Texture view (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDTextureView: RefCounted { + override open class var godotClassName: StringName { "RDTextureView" } + + /* Properties */ + + /// Optional override for the data format to return sampled values in. The default value of ``RenderingDevice/DataFormat/max`` does not override the format. + final public var formatOverride: RenderingDevice.DataFormat { + get { + return get_format_override () + } + + set { + set_format_override (newValue) + } + + } + + /// The channel to sample when sampling the red color channel. + final public var swizzleR: RenderingDevice.TextureSwizzle { + get { + return get_swizzle_r () + } + + set { + set_swizzle_r (newValue) + } + + } + + /// The channel to sample when sampling the green color channel. + final public var swizzleG: RenderingDevice.TextureSwizzle { + get { + return get_swizzle_g () + } + + set { + set_swizzle_g (newValue) + } + + } + + /// The channel to sample when sampling the blue color channel. + final public var swizzleB: RenderingDevice.TextureSwizzle { + get { + return get_swizzle_b () + } + + set { + set_swizzle_b (newValue) + } + + } + + /// The channel to sample when sampling the alpha channel. + final public var swizzleA: RenderingDevice.TextureSwizzle { + get { + return get_swizzle_a () + } + + set { + set_swizzle_a (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_format_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format_override") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format_override(_ pMember: RenderingDevice.DataFormat) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureView.method_set_format_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format_override") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2235804183)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format_override() -> RenderingDevice.DataFormat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureView.method_get_format_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.DataFormat (rawValue: _result)! + } + + fileprivate static var method_set_swizzle_r: GDExtensionMethodBindPtr = { + let methodName = StringName("set_swizzle_r") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3833362581)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_swizzle_r(_ pMember: RenderingDevice.TextureSwizzle) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureView.method_set_swizzle_r, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_swizzle_r: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swizzle_r") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4150792614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_swizzle_r() -> RenderingDevice.TextureSwizzle { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureView.method_get_swizzle_r, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSwizzle (rawValue: _result)! + } + + fileprivate static var method_set_swizzle_g: GDExtensionMethodBindPtr = { + let methodName = StringName("set_swizzle_g") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3833362581)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_swizzle_g(_ pMember: RenderingDevice.TextureSwizzle) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureView.method_set_swizzle_g, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_swizzle_g: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swizzle_g") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4150792614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_swizzle_g() -> RenderingDevice.TextureSwizzle { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureView.method_get_swizzle_g, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSwizzle (rawValue: _result)! + } + + fileprivate static var method_set_swizzle_b: GDExtensionMethodBindPtr = { + let methodName = StringName("set_swizzle_b") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3833362581)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_swizzle_b(_ pMember: RenderingDevice.TextureSwizzle) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureView.method_set_swizzle_b, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_swizzle_b: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swizzle_b") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4150792614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_swizzle_b() -> RenderingDevice.TextureSwizzle { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureView.method_get_swizzle_b, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSwizzle (rawValue: _result)! + } + + fileprivate static var method_set_swizzle_a: GDExtensionMethodBindPtr = { + let methodName = StringName("set_swizzle_a") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3833362581)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_swizzle_a(_ pMember: RenderingDevice.TextureSwizzle) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDTextureView.method_set_swizzle_a, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_swizzle_a: GDExtensionMethodBindPtr = { + let methodName = StringName("get_swizzle_a") + return withUnsafePointer(to: &RDTextureView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4150792614)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_swizzle_a() -> RenderingDevice.TextureSwizzle { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDTextureView.method_get_swizzle_a, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.TextureSwizzle (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDUniform.swift b/Sources/SwiftGodot/Generated/Api/RDUniform.swift new file mode 100644 index 000000000..e8bc410c1 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDUniform.swift @@ -0,0 +1,204 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Shader uniform (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDUniform: RefCounted { + override open class var godotClassName: StringName { "RDUniform" } + + /* Properties */ + + /// The uniform's data type. + final public var uniformType: RenderingDevice.UniformType { + get { + return get_uniform_type () + } + + set { + set_uniform_type (newValue) + } + + } + + /// The uniform's binding. + final public var binding: Int32 { + get { + return get_binding () + } + + set { + set_binding (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_uniform_type: GDExtensionMethodBindPtr = { + let methodName = StringName("set_uniform_type") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1664894931)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_uniform_type(_ pMember: RenderingDevice.UniformType) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDUniform.method_set_uniform_type, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_uniform_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uniform_type") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 475470040)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_uniform_type() -> RenderingDevice.UniformType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDUniform.method_get_uniform_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.UniformType (rawValue: _result)! + } + + fileprivate static var method_set_binding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_binding") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_binding(_ pMember: Int32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDUniform.method_set_binding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_binding: GDExtensionMethodBindPtr = { + let methodName = StringName("get_binding") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_binding() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RDUniform.method_get_binding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_id: GDExtensionMethodBindPtr = { + let methodName = StringName("add_id") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Binds the given id to the uniform. The data associated with the id is then used when the uniform is passed to a shader. + public final func addId(_ id: RID) { + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDUniform.method_add_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_ids") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Unbinds all ids currently bound to the uniform. + public final func clearIds() { + gi.object_method_bind_ptrcall(RDUniform.method_clear_ids, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_ids: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ids") + return withUnsafePointer(to: &RDUniform.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an array of all ids currently bound to the uniform. + public final func getIds() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RDUniform.method_get_ids, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RDVertexAttribute.swift b/Sources/SwiftGodot/Generated/Api/RDVertexAttribute.swift new file mode 100644 index 000000000..191a838e3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RDVertexAttribute.swift @@ -0,0 +1,306 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Vertex attribute (used by ``RenderingDevice``). +/// +/// This object is used by ``RenderingDevice``. +open class RDVertexAttribute: RefCounted { + override open class var godotClassName: StringName { "RDVertexAttribute" } + + /* Properties */ + + final public var location: UInt32 { + get { + return get_location () + } + + set { + set_location (newValue) + } + + } + + final public var offset: UInt32 { + get { + return get_offset () + } + + set { + set_offset (newValue) + } + + } + + final public var format: RenderingDevice.DataFormat { + get { + return get_format () + } + + set { + set_format (newValue) + } + + } + + final public var stride: UInt32 { + get { + return get_stride () + } + + set { + set_stride (newValue) + } + + } + + final public var frequency: RenderingDevice.VertexFrequency { + get { + return get_frequency () + } + + set { + set_frequency (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_location: GDExtensionMethodBindPtr = { + let methodName = StringName("set_location") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_location(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDVertexAttribute.method_set_location, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_location: GDExtensionMethodBindPtr = { + let methodName = StringName("get_location") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_location() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDVertexAttribute.method_get_location, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_offset") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_offset(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDVertexAttribute.method_set_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_offset") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_offset() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDVertexAttribute.method_get_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_format: GDExtensionMethodBindPtr = { + let methodName = StringName("set_format") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 565531219)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_format(_ pMember: RenderingDevice.DataFormat) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDVertexAttribute.method_set_format, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_format") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2235804183)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_format() -> RenderingDevice.DataFormat { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDVertexAttribute.method_get_format, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.DataFormat (rawValue: _result)! + } + + fileprivate static var method_set_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("set_stride") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_stride(_ pMember: UInt32) { + withUnsafePointer(to: pMember) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDVertexAttribute.method_set_stride, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("get_stride") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_stride() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RDVertexAttribute.method_get_stride, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("set_frequency") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 522141836)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_frequency(_ pMember: RenderingDevice.VertexFrequency) { + withUnsafePointer(to: pMember.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RDVertexAttribute.method_set_frequency, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frequency: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frequency") + return withUnsafePointer(to: &RDVertexAttribute.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4154106413)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_frequency() -> RenderingDevice.VertexFrequency { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RDVertexAttribute.method_get_frequency, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingDevice.VertexFrequency (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RandomNumberGenerator.swift b/Sources/SwiftGodot/Generated/Api/RandomNumberGenerator.swift new file mode 100644 index 000000000..b4b8a7d3d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RandomNumberGenerator.swift @@ -0,0 +1,334 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides methods for generating pseudo-random numbers. +/// +/// RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses PCG32. +/// +/// > Note: The underlying algorithm is an implementation detail and should not be depended upon. +/// +/// To generate a random float number (within a given range) based on a time-dependent seed: +/// +open class RandomNumberGenerator: RefCounted { + override open class var godotClassName: StringName { "RandomNumberGenerator" } + + /* Properties */ + + /// Initializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers. + /// + /// > Note: The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally. + /// + /// > Note: Setting this property produces a side effect of changing the internal ``state``, so make sure to initialize the seed _before_ modifying the ``state``: + /// + /// > Note: The default value of this property is pseudo-random, and changes when calling ``randomize()``. The `0` value documented here is a placeholder, and not the actual default seed. + /// + final public var seed: UInt { + get { + return get_seed () + } + + set { + set_seed (newValue) + } + + } + + /// The current state of the random number generator. Save and restore this property to restore the generator to a previous state: + /// + /// > Note: Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use ``seed`` instead. + /// + /// > Note: The default value of this property is pseudo-random, and changes when calling ``randomize()``. The `0` value documented here is a placeholder, and not the actual default seed. + /// + final public var state: UInt { + get { + return get_state () + } + + set { + set_state (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_seed: GDExtensionMethodBindPtr = { + let methodName = StringName("set_seed") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_seed(_ seed: UInt) { + withUnsafePointer(to: seed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_set_seed, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_seed: GDExtensionMethodBindPtr = { + let methodName = StringName("get_seed") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_seed() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_get_seed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_state: GDExtensionMethodBindPtr = { + let methodName = StringName("set_state") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_state(_ state: UInt) { + withUnsafePointer(to: state) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_set_state, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_state: GDExtensionMethodBindPtr = { + let methodName = StringName("get_state") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_state() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_get_state, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_randi: GDExtensionMethodBindPtr = { + let methodName = StringName("randi") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Returns a pseudo-random 32-bit unsigned integer between `0` and `4294967295` (inclusive). + public final func randi() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randi, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_randf: GDExtensionMethodBindPtr = { + let methodName = StringName("randf") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 191475506)! + } + + } + + }() + + /// Returns a pseudo-random float between `0.0` and `1.0` (inclusive). + public final func randf() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randf, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_randfn: GDExtensionMethodBindPtr = { + let methodName = StringName("randfn") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 837325100)! + } + + } + + }() + + /// Returns a normally-distributed, pseudo-random floating-point number from the specified `mean` and a standard `deviation`. This is also known as a Gaussian distribution. + /// + /// > Note: This method uses the Box-Muller transform algorithm. + /// + public final func randfn(mean: Double = 0.0, deviation: Double = 1.0) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: mean) { pArg0 in + withUnsafePointer(to: deviation) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randfn, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_randf_range: GDExtensionMethodBindPtr = { + let methodName = StringName("randf_range") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4269894367)! + } + + } + + }() + + /// Returns a pseudo-random float between `from` and `to` (inclusive). + public final func randfRange(from: Double, to: Double) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randf_range, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_randi_range: GDExtensionMethodBindPtr = { + let methodName = StringName("randi_range") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 50157827)! + } + + } + + }() + + /// Returns a pseudo-random 32-bit signed integer between `from` and `to` (inclusive). + public final func randiRange(from: Int32, to: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randi_range, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_rand_weighted: GDExtensionMethodBindPtr = { + let methodName = StringName("rand_weighted") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4189642986)! + } + + } + + }() + + /// Returns a random index with non-uniform weights. Prints an error and returns `-1` if the array is empty. + /// + public final func randWeighted(weights: PackedFloat32Array) -> Int { + var _result: Int = 0 + withUnsafePointer(to: weights.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_rand_weighted, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_randomize: GDExtensionMethodBindPtr = { + let methodName = StringName("randomize") + return withUnsafePointer(to: &RandomNumberGenerator.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Sets up a time-based seed for this ``RandomNumberGenerator`` instance. Unlike the [@GlobalScope] random number generation functions, different ``RandomNumberGenerator`` instances can use different seeds. + public final func randomize() { + gi.object_method_bind_ptrcall(RandomNumberGenerator.method_randomize, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Range.swift b/Sources/SwiftGodot/Generated/Api/Range.swift new file mode 100644 index 000000000..6f05ce0b7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Range.swift @@ -0,0 +1,791 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract base class for controls that represent a number within a range. +/// +/// Range is an abstract base class for controls that represent a number within a range, using a configured ``step`` and ``page`` size. See e.g. ``ScrollBar`` and ``Slider`` for examples of higher-level nodes using Range. +/// +/// +/// This object emits the following signals: +/// +/// - ``valueChanged`` +/// - ``changed`` +open class Range: Control { + override open class var godotClassName: StringName { "Range" } + + /* Properties */ + + /// Minimum value. Range is clamped if ``value`` is less than ``minValue``. + final public var minValue: Double { + get { + return get_min () + } + + set { + set_min (newValue) + } + + } + + /// Maximum value. Range is clamped if ``value`` is greater than ``maxValue``. + final public var maxValue: Double { + get { + return get_max () + } + + set { + set_max (newValue) + } + + } + + /// If greater than 0, ``value`` will always be rounded to a multiple of this property's value. If ``rounded`` is also `true`, ``value`` will first be rounded to a multiple of this property's value, then rounded to the nearest integer. + final public var step: Double { + get { + return get_step () + } + + set { + set_step (newValue) + } + + } + + /// Page size. Used mainly for ``ScrollBar``. ScrollBar's length is its size multiplied by ``page`` over the difference between ``minValue`` and ``maxValue``. + final public var page: Double { + get { + return get_page () + } + + set { + set_page (newValue) + } + + } + + /// Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use ``setValueNoSignal(value:)`` if you want to avoid it. + final public var value: Double { + get { + return get_value () + } + + set { + set_value (newValue) + } + + } + + /// The value mapped between 0 and 1. + final public var ratio: Double { + get { + return get_as_ratio () + } + + set { + set_as_ratio (newValue) + } + + } + + /// If `true`, and ``minValue`` is greater than 0, ``value`` will be represented exponentially rather than linearly. + final public var expEdit: Bool { + get { + return is_ratio_exp () + } + + set { + set_exp_ratio (newValue) + } + + } + + /// If `true`, ``value`` will always be rounded to the nearest integer. + final public var rounded: Bool { + get { + return is_using_rounded_values () + } + + set { + set_use_rounded_values (newValue) + } + + } + + /// If `true`, ``value`` may be greater than ``maxValue``. + final public var allowGreater: Bool { + get { + return is_greater_allowed () + } + + set { + set_allow_greater (newValue) + } + + } + + /// If `true`, ``value`` may be less than ``minValue``. + final public var allowLesser: Bool { + get { + return is_lesser_allowed () + } + + set { + set_allow_lesser (newValue) + } + + } + + /* Methods */ + /// Called when the ``Range``'s value is changed (following the same conditions as [signal value_changed]). + @_documentation(visibility: public) + open func _valueChanged(newValue: Double) { + } + + fileprivate static var method_get_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_value") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_value() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_value, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_min: GDExtensionMethodBindPtr = { + let methodName = StringName("get_min") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_min() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_min, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_max: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_max, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_step: GDExtensionMethodBindPtr = { + let methodName = StringName("get_step") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_step() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_step, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_page: GDExtensionMethodBindPtr = { + let methodName = StringName("get_page") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_page() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_page, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_as_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_as_ratio") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_as_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(Range.method_get_as_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_value") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_value(_ value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_value_no_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("set_value_no_signal") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Sets the ``Range``'s current value to the specified `value`, without emitting the [signal value_changed] signal. + public final func setValueNoSignal(value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_value_no_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_min: GDExtensionMethodBindPtr = { + let methodName = StringName("set_min") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_min(_ minimum: Double) { + withUnsafePointer(to: minimum) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_min, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_max: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max(_ maximum: Double) { + withUnsafePointer(to: maximum) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_max, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_step: GDExtensionMethodBindPtr = { + let methodName = StringName("set_step") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_step(_ step: Double) { + withUnsafePointer(to: step) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_step, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_page: GDExtensionMethodBindPtr = { + let methodName = StringName("set_page") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_page(_ pagesize: Double) { + withUnsafePointer(to: pagesize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_page, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_as_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_ratio") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_ratio(_ value: Double) { + withUnsafePointer(to: value) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_as_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_use_rounded_values: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_rounded_values") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_rounded_values(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_use_rounded_values, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_rounded_values: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_rounded_values") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_rounded_values() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Range.method_is_using_rounded_values, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_exp_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exp_ratio") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exp_ratio(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_exp_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_ratio_exp: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ratio_exp") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_ratio_exp() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Range.method_is_ratio_exp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_greater: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_greater") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_greater(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_allow_greater, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_greater_allowed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_greater_allowed") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_greater_allowed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Range.method_is_greater_allowed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_lesser: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_lesser") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_lesser(_ allow: Bool) { + withUnsafePointer(to: allow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_set_allow_lesser, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_lesser_allowed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_lesser_allowed") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_lesser_allowed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Range.method_is_lesser_allowed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_share: GDExtensionMethodBindPtr = { + let methodName = StringName("share") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + /// Binds two ``Range``s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. + public final func share(with: Node?) { + withUnsafePointer(to: with?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Range.method_share, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_unshare: GDExtensionMethodBindPtr = { + let methodName = StringName("unshare") + return withUnsafePointer(to: &Range.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Stops the ``Range`` from sharing its member variables with any other. + public final func unshare() { + gi.object_method_bind_ptrcall(Range.method_unshare, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_value_changed": + return _Range_proxy_value_changed + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ value: Double) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Double (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when ``value`` changes. When used on a ``Slider``, this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to [signal value_changed], consider using a _debouncing_ ``Timer`` to call the function less often. + /// + /// > Note: Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when `value` is set directly via code. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.valueChanged.connect { value in + /// print ("caught signal") + /// } + /// ``` + public var valueChanged: Signal1 { Signal1 (target: self, signalName: "value_changed") } + + /// Emitted when ``minValue``, ``maxValue``, ``page``, or ``step`` change. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.changed.connect { + /// print ("caught signal") + /// } + /// ``` + public var changed: SimpleSignal { SimpleSignal (target: self, signalName: "changed") } + +} + +// Support methods for proxies +func _Range_proxy_value_changed (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._valueChanged (newValue: args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RayCast2D.swift b/Sources/SwiftGodot/Generated/Api/RayCast2D.swift new file mode 100644 index 000000000..0faea4868 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RayCast2D.swift @@ -0,0 +1,744 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ray in 2D space, used to find the first ``CollisionObject2D`` it intersects. +/// +/// A raycast represents a ray from its origin to its ``targetPosition`` that finds the closest ``CollisionObject2D`` along its path, if it intersects any. +/// +/// ``RayCast2D`` can ignore some objects by adding them to an exception list, by making its detection reporting ignore ``Area2D``s (``collideWithAreas``) or ``PhysicsBody2D``s (``collideWithBodies``), or by configuring physics layers. +/// +/// ``RayCast2D`` calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a ``RayCast2D`` multiple times within the same physics frame, use ``forceRaycastUpdate()``. +/// +/// To sweep over a region of 2D space, you can approximate the region with multiple ``RayCast2D``s or use ``ShapeCast2D``. +/// +open class RayCast2D: Node2D { + override open class var godotClassName: StringName { "RayCast2D" } + + /* Properties */ + + /// If `true`, collisions will be reported. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// If `true`, the parent node will be excluded from collision detection. + final public var excludeParent: Bool { + get { + return get_exclude_parent_body () + } + + set { + set_exclude_parent_body (newValue) + } + + } + + /// The ray's destination point, relative to the RayCast's `position`. + final public var targetPosition: Vector2 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// If `true`, the ray will detect a hit when starting inside shapes. In this case the collision normal will be `Vector2(0, 0)`. Does not affect concave polygon shapes. + final public var hitFromInside: Bool { + get { + return is_hit_from_inside_enabled () + } + + set { + set_hit_from_inside (newValue) + } + + } + + /// If `true`, collisions with ``Area2D``s will be reported. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /// If `true`, collisions with ``PhysicsBody2D``s will be reported. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ localPoint: Vector2) { + withUnsafePointer(to: localPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RayCast2D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_colliding: GDExtensionMethodBindPtr = { + let methodName = StringName("is_colliding") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether any object is intersecting with the ray's vector (considering the vector length). + public final func isColliding() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_is_colliding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_force_raycast_update: GDExtensionMethodBindPtr = { + let methodName = StringName("force_raycast_update") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates the collision information for the ray immediately, without waiting for the next `_physics_process` call. Use this method, for example, when the ray or its parent has changed state. + /// + /// > Note: ``enabled`` does not need to be `true` for this to work. + /// + public final func forceRaycastUpdate() { + gi.object_method_bind_ptrcall(RayCast2D.method_force_raycast_update, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + public final func getCollider() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RayCast2D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the first object that the ray intersects, or an empty ``RID`` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + public final func getColliderRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RayCast2D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + /// + /// To get the intersected shape node, for a ``CollisionObject2D`` target, use: + /// + public final func getColliderShape() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RayCast2D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_point") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If ``hitFromInside`` is `true` and the ray starts inside of a collision shape, this function will return the origin point of the ray. + /// + /// > Note: Check that ``isColliding()`` returns `true` before calling this method to ensure the returned point is valid and up-to-date. + /// + public final func getCollisionPoint() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RayCast2D.method_get_collision_point, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_normal") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + /// Returns the normal of the intersecting object's shape at the collision point, or `Vector2(0, 0)` if the ray starts inside the shape and ``hitFromInside`` is `true`. + /// + /// > Note: Check that ``isColliding()`` returns `true` before calling this method to ensure the returned normal is valid and up-to-date. + /// + public final func getCollisionNormal() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RayCast2D.method_get_collision_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_exception_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("add_exception_rid") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Adds a collision exception so the ray does not report collisions with the specified ``RID``. + public final func addExceptionRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_add_exception_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("add_exception") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3090941106)! + } + + } + + }() + + /// Adds a collision exception so the ray does not report collisions with the specified ``CollisionObject2D`` node. + public final func addException(node: CollisionObject2D?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_add_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_exception_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_exception_rid") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes a collision exception so the ray does report collisions with the specified ``RID``. + public final func removeExceptionRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_remove_exception_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_exception") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3090941106)! + } + + } + + }() + + /// Removes a collision exception so the ray does report collisions with the specified ``CollisionObject2D`` node. + public final func removeException(node: CollisionObject2D?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_remove_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_exceptions: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_exceptions") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all collision exceptions for this ray. + public final func clearExceptions() { + gi.object_method_bind_ptrcall(RayCast2D.method_clear_exceptions, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RayCast2D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_exclude_parent_body: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_parent_body") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_parent_body(_ mask: Bool) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_exclude_parent_body, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_parent_body: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_parent_body") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_parent_body() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_get_exclude_parent_body, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_from_inside: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_from_inside") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_from_inside(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast2D.method_set_hit_from_inside, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_from_inside_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_from_inside_enabled") + return withUnsafePointer(to: &RayCast2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_from_inside_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast2D.method_is_hit_from_inside_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RayCast3D.swift b/Sources/SwiftGodot/Generated/Api/RayCast3D.swift new file mode 100644 index 000000000..2b9631515 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RayCast3D.swift @@ -0,0 +1,933 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A ray in 3D space, used to find the first ``CollisionObject3D`` it intersects. +/// +/// A raycast represents a ray from its origin to its ``targetPosition`` that finds the closest ``CollisionObject3D`` along its path, if it intersects any. +/// +/// ``RayCast3D`` can ignore some objects by adding them to an exception list, by making its detection reporting ignore ``Area3D``s (``collideWithAreas``) or ``PhysicsBody3D``s (``collideWithBodies``), or by configuring physics layers. +/// +/// ``RayCast3D`` calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a ``RayCast3D`` multiple times within the same physics frame, use ``forceRaycastUpdate()``. +/// +/// To sweep over a region of 3D space, you can approximate the region with multiple ``RayCast3D``s or use ``ShapeCast3D``. +/// +open class RayCast3D: Node3D { + override open class var godotClassName: StringName { "RayCast3D" } + + /* Properties */ + + /// If `true`, collisions will be reported. + final public var enabled: Bool { + get { + return is_enabled () + } + + set { + set_enabled (newValue) + } + + } + + /// If `true`, collisions will be ignored for this RayCast3D's immediate parent. + final public var excludeParent: Bool { + get { + return get_exclude_parent_body () + } + + set { + set_exclude_parent_body (newValue) + } + + } + + /// The ray's destination point, relative to the RayCast's `position`. + final public var targetPosition: Vector3 { + get { + return get_target_position () + } + + set { + set_target_position (newValue) + } + + } + + /// The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See Collision layers and masks in the documentation for more information. + final public var collisionMask: UInt32 { + get { + return get_collision_mask () + } + + set { + set_collision_mask (newValue) + } + + } + + /// If `true`, the ray will detect a hit when starting inside shapes. In this case the collision normal will be `Vector3(0, 0, 0)`. Does not affect shapes with no volume like concave polygon or heightmap. + final public var hitFromInside: Bool { + get { + return is_hit_from_inside_enabled () + } + + set { + set_hit_from_inside (newValue) + } + + } + + /// If `true`, the ray will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. + final public var hitBackFaces: Bool { + get { + return is_hit_back_faces_enabled () + } + + set { + set_hit_back_faces (newValue) + } + + } + + /// If `true`, collisions with ``Area3D``s will be reported. + final public var collideWithAreas: Bool { + get { + return is_collide_with_areas_enabled () + } + + set { + set_collide_with_areas (newValue) + } + + } + + /// If `true`, collisions with ``PhysicsBody3D``s will be reported. + final public var collideWithBodies: Bool { + get { + return is_collide_with_bodies_enabled () + } + + set { + set_collide_with_bodies (newValue) + } + + } + + /// The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the ``RayCast3D`` is colliding with something. + /// + /// If set to `Color(0.0, 0.0, 0.0)` (by default), the color set in ``ProjectSettings/debug/shapes/collision/shapeColor`` is used. + /// + final public var debugShapeCustomColor: Color { + get { + return get_debug_shape_custom_color () + } + + set { + set_debug_shape_custom_color (newValue) + } + + } + + /// If set to `1`, a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the ``RayCast3D``. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for the debug shape to be visible at run-time. + final public var debugShapeThickness: Int32 { + get { + return get_debug_shape_thickness () + } + + set { + set_debug_shape_thickness (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_position") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_position(_ localPoint: Vector3) { + withUnsafePointer(to: localPoint) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_target_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_position") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_position() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RayCast3D.method_get_target_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_colliding: GDExtensionMethodBindPtr = { + let methodName = StringName("is_colliding") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether any object is intersecting with the ray's vector (considering the vector length). + public final func isColliding() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_colliding, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_force_raycast_update: GDExtensionMethodBindPtr = { + let methodName = StringName("force_raycast_update") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Updates the collision information for the ray immediately, without waiting for the next `_physics_process` call. Use this method, for example, when the ray or its parent has changed state. + /// + /// > Note: ``enabled`` does not need to be `true` for this to work. + /// + public final func forceRaycastUpdate() { + gi.object_method_bind_ptrcall(RayCast3D.method_force_raycast_update, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_collider: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1981248198)! + } + + } + + }() + + /// Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + public final func getCollider() -> Object? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RayCast3D.method_get_collider, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_collider_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_rid") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the first object that the ray intersects, or an empty ``RID`` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + public final func getColliderRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RayCast3D.method_get_collider_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_collider_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collider_shape") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. ``isColliding()`` returns `false`). + /// + /// To get the intersected shape node, for a ``CollisionObject3D`` target, use: + /// + public final func getColliderShape() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RayCast3D.method_get_collider_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_point: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_point") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If ``hitFromInside`` is `true` and the ray starts inside of a collision shape, this function will return the origin point of the ray. + /// + /// > Note: Check that ``isColliding()`` returns `true` before calling this method to ensure the returned point is valid and up-to-date. + /// + public final func getCollisionPoint() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RayCast3D.method_get_collision_point, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_normal") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + /// Returns the normal of the intersecting object's shape at the collision point, or `Vector3(0, 0, 0)` if the ray starts inside the shape and ``hitFromInside`` is `true`. + /// + /// > Note: Check that ``isColliding()`` returns `true` before calling this method to ensure the returned normal is valid and up-to-date. + /// + public final func getCollisionNormal() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RayCast3D.method_get_collision_normal, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_collision_face_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_face_index") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the collision object's face index at the collision point, or `-1` if the shape intersecting the ray is not a ``ConcavePolygonShape3D``. + public final func getCollisionFaceIndex() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RayCast3D.method_get_collision_face_index, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_add_exception_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("add_exception_rid") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Adds a collision exception so the ray does not report collisions with the specified ``RID``. + public final func addExceptionRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_add_exception_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("add_exception") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1976431078)! + } + + } + + }() + + /// Adds a collision exception so the ray does not report collisions with the specified ``CollisionObject3D`` node. + public final func addException(node: CollisionObject3D?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_add_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_exception_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_exception_rid") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes a collision exception so the ray does report collisions with the specified ``RID``. + public final func removeExceptionRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_remove_exception_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_remove_exception: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_exception") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1976431078)! + } + + } + + }() + + /// Removes a collision exception so the ray does report collisions with the specified ``CollisionObject3D`` node. + public final func removeException(node: CollisionObject3D?) { + withUnsafePointer(to: node?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_remove_exception, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_clear_exceptions: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_exceptions") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Removes all collision exceptions for this ray. + public final func clearExceptions() { + gi.object_method_bind_ptrcall(RayCast3D.method_clear_exceptions, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collision_mask(_ mask: UInt32) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_collision_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_collision_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RayCast3D.method_get_collision_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collision_mask_value") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Based on `value`, enables or disables the specified layer in the ``collisionMask``, given a `layerNumber` between 1 and 32. + public final func setCollisionMaskValue(layerNumber: Int32, value: Bool) { + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: value) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_collision_mask_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_collision_mask_value") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether or not the specified layer of the ``collisionMask`` is enabled, given a `layerNumber` between 1 and 32. + public final func getCollisionMaskValue(layerNumber: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: layerNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_get_collision_mask_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_exclude_parent_body: GDExtensionMethodBindPtr = { + let methodName = StringName("set_exclude_parent_body") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_exclude_parent_body(_ mask: Bool) { + withUnsafePointer(to: mask) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_exclude_parent_body, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_exclude_parent_body: GDExtensionMethodBindPtr = { + let methodName = StringName("get_exclude_parent_body") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_exclude_parent_body() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_get_exclude_parent_body, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_areas: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_areas") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_areas(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_collide_with_areas, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_areas_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_areas_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_areas_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_collide_with_areas_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_collide_with_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("set_collide_with_bodies") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_collide_with_bodies(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_collide_with_bodies, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_collide_with_bodies_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_collide_with_bodies_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_collide_with_bodies_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_collide_with_bodies_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_from_inside: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_from_inside") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_from_inside(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_hit_from_inside, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_from_inside_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_from_inside_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_from_inside_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_hit_from_inside_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hit_back_faces: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hit_back_faces") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hit_back_faces(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_hit_back_faces, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hit_back_faces_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hit_back_faces_enabled") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hit_back_faces_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RayCast3D.method_is_hit_back_faces_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_shape_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_shape_custom_color") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_shape_custom_color(_ debugShapeCustomColor: Color) { + withUnsafePointer(to: debugShapeCustomColor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_debug_shape_custom_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_shape_custom_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_shape_custom_color") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_shape_custom_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(RayCast3D.method_get_debug_shape_custom_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_shape_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_shape_thickness") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_shape_thickness(_ debugShapeThickness: Int32) { + withUnsafePointer(to: debugShapeThickness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RayCast3D.method_set_debug_shape_thickness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_debug_shape_thickness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_debug_shape_thickness") + return withUnsafePointer(to: &RayCast3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_debug_shape_thickness() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RayCast3D.method_get_debug_shape_thickness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RectangleShape2D.swift b/Sources/SwiftGodot/Generated/Api/RectangleShape2D.swift new file mode 100644 index 000000000..6a9d68da6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RectangleShape2D.swift @@ -0,0 +1,90 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D rectangle shape used for physics collision. +/// +/// A 2D rectangle shape, intended for use in physics. Usually used to provide a shape for a ``CollisionShape2D``. +/// +/// **Performance:** ``RectangleShape2D`` is fast to check collisions against. It is faster than ``CapsuleShape2D``, but slower than ``CircleShape2D``. +/// +open class RectangleShape2D: Shape2D { + override open class var godotClassName: StringName { "RectangleShape2D" } + + /* Properties */ + + /// The rectangle's width and height. + final public var size: Vector2 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &RectangleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector2) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RectangleShape2D.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &RectangleShape2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RectangleShape2D.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RefCounted.swift b/Sources/SwiftGodot/Generated/Api/RefCounted.swift new file mode 100644 index 000000000..d3af147bf --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RefCounted.swift @@ -0,0 +1,131 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for reference-counted objects. +/// +/// Base class for any object that keeps a reference count. ``Resource`` and many other helper objects inherit this class. +/// +/// Unlike other ``Object`` types, ``RefCounted``s keep an internal reference counter so that they are automatically released when no longer in use, and only then. ``RefCounted``s therefore do not need to be freed manually with ``Object/free()``. +/// +/// ``RefCounted`` instances caught in a cyclic reference will **not** be freed automatically. For example, if a node holds a reference to instance `A`, which directly or indirectly holds a reference back to `A`, `A`'s reference count will be 2. Destruction of the node will leave `A` dangling with a reference count of 1, and there will be a memory leak. To prevent this, one of the references in the cycle can be made weak with ``@GlobalScope.weakref``. +/// +/// In the vast majority of use cases, instantiating and using ``RefCounted``-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. +/// +/// > Note: In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will remain in memory for a while before being removed. +/// +open class RefCounted: Object { + override open class var godotClassName: StringName { "RefCounted" } + public required init () { + super.init () + _ = initRef() + } + + public required init(nativeHandle: UnsafeRawPointer) { + super.init (nativeHandle: nativeHandle) + reference() + ownsHandle = true + } + + /* Methods */ + fileprivate static var method_init_ref: GDExtensionMethodBindPtr = { + let methodName = StringName("init_ref") + return withUnsafePointer(to: &RefCounted.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Initializes the internal reference counter. Use this only if you really know what you are doing. + /// + /// Returns whether the initialization was successful. + /// + public final func initRef() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RefCounted.method_init_ref, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_reference: GDExtensionMethodBindPtr = { + let methodName = StringName("reference") + return withUnsafePointer(to: &RefCounted.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Increments the internal reference counter. Use this only if you really know what you are doing. + /// + /// Returns `true` if the increment was successful, `false` otherwise. + /// + @discardableResult /* discardable per discardableList: RefCounted, reference */ + public final func reference() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RefCounted.method_reference, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_unreference: GDExtensionMethodBindPtr = { + let methodName = StringName("unreference") + return withUnsafePointer(to: &RefCounted.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Decrements the internal reference counter. Use this only if you really know what you are doing. + /// + /// Returns `true` if the object should be freed after the decrement, `false` otherwise. + /// + @discardableResult /* discardable per discardableList: RefCounted, unreference */ + public final func unreference() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RefCounted.method_unreference, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_reference_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reference_count") + return withUnsafePointer(to: &RefCounted.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the current reference count. + public final func getReferenceCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RefCounted.method_get_reference_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ReferenceRect.swift b/Sources/SwiftGodot/Generated/Api/ReferenceRect.swift new file mode 100644 index 000000000..56f8a0ee7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ReferenceRect.swift @@ -0,0 +1,199 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A rectangle hint for designing UIs. +/// +/// A rectangle box that displays only a colored border around its rectangle. It is used to visualize the extents of a ``Control``. +open class ReferenceRect: Control { + override open class var godotClassName: StringName { "ReferenceRect" } + + /* Properties */ + + /// Sets the border color of the ``ReferenceRect``. + final public var borderColor: Color { + get { + return get_border_color () + } + + set { + set_border_color (newValue) + } + + } + + /// Sets the border width of the ``ReferenceRect``. The border grows both inwards and outwards with respect to the rectangle box. + final public var borderWidth: Double { + get { + return get_border_width () + } + + set { + set_border_width (newValue) + } + + } + + /// If `true`, the ``ReferenceRect`` will only be visible while in editor. Otherwise, ``ReferenceRect`` will be visible in the running project. + final public var editorOnly: Bool { + get { + return get_editor_only () + } + + set { + set_editor_only (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_border_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_border_color") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_border_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ReferenceRect.method_get_border_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_border_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_border_color") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_border_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReferenceRect.method_set_border_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_border_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_border_width") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_border_width() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ReferenceRect.method_get_border_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_border_width: GDExtensionMethodBindPtr = { + let methodName = StringName("set_border_width") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_border_width(_ width: Double) { + withUnsafePointer(to: width) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReferenceRect.method_set_border_width, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("get_editor_only") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_editor_only() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ReferenceRect.method_get_editor_only, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_editor_only: GDExtensionMethodBindPtr = { + let methodName = StringName("set_editor_only") + return withUnsafePointer(to: &ReferenceRect.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_editor_only(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReferenceRect.method_set_editor_only, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ReflectionProbe.swift b/Sources/SwiftGodot/Generated/Api/ReflectionProbe.swift new file mode 100644 index 000000000..fb15c416b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ReflectionProbe.swift @@ -0,0 +1,874 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Captures its surroundings to create fast, accurate reflections from a given point. +/// +/// Captures its surroundings as a cubemap, and stores versions of it with increasing levels of blur to simulate different material roughnesses. +/// +/// The ``ReflectionProbe`` is used to create high-quality reflections at a low performance cost (when ``updateMode`` is ``UpdateMode/once``). ``ReflectionProbe``s can be blended together and with the rest of the scene smoothly. ``ReflectionProbe``s can also be combined with ``VoxelGI``, SDFGI (``Environment/sdfgiEnabled``) and screen-space reflections (``Environment/ssrEnabled``) to get more accurate reflections in specific areas. ``ReflectionProbe``s render all objects within their ``cullMask``, so updating them can be quite expensive. It is best to update them once with the important static objects and then leave them as-is. +/// +/// > Note: Unlike ``VoxelGI`` and SDFGI, ``ReflectionProbe``s only source their environment from a ``WorldEnvironment`` node. If you specify an ``Environment`` resource within a ``Camera3D`` node, it will be ignored by the ``ReflectionProbe``. This can lead to incorrect lighting within the ``ReflectionProbe``. +/// +/// > Note: Reflection probes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. When using the Mobile rendering method, only 8 reflection probes can be displayed on each mesh resource. Attempting to display more than 8 reflection probes on a single mesh resource will result in reflection probes flickering in and out as the camera moves. +/// +/// > Note: When using the Mobile rendering method, reflection probes will only correctly affect meshes whose visibility AABB intersects with the reflection probe's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, ``GeometryInstance3D/extraCullMargin`` must be increased on the mesh. Otherwise, the reflection probe may not be visible on the mesh. +/// +open class ReflectionProbe: VisualInstance3D { + override open class var godotClassName: StringName { "ReflectionProbe" } + public enum UpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than ``UpdateMode/always``, but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a ``ReflectionProbe`` update by moving the ``ReflectionProbe`` slightly in any direction. + case once = 0 // UPDATE_ONCE + /// Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with ``UpdateMode/always`` at most per scene. For all other use cases, use ``UpdateMode/once``. + case always = 1 // UPDATE_ALWAYS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .once: return ".once" + case .always: return ".always" + } + + } + + } + + public enum AmbientMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not apply any ambient lighting inside the ``ReflectionProbe``'s box defined by its ``size``. + case disabled = 0 // AMBIENT_DISABLED + /// Apply automatically-sourced environment lighting inside the ``ReflectionProbe``'s box defined by its ``size``. + case environment = 1 // AMBIENT_ENVIRONMENT + /// Apply custom ambient lighting inside the ``ReflectionProbe``'s box defined by its ``size``. See ``ambientColor`` and ``ambientColorEnergy``. + case color = 2 // AMBIENT_COLOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .environment: return ".environment" + case .color: return ".color" + } + + } + + } + + + /* Properties */ + + /// Sets how frequently the ``ReflectionProbe`` is updated. Can be ``UpdateMode/once`` or ``UpdateMode/always``. + final public var updateMode: ReflectionProbe.UpdateMode { + get { + return get_update_mode () + } + + set { + set_update_mode (newValue) + } + + } + + /// Defines the reflection intensity. Intensity modulates the strength of the reflection. + final public var intensity: Double { + get { + return get_intensity () + } + + set { + set_intensity (newValue) + } + + } + + /// The maximum distance away from the ``ReflectionProbe`` an object can be before it is culled. Decrease this to improve performance, especially when using the ``UpdateMode/always`` ``updateMode``. + /// + /// > Note: The maximum reflection distance is always at least equal to the probe's extents. This means that decreasing ``maxDistance`` will not always cull objects from reflections, especially if the reflection probe's box defined by its ``size`` is already large. + /// + final public var maxDistance: Double { + get { + return get_max_distance () + } + + set { + set_max_distance (newValue) + } + + } + + /// The size of the reflection probe. The larger the size, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the size only as large as you need it. + /// + /// > Note: To better fit areas that are not aligned to the grid, you can rotate the ``ReflectionProbe`` node. + /// + final public var size: Vector3 { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// Sets the origin offset to be used when this ``ReflectionProbe`` is in ``boxProjection`` mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection. + final public var originOffset: Vector3 { + get { + return get_origin_offset () + } + + set { + set_origin_offset (newValue) + } + + } + + /// If `true`, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. + /// + /// > Note: To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the ``ReflectionProbe`` node. + /// + final public var boxProjection: Bool { + get { + return is_box_projection_enabled () + } + + set { + set_enable_box_projection (newValue) + } + + } + + /// If `true`, reflections will ignore sky contribution. + final public var interior: Bool { + get { + return is_set_as_interior () + } + + set { + set_as_interior (newValue) + } + + } + + /// If `true`, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the ``UpdateMode/always`` ``updateMode``. + final public var enableShadows: Bool { + get { + return are_shadows_enabled () + } + + set { + set_enable_shadows (newValue) + } + + } + + /// Sets the cull mask which determines what objects are drawn by this probe. Every ``VisualInstance3D`` with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. + /// + /// This can also be used to prevent an object from reflecting upon itself (for instance, a ``ReflectionProbe`` centered on a vehicle). + /// + final public var cullMask: UInt32 { + get { + return get_cull_mask () + } + + set { + set_cull_mask (newValue) + } + + } + + /// Sets the reflection mask which determines what objects have reflections applied from this probe. Every ``VisualInstance3D`` with a layer included in this reflection mask will have reflections applied from this probe. See also ``cullMask``, which can be used to exclude objects from appearing in the reflection while still making them affected by the ``ReflectionProbe``. + final public var reflectionMask: UInt32 { + get { + return get_reflection_mask () + } + + set { + set_reflection_mask (newValue) + } + + } + + /// The automatic LOD bias to use for meshes rendered within the ``ReflectionProbe`` (this is analog to ``Viewport/meshLodThreshold``). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to `0.0`, automatic LOD is disabled. Increase ``meshLodThreshold`` to improve performance at the cost of geometry detail, especially when using the ``UpdateMode/always`` ``updateMode``. + /// + /// > Note: ``meshLodThreshold`` does not affect ``GeometryInstance3D`` visibility ranges (also known as "manual" LOD or hierarchical LOD). + /// + final public var meshLodThreshold: Double { + get { + return get_mesh_lod_threshold () + } + + set { + set_mesh_lod_threshold (newValue) + } + + } + + /// The ambient color to use within the ``ReflectionProbe``'s box defined by its ``size``. The ambient color will smoothly blend with other ``ReflectionProbe``s and the rest of the scene (outside the ``ReflectionProbe``'s box defined by its ``size``). + final public var ambientMode: ReflectionProbe.AmbientMode { + get { + return get_ambient_mode () + } + + set { + set_ambient_mode (newValue) + } + + } + + /// The custom ambient color to use within the ``ReflectionProbe``'s box defined by its ``size``. Only effective if ``ambientMode`` is ``AmbientMode/color``. + final public var ambientColor: Color { + get { + return get_ambient_color () + } + + set { + set_ambient_color (newValue) + } + + } + + /// The custom ambient color energy to use within the ``ReflectionProbe``'s box defined by its ``size``. Only effective if ``ambientMode`` is ``AmbientMode/color``. + final public var ambientColorEnergy: Double { + get { + return get_ambient_color_energy () + } + + set { + set_ambient_color_energy (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_intensity") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_intensity(_ intensity: Double) { + withUnsafePointer(to: intensity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_intensity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_intensity") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_intensity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_intensity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ambient_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_mode") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1748981278)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_mode(_ ambient: ReflectionProbe.AmbientMode) { + withUnsafePointer(to: ambient.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_ambient_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_mode") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1014607621)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_mode() -> ReflectionProbe.AmbientMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_ambient_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ReflectionProbe.AmbientMode (rawValue: _result)! + } + + fileprivate static var method_set_ambient_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_color") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_color(_ ambient: Color) { + withUnsafePointer(to: ambient) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_ambient_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_color") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_ambient_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_ambient_color_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("set_ambient_color_energy") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_ambient_color_energy(_ ambientEnergy: Double) { + withUnsafePointer(to: ambientEnergy) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_ambient_color_energy, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_ambient_color_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("get_ambient_color_energy") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_ambient_color_energy() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_ambient_color_energy, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_distance") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_distance(_ maxDistance: Double) { + withUnsafePointer(to: maxDistance) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_max_distance, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_distance") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_distance() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_max_distance, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_mesh_lod_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mesh_lod_threshold") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mesh_lod_threshold(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_mesh_lod_threshold, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mesh_lod_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mesh_lod_threshold") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mesh_lod_threshold() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_mesh_lod_threshold, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Vector3) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_origin_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("set_origin_offset") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_origin_offset(_ originOffset: Vector3) { + withUnsafePointer(to: originOffset) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_origin_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_origin_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_origin_offset") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_origin_offset() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_origin_offset, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_as_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_as_interior") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_as_interior(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_as_interior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_set_as_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("is_set_as_interior") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_set_as_interior() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ReflectionProbe.method_is_set_as_interior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_box_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_box_projection") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_box_projection(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_enable_box_projection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_box_projection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_box_projection_enabled") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_box_projection_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ReflectionProbe.method_is_box_projection_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_enable_shadows: GDExtensionMethodBindPtr = { + let methodName = StringName("set_enable_shadows") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_enable_shadows(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_enable_shadows, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_are_shadows_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("are_shadows_enabled") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func are_shadows_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(ReflectionProbe.method_are_shadows_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cull_mask") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cull_mask(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_cull_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cull_mask") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cull_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_cull_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_reflection_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("set_reflection_mask") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_reflection_mask(_ layers: UInt32) { + withUnsafePointer(to: layers) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_reflection_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_reflection_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("get_reflection_mask") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_reflection_mask() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_reflection_mask, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_mode") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4090221187)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_mode(_ mode: ReflectionProbe.UpdateMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ReflectionProbe.method_set_update_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_mode") + return withUnsafePointer(to: &ReflectionProbe.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2367550552)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_mode() -> ReflectionProbe.UpdateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(ReflectionProbe.method_get_update_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ReflectionProbe.UpdateMode (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RegEx.swift b/Sources/SwiftGodot/Generated/Api/RegEx.swift new file mode 100644 index 000000000..915c20063 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RegEx.swift @@ -0,0 +1,310 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Class for searching text for patterns using regular expressions. +/// +/// A regular expression (or regex) is a compact language that can be used to recognize strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For example, a regex of `ab[0-9]` would find any string that is `ab` followed by any number from `0` to `9`. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. +/// +/// To begin, the RegEx object needs to be compiled with the search pattern using ``compile(pattern:)`` before it can be used. +/// +/// The search pattern must be escaped first for GDScript before it is escaped for the expression. For example, `compile("\\d+")` would be read by RegEx as `\d+`. Similarly, `compile("\"(?:\\\\.|[^\"])*\"")` would be read as `"(?:\\.|[^"])*"`. In GDScript, you can also use raw string literals (r-strings). For example, `compile(r'"(?:\\.|[^"])*"')` would be read the same. +/// +/// Using ``search(subject:offset:end:)``, you can find the pattern within the given text. If a pattern is found, ``RegExMatch`` is returned and you can retrieve details of the results using methods such as ``RegExMatch/getString(name:)`` and ``RegExMatch/getStart(name:)``. +/// +/// The results of capturing groups `()` can be retrieved by passing the group number to the various methods in ``RegExMatch``. Group 0 is the default and will always refer to the entire pattern. In the above example, calling `result.get_string(1)` would give you `0123`. +/// +/// This version of RegEx also supports named capturing groups, and the names can be used to retrieve the results. If two or more groups have the same name, the name would only refer to the first one with a match. +/// +/// If you need to process multiple results, ``searchAll(subject:offset:end:)`` generates a list of all non-overlapping results. This can be combined with a `for` loop for convenience. +/// +/// **Example of splitting a string using a RegEx:** +/// +/// > Note: Godot's regex implementation is based on the PCRE2 library. You can view the full pattern reference here. +/// +/// **Tip:** You can use Regexr to test regular expressions online. +/// +open class RegEx: RefCounted { + override open class var godotClassName: StringName { "RegEx" } + /* Methods */ + fileprivate static var method_create_from_string: GDExtensionMethodBindPtr = { + let methodName = StringName("create_from_string") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2150300909)! + } + + } + + }() + + /// Creates and compiles a new ``RegEx`` object. + public static func createFromString(pattern: String) -> RegEx? { + var _result = UnsafeRawPointer (bitPattern: 0) + let pattern = GString(pattern) + withUnsafePointer(to: pattern.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_create_from_string, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. + public final func clear() { + gi.object_method_bind_ptrcall(RegEx.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_compile: GDExtensionMethodBindPtr = { + let methodName = StringName("compile") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Compiles and assign the search pattern to use. Returns ``GodotError/ok`` if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. + public final func compile(pattern: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let pattern = GString(pattern) + withUnsafePointer(to: pattern.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RegEx.method_compile, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_search: GDExtensionMethodBindPtr = { + let methodName = StringName("search") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3365977994)! + } + + } + + }() + + /// Searches the text for the compiled pattern. Returns a ``RegExMatch`` container of the first matching result if found, otherwise `null`. + /// + /// The region to search within can be specified with `offset` and `end`. This is useful when searching for another match in the same `subject` by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by `offset`, and the character before `offset` will be checked for the word boundary `\b`. + /// + public final func search(subject: String, offset: Int32 = 0, end: Int32 = -1) -> RegExMatch? { + var _result = UnsafeRawPointer (bitPattern: 0) + let subject = GString(subject) + withUnsafePointer(to: subject.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: end) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RegEx.method_search, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_search_all: GDExtensionMethodBindPtr = { + let methodName = StringName("search_all") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 849021363)! + } + + } + + }() + + /// Searches the text for the compiled pattern. Returns an array of ``RegExMatch`` containers for each non-overlapping result. If no results were found, an empty array is returned instead. + /// + /// The region to search within can be specified with `offset` and `end`. This is useful when searching for another match in the same `subject` by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by `offset`, and the character before `offset` will be checked for the word boundary `\b`. + /// + public final func searchAll(subject: String, offset: Int32 = 0, end: Int32 = -1) -> ObjectCollection { + var _result: Int64 = 0 + let subject = GString(subject) + withUnsafePointer(to: subject.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: end) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RegEx.method_search_all, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_sub: GDExtensionMethodBindPtr = { + let methodName = StringName("sub") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 54019702)! + } + + } + + }() + + /// Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as `$1` and `$name` are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). + /// + /// The region to search within can be specified with `offset` and `end`. This is useful when searching for another match in the same `subject` by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by `offset`, and the character before `offset` will be checked for the word boundary `\b`. + /// + public final func sub(subject: String, replacement: String, all: Bool = false, offset: Int32 = 0, end: Int32 = -1) -> String { + let _result = GString () + let subject = GString(subject) + withUnsafePointer(to: subject.content) { pArg0 in + let replacement = GString(replacement) + withUnsafePointer(to: replacement.content) { pArg1 in + withUnsafePointer(to: all) { pArg2 in + withUnsafePointer(to: offset) { pArg3 in + withUnsafePointer(to: end) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(RegEx.method_sub, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + return _result.description + } + + fileprivate static var method_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("is_valid") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether this object has a valid search pattern assigned. + public final func isValid() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RegEx.method_is_valid, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_pattern: GDExtensionMethodBindPtr = { + let methodName = StringName("get_pattern") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the original search pattern that was compiled. + public final func getPattern() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RegEx.method_get_pattern, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_group_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_group_count") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of capturing groups in compiled pattern. + public final func getGroupCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RegEx.method_get_group_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_names") + return withUnsafePointer(to: &RegEx.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. + public final func getNames() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(RegEx.method_get_names, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RegExMatch.swift b/Sources/SwiftGodot/Generated/Api/RegExMatch.swift new file mode 100644 index 000000000..4b829976d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RegExMatch.swift @@ -0,0 +1,217 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Contains the results of a ``RegEx`` search. +/// +/// Contains the results of a single ``RegEx`` match returned by ``RegEx/search(subject:offset:end:)`` and ``RegEx/searchAll(subject:offset:end:)``. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. +open class RegExMatch: RefCounted { + override open class var godotClassName: StringName { "RegExMatch" } + + /* Properties */ + + /// The source string used with the search pattern to find this matching result. + final public var subject: String { + get { + return get_subject () + } + + } + + /// A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. + final public var names: GDictionary { + get { + return get_names () + } + + } + + /// An ``GArray`` of the match and its capturing groups. + final public var strings: PackedStringArray { + get { + return get_strings () + } + + } + + /* Methods */ + fileprivate static var method_get_subject: GDExtensionMethodBindPtr = { + let methodName = StringName("get_subject") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_subject() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RegExMatch.method_get_subject, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_group_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_group_count") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of capturing groups. + public final func getGroupCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RegExMatch.method_get_group_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_names: GDExtensionMethodBindPtr = { + let methodName = StringName("get_names") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3102165223)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_names() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(RegExMatch.method_get_names, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_strings: GDExtensionMethodBindPtr = { + let methodName = StringName("get_strings") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_strings() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(RegExMatch.method_get_strings, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_string: GDExtensionMethodBindPtr = { + let methodName = StringName("get_string") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 687115856)! + } + + } + + }() + + /// Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + /// + /// Returns an empty string if the group did not match or doesn't exist. + /// + public final func getString(name: Variant?) -> String { + let _result = GString () + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RegExMatch.method_get_string, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_start: GDExtensionMethodBindPtr = { + let methodName = StringName("get_start") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 490464691)! + } + + } + + }() + + /// Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + /// + /// Returns -1 if the group did not match or doesn't exist. + /// + public final func getStart(name: Variant?) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RegExMatch.method_get_start, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_end: GDExtensionMethodBindPtr = { + let methodName = StringName("get_end") + return withUnsafePointer(to: &RegExMatch.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 490464691)! + } + + } + + }() + + /// Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + /// + /// Returns -1 if the group did not match or doesn't exist. + /// + public final func getEnd(name: Variant?) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RegExMatch.method_get_end, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RemoteTransform2D.swift b/Sources/SwiftGodot/Generated/Api/RemoteTransform2D.swift new file mode 100644 index 000000000..773a4f9b6 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RemoteTransform2D.swift @@ -0,0 +1,331 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// RemoteTransform2D pushes its own ``Transform2D`` to another ``Node2D`` derived node in the scene. +/// +/// RemoteTransform2D pushes its own ``Transform2D`` to another ``Node2D`` derived node (called the remote node) in the scene. +/// +/// It can be set to update another node's position, rotation and/or scale. It can use either global or local coordinates. +/// +open class RemoteTransform2D: Node2D { + override open class var godotClassName: StringName { "RemoteTransform2D" } + + /* Properties */ + + /// The ``NodePath`` to the remote node, relative to the RemoteTransform2D's position in the scene. + final public var remotePath: NodePath { + get { + return get_remote_node () + } + + set { + set_remote_node (newValue) + } + + } + + /// If `true`, global coordinates are used. If `false`, local coordinates are used. + final public var useGlobalCoordinates: Bool { + get { + return get_use_global_coordinates () + } + + set { + set_use_global_coordinates (newValue) + } + + } + + /// If `true`, the remote node's position is updated. + final public var updatePosition: Bool { + get { + return get_update_position () + } + + set { + set_update_position (newValue) + } + + } + + /// If `true`, the remote node's rotation is updated. + final public var updateRotation: Bool { + get { + return get_update_rotation () + } + + set { + set_update_rotation (newValue) + } + + } + + /// If `true`, the remote node's scale is updated. + final public var updateScale: Bool { + get { + return get_update_scale () + } + + set { + set_update_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_remote_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_remote_node") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_remote_node(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform2D.method_set_remote_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_remote_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remote_node") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_remote_node() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(RemoteTransform2D.method_get_remote_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_force_update_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_cache") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// ``RemoteTransform2D`` caches the remote node. It may not notice if the remote node disappears; ``forceUpdateCache()`` forces it to update the cache again. + public final func forceUpdateCache() { + gi.object_method_bind_ptrcall(RemoteTransform2D.method_force_update_cache, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_use_global_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_global_coordinates") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_global_coordinates(_ useGlobalCoordinates: Bool) { + withUnsafePointer(to: useGlobalCoordinates) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform2D.method_set_use_global_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_global_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_global_coordinates") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_global_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform2D.method_get_use_global_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_position") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_position(_ updateRemotePosition: Bool) { + withUnsafePointer(to: updateRemotePosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform2D.method_set_update_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_position") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_position() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform2D.method_get_update_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_rotation") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_rotation(_ updateRemoteRotation: Bool) { + withUnsafePointer(to: updateRemoteRotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform2D.method_set_update_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_rotation") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_rotation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform2D.method_get_update_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_scale") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_scale(_ updateRemoteScale: Bool) { + withUnsafePointer(to: updateRemoteScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform2D.method_set_update_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_scale") + return withUnsafePointer(to: &RemoteTransform2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform2D.method_get_update_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RemoteTransform3D.swift b/Sources/SwiftGodot/Generated/Api/RemoteTransform3D.swift new file mode 100644 index 000000000..a7bc747b7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RemoteTransform3D.swift @@ -0,0 +1,331 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// RemoteTransform3D pushes its own ``Transform3D`` to another ``Node3D`` derived Node in the scene. +/// +/// RemoteTransform3D pushes its own ``Transform3D`` to another ``Node3D`` derived Node (called the remote node) in the scene. +/// +/// It can be set to update another Node's position, rotation and/or scale. It can use either global or local coordinates. +/// +open class RemoteTransform3D: Node3D { + override open class var godotClassName: StringName { "RemoteTransform3D" } + + /* Properties */ + + /// The ``NodePath`` to the remote node, relative to the RemoteTransform3D's position in the scene. + final public var remotePath: NodePath { + get { + return get_remote_node () + } + + set { + set_remote_node (newValue) + } + + } + + /// If `true`, global coordinates are used. If `false`, local coordinates are used. + final public var useGlobalCoordinates: Bool { + get { + return get_use_global_coordinates () + } + + set { + set_use_global_coordinates (newValue) + } + + } + + /// If `true`, the remote node's position is updated. + final public var updatePosition: Bool { + get { + return get_update_position () + } + + set { + set_update_position (newValue) + } + + } + + /// If `true`, the remote node's rotation is updated. + final public var updateRotation: Bool { + get { + return get_update_rotation () + } + + set { + set_update_rotation (newValue) + } + + } + + /// If `true`, the remote node's scale is updated. + final public var updateScale: Bool { + get { + return get_update_scale () + } + + set { + set_update_scale (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_remote_node: GDExtensionMethodBindPtr = { + let methodName = StringName("set_remote_node") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_remote_node(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform3D.method_set_remote_node, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_remote_node: GDExtensionMethodBindPtr = { + let methodName = StringName("get_remote_node") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_remote_node() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(RemoteTransform3D.method_get_remote_node, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_force_update_cache: GDExtensionMethodBindPtr = { + let methodName = StringName("force_update_cache") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// ``RemoteTransform3D`` caches the remote node. It may not notice if the remote node disappears; ``forceUpdateCache()`` forces it to update the cache again. + public final func forceUpdateCache() { + gi.object_method_bind_ptrcall(RemoteTransform3D.method_force_update_cache, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_use_global_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_global_coordinates") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_global_coordinates(_ useGlobalCoordinates: Bool) { + withUnsafePointer(to: useGlobalCoordinates) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform3D.method_set_use_global_coordinates, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_use_global_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_global_coordinates") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_use_global_coordinates() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform3D.method_get_use_global_coordinates, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_position: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_position") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_position(_ updateRemotePosition: Bool) { + withUnsafePointer(to: updateRemotePosition) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform3D.method_set_update_position, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_position: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_position") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_position() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform3D.method_get_update_position, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_rotation") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_rotation(_ updateRemoteRotation: Bool) { + withUnsafePointer(to: updateRemoteRotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform3D.method_set_update_rotation, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_rotation: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_rotation") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_rotation() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform3D.method_get_update_rotation, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_update_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_update_scale") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_update_scale(_ updateRemoteScale: Bool) { + withUnsafePointer(to: updateRemoteScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RemoteTransform3D.method_set_update_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_update_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_update_scale") + return withUnsafePointer(to: &RemoteTransform3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_update_scale() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RemoteTransform3D.method_get_update_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderData.swift b/Sources/SwiftGodot/Generated/Api/RenderData.swift new file mode 100644 index 000000000..1f381f2d2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderData.swift @@ -0,0 +1,103 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract render data object, holds frame data related to rendering a single frame of a viewport. +/// +/// Abstract render data object, exists for the duration of rendering a single viewport. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +open class RenderData: Object { + override open class var godotClassName: StringName { "RenderData" } + /* Methods */ + fileprivate static var method_get_render_scene_buffers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_scene_buffers") + return withUnsafePointer(to: &RenderData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2793216201)! + } + + } + + }() + + /// Returns the ``RenderSceneBuffers`` object managing the scene buffers for rendering this viewport. + public final func getRenderSceneBuffers() -> RenderSceneBuffers? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RenderData.method_get_render_scene_buffers, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_render_scene_data: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_scene_data") + return withUnsafePointer(to: &RenderData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1288715698)! + } + + } + + }() + + /// Returns the ``RenderSceneData`` object managing this frames scene data. + public final func getRenderSceneData() -> RenderSceneData? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RenderData.method_get_render_scene_data, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("get_environment") + return withUnsafePointer(to: &RenderData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the environments object in the ``RenderingServer`` being used to render this viewport. + public final func getEnvironment() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderData.method_get_environment, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_camera_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("get_camera_attributes") + return withUnsafePointer(to: &RenderData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of the camera attributes object in the ``RenderingServer`` being used to render this viewport. + public final func getCameraAttributes() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderData.method_get_camera_attributes, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderDataExtension.swift b/Sources/SwiftGodot/Generated/Api/RenderDataExtension.swift new file mode 100644 index 000000000..9914cad9f --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderDataExtension.swift @@ -0,0 +1,100 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// This class allows for a RenderData implementation to be made in GDExtension. +/// +/// This class allows for a RenderData implementation to be made in GDExtension. +open class RenderDataExtension: RenderData { + override open class var godotClassName: StringName { "RenderDataExtension" } + /* Methods */ + /// Implement this in GDExtension to return the ``RID`` of the implementations environment object. + @_documentation(visibility: public) + open func _getRenderSceneBuffers() -> RenderSceneBuffers? { + return RenderSceneBuffers () + } + + /// Implement this in GDExtension to return the implementations ``RenderSceneDataExtension`` object. + @_documentation(visibility: public) + open func _getRenderSceneData() -> RenderSceneData? { + return RenderSceneData () + } + + /// + @_documentation(visibility: public) + open func _getEnvironment() -> RID { + return RID () + } + + /// Implement this in GDExtension to return the ``RID`` for the implementations camera attributes object. + @_documentation(visibility: public) + open func _getCameraAttributes() -> RID { + return RID () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_camera_attributes": + return _RenderDataExtension_proxy_get_camera_attributes + case "_get_environment": + return _RenderDataExtension_proxy_get_environment + case "_get_render_scene_buffers": + return _RenderDataExtension_proxy_get_render_scene_buffers + case "_get_render_scene_data": + return _RenderDataExtension_proxy_get_render_scene_data + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _RenderDataExtension_proxy_get_camera_attributes (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCameraAttributes () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _RenderDataExtension_proxy_get_environment (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getEnvironment () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _RenderDataExtension_proxy_get_render_scene_buffers (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRenderSceneBuffers () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // RenderSceneBuffers +} + +func _RenderDataExtension_proxy_get_render_scene_data (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRenderSceneData () + retPtr!.storeBytes (of: ret?.handle, as: UnsafeRawPointer?.self) // RenderSceneData +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderDataRD.swift b/Sources/SwiftGodot/Generated/Api/RenderDataRD.swift new file mode 100644 index 000000000..0fdb19c37 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderDataRD.swift @@ -0,0 +1,33 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Render data implementation for the RenderingDevice based renderers. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +/// +/// This object manages all render data for the rendering device based renderers. +/// +/// > Note: This is an internal rendering server object only exposed for GDExtension plugins. +/// +open class RenderDataRD: RenderData { + override open class var godotClassName: StringName { "RenderDataRD" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneBuffers.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffers.swift new file mode 100644 index 000000000..51f5b5611 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffers.swift @@ -0,0 +1,57 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract scene buffers object, created for each viewport for which 3D rendering is done. +/// +/// Abstract scene buffers object, created for each viewport for which 3D rendering is done. It manages any additional buffers used during rendering and will discard buffers when the viewport is resized. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +open class RenderSceneBuffers: RefCounted { + override open class var godotClassName: StringName { "RenderSceneBuffers" } + /* Methods */ + fileprivate static var method_configure: GDExtensionMethodBindPtr = { + let methodName = StringName("configure") + return withUnsafePointer(to: &RenderSceneBuffers.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3072623270)! + } + + } + + }() + + /// This method is called by the rendering server when the associated viewports configuration is changed. It will discard the old buffers and recreate the internal buffers used. + public final func configure(config: RenderSceneBuffersConfiguration?) { + withUnsafePointer(to: config?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffers.method_configure, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersConfiguration.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersConfiguration.swift new file mode 100644 index 000000000..b2c2e8dd0 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersConfiguration.swift @@ -0,0 +1,535 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Configuration object used to setup a ``RenderSceneBuffers`` object. +/// +/// This configuration object is created and populated by the render engine on a viewport change and used to (re)configure a ``RenderSceneBuffers`` object. +open class RenderSceneBuffersConfiguration: RefCounted { + override open class var godotClassName: StringName { "RenderSceneBuffersConfiguration" } + + /* Properties */ + + /// The render target associated with these buffer. + final public var renderTarget: RID { + get { + return get_render_target () + } + + set { + set_render_target (newValue) + } + + } + + /// The size of the 3D render buffer used for rendering. + final public var internalSize: Vector2i { + get { + return get_internal_size () + } + + set { + set_internal_size (newValue) + } + + } + + /// The target (upscale) size if scaling is used. + final public var targetSize: Vector2i { + get { + return get_target_size () + } + + set { + set_target_size (newValue) + } + + } + + /// The number of views we're rendering. + final public var viewCount: UInt32 { + get { + return get_view_count () + } + + set { + set_view_count (newValue) + } + + } + + /// The requested scaling mode with which we upscale/downscale if ``internalSize`` and ``targetSize`` are not equal. + final public var scaling3dMode: RenderingServer.ViewportScaling3DMode { + get { + return get_scaling_3d_mode () + } + + set { + set_scaling_3d_mode (newValue) + } + + } + + /// The MSAA mode we're using for 3D rendering. + final public var msaa3d: RenderingServer.ViewportMSAA { + get { + return get_msaa_3d () + } + + set { + set_msaa_3d (newValue) + } + + } + + /// The requested screen space AA applied in post processing. + final public var screenSpaceAa: RenderingServer.ViewportScreenSpaceAA { + get { + return get_screen_space_aa () + } + + set { + set_screen_space_aa (newValue) + } + + } + + /// FSR Sharpness applicable if FSR upscaling is used. + final public var fsrSharpness: Double { + get { + return get_fsr_sharpness () + } + + set { + set_fsr_sharpness (newValue) + } + + } + + /// Bias applied to mipmaps. + final public var textureMipmapBias: Double { + get { + return get_texture_mipmap_bias () + } + + set { + set_texture_mipmap_bias (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_render_target: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_target") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_render_target() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_render_target, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_render_target: GDExtensionMethodBindPtr = { + let methodName = StringName("set_render_target") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_render_target(_ renderTarget: RID) { + withUnsafePointer(to: renderTarget.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_render_target, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_internal_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_internal_size") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_internal_size() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_internal_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_internal_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_internal_size") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_internal_size(_ internalSize: Vector2i) { + withUnsafePointer(to: internalSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_internal_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_target_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_target_size") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_target_size() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_target_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_target_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_target_size") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1130785943)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_target_size(_ targetSize: Vector2i) { + withUnsafePointer(to: targetSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_target_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_view_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_view_count") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_view_count() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_view_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_view_count: GDExtensionMethodBindPtr = { + let methodName = StringName("set_view_count") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_view_count(_ viewCount: UInt32) { + withUnsafePointer(to: viewCount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_view_count, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scaling_3d_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scaling_3d_mode") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 976778074)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scaling_3d_mode() -> RenderingServer.ViewportScaling3DMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_scaling_3d_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingServer.ViewportScaling3DMode (rawValue: _result)! + } + + fileprivate static var method_set_scaling_3d_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scaling_3d_mode") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 447477857)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scaling_3d_mode(_ scaling3dMode: RenderingServer.ViewportScaling3DMode) { + withUnsafePointer(to: scaling3dMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_scaling_3d_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_msaa_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msaa_3d") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3109158617)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_msaa_3d() -> RenderingServer.ViewportMSAA { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_msaa_3d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingServer.ViewportMSAA (rawValue: _result)! + } + + fileprivate static var method_set_msaa_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("set_msaa_3d") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3952630748)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_msaa_3d(_ msaa3d: RenderingServer.ViewportMSAA) { + withUnsafePointer(to: msaa3d.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_msaa_3d, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_screen_space_aa: GDExtensionMethodBindPtr = { + let methodName = StringName("get_screen_space_aa") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 641513172)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_screen_space_aa() -> RenderingServer.ViewportScreenSpaceAA { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_screen_space_aa, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingServer.ViewportScreenSpaceAA (rawValue: _result)! + } + + fileprivate static var method_set_screen_space_aa: GDExtensionMethodBindPtr = { + let methodName = StringName("set_screen_space_aa") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 139543108)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_screen_space_aa(_ screenSpaceAa: RenderingServer.ViewportScreenSpaceAA) { + withUnsafePointer(to: screenSpaceAa.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_screen_space_aa, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_fsr_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("get_fsr_sharpness") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_fsr_sharpness() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_fsr_sharpness, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fsr_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fsr_sharpness") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fsr_sharpness(_ fsrSharpness: Double) { + withUnsafePointer(to: fsrSharpness) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_fsr_sharpness, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_texture_mipmap_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_mipmap_bias") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_texture_mipmap_bias() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_get_texture_mipmap_bias, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_texture_mipmap_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("set_texture_mipmap_bias") + return withUnsafePointer(to: &RenderSceneBuffersConfiguration.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_texture_mipmap_bias(_ textureMipmapBias: Double) { + withUnsafePointer(to: textureMipmapBias) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersConfiguration.method_set_texture_mipmap_bias, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersExtension.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersExtension.swift new file mode 100644 index 000000000..4b39a8988 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersExtension.swift @@ -0,0 +1,96 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// This class allows for a RenderSceneBuffer implementation to be made in GDExtension. +/// +/// This class allows for a RenderSceneBuffer implementation to be made in GDExtension. +open class RenderSceneBuffersExtension: RenderSceneBuffers { + override open class var godotClassName: StringName { "RenderSceneBuffersExtension" } + /* Methods */ + /// Implement this in GDExtension to handle the (re)sizing of a viewport. + @_documentation(visibility: public) + open func _configure(config: RenderSceneBuffersConfiguration?) { + } + + /// Implement this in GDExtension to record a new FSR sharpness value. + @_documentation(visibility: public) + open func _setFsrSharpness(_ fsrSharpness: Double) { + } + + /// Implement this in GDExtension to change the texture mipmap bias. + @_documentation(visibility: public) + open func _setTextureMipmapBias(_ textureMipmapBias: Double) { + } + + /// Implement this in GDExtension to react to the debanding flag changing. + @_documentation(visibility: public) + open func _setUseDebanding(_ useDebanding: Bool) { + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_configure": + return _RenderSceneBuffersExtension_proxy_configure + case "_set_fsr_sharpness": + return _RenderSceneBuffersExtension_proxy_set_fsr_sharpness + case "_set_texture_mipmap_bias": + return _RenderSceneBuffersExtension_proxy_set_texture_mipmap_bias + case "_set_use_debanding": + return _RenderSceneBuffersExtension_proxy_set_use_debanding + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _RenderSceneBuffersExtension_proxy_configure (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._configure (config: lookupLiveObject (handleAddress: resolved_0) as? RenderSceneBuffersConfiguration ?? RenderSceneBuffersConfiguration (nativeHandle: resolved_0)) +} + +func _RenderSceneBuffersExtension_proxy_set_fsr_sharpness (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setFsrSharpness (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _RenderSceneBuffersExtension_proxy_set_texture_mipmap_bias (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setTextureMipmapBias (args [0]!.assumingMemoryBound (to: Double.self).pointee) +} + +func _RenderSceneBuffersExtension_proxy_set_use_debanding (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setUseDebanding (args [0]!.assumingMemoryBound (to: Bool.self).pointee) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersRD.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersRD.swift new file mode 100644 index 000000000..9d546ea23 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneBuffersRD.swift @@ -0,0 +1,673 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Render scene buffer implementation for the RenderingDevice based renderers. +/// +/// This object manages all 3D rendering buffers for the rendering device based renderers. An instance of this object is created for every viewport that has 3D rendering enabled. +/// +/// All buffers are organized in **contexts**. The default context is called **render_buffers** and can contain amongst others the color buffer, depth buffer, velocity buffers, VRS density map and MSAA variants of these buffers. +/// +/// Buffers are only guaranteed to exist during rendering of the viewport. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +open class RenderSceneBuffersRD: RenderSceneBuffers { + override open class var godotClassName: StringName { "RenderSceneBuffersRD" } + /* Methods */ + fileprivate static var method_has_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("has_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 471820014)! + } + + } + + }() + + /// Returns `true` if a cached texture exists for this name. + public final func hasTexture(context: StringName, name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_has_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("create_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3559915770)! + } + + } + + }() + + /// Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists. + public final func createTexture(context: StringName, name: StringName, dataFormat: RenderingDevice.DataFormat, usageBits: UInt32, textureSamples: RenderingDevice.TextureSamples, size: Vector2i, layers: UInt32, mipmaps: UInt32, unique: Bool) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: dataFormat.rawValue) { pArg2 in + withUnsafePointer(to: usageBits) { pArg3 in + withUnsafePointer(to: textureSamples.rawValue) { pArg4 in + withUnsafePointer(to: size) { pArg5 in + withUnsafePointer(to: layers) { pArg6 in + withUnsafePointer(to: mipmaps) { pArg7 in + withUnsafePointer(to: unique) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_create_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_texture_from_format: GDExtensionMethodBindPtr = { + let methodName = StringName("create_texture_from_format") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3344669382)! + } + + } + + }() + + /// Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists. + public final func createTextureFromFormat(context: StringName, name: StringName, format: RDTextureFormat?, view: RDTextureView?, unique: Bool) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: format?.handle) { pArg2 in + withUnsafePointer(to: view?.handle) { pArg3 in + withUnsafePointer(to: unique) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_create_texture_from_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_create_texture_view: GDExtensionMethodBindPtr = { + let methodName = StringName("create_texture_view") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 283055834)! + } + + } + + }() + + /// Create a new texture view for an existing texture and cache this under the given view_name. Will return the existing teture view if it already exists. Will error if the source texture doesn't exist. + public final func createTextureView(context: StringName, name: StringName, viewName: StringName, view: RDTextureView?) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: viewName.content) { pArg2 in + withUnsafePointer(to: view?.handle) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_create_texture_view, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 750006389)! + } + + } + + }() + + /// Returns a cached texture with this name. + public final func getTexture(context: StringName, name: StringName) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_texture_format: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_format") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 371461758)! + } + + } + + }() + + /// Returns the texture format information with which a cached texture was created. + public final func getTextureFormat(context: StringName, name: StringName) -> RDTextureFormat? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_texture_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_texture_slice: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_slice") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 588440706)! + } + + } + + }() + + /// Returns a specific slice (layer or mipmap) for a cached texture. + public final func getTextureSlice(context: StringName, name: StringName, layer: UInt32, mipmap: UInt32, layers: UInt32, mipmaps: UInt32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: layer) { pArg2 in + withUnsafePointer(to: mipmap) { pArg3 in + withUnsafePointer(to: layers) { pArg4 in + withUnsafePointer(to: mipmaps) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_texture_slice, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_texture_slice_view: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_slice_view") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 682451778)! + } + + } + + }() + + /// Returns a specific view of a slice (layer or mipmap) for a cached texture. + public final func getTextureSliceView(context: StringName, name: StringName, layer: UInt32, mipmap: UInt32, layers: UInt32, mipmaps: UInt32, view: RDTextureView?) -> RID { + let _result: RID = RID () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: layer) { pArg2 in + withUnsafePointer(to: mipmap) { pArg3 in + withUnsafePointer(to: layers) { pArg4 in + withUnsafePointer(to: mipmaps) { pArg5 in + withUnsafePointer(to: view?.handle) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_texture_slice_view, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_texture_slice_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_texture_slice_size") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2617625368)! + } + + } + + }() + + /// Returns the texture size of a given slice of a cached texture. + public final func getTextureSliceSize(context: StringName, name: StringName, mipmap: UInt32) -> Vector2i { + var _result: Vector2i = Vector2i () + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: mipmap) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_texture_slice_size, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_clear_context: GDExtensionMethodBindPtr = { + let methodName = StringName("clear_context") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Frees all buffers related to this context. + public final func clearContext(_ context: StringName) { + withUnsafePointer(to: context.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_clear_context, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3050822880)! + } + + } + + }() + + /// Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + /// + /// If `msaa` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + /// + public final func getColorTexture(msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: msaa) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_color_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_color_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color_layer") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3087988589)! + } + + } + + }() + + /// Returns the specified layer from the color texture we are rendering 3D content to. + /// + /// If `msaa` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + /// + public final func getColorLayer(_ layer: UInt32, msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: msaa) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_color_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_depth_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3050822880)! + } + + } + + }() + + /// Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + /// + /// If `msaa` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + /// + public final func getDepthTexture(msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: msaa) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_depth_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_depth_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_depth_layer") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3087988589)! + } + + } + + }() + + /// Returns the specified layer from the depth texture we are rendering 3D content to. + /// + /// If `msaa` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + /// + public final func getDepthLayer(_ layer: UInt32, msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: msaa) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_depth_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_velocity_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_texture") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3050822880)! + } + + } + + }() + + /// Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + /// + /// If `msaa` is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + /// + public final func getVelocityTexture(msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: msaa) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_velocity_texture, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_velocity_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_velocity_layer") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3087988589)! + } + + } + + }() + + /// Returns the specified layer from the velocity texture we are rendering 3D content to. + public final func getVelocityLayer(_ layer: UInt32, msaa: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: layer) { pArg0 in + withUnsafePointer(to: msaa) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_velocity_layer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_render_target: GDExtensionMethodBindPtr = { + let methodName = StringName("get_render_target") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the render target associated with this buffers object. + public final func getRenderTarget() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_render_target, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_view_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_view_count") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the view count for the associated viewport. + public final func getViewCount() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_view_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_internal_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_internal_size") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3690982128)! + } + + } + + }() + + /// Returns the internal size of the render buffer (size before upscaling) with which textures are created by default. + public final func getInternalSize() -> Vector2i { + var _result: Vector2i = Vector2i () + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_internal_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_msaa_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("get_msaa_3d") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3109158617)! + } + + } + + }() + + /// Returns the applied 3D MSAA mode for this viewport. + public final func getMsaa3d() -> RenderingServer.ViewportMSAA { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_msaa_3d, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RenderingServer.ViewportMSAA (rawValue: _result)! + } + + fileprivate static var method_get_use_taa: GDExtensionMethodBindPtr = { + let methodName = StringName("get_use_taa") + return withUnsafePointer(to: &RenderSceneBuffersRD.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if TAA is enabled. + public final func getUseTaa() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RenderSceneBuffersRD.method_get_use_taa, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneData.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneData.swift new file mode 100644 index 000000000..9994e7f86 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneData.swift @@ -0,0 +1,166 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstract render data object, holds scene data related to rendering a single frame of a viewport. +/// +/// Abstract scene data object, exists for the duration of rendering a single viewport. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +open class RenderSceneData: Object { + override open class var godotClassName: StringName { "RenderSceneData" } + /* Methods */ + fileprivate static var method_get_cam_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cam_transform") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3229777777)! + } + + } + + }() + + /// Returns the camera transform used to render this frame. + /// + /// > Note: If more than one view is rendered, this will return a centered transform. + /// + public final func getCamTransform() -> Transform3D { + var _result: Transform3D = Transform3D () + gi.object_method_bind_ptrcall(RenderSceneData.method_get_cam_transform, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_cam_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cam_projection") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2910717950)! + } + + } + + }() + + /// Returns the camera projection used to render this frame. + /// + /// > Note: If more than one view is rendered, this will return a combined projection. + /// + public final func getCamProjection() -> Projection { + var _result: Projection = Projection () + gi.object_method_bind_ptrcall(RenderSceneData.method_get_cam_projection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_view_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_view_count") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of views being rendered. + public final func getViewCount() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RenderSceneData.method_get_view_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_view_eye_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_view_eye_offset") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 711720468)! + } + + } + + }() + + /// Returns the eye offset per view used to render this frame. This is the offset between our camera transform and the eye transform. + public final func getViewEyeOffset(view: UInt32) -> Vector3 { + var _result: Vector3 = Vector3 () + withUnsafePointer(to: view) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneData.method_get_view_eye_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_view_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("get_view_projection") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3179846605)! + } + + } + + }() + + /// Returns the view projection per view used to render this frame. + /// + /// > Note: If a single view is rendered, this returns the camera projection. If more than one view is rendered, this will return a projection for the given view including the eye offset. + /// + public final func getViewProjection(view: UInt32) -> Projection { + var _result: Projection = Projection () + withUnsafePointer(to: view) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderSceneData.method_get_view_projection, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_uniform_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_uniform_buffer") + return withUnsafePointer(to: &RenderSceneData.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Return the ``RID`` of the uniform buffer containing the scene data as a UBO. + public final func getUniformBuffer() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderSceneData.method_get_uniform_buffer, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneDataExtension.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneDataExtension.swift new file mode 100644 index 000000000..65a915f3e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneDataExtension.swift @@ -0,0 +1,131 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// This class allows for a RenderSceneData implementation to be made in GDExtension. +/// +/// This class allows for a RenderSceneData implementation to be made in GDExtension. +open class RenderSceneDataExtension: RenderSceneData { + override open class var godotClassName: StringName { "RenderSceneDataExtension" } + /* Methods */ + /// Implement this in GDExtension to return the camera ``Transform3D``. + @_documentation(visibility: public) + open func _getCamTransform() -> Transform3D { + return Transform3D () + } + + /// Implement this in GDExtension to return the camera ``Projection``. + @_documentation(visibility: public) + open func _getCamProjection() -> Projection { + return Projection () + } + + /// Implement this in GDExtension to return the view count. + @_documentation(visibility: public) + open func _getViewCount() -> UInt32 { + return 0 + } + + /// Implement this in GDExtension to return the eye offset for the given `view`. + @_documentation(visibility: public) + open func _getViewEyeOffset(view: UInt32) -> Vector3 { + return Vector3 () + } + + /// Implement this in GDExtension to return the view ``Projection`` for the given `view`. + @_documentation(visibility: public) + open func _getViewProjection(view: UInt32) -> Projection { + return Projection () + } + + /// Implement this in GDExtension to return the ``RID`` of the uniform buffer containing the scene data as a UBO. + @_documentation(visibility: public) + open func _getUniformBuffer() -> RID { + return RID () + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_cam_projection": + return _RenderSceneDataExtension_proxy_get_cam_projection + case "_get_cam_transform": + return _RenderSceneDataExtension_proxy_get_cam_transform + case "_get_uniform_buffer": + return _RenderSceneDataExtension_proxy_get_uniform_buffer + case "_get_view_count": + return _RenderSceneDataExtension_proxy_get_view_count + case "_get_view_eye_offset": + return _RenderSceneDataExtension_proxy_get_view_eye_offset + case "_get_view_projection": + return _RenderSceneDataExtension_proxy_get_view_projection + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _RenderSceneDataExtension_proxy_get_cam_projection (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCamProjection () + retPtr!.storeBytes (of: ret, as: Projection.self) +} + +func _RenderSceneDataExtension_proxy_get_cam_transform (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getCamTransform () + retPtr!.storeBytes (of: ret, as: Transform3D.self) +} + +func _RenderSceneDataExtension_proxy_get_uniform_buffer (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getUniformBuffer () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // RID + ret.content = RID.zero +} + +func _RenderSceneDataExtension_proxy_get_view_count (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getViewCount () + retPtr!.storeBytes (of: ret, as: UInt32.self) +} + +func _RenderSceneDataExtension_proxy_get_view_eye_offset (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getViewEyeOffset (view: args [0]!.assumingMemoryBound (to: UInt32.self).pointee) + retPtr!.storeBytes (of: ret, as: Vector3.self) +} + +func _RenderSceneDataExtension_proxy_get_view_projection (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getViewProjection (view: args [0]!.assumingMemoryBound (to: UInt32.self).pointee) + retPtr!.storeBytes (of: ret, as: Projection.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderSceneDataRD.swift b/Sources/SwiftGodot/Generated/Api/RenderSceneDataRD.swift new file mode 100644 index 000000000..6d098d352 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderSceneDataRD.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Render scene data implementation for the RenderingDevice based renderers. +/// +/// Object holds scene data related to rendering a single frame of a viewport. +/// +/// > Note: This is an internal rendering server object, do not instantiate this from script. +/// +open class RenderSceneDataRD: RenderSceneData { + override open class var godotClassName: StringName { "RenderSceneDataRD" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderingDevice.swift b/Sources/SwiftGodot/Generated/Api/RenderingDevice.swift new file mode 100644 index 000000000..aeaee1e41 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderingDevice.swift @@ -0,0 +1,4914 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Abstraction for working with modern low-level graphics APIs. +/// +/// ``RenderingDevice`` is an abstraction for working with modern low-level graphics APIs such as Vulkan. Compared to ``RenderingServer`` (which works with Godot's own rendering subsystems), ``RenderingDevice`` is much lower-level and allows working more directly with the underlying graphics APIs. ``RenderingDevice`` is used in Godot to provide support for several modern low-level graphics APIs while reducing the amount of code duplication required. ``RenderingDevice`` can also be used in your own projects to perform things that are not exposed by ``RenderingServer`` or high-level nodes, such as using compute shaders. +/// +/// On startup, Godot creates a global ``RenderingDevice`` which can be retrieved using ``RenderingServer/getRenderingDevice()``. This global ``RenderingDevice`` performs drawing to the screen. +/// +/// **Local RenderingDevices:** Using ``RenderingServer/createLocalRenderingDevice()``, you can create "secondary" rendering devices to perform drawing and GPU compute operations on separate threads. +/// +/// > Note: ``RenderingDevice`` assumes intermediate knowledge of modern graphics APIs such as Vulkan, Direct3D 12, Metal or WebGPU. These graphics APIs are lower-level than OpenGL or Direct3D 11, requiring you to perform what was previously done by the graphics driver itself. If you have difficulty understanding the concepts used in this class, follow the Vulkan Tutorial or Vulkan Guide. It's recommended to have existing modern OpenGL or Direct3D 11 knowledge before attempting to learn a low-level graphics API. +/// +/// > Note: ``RenderingDevice`` is not available when running in headless mode or when using the Compatibility rendering method. +/// +open class RenderingDevice: Object { + override open class var godotClassName: StringName { "RenderingDevice" } + public enum DeviceType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Rendering device type does not match any of the other enum values or is unknown. + case other = 0 // DEVICE_TYPE_OTHER + /// Rendering device is an integrated GPU, which is typically _(but not always)_ slower than dedicated GPUs (``DeviceType/discreteGpu``). On Android and iOS, the rendering device type is always considered to be ``DeviceType/integratedGpu``. + case integratedGpu = 1 // DEVICE_TYPE_INTEGRATED_GPU + /// Rendering device is a dedicated GPU, which is typically _(but not always)_ faster than integrated GPUs (``DeviceType/integratedGpu``). + case discreteGpu = 2 // DEVICE_TYPE_DISCRETE_GPU + /// Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to ``DeviceType/integratedGpu``. Virtual machine GPU passthrough (such as VFIO) will not report the device type as ``DeviceType/virtualGpu``. Instead, the host GPU's device type will be reported as if the GPU was not emulated. + case virtualGpu = 3 // DEVICE_TYPE_VIRTUAL_GPU + /// Rendering device is provided by software emulation (such as Lavapipe or SwiftShader). This is the slowest kind of rendering device available; it's typically much slower than ``DeviceType/integratedGpu``. + case cpu = 4 // DEVICE_TYPE_CPU + /// Represents the size of the ``RenderingDevice/DeviceType`` enum. + case max = 5 // DEVICE_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .other: return ".other" + case .integratedGpu: return ".integratedGpu" + case .discreteGpu: return ".discreteGpu" + case .virtualGpu: return ".virtualGpu" + case .cpu: return ".cpu" + case .max: return ".max" + } + + } + + } + + public enum DriverResource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Specific device object based on a physical device. + /// + /// - Vulkan: Vulkan device driver resource (`VkDevice`). (`rid` argument doesn't apply.) + /// + case logicalDevice = 0 // DRIVER_RESOURCE_LOGICAL_DEVICE + /// Physical device the specific logical device is based on. + /// + /// - Vulkan: `VkDevice`. (`rid` argument doesn't apply.) + /// + case physicalDevice = 1 // DRIVER_RESOURCE_PHYSICAL_DEVICE + /// Top-most graphics API entry object. + /// + /// - Vulkan: `VkInstance`. (`rid` argument doesn't apply.) + /// + case topmostObject = 2 // DRIVER_RESOURCE_TOPMOST_OBJECT + /// The main graphics-compute command queue. + /// + /// - Vulkan: `VkQueue`. (`rid` argument doesn't apply.) + /// + case commandQueue = 3 // DRIVER_RESOURCE_COMMAND_QUEUE + /// The specific family the main queue belongs to. + /// + /// - Vulkan: the queue family index, an `uint32_t`. (`rid` argument doesn't apply.) + /// + case queueFamily = 4 // DRIVER_RESOURCE_QUEUE_FAMILY + /// - Vulkan: `VkImage`. + case texture = 5 // DRIVER_RESOURCE_TEXTURE + /// The view of an owned or shared texture. + /// + /// - Vulkan: `VkImageView`. + /// + case textureView = 6 // DRIVER_RESOURCE_TEXTURE_VIEW + /// The native id of the data format of the texture. + /// + /// - Vulkan: `VkFormat`. + /// + case textureDataFormat = 7 // DRIVER_RESOURCE_TEXTURE_DATA_FORMAT + /// - Vulkan: `VkSampler`. + case sampler = 8 // DRIVER_RESOURCE_SAMPLER + /// - Vulkan: `VkDescriptorSet`. + case uniformSet = 9 // DRIVER_RESOURCE_UNIFORM_SET + /// Buffer of any kind of (storage, vertex, etc.). + /// + /// - Vulkan: `VkBuffer`. + /// + case buffer = 10 // DRIVER_RESOURCE_BUFFER + /// - Vulkan: `VkPipeline`. + case computePipeline = 11 // DRIVER_RESOURCE_COMPUTE_PIPELINE + /// - Vulkan: `VkPipeline`. + case renderPipeline = 12 // DRIVER_RESOURCE_RENDER_PIPELINE + /// + // case vulkanDevice = 0 // DRIVER_RESOURCE_VULKAN_DEVICE + /// + // case vulkanPhysicalDevice = 1 // DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE + /// + // case vulkanInstance = 2 // DRIVER_RESOURCE_VULKAN_INSTANCE + /// + // case vulkanQueue = 3 // DRIVER_RESOURCE_VULKAN_QUEUE + /// + // case vulkanQueueFamilyIndex = 4 // DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX + /// + // case vulkanImage = 5 // DRIVER_RESOURCE_VULKAN_IMAGE + /// + // case vulkanImageView = 6 // DRIVER_RESOURCE_VULKAN_IMAGE_VIEW + /// + // case vulkanImageNativeTextureFormat = 7 // DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT + /// + // case vulkanSampler = 8 // DRIVER_RESOURCE_VULKAN_SAMPLER + /// + // case vulkanDescriptorSet = 9 // DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET + /// + // case vulkanBuffer = 10 // DRIVER_RESOURCE_VULKAN_BUFFER + /// + // case vulkanComputePipeline = 11 // DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE + /// + // case vulkanRenderPipeline = 12 // DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .logicalDevice: return ".logicalDevice" + case .physicalDevice: return ".physicalDevice" + case .topmostObject: return ".topmostObject" + case .commandQueue: return ".commandQueue" + case .queueFamily: return ".queueFamily" + case .texture: return ".texture" + case .textureView: return ".textureView" + case .textureDataFormat: return ".textureDataFormat" + case .sampler: return ".sampler" + case .uniformSet: return ".uniformSet" + case .buffer: return ".buffer" + case .computePipeline: return ".computePipeline" + case .renderPipeline: return ".renderPipeline" + } + + } + + } + + public enum DataFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// 4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the `[0.0, 1.0]` range. + /// + /// > Note: More information on all data formats can be found on the Identification of formats section of the Vulkan specification, as well as the VkFormat enum. + /// + case r4g4UnormPack8 = 0 // DATA_FORMAT_R4G4_UNORM_PACK8 + /// 4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case r4g4b4a4UnormPack16 = 1 // DATA_FORMAT_R4G4B4A4_UNORM_PACK16 + /// 4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case b4g4r4a4UnormPack16 = 2 // DATA_FORMAT_B4G4R4A4_UNORM_PACK16 + /// Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case r5g6b5UnormPack16 = 3 // DATA_FORMAT_R5G6B5_UNORM_PACK16 + /// Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case b5g6r5UnormPack16 = 4 // DATA_FORMAT_B5G6R5_UNORM_PACK16 + /// Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case r5g5b5a1UnormPack16 = 5 // DATA_FORMAT_R5G5B5A1_UNORM_PACK16 + /// Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case b5g5r5a1UnormPack16 = 6 // DATA_FORMAT_B5G5R5A1_UNORM_PACK16 + /// Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range. + case a1r5g5b5UnormPack16 = 7 // DATA_FORMAT_A1R5G5B5_UNORM_PACK16 + /// 8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r8Unorm = 8 // DATA_FORMAT_R8_UNORM + /// 8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r8Snorm = 9 // DATA_FORMAT_R8_SNORM + /// 8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case r8Uscaled = 10 // DATA_FORMAT_R8_USCALED + /// 8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case r8Sscaled = 11 // DATA_FORMAT_R8_SSCALED + /// 8-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 255]` range. + case r8Uint = 12 // DATA_FORMAT_R8_UINT + /// 8-bit-per-channel signed integer red channel data format. Values are in the `[-127, 127]` range. + case r8Sint = 13 // DATA_FORMAT_R8_SINT + /// 8-bit-per-channel unsigned floating-point red channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case r8Srgb = 14 // DATA_FORMAT_R8_SRGB + /// 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r8g8Unorm = 15 // DATA_FORMAT_R8G8_UNORM + /// 8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r8g8Snorm = 16 // DATA_FORMAT_R8G8_SNORM + /// 8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case r8g8Uscaled = 17 // DATA_FORMAT_R8G8_USCALED + /// 8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case r8g8Sscaled = 18 // DATA_FORMAT_R8G8_SSCALED + /// 8-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 255]` range. + case r8g8Uint = 19 // DATA_FORMAT_R8G8_UINT + /// 8-bit-per-channel signed integer red/green channel data format. Values are in the `[-127, 127]` range. + case r8g8Sint = 20 // DATA_FORMAT_R8G8_SINT + /// 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case r8g8Srgb = 21 // DATA_FORMAT_R8G8_SRGB + /// 8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r8g8b8Unorm = 22 // DATA_FORMAT_R8G8B8_UNORM + /// 8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r8g8b8Snorm = 23 // DATA_FORMAT_R8G8B8_SNORM + /// 8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case r8g8b8Uscaled = 24 // DATA_FORMAT_R8G8B8_USCALED + /// 8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case r8g8b8Sscaled = 25 // DATA_FORMAT_R8G8B8_SSCALED + /// 8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 255]` range. + case r8g8b8Uint = 26 // DATA_FORMAT_R8G8B8_UINT + /// 8-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-127, 127]` range. + case r8g8b8Sint = 27 // DATA_FORMAT_R8G8B8_SINT + /// 8-bit-per-channel unsigned floating-point red/green/blue/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case r8g8b8Srgb = 28 // DATA_FORMAT_R8G8B8_SRGB + /// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case b8g8r8Unorm = 29 // DATA_FORMAT_B8G8R8_UNORM + /// 8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case b8g8r8Snorm = 30 // DATA_FORMAT_B8G8R8_SNORM + /// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case b8g8r8Uscaled = 31 // DATA_FORMAT_B8G8R8_USCALED + /// 8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case b8g8r8Sscaled = 32 // DATA_FORMAT_B8G8R8_SSCALED + /// 8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the `[0, 255]` range. + case b8g8r8Uint = 33 // DATA_FORMAT_B8G8R8_UINT + /// 8-bit-per-channel signed integer blue/green/red channel data format. Values are in the `[-127, 127]` range. + case b8g8r8Sint = 34 // DATA_FORMAT_B8G8R8_SINT + /// 8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case b8g8r8Srgb = 35 // DATA_FORMAT_B8G8R8_SRGB + /// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r8g8b8a8Unorm = 36 // DATA_FORMAT_R8G8B8A8_UNORM + /// 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r8g8b8a8Snorm = 37 // DATA_FORMAT_R8G8B8A8_SNORM + /// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case r8g8b8a8Uscaled = 38 // DATA_FORMAT_R8G8B8A8_USCALED + /// 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case r8g8b8a8Sscaled = 39 // DATA_FORMAT_R8G8B8A8_SSCALED + /// 8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 255]` range. + case r8g8b8a8Uint = 40 // DATA_FORMAT_R8G8B8A8_UINT + /// 8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-127, 127]` range. + case r8g8b8a8Sint = 41 // DATA_FORMAT_R8G8B8A8_SINT + /// 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case r8g8b8a8Srgb = 42 // DATA_FORMAT_R8G8B8A8_SRGB + /// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case b8g8r8a8Unorm = 43 // DATA_FORMAT_B8G8R8A8_UNORM + /// 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case b8g8r8a8Snorm = 44 // DATA_FORMAT_B8G8R8A8_SNORM + /// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. + case b8g8r8a8Uscaled = 45 // DATA_FORMAT_B8G8R8A8_USCALED + /// 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. + case b8g8r8a8Sscaled = 46 // DATA_FORMAT_B8G8R8A8_SSCALED + /// 8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the `[0, 255]` range. + case b8g8r8a8Uint = 47 // DATA_FORMAT_B8G8R8A8_UINT + /// 8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the `[-127, 127]` range. + case b8g8r8a8Sint = 48 // DATA_FORMAT_B8G8R8A8_SINT + /// 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. + case b8g8r8a8Srgb = 49 // DATA_FORMAT_B8G8R8A8_SRGB + /// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[0.0, 1.0]` range. + case a8b8g8r8UnormPack32 = 50 // DATA_FORMAT_A8B8G8R8_UNORM_PACK32 + /// 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[-1.0, 1.0]` range. + case a8b8g8r8SnormPack32 = 51 // DATA_FORMAT_A8B8G8R8_SNORM_PACK32 + /// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[0.0, 255.0]` range. + case a8b8g8r8UscaledPack32 = 52 // DATA_FORMAT_A8B8G8R8_USCALED_PACK32 + /// 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[-127.0, 127.0]` range. + case a8b8g8r8SscaledPack32 = 53 // DATA_FORMAT_A8B8G8R8_SSCALED_PACK32 + /// 8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[0, 255]` range. + case a8b8g8r8UintPack32 = 54 // DATA_FORMAT_A8B8G8R8_UINT_PACK32 + /// 8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[-127, 127]` range. + case a8b8g8r8SintPack32 = 55 // DATA_FORMAT_A8B8G8R8_SINT_PACK32 + /// 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and non-linear sRGB encoding, packed in 32 bits. Values are in the `[0.0, 1.0]` range. + case a8b8g8r8SrgbPack32 = 56 // DATA_FORMAT_A8B8G8R8_SRGB_PACK32 + /// Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1.0]` range. + case a2r10g10b10UnormPack32 = 57 // DATA_FORMAT_A2R10G10B10_UNORM_PACK32 + /// Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-1.0, 1.0]` range. + case a2r10g10b10SnormPack32 = 58 // DATA_FORMAT_A2R10G10B10_SNORM_PACK32 + /// Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1023.0]` range for red/green/blue and `[0.0, 3.0]` for alpha. + case a2r10g10b10UscaledPack32 = 59 // DATA_FORMAT_A2R10G10B10_USCALED_PACK32 + /// Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511.0, 511.0]` range for red/green/blue and `[-1.0, 1.0]` for alpha. + case a2r10g10b10SscaledPack32 = 60 // DATA_FORMAT_A2R10G10B10_SSCALED_PACK32 + /// Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0, 1023]` range for red/green/blue and `[0, 3]` for alpha. + case a2r10g10b10UintPack32 = 61 // DATA_FORMAT_A2R10G10B10_UINT_PACK32 + /// Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511, 511]` range for red/green/blue and `[-1, 1]` for alpha. + case a2r10g10b10SintPack32 = 62 // DATA_FORMAT_A2R10G10B10_SINT_PACK32 + /// Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1.0]` range. + case a2b10g10r10UnormPack32 = 63 // DATA_FORMAT_A2B10G10R10_UNORM_PACK32 + /// Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-1.0, 1.0]` range. + case a2b10g10r10SnormPack32 = 64 // DATA_FORMAT_A2B10G10R10_SNORM_PACK32 + /// Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1023.0]` range for blue/green/red and `[0.0, 3.0]` for alpha. + case a2b10g10r10UscaledPack32 = 65 // DATA_FORMAT_A2B10G10R10_USCALED_PACK32 + /// Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511.0, 511.0]` range for blue/green/red and `[-1.0, 1.0]` for alpha. + case a2b10g10r10SscaledPack32 = 66 // DATA_FORMAT_A2B10G10R10_SSCALED_PACK32 + /// Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0, 1023]` range for blue/green/red and `[0, 3]` for alpha. + case a2b10g10r10UintPack32 = 67 // DATA_FORMAT_A2B10G10R10_UINT_PACK32 + /// Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511, 511]` range for blue/green/red and `[-1, 1]` for alpha. + case a2b10g10r10SintPack32 = 68 // DATA_FORMAT_A2B10G10R10_SINT_PACK32 + /// 16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r16Unorm = 69 // DATA_FORMAT_R16_UNORM + /// 16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r16Snorm = 70 // DATA_FORMAT_R16_SNORM + /// 16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. + case r16Uscaled = 71 // DATA_FORMAT_R16_USCALED + /// 16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. + case r16Sscaled = 72 // DATA_FORMAT_R16_SSCALED + /// 16-bit-per-channel unsigned integer red channel data format. Values are in the `[0.0, 65535]` range. + case r16Uint = 73 // DATA_FORMAT_R16_UINT + /// 16-bit-per-channel signed integer red channel data format. Values are in the `[-32767, 32767]` range. + case r16Sint = 74 // DATA_FORMAT_R16_SINT + /// 16-bit-per-channel signed floating-point red channel data format with the value stored as-is. + case r16Sfloat = 75 // DATA_FORMAT_R16_SFLOAT + /// 16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r16g16Unorm = 76 // DATA_FORMAT_R16G16_UNORM + /// 16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r16g16Snorm = 77 // DATA_FORMAT_R16G16_SNORM + /// 16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. + case r16g16Uscaled = 78 // DATA_FORMAT_R16G16_USCALED + /// 16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. + case r16g16Sscaled = 79 // DATA_FORMAT_R16G16_SSCALED + /// 16-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0.0, 65535]` range. + case r16g16Uint = 80 // DATA_FORMAT_R16G16_UINT + /// 16-bit-per-channel signed integer red/green channel data format. Values are in the `[-32767, 32767]` range. + case r16g16Sint = 81 // DATA_FORMAT_R16G16_SINT + /// 16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. + case r16g16Sfloat = 82 // DATA_FORMAT_R16G16_SFLOAT + /// 16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r16g16b16Unorm = 83 // DATA_FORMAT_R16G16B16_UNORM + /// 16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r16g16b16Snorm = 84 // DATA_FORMAT_R16G16B16_SNORM + /// 16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. + case r16g16b16Uscaled = 85 // DATA_FORMAT_R16G16B16_USCALED + /// 16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. + case r16g16b16Sscaled = 86 // DATA_FORMAT_R16G16B16_SSCALED + /// 16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0.0, 65535]` range. + case r16g16b16Uint = 87 // DATA_FORMAT_R16G16B16_UINT + /// 16-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-32767, 32767]` range. + case r16g16b16Sint = 88 // DATA_FORMAT_R16G16B16_SINT + /// 16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. + case r16g16b16Sfloat = 89 // DATA_FORMAT_R16G16B16_SFLOAT + /// 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. + case r16g16b16a16Unorm = 90 // DATA_FORMAT_R16G16B16A16_UNORM + /// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. + case r16g16b16a16Snorm = 91 // DATA_FORMAT_R16G16B16A16_SNORM + /// 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. + case r16g16b16a16Uscaled = 92 // DATA_FORMAT_R16G16B16A16_USCALED + /// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. + case r16g16b16a16Sscaled = 93 // DATA_FORMAT_R16G16B16A16_SSCALED + /// 16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0.0, 65535]` range. + case r16g16b16a16Uint = 94 // DATA_FORMAT_R16G16B16A16_UINT + /// 16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-32767, 32767]` range. + case r16g16b16a16Sint = 95 // DATA_FORMAT_R16G16B16A16_SINT + /// 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. + case r16g16b16a16Sfloat = 96 // DATA_FORMAT_R16G16B16A16_SFLOAT + /// 32-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^32 - 1]` range. + case r32Uint = 97 // DATA_FORMAT_R32_UINT + /// 32-bit-per-channel signed integer red channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. + case r32Sint = 98 // DATA_FORMAT_R32_SINT + /// 32-bit-per-channel signed floating-point red channel data format with the value stored as-is. + case r32Sfloat = 99 // DATA_FORMAT_R32_SFLOAT + /// 32-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^32 - 1]` range. + case r32g32Uint = 100 // DATA_FORMAT_R32G32_UINT + /// 32-bit-per-channel signed integer red/green channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. + case r32g32Sint = 101 // DATA_FORMAT_R32G32_SINT + /// 32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. + case r32g32Sfloat = 102 // DATA_FORMAT_R32G32_SFLOAT + /// 32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^32 - 1]` range. + case r32g32b32Uint = 103 // DATA_FORMAT_R32G32B32_UINT + /// 32-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. + case r32g32b32Sint = 104 // DATA_FORMAT_R32G32B32_SINT + /// 32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. + case r32g32b32Sfloat = 105 // DATA_FORMAT_R32G32B32_SFLOAT + /// 32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^32 - 1]` range. + case r32g32b32a32Uint = 106 // DATA_FORMAT_R32G32B32A32_UINT + /// 32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. + case r32g32b32a32Sint = 107 // DATA_FORMAT_R32G32B32A32_SINT + /// 32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. + case r32g32b32a32Sfloat = 108 // DATA_FORMAT_R32G32B32A32_SFLOAT + /// 64-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^64 - 1]` range. + case r64Uint = 109 // DATA_FORMAT_R64_UINT + /// 64-bit-per-channel signed integer red channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. + case r64Sint = 110 // DATA_FORMAT_R64_SINT + /// 64-bit-per-channel signed floating-point red channel data format with the value stored as-is. + case r64Sfloat = 111 // DATA_FORMAT_R64_SFLOAT + /// 64-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^64 - 1]` range. + case r64g64Uint = 112 // DATA_FORMAT_R64G64_UINT + /// 64-bit-per-channel signed integer red/green channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. + case r64g64Sint = 113 // DATA_FORMAT_R64G64_SINT + /// 64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. + case r64g64Sfloat = 114 // DATA_FORMAT_R64G64_SFLOAT + /// 64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^64 - 1]` range. + case r64g64b64Uint = 115 // DATA_FORMAT_R64G64B64_UINT + /// 64-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. + case r64g64b64Sint = 116 // DATA_FORMAT_R64G64B64_SINT + /// 64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. + case r64g64b64Sfloat = 117 // DATA_FORMAT_R64G64B64_SFLOAT + /// 64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^64 - 1]` range. + case r64g64b64a64Uint = 118 // DATA_FORMAT_R64G64B64A64_UINT + /// 64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. + case r64g64b64a64Sint = 119 // DATA_FORMAT_R64G64B64A64_SINT + /// 64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. + case r64g64b64a64Sfloat = 120 // DATA_FORMAT_R64G64B64A64_SFLOAT + /// Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel. + case b10g11r11UfloatPack32 = 121 // DATA_FORMAT_B10G11R11_UFLOAT_PACK32 + /// Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel. + case e5b9g9r9UfloatPack32 = 122 // DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32 + /// 16-bit unsigned floating-point depth data format with normalized value. Values are in the `[0.0, 1.0]` range. + case d16Unorm = 123 // DATA_FORMAT_D16_UNORM + /// 24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the `[0.0, 1.0]` range. + case x8D24UnormPack32 = 124 // DATA_FORMAT_X8_D24_UNORM_PACK32 + /// 32-bit signed floating-point depth data format with the value stored as-is. + case d32Sfloat = 125 // DATA_FORMAT_D32_SFLOAT + /// 8-bit unsigned integer stencil data format. + case s8Uint = 126 // DATA_FORMAT_S8_UINT + /// 16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range. + case d16UnormS8Uint = 127 // DATA_FORMAT_D16_UNORM_S8_UINT + /// 24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range. + case d24UnormS8Uint = 128 // DATA_FORMAT_D24_UNORM_S8_UINT + /// 32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the `[0, 255]` range. + case d32SfloatS8Uint = 129 // DATA_FORMAT_D32_SFLOAT_S8_UINT + /// VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). + case bc1RgbUnormBlock = 130 // DATA_FORMAT_BC1_RGB_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). + case bc1RgbSrgbBlock = 131 // DATA_FORMAT_BC1_RGB_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). + case bc1RgbaUnormBlock = 132 // DATA_FORMAT_BC1_RGBA_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). + case bc1RgbaSrgbBlock = 133 // DATA_FORMAT_BC1_RGBA_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). + case bc2UnormBlock = 134 // DATA_FORMAT_BC2_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). + case bc2SrgbBlock = 135 // DATA_FORMAT_BC2_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). + case bc3UnormBlock = 136 // DATA_FORMAT_BC3_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). + case bc3SrgbBlock = 137 // DATA_FORMAT_BC3_SRGB_BLOCK + /// VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. + case bc4UnormBlock = 138 // DATA_FORMAT_BC4_UNORM_BLOCK + /// VRAM-compressed signed red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. + case bc4SnormBlock = 139 // DATA_FORMAT_BC4_SNORM_BLOCK + /// VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). + case bc5UnormBlock = 140 // DATA_FORMAT_BC5_UNORM_BLOCK + /// VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). + case bc5SnormBlock = 141 // DATA_FORMAT_BC5_SNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC6H texture compression (also known as BPTC HDR). + case bc6hUfloatBlock = 142 // DATA_FORMAT_BC6H_UFLOAT_BLOCK + /// VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Using BC7 texture compression (also known as BPTC HDR). + case bc6hSfloatBlock = 143 // DATA_FORMAT_BC6H_SFLOAT_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. + case bc7UnormBlock = 144 // DATA_FORMAT_BC7_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. + case bc7SrgbBlock = 145 // DATA_FORMAT_BC7_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case etc2R8g8b8UnormBlock = 146 // DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case etc2R8g8b8SrgbBlock = 147 // DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. + case etc2R8g8b8a1UnormBlock = 148 // DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. + case etc2R8g8b8a1SrgbBlock = 149 // DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. + case etc2R8g8b8a8UnormBlock = 150 // DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK + /// VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. + case etc2R8g8b8a8SrgbBlock = 151 // DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK + /// 11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case eacR11UnormBlock = 152 // DATA_FORMAT_EAC_R11_UNORM_BLOCK + /// 11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case eacR11SnormBlock = 153 // DATA_FORMAT_EAC_R11_SNORM_BLOCK + /// 11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case eacR11g11UnormBlock = 154 // DATA_FORMAT_EAC_R11G11_UNORM_BLOCK + /// 11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. + case eacR11g11SnormBlock = 155 // DATA_FORMAT_EAC_R11G11_SNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc4x4UnormBlock = 156 // DATA_FORMAT_ASTC_4x4_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc4x4SrgbBlock = 157 // DATA_FORMAT_ASTC_4x4_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc5x4UnormBlock = 158 // DATA_FORMAT_ASTC_5x4_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc5x4SrgbBlock = 159 // DATA_FORMAT_ASTC_5x4_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc5x5UnormBlock = 160 // DATA_FORMAT_ASTC_5x5_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc5x5SrgbBlock = 161 // DATA_FORMAT_ASTC_5x5_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc6x5UnormBlock = 162 // DATA_FORMAT_ASTC_6x5_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc6x5SrgbBlock = 163 // DATA_FORMAT_ASTC_6x5_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc6x6UnormBlock = 164 // DATA_FORMAT_ASTC_6x6_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc6x6SrgbBlock = 165 // DATA_FORMAT_ASTC_6x6_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x5UnormBlock = 166 // DATA_FORMAT_ASTC_8x5_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x5SrgbBlock = 167 // DATA_FORMAT_ASTC_8x5_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x6UnormBlock = 168 // DATA_FORMAT_ASTC_8x6_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x6SrgbBlock = 169 // DATA_FORMAT_ASTC_8x6_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x8UnormBlock = 170 // DATA_FORMAT_ASTC_8x8_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc8x8SrgbBlock = 171 // DATA_FORMAT_ASTC_8x8_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x5UnormBlock = 172 // DATA_FORMAT_ASTC_10x5_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x5SrgbBlock = 173 // DATA_FORMAT_ASTC_10x5_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x6UnormBlock = 174 // DATA_FORMAT_ASTC_10x6_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x6SrgbBlock = 175 // DATA_FORMAT_ASTC_10x6_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x8UnormBlock = 176 // DATA_FORMAT_ASTC_10x8_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x8SrgbBlock = 177 // DATA_FORMAT_ASTC_10x8_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x10UnormBlock = 178 // DATA_FORMAT_ASTC_10x10_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc10x10SrgbBlock = 179 // DATA_FORMAT_ASTC_10x10_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc12x10UnormBlock = 180 // DATA_FORMAT_ASTC_12x10_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc12x10SrgbBlock = 181 // DATA_FORMAT_ASTC_12x10_SRGB_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc12x12UnormBlock = 182 // DATA_FORMAT_ASTC_12x12_UNORM_BLOCK + /// VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. + case astc12x12SrgbBlock = 183 // DATA_FORMAT_ASTC_12x12_SRGB_BLOCK + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g8b8g8r8422Unorm = 184 // DATA_FORMAT_G8B8G8R8_422_UNORM + /// 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case b8g8r8g8422Unorm = 185 // DATA_FORMAT_B8G8R8G8_422_UNORM + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g8B8R83plane420Unorm = 186 // DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g8B8r82plane420Unorm = 187 // DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g8B8R83plane422Unorm = 188 // DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g8B8r82plane422Unorm = 189 // DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM + /// 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the `[0.0, 1.0]` range. + case g8B8R83plane444Unorm = 190 // DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM + /// 10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range. + case r10x6UnormPack16 = 191 // DATA_FORMAT_R10X6_UNORM_PACK16 + /// 10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range. + case r10x6g10x6Unorm2pack16 = 192 // DATA_FORMAT_R10X6G10X6_UNORM_2PACK16 + /// 10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. + case r10x6g10x6b10x6a10x6Unorm4pack16 = 193 // DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. + case g10x6b10x6g10x6r10x6422Unorm4pack16 = 194 // DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 + /// 10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. + case b10x6g10x6r10x6g10x6422Unorm4pack16 = 195 // DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g10x6B10x6R10x63plane420Unorm3pack16 = 196 // DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g10x6B10x6r10x62plane420Unorm3pack16 = 197 // DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g10x6B10x6R10x63plane422Unorm3pack16 = 198 // DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g10x6B10x6r10x62plane422Unorm3pack16 = 199 // DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 + /// 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. + case g10x6B10x6R10x63plane444Unorm3pack16 = 200 // DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 + /// 12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range. + case r12x4UnormPack16 = 201 // DATA_FORMAT_R12X4_UNORM_PACK16 + /// 12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range. + case r12x4g12x4Unorm2pack16 = 202 // DATA_FORMAT_R12X4G12X4_UNORM_2PACK16 + /// 12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. + case r12x4g12x4b12x4a12x4Unorm4pack16 = 203 // DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. + case g12x4b12x4g12x4r12x4422Unorm4pack16 = 204 // DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 + /// 12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. + case b12x4g12x4r12x4g12x4422Unorm4pack16 = 205 // DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g12x4B12x4R12x43plane420Unorm3pack16 = 206 // DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g12x4B12x4r12x42plane420Unorm3pack16 = 207 // DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g12x4B12x4R12x43plane422Unorm3pack16 = 208 // DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g12x4B12x4r12x42plane422Unorm3pack16 = 209 // DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 + /// 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. + case g12x4B12x4R12x43plane444Unorm3pack16 = 210 // DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g16b16g16r16422Unorm = 211 // DATA_FORMAT_G16B16G16R16_422_UNORM + /// 16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case b16g16r16g16422Unorm = 212 // DATA_FORMAT_B16G16R16G16_422_UNORM + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g16B16R163plane420Unorm = 213 // DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). + case g16B16r162plane420Unorm = 214 // DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g16B16R163plane422Unorm = 215 // DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). + case g16B16r162plane422Unorm = 216 // DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM + /// 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. + case g16B16R163plane444Unorm = 217 // DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM + /// Represents the size of the ``RenderingDevice/DataFormat`` enum. + case max = 218 // DATA_FORMAT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .r4g4UnormPack8: return ".r4g4UnormPack8" + case .r4g4b4a4UnormPack16: return ".r4g4b4a4UnormPack16" + case .b4g4r4a4UnormPack16: return ".b4g4r4a4UnormPack16" + case .r5g6b5UnormPack16: return ".r5g6b5UnormPack16" + case .b5g6r5UnormPack16: return ".b5g6r5UnormPack16" + case .r5g5b5a1UnormPack16: return ".r5g5b5a1UnormPack16" + case .b5g5r5a1UnormPack16: return ".b5g5r5a1UnormPack16" + case .a1r5g5b5UnormPack16: return ".a1r5g5b5UnormPack16" + case .r8Unorm: return ".r8Unorm" + case .r8Snorm: return ".r8Snorm" + case .r8Uscaled: return ".r8Uscaled" + case .r8Sscaled: return ".r8Sscaled" + case .r8Uint: return ".r8Uint" + case .r8Sint: return ".r8Sint" + case .r8Srgb: return ".r8Srgb" + case .r8g8Unorm: return ".r8g8Unorm" + case .r8g8Snorm: return ".r8g8Snorm" + case .r8g8Uscaled: return ".r8g8Uscaled" + case .r8g8Sscaled: return ".r8g8Sscaled" + case .r8g8Uint: return ".r8g8Uint" + case .r8g8Sint: return ".r8g8Sint" + case .r8g8Srgb: return ".r8g8Srgb" + case .r8g8b8Unorm: return ".r8g8b8Unorm" + case .r8g8b8Snorm: return ".r8g8b8Snorm" + case .r8g8b8Uscaled: return ".r8g8b8Uscaled" + case .r8g8b8Sscaled: return ".r8g8b8Sscaled" + case .r8g8b8Uint: return ".r8g8b8Uint" + case .r8g8b8Sint: return ".r8g8b8Sint" + case .r8g8b8Srgb: return ".r8g8b8Srgb" + case .b8g8r8Unorm: return ".b8g8r8Unorm" + case .b8g8r8Snorm: return ".b8g8r8Snorm" + case .b8g8r8Uscaled: return ".b8g8r8Uscaled" + case .b8g8r8Sscaled: return ".b8g8r8Sscaled" + case .b8g8r8Uint: return ".b8g8r8Uint" + case .b8g8r8Sint: return ".b8g8r8Sint" + case .b8g8r8Srgb: return ".b8g8r8Srgb" + case .r8g8b8a8Unorm: return ".r8g8b8a8Unorm" + case .r8g8b8a8Snorm: return ".r8g8b8a8Snorm" + case .r8g8b8a8Uscaled: return ".r8g8b8a8Uscaled" + case .r8g8b8a8Sscaled: return ".r8g8b8a8Sscaled" + case .r8g8b8a8Uint: return ".r8g8b8a8Uint" + case .r8g8b8a8Sint: return ".r8g8b8a8Sint" + case .r8g8b8a8Srgb: return ".r8g8b8a8Srgb" + case .b8g8r8a8Unorm: return ".b8g8r8a8Unorm" + case .b8g8r8a8Snorm: return ".b8g8r8a8Snorm" + case .b8g8r8a8Uscaled: return ".b8g8r8a8Uscaled" + case .b8g8r8a8Sscaled: return ".b8g8r8a8Sscaled" + case .b8g8r8a8Uint: return ".b8g8r8a8Uint" + case .b8g8r8a8Sint: return ".b8g8r8a8Sint" + case .b8g8r8a8Srgb: return ".b8g8r8a8Srgb" + case .a8b8g8r8UnormPack32: return ".a8b8g8r8UnormPack32" + case .a8b8g8r8SnormPack32: return ".a8b8g8r8SnormPack32" + case .a8b8g8r8UscaledPack32: return ".a8b8g8r8UscaledPack32" + case .a8b8g8r8SscaledPack32: return ".a8b8g8r8SscaledPack32" + case .a8b8g8r8UintPack32: return ".a8b8g8r8UintPack32" + case .a8b8g8r8SintPack32: return ".a8b8g8r8SintPack32" + case .a8b8g8r8SrgbPack32: return ".a8b8g8r8SrgbPack32" + case .a2r10g10b10UnormPack32: return ".a2r10g10b10UnormPack32" + case .a2r10g10b10SnormPack32: return ".a2r10g10b10SnormPack32" + case .a2r10g10b10UscaledPack32: return ".a2r10g10b10UscaledPack32" + case .a2r10g10b10SscaledPack32: return ".a2r10g10b10SscaledPack32" + case .a2r10g10b10UintPack32: return ".a2r10g10b10UintPack32" + case .a2r10g10b10SintPack32: return ".a2r10g10b10SintPack32" + case .a2b10g10r10UnormPack32: return ".a2b10g10r10UnormPack32" + case .a2b10g10r10SnormPack32: return ".a2b10g10r10SnormPack32" + case .a2b10g10r10UscaledPack32: return ".a2b10g10r10UscaledPack32" + case .a2b10g10r10SscaledPack32: return ".a2b10g10r10SscaledPack32" + case .a2b10g10r10UintPack32: return ".a2b10g10r10UintPack32" + case .a2b10g10r10SintPack32: return ".a2b10g10r10SintPack32" + case .r16Unorm: return ".r16Unorm" + case .r16Snorm: return ".r16Snorm" + case .r16Uscaled: return ".r16Uscaled" + case .r16Sscaled: return ".r16Sscaled" + case .r16Uint: return ".r16Uint" + case .r16Sint: return ".r16Sint" + case .r16Sfloat: return ".r16Sfloat" + case .r16g16Unorm: return ".r16g16Unorm" + case .r16g16Snorm: return ".r16g16Snorm" + case .r16g16Uscaled: return ".r16g16Uscaled" + case .r16g16Sscaled: return ".r16g16Sscaled" + case .r16g16Uint: return ".r16g16Uint" + case .r16g16Sint: return ".r16g16Sint" + case .r16g16Sfloat: return ".r16g16Sfloat" + case .r16g16b16Unorm: return ".r16g16b16Unorm" + case .r16g16b16Snorm: return ".r16g16b16Snorm" + case .r16g16b16Uscaled: return ".r16g16b16Uscaled" + case .r16g16b16Sscaled: return ".r16g16b16Sscaled" + case .r16g16b16Uint: return ".r16g16b16Uint" + case .r16g16b16Sint: return ".r16g16b16Sint" + case .r16g16b16Sfloat: return ".r16g16b16Sfloat" + case .r16g16b16a16Unorm: return ".r16g16b16a16Unorm" + case .r16g16b16a16Snorm: return ".r16g16b16a16Snorm" + case .r16g16b16a16Uscaled: return ".r16g16b16a16Uscaled" + case .r16g16b16a16Sscaled: return ".r16g16b16a16Sscaled" + case .r16g16b16a16Uint: return ".r16g16b16a16Uint" + case .r16g16b16a16Sint: return ".r16g16b16a16Sint" + case .r16g16b16a16Sfloat: return ".r16g16b16a16Sfloat" + case .r32Uint: return ".r32Uint" + case .r32Sint: return ".r32Sint" + case .r32Sfloat: return ".r32Sfloat" + case .r32g32Uint: return ".r32g32Uint" + case .r32g32Sint: return ".r32g32Sint" + case .r32g32Sfloat: return ".r32g32Sfloat" + case .r32g32b32Uint: return ".r32g32b32Uint" + case .r32g32b32Sint: return ".r32g32b32Sint" + case .r32g32b32Sfloat: return ".r32g32b32Sfloat" + case .r32g32b32a32Uint: return ".r32g32b32a32Uint" + case .r32g32b32a32Sint: return ".r32g32b32a32Sint" + case .r32g32b32a32Sfloat: return ".r32g32b32a32Sfloat" + case .r64Uint: return ".r64Uint" + case .r64Sint: return ".r64Sint" + case .r64Sfloat: return ".r64Sfloat" + case .r64g64Uint: return ".r64g64Uint" + case .r64g64Sint: return ".r64g64Sint" + case .r64g64Sfloat: return ".r64g64Sfloat" + case .r64g64b64Uint: return ".r64g64b64Uint" + case .r64g64b64Sint: return ".r64g64b64Sint" + case .r64g64b64Sfloat: return ".r64g64b64Sfloat" + case .r64g64b64a64Uint: return ".r64g64b64a64Uint" + case .r64g64b64a64Sint: return ".r64g64b64a64Sint" + case .r64g64b64a64Sfloat: return ".r64g64b64a64Sfloat" + case .b10g11r11UfloatPack32: return ".b10g11r11UfloatPack32" + case .e5b9g9r9UfloatPack32: return ".e5b9g9r9UfloatPack32" + case .d16Unorm: return ".d16Unorm" + case .x8D24UnormPack32: return ".x8D24UnormPack32" + case .d32Sfloat: return ".d32Sfloat" + case .s8Uint: return ".s8Uint" + case .d16UnormS8Uint: return ".d16UnormS8Uint" + case .d24UnormS8Uint: return ".d24UnormS8Uint" + case .d32SfloatS8Uint: return ".d32SfloatS8Uint" + case .bc1RgbUnormBlock: return ".bc1RgbUnormBlock" + case .bc1RgbSrgbBlock: return ".bc1RgbSrgbBlock" + case .bc1RgbaUnormBlock: return ".bc1RgbaUnormBlock" + case .bc1RgbaSrgbBlock: return ".bc1RgbaSrgbBlock" + case .bc2UnormBlock: return ".bc2UnormBlock" + case .bc2SrgbBlock: return ".bc2SrgbBlock" + case .bc3UnormBlock: return ".bc3UnormBlock" + case .bc3SrgbBlock: return ".bc3SrgbBlock" + case .bc4UnormBlock: return ".bc4UnormBlock" + case .bc4SnormBlock: return ".bc4SnormBlock" + case .bc5UnormBlock: return ".bc5UnormBlock" + case .bc5SnormBlock: return ".bc5SnormBlock" + case .bc6hUfloatBlock: return ".bc6hUfloatBlock" + case .bc6hSfloatBlock: return ".bc6hSfloatBlock" + case .bc7UnormBlock: return ".bc7UnormBlock" + case .bc7SrgbBlock: return ".bc7SrgbBlock" + case .etc2R8g8b8UnormBlock: return ".etc2R8g8b8UnormBlock" + case .etc2R8g8b8SrgbBlock: return ".etc2R8g8b8SrgbBlock" + case .etc2R8g8b8a1UnormBlock: return ".etc2R8g8b8a1UnormBlock" + case .etc2R8g8b8a1SrgbBlock: return ".etc2R8g8b8a1SrgbBlock" + case .etc2R8g8b8a8UnormBlock: return ".etc2R8g8b8a8UnormBlock" + case .etc2R8g8b8a8SrgbBlock: return ".etc2R8g8b8a8SrgbBlock" + case .eacR11UnormBlock: return ".eacR11UnormBlock" + case .eacR11SnormBlock: return ".eacR11SnormBlock" + case .eacR11g11UnormBlock: return ".eacR11g11UnormBlock" + case .eacR11g11SnormBlock: return ".eacR11g11SnormBlock" + case .astc4x4UnormBlock: return ".astc4x4UnormBlock" + case .astc4x4SrgbBlock: return ".astc4x4SrgbBlock" + case .astc5x4UnormBlock: return ".astc5x4UnormBlock" + case .astc5x4SrgbBlock: return ".astc5x4SrgbBlock" + case .astc5x5UnormBlock: return ".astc5x5UnormBlock" + case .astc5x5SrgbBlock: return ".astc5x5SrgbBlock" + case .astc6x5UnormBlock: return ".astc6x5UnormBlock" + case .astc6x5SrgbBlock: return ".astc6x5SrgbBlock" + case .astc6x6UnormBlock: return ".astc6x6UnormBlock" + case .astc6x6SrgbBlock: return ".astc6x6SrgbBlock" + case .astc8x5UnormBlock: return ".astc8x5UnormBlock" + case .astc8x5SrgbBlock: return ".astc8x5SrgbBlock" + case .astc8x6UnormBlock: return ".astc8x6UnormBlock" + case .astc8x6SrgbBlock: return ".astc8x6SrgbBlock" + case .astc8x8UnormBlock: return ".astc8x8UnormBlock" + case .astc8x8SrgbBlock: return ".astc8x8SrgbBlock" + case .astc10x5UnormBlock: return ".astc10x5UnormBlock" + case .astc10x5SrgbBlock: return ".astc10x5SrgbBlock" + case .astc10x6UnormBlock: return ".astc10x6UnormBlock" + case .astc10x6SrgbBlock: return ".astc10x6SrgbBlock" + case .astc10x8UnormBlock: return ".astc10x8UnormBlock" + case .astc10x8SrgbBlock: return ".astc10x8SrgbBlock" + case .astc10x10UnormBlock: return ".astc10x10UnormBlock" + case .astc10x10SrgbBlock: return ".astc10x10SrgbBlock" + case .astc12x10UnormBlock: return ".astc12x10UnormBlock" + case .astc12x10SrgbBlock: return ".astc12x10SrgbBlock" + case .astc12x12UnormBlock: return ".astc12x12UnormBlock" + case .astc12x12SrgbBlock: return ".astc12x12SrgbBlock" + case .g8b8g8r8422Unorm: return ".g8b8g8r8422Unorm" + case .b8g8r8g8422Unorm: return ".b8g8r8g8422Unorm" + case .g8B8R83plane420Unorm: return ".g8B8R83plane420Unorm" + case .g8B8r82plane420Unorm: return ".g8B8r82plane420Unorm" + case .g8B8R83plane422Unorm: return ".g8B8R83plane422Unorm" + case .g8B8r82plane422Unorm: return ".g8B8r82plane422Unorm" + case .g8B8R83plane444Unorm: return ".g8B8R83plane444Unorm" + case .r10x6UnormPack16: return ".r10x6UnormPack16" + case .r10x6g10x6Unorm2pack16: return ".r10x6g10x6Unorm2pack16" + case .r10x6g10x6b10x6a10x6Unorm4pack16: return ".r10x6g10x6b10x6a10x6Unorm4pack16" + case .g10x6b10x6g10x6r10x6422Unorm4pack16: return ".g10x6b10x6g10x6r10x6422Unorm4pack16" + case .b10x6g10x6r10x6g10x6422Unorm4pack16: return ".b10x6g10x6r10x6g10x6422Unorm4pack16" + case .g10x6B10x6R10x63plane420Unorm3pack16: return ".g10x6B10x6R10x63plane420Unorm3pack16" + case .g10x6B10x6r10x62plane420Unorm3pack16: return ".g10x6B10x6r10x62plane420Unorm3pack16" + case .g10x6B10x6R10x63plane422Unorm3pack16: return ".g10x6B10x6R10x63plane422Unorm3pack16" + case .g10x6B10x6r10x62plane422Unorm3pack16: return ".g10x6B10x6r10x62plane422Unorm3pack16" + case .g10x6B10x6R10x63plane444Unorm3pack16: return ".g10x6B10x6R10x63plane444Unorm3pack16" + case .r12x4UnormPack16: return ".r12x4UnormPack16" + case .r12x4g12x4Unorm2pack16: return ".r12x4g12x4Unorm2pack16" + case .r12x4g12x4b12x4a12x4Unorm4pack16: return ".r12x4g12x4b12x4a12x4Unorm4pack16" + case .g12x4b12x4g12x4r12x4422Unorm4pack16: return ".g12x4b12x4g12x4r12x4422Unorm4pack16" + case .b12x4g12x4r12x4g12x4422Unorm4pack16: return ".b12x4g12x4r12x4g12x4422Unorm4pack16" + case .g12x4B12x4R12x43plane420Unorm3pack16: return ".g12x4B12x4R12x43plane420Unorm3pack16" + case .g12x4B12x4r12x42plane420Unorm3pack16: return ".g12x4B12x4r12x42plane420Unorm3pack16" + case .g12x4B12x4R12x43plane422Unorm3pack16: return ".g12x4B12x4R12x43plane422Unorm3pack16" + case .g12x4B12x4r12x42plane422Unorm3pack16: return ".g12x4B12x4r12x42plane422Unorm3pack16" + case .g12x4B12x4R12x43plane444Unorm3pack16: return ".g12x4B12x4R12x43plane444Unorm3pack16" + case .g16b16g16r16422Unorm: return ".g16b16g16r16422Unorm" + case .b16g16r16g16422Unorm: return ".b16g16r16g16422Unorm" + case .g16B16R163plane420Unorm: return ".g16B16R163plane420Unorm" + case .g16B16r162plane420Unorm: return ".g16B16r162plane420Unorm" + case .g16B16R163plane422Unorm: return ".g16B16R163plane422Unorm" + case .g16B16r162plane422Unorm: return ".g16B16r162plane422Unorm" + case .g16B16R163plane444Unorm: return ".g16B16R163plane444Unorm" + case .max: return ".max" + } + + } + + } + + public struct BarrierMask: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Vertex shader barrier mask. + public static let vertex = BarrierMask (rawValue: 1) + /// Fragment shader barrier mask. + public static let fragment = BarrierMask (rawValue: 8) + /// Compute barrier mask. + public static let compute = BarrierMask (rawValue: 2) + /// Transfer barrier mask. + public static let transfer = BarrierMask (rawValue: 4) + /// Raster barrier mask (vertex and fragment). Equivalent to `BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT`. + public static let raster = BarrierMask (rawValue: 9) + /// Barrier mask for all types (vertex, fragment, compute, transfer). + public static let allBarriers = BarrierMask (rawValue: 32767) + /// No barrier for any type. + public static let noBarrier = BarrierMask (rawValue: 32768) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.vertex) { result += "vertex, " } + if self.contains (.fragment) { result += "fragment, " } + if self.contains (.compute) { result += "compute, " } + if self.contains (.transfer) { result += "transfer, " } + if self.contains (.raster) { result += "raster, " } + if self.contains (.allBarriers) { result += "allBarriers, " } + if self.contains (.noBarrier) { result += "noBarrier, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum TextureType: Int64, CaseIterable, CustomDebugStringConvertible { + /// 1-dimensional texture. + case textureType1d = 0 // TEXTURE_TYPE_1D + /// 2-dimensional texture. + case textureType2d = 1 // TEXTURE_TYPE_2D + /// 3-dimensional texture. + case textureType3d = 2 // TEXTURE_TYPE_3D + /// ``Cubemap`` texture. + case cube = 3 // TEXTURE_TYPE_CUBE + /// Array of 1-dimensional textures. + case textureType1dArray = 4 // TEXTURE_TYPE_1D_ARRAY + /// Array of 2-dimensional textures. + case textureType2dArray = 5 // TEXTURE_TYPE_2D_ARRAY + /// Array of ``Cubemap`` textures. + case cubeArray = 6 // TEXTURE_TYPE_CUBE_ARRAY + /// Represents the size of the ``RenderingDevice/TextureType`` enum. + case max = 7 // TEXTURE_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .textureType1d: return ".textureType1d" + case .textureType2d: return ".textureType2d" + case .textureType3d: return ".textureType3d" + case .cube: return ".cube" + case .textureType1dArray: return ".textureType1dArray" + case .textureType2dArray: return ".textureType2dArray" + case .cubeArray: return ".cubeArray" + case .max: return ".max" + } + + } + + } + + public enum TextureSamples: Int64, CaseIterable, CustomDebugStringConvertible { + /// Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing). + case textureSamples1 = 0 // TEXTURE_SAMPLES_1 + /// Perform 2 texture samples. + case textureSamples2 = 1 // TEXTURE_SAMPLES_2 + /// Perform 4 texture samples. + case textureSamples4 = 2 // TEXTURE_SAMPLES_4 + /// Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon). + case textureSamples8 = 3 // TEXTURE_SAMPLES_8 + /// Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs. + case textureSamples16 = 4 // TEXTURE_SAMPLES_16 + /// Perform 32 texture samples. Not supported on most GPUs. + case textureSamples32 = 5 // TEXTURE_SAMPLES_32 + /// Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs. + case textureSamples64 = 6 // TEXTURE_SAMPLES_64 + /// Represents the size of the ``RenderingDevice/TextureSamples`` enum. + case max = 7 // TEXTURE_SAMPLES_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .textureSamples1: return ".textureSamples1" + case .textureSamples2: return ".textureSamples2" + case .textureSamples4: return ".textureSamples4" + case .textureSamples8: return ".textureSamples8" + case .textureSamples16: return ".textureSamples16" + case .textureSamples32: return ".textureSamples32" + case .textureSamples64: return ".textureSamples64" + case .max: return ".max" + } + + } + + } + + public struct TextureUsageBits: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Texture can be sampled. + public static let samplingBit = TextureUsageBits (rawValue: 1) + /// Texture can be used as a color attachment in a framebuffer. + public static let colorAttachmentBit = TextureUsageBits (rawValue: 2) + /// Texture can be used as a depth/stencil attachment in a framebuffer. + public static let depthStencilAttachmentBit = TextureUsageBits (rawValue: 4) + /// Texture can be used as a storage image. + public static let storageBit = TextureUsageBits (rawValue: 8) + /// Texture can be used as a storage image with support for atomic operations. + public static let storageAtomicBit = TextureUsageBits (rawValue: 16) + /// Texture can be read back on the CPU using ``textureGetData(texture:layer:)`` faster than without this bit, since it is always kept in the system memory. + public static let cpuReadBit = TextureUsageBits (rawValue: 32) + /// Texture can be updated using ``textureUpdate(texture:layer:data:)``. + public static let canUpdateBit = TextureUsageBits (rawValue: 64) + /// Texture can be a source for ``textureCopy(fromTexture:toTexture:fromPos:toPos:size:srcMipmap:dstMipmap:srcLayer:dstLayer:)``. + public static let canCopyFromBit = TextureUsageBits (rawValue: 128) + /// Texture can be a destination for ``textureCopy(fromTexture:toTexture:fromPos:toPos:size:srcMipmap:dstMipmap:srcLayer:dstLayer:)``. + public static let canCopyToBit = TextureUsageBits (rawValue: 256) + /// Texture can be used as a input attachment in a framebuffer. + public static let inputAttachmentBit = TextureUsageBits (rawValue: 512) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.samplingBit) { result += "samplingBit, " } + if self.contains (.colorAttachmentBit) { result += "colorAttachmentBit, " } + if self.contains (.depthStencilAttachmentBit) { result += "depthStencilAttachmentBit, " } + if self.contains (.storageBit) { result += "storageBit, " } + if self.contains (.storageAtomicBit) { result += "storageAtomicBit, " } + if self.contains (.cpuReadBit) { result += "cpuReadBit, " } + if self.contains (.canUpdateBit) { result += "canUpdateBit, " } + if self.contains (.canCopyFromBit) { result += "canCopyFromBit, " } + if self.contains (.canCopyToBit) { result += "canCopyToBit, " } + if self.contains (.inputAttachmentBit) { result += "inputAttachmentBit, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum TextureSwizzle: Int64, CaseIterable, CustomDebugStringConvertible { + /// Return the sampled value as-is. + case identity = 0 // TEXTURE_SWIZZLE_IDENTITY + /// Always return `0.0` when sampling. + case zero = 1 // TEXTURE_SWIZZLE_ZERO + /// Always return `1.0` when sampling. + case one = 2 // TEXTURE_SWIZZLE_ONE + /// Sample the red color channel. + case r = 3 // TEXTURE_SWIZZLE_R + /// Sample the green color channel. + case g = 4 // TEXTURE_SWIZZLE_G + /// Sample the blue color channel. + case b = 5 // TEXTURE_SWIZZLE_B + /// Sample the alpha channel. + case a = 6 // TEXTURE_SWIZZLE_A + /// Represents the size of the ``RenderingDevice/TextureSwizzle`` enum. + case max = 7 // TEXTURE_SWIZZLE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .identity: return ".identity" + case .zero: return ".zero" + case .one: return ".one" + case .r: return ".r" + case .g: return ".g" + case .b: return ".b" + case .a: return ".a" + case .max: return ".max" + } + + } + + } + + public enum TextureSliceType: Int64, CaseIterable, CustomDebugStringConvertible { + /// 2-dimensional texture slice. + case textureSlice2d = 0 // TEXTURE_SLICE_2D + /// Cubemap texture slice. + case cubemap = 1 // TEXTURE_SLICE_CUBEMAP + /// 3-dimensional texture slice. + case textureSlice3d = 2 // TEXTURE_SLICE_3D + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .textureSlice2d: return ".textureSlice2d" + case .cubemap: return ".cubemap" + case .textureSlice3d: return ".textureSlice3d" + } + + } + + } + + public enum SamplerFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Nearest-neighbor sampler filtering. Sampling at higher resolutions than the source will result in a pixelated look. + case nearest = 0 // SAMPLER_FILTER_NEAREST + /// Bilinear sampler filtering. Sampling at higher resolutions than the source will result in a blurry look. + case linear = 1 // SAMPLER_FILTER_LINEAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .linear: return ".linear" + } + + } + + } + + public enum SamplerRepeatMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Sample with repeating enabled. + case `repeat` = 0 // SAMPLER_REPEAT_MODE_REPEAT + /// Sample with mirrored repeating enabled. When sampling outside the `[0.0, 1.0]` range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely. + case mirroredRepeat = 1 // SAMPLER_REPEAT_MODE_MIRRORED_REPEAT + /// Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the color of the last pixel on the edge. + case clampToEdge = 2 // SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE + /// Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the specified ``RDSamplerState/borderColor``. + case clampToBorder = 3 // SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER + /// Sample with mirrored repeating enabled, but only once. When sampling in the `[-1.0, 0.0]` range, return a mirrored version of the sampler. When sampling outside the `[-1.0, 1.0]` range, return the color of the last pixel on the edge. + case mirrorClampToEdge = 4 // SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE + /// Represents the size of the ``RenderingDevice/SamplerRepeatMode`` enum. + case max = 5 // SAMPLER_REPEAT_MODE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`repeat`: return ".`repeat`" + case .mirroredRepeat: return ".mirroredRepeat" + case .clampToEdge: return ".clampToEdge" + case .clampToBorder: return ".clampToBorder" + case .mirrorClampToEdge: return ".mirrorClampToEdge" + case .max: return ".max" + } + + } + + } + + public enum SamplerBorderColor: Int64, CaseIterable, CustomDebugStringConvertible { + /// Return a floating-point transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case floatTransparentBlack = 0 // SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK + /// Return a integer transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case intTransparentBlack = 1 // SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK + /// Return a floating-point opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case floatOpaqueBlack = 2 // SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK + /// Return a integer opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case intOpaqueBlack = 3 // SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK + /// Return a floating-point opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case floatOpaqueWhite = 4 // SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE + /// Return a integer opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is ``SamplerRepeatMode/clampToBorder``. + case intOpaqueWhite = 5 // SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE + /// Represents the size of the ``RenderingDevice/SamplerBorderColor`` enum. + case max = 6 // SAMPLER_BORDER_COLOR_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .floatTransparentBlack: return ".floatTransparentBlack" + case .intTransparentBlack: return ".intTransparentBlack" + case .floatOpaqueBlack: return ".floatOpaqueBlack" + case .intOpaqueBlack: return ".intOpaqueBlack" + case .floatOpaqueWhite: return ".floatOpaqueWhite" + case .intOpaqueWhite: return ".intOpaqueWhite" + case .max: return ".max" + } + + } + + } + + public enum VertexFrequency: Int64, CaseIterable, CustomDebugStringConvertible { + /// Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers. + case vertex = 0 // VERTEX_FREQUENCY_VERTEX + /// Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers. + case instance = 1 // VERTEX_FREQUENCY_INSTANCE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .vertex: return ".vertex" + case .instance: return ".instance" + } + + } + + } + + public enum IndexBufferFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to `65535`. + case uint16 = 0 // INDEX_BUFFER_FORMAT_UINT16 + /// Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to `4294967295`. + case uint32 = 1 // INDEX_BUFFER_FORMAT_UINT32 + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .uint16: return ".uint16" + case .uint32: return ".uint32" + } + + } + + } + + public struct StorageBufferUsage: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// + public static let storageBufferUsageDispatchIndirect = StorageBufferUsage (rawValue: 1) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.storageBufferUsageDispatchIndirect) { result += "storageBufferUsageDispatchIndirect, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum UniformType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Sampler uniform. + case sampler = 0 // UNIFORM_TYPE_SAMPLER + /// Sampler uniform with a texture. + case samplerWithTexture = 1 // UNIFORM_TYPE_SAMPLER_WITH_TEXTURE + /// Texture uniform. + case texture = 2 // UNIFORM_TYPE_TEXTURE + /// Image uniform. + case image = 3 // UNIFORM_TYPE_IMAGE + /// Texture buffer uniform. + case textureBuffer = 4 // UNIFORM_TYPE_TEXTURE_BUFFER + /// Sampler uniform with a texture buffer. + case samplerWithTextureBuffer = 5 // UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER + /// Image buffer uniform. + case imageBuffer = 6 // UNIFORM_TYPE_IMAGE_BUFFER + /// Uniform buffer uniform. + case uniformBuffer = 7 // UNIFORM_TYPE_UNIFORM_BUFFER + /// Storage buffer uniform. + case storageBuffer = 8 // UNIFORM_TYPE_STORAGE_BUFFER + /// Input attachment uniform. + case inputAttachment = 9 // UNIFORM_TYPE_INPUT_ATTACHMENT + /// Represents the size of the ``RenderingDevice/UniformType`` enum. + case max = 10 // UNIFORM_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .sampler: return ".sampler" + case .samplerWithTexture: return ".samplerWithTexture" + case .texture: return ".texture" + case .image: return ".image" + case .textureBuffer: return ".textureBuffer" + case .samplerWithTextureBuffer: return ".samplerWithTextureBuffer" + case .imageBuffer: return ".imageBuffer" + case .uniformBuffer: return ".uniformBuffer" + case .storageBuffer: return ".storageBuffer" + case .inputAttachment: return ".inputAttachment" + case .max: return ".max" + } + + } + + } + + public enum RenderPrimitive: Int64, CaseIterable, CustomDebugStringConvertible { + /// Point rendering primitive (with constant size, regardless of distance from camera). + case points = 0 // RENDER_PRIMITIVE_POINTS + /// Line list rendering primitive. Lines are drawn separated from each other. + case lines = 1 // RENDER_PRIMITIVE_LINES + /// Line list rendering primitive with adjacency. + /// + /// > Note: Adjacency is only useful with geometry shaders, which Godot does not expose. + /// + case linesWithAdjacency = 2 // RENDER_PRIMITIVE_LINES_WITH_ADJACENCY + /// Line strip rendering primitive. Lines drawn are connected to the previous vertex. + case linestrips = 3 // RENDER_PRIMITIVE_LINESTRIPS + /// Line strip rendering primitive with adjacency. + /// + /// > Note: Adjacency is only useful with geometry shaders, which Godot does not expose. + /// + case linestripsWithAdjacency = 4 // RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY + /// Triangle list rendering primitive. Triangles are drawn separated from each other. + case triangles = 5 // RENDER_PRIMITIVE_TRIANGLES + /// Triangle list rendering primitive with adjacency. + /// + /// > Note: Adjacency is only useful with geometry shaders, which Godot does not expose. + /// + case trianglesWithAdjacency = 6 // RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY + /// Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle. + case triangleStrips = 7 // RENDER_PRIMITIVE_TRIANGLE_STRIPS + /// Triangle strip rendering primitive with adjacency. + /// + /// > Note: Adjacency is only useful with geometry shaders, which Godot does not expose. + /// + case triangleStripsWithAjacency = 8 // RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY + /// Triangle strip rendering primitive with _primitive restart_ enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index. + /// + /// > Note: Only compatible with indexed draws. + /// + case triangleStripsWithRestartIndex = 9 // RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX + /// Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches. + case tesselationPatch = 10 // RENDER_PRIMITIVE_TESSELATION_PATCH + /// Represents the size of the ``RenderingDevice/RenderPrimitive`` enum. + case max = 11 // RENDER_PRIMITIVE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .points: return ".points" + case .lines: return ".lines" + case .linesWithAdjacency: return ".linesWithAdjacency" + case .linestrips: return ".linestrips" + case .linestripsWithAdjacency: return ".linestripsWithAdjacency" + case .triangles: return ".triangles" + case .trianglesWithAdjacency: return ".trianglesWithAdjacency" + case .triangleStrips: return ".triangleStrips" + case .triangleStripsWithAjacency: return ".triangleStripsWithAjacency" + case .triangleStripsWithRestartIndex: return ".triangleStripsWithRestartIndex" + case .tesselationPatch: return ".tesselationPatch" + case .max: return ".max" + } + + } + + } + + public enum PolygonCullMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not use polygon front face or backface culling. + case disabled = 0 // POLYGON_CULL_DISABLED + /// Use polygon frontface culling (faces pointing towards the camera are hidden). + case front = 1 // POLYGON_CULL_FRONT + /// Use polygon backface culling (faces pointing away from the camera are hidden). + case back = 2 // POLYGON_CULL_BACK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .front: return ".front" + case .back: return ".back" + } + + } + + } + + public enum PolygonFrontFace: Int64, CaseIterable, CustomDebugStringConvertible { + /// Clockwise winding order to determine which face of a polygon is its front face. + case clockwise = 0 // POLYGON_FRONT_FACE_CLOCKWISE + /// Counter-clockwise winding order to determine which face of a polygon is its front face. + case counterClockwise = 1 // POLYGON_FRONT_FACE_COUNTER_CLOCKWISE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .clockwise: return ".clockwise" + case .counterClockwise: return ".counterClockwise" + } + + } + + } + + public enum StencilOperation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Keep the current stencil value. + case keep = 0 // STENCIL_OP_KEEP + /// Set the stencil value to `0`. + case zero = 1 // STENCIL_OP_ZERO + /// Replace the existing stencil value with the new one. + case replace = 2 // STENCIL_OP_REPLACE + /// Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer. + case incrementAndClamp = 3 // STENCIL_OP_INCREMENT_AND_CLAMP + /// Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer. + case decrementAndClamp = 4 // STENCIL_OP_DECREMENT_AND_CLAMP + /// Bitwise-invert the existing stencil value. + case invert = 5 // STENCIL_OP_INVERT + /// Increment the stencil value and wrap around to `0` if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer. + case incrementAndWrap = 6 // STENCIL_OP_INCREMENT_AND_WRAP + /// Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer. + case decrementAndWrap = 7 // STENCIL_OP_DECREMENT_AND_WRAP + /// Represents the size of the ``RenderingDevice/StencilOperation`` enum. + case max = 8 // STENCIL_OP_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .keep: return ".keep" + case .zero: return ".zero" + case .replace: return ".replace" + case .incrementAndClamp: return ".incrementAndClamp" + case .decrementAndClamp: return ".decrementAndClamp" + case .invert: return ".invert" + case .incrementAndWrap: return ".incrementAndWrap" + case .decrementAndWrap: return ".decrementAndWrap" + case .max: return ".max" + } + + } + + } + + public enum CompareOperator: Int64, CaseIterable, CustomDebugStringConvertible { + /// "Never" comparison (opposite of ``CompareOperator/always``). + case never = 0 // COMPARE_OP_NEVER + /// "Less than" comparison. + case less = 1 // COMPARE_OP_LESS + /// "Equal" comparison. + case equal = 2 // COMPARE_OP_EQUAL + /// "Less than or equal" comparison. + case lessOrEqual = 3 // COMPARE_OP_LESS_OR_EQUAL + /// "Greater than" comparison. + case greater = 4 // COMPARE_OP_GREATER + /// "Not equal" comparison. + case notEqual = 5 // COMPARE_OP_NOT_EQUAL + /// "Greater than or equal" comparison. + case greaterOrEqual = 6 // COMPARE_OP_GREATER_OR_EQUAL + /// "Always" comparison (opposite of ``CompareOperator/never``). + case always = 7 // COMPARE_OP_ALWAYS + /// Represents the size of the ``RenderingDevice/CompareOperator`` enum. + case max = 8 // COMPARE_OP_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .never: return ".never" + case .less: return ".less" + case .equal: return ".equal" + case .lessOrEqual: return ".lessOrEqual" + case .greater: return ".greater" + case .notEqual: return ".notEqual" + case .greaterOrEqual: return ".greaterOrEqual" + case .always: return ".always" + case .max: return ".max" + } + + } + + } + + public enum LogicOperation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Clear logic operation (result is always `0`). See also ``LogicOperation/set``. + case clear = 0 // LOGIC_OP_CLEAR + /// AND logic operation. + case and = 1 // LOGIC_OP_AND + /// AND logic operation with the _destination_ operand being inverted. See also ``LogicOperation/andInverted``. + case andReverse = 2 // LOGIC_OP_AND_REVERSE + /// Copy logic operation (keeps the _source_ value as-is). See also ``LogicOperation/copyInverted`` and ``LogicOperation/noOp``. + case copy = 3 // LOGIC_OP_COPY + /// AND logic operation with the _source_ operand being inverted. See also ``LogicOperation/andReverse``. + case andInverted = 4 // LOGIC_OP_AND_INVERTED + /// No-op logic operation (keeps the _destination_ value as-is). See also ``LogicOperation/copy``. + case noOp = 5 // LOGIC_OP_NO_OP + /// Exclusive or (XOR) logic operation. + case xor = 6 // LOGIC_OP_XOR + /// OR logic operation. + case or = 7 // LOGIC_OP_OR + /// Not-OR (NOR) logic operation. + case nor = 8 // LOGIC_OP_NOR + /// Not-XOR (XNOR) logic operation. + case equivalent = 9 // LOGIC_OP_EQUIVALENT + /// Invert logic operation. + case invert = 10 // LOGIC_OP_INVERT + /// OR logic operation with the _destination_ operand being inverted. See also ``LogicOperation/orReverse``. + case orReverse = 11 // LOGIC_OP_OR_REVERSE + /// NOT logic operation (inverts the value). See also ``LogicOperation/copy``. + case copyInverted = 12 // LOGIC_OP_COPY_INVERTED + /// OR logic operation with the _source_ operand being inverted. See also ``LogicOperation/orReverse``. + case orInverted = 13 // LOGIC_OP_OR_INVERTED + /// Not-AND (NAND) logic operation. + case nand = 14 // LOGIC_OP_NAND + /// SET logic operation (result is always `1`). See also ``LogicOperation/clear``. + case set = 15 // LOGIC_OP_SET + /// Represents the size of the ``RenderingDevice/LogicOperation`` enum. + case max = 16 // LOGIC_OP_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .clear: return ".clear" + case .and: return ".and" + case .andReverse: return ".andReverse" + case .copy: return ".copy" + case .andInverted: return ".andInverted" + case .noOp: return ".noOp" + case .xor: return ".xor" + case .or: return ".or" + case .nor: return ".nor" + case .equivalent: return ".equivalent" + case .invert: return ".invert" + case .orReverse: return ".orReverse" + case .copyInverted: return ".copyInverted" + case .orInverted: return ".orInverted" + case .nand: return ".nand" + case .set: return ".set" + case .max: return ".max" + } + + } + + } + + public enum BlendFactor: Int64, CaseIterable, CustomDebugStringConvertible { + /// Constant `0.0` blend factor. + case zero = 0 // BLEND_FACTOR_ZERO + /// Constant `1.0` blend factor. + case one = 1 // BLEND_FACTOR_ONE + /// Color blend factor is `source color`. Alpha blend factor is `source alpha`. + case srcColor = 2 // BLEND_FACTOR_SRC_COLOR + /// Color blend factor is `1.0 - source color`. Alpha blend factor is `1.0 - source alpha`. + case oneMinusSrcColor = 3 // BLEND_FACTOR_ONE_MINUS_SRC_COLOR + /// Color blend factor is `destination color`. Alpha blend factor is `destination alpha`. + case dstColor = 4 // BLEND_FACTOR_DST_COLOR + /// Color blend factor is `1.0 - destination color`. Alpha blend factor is `1.0 - destination alpha`. + case oneMinusDstColor = 5 // BLEND_FACTOR_ONE_MINUS_DST_COLOR + /// Color and alpha blend factor is `source alpha`. + case srcAlpha = 6 // BLEND_FACTOR_SRC_ALPHA + /// Color and alpha blend factor is `1.0 - source alpha`. + case oneMinusSrcAlpha = 7 // BLEND_FACTOR_ONE_MINUS_SRC_ALPHA + /// Color and alpha blend factor is `destination alpha`. + case dstAlpha = 8 // BLEND_FACTOR_DST_ALPHA + /// Color and alpha blend factor is `1.0 - destination alpha`. + case oneMinusDstAlpha = 9 // BLEND_FACTOR_ONE_MINUS_DST_ALPHA + /// Color blend factor is `blend constant color`. Alpha blend factor is `blend constant alpha` (see ``drawListSetBlendConstants(drawList:color:)``). + case constantColor = 10 // BLEND_FACTOR_CONSTANT_COLOR + /// Color blend factor is `1.0 - blend constant color`. Alpha blend factor is `1.0 - blend constant alpha` (see ``drawListSetBlendConstants(drawList:color:)``). + case oneMinusConstantColor = 11 // BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR + /// Color and alpha blend factor is `blend constant alpha` (see ``drawListSetBlendConstants(drawList:color:)``). + case constantAlpha = 12 // BLEND_FACTOR_CONSTANT_ALPHA + /// Color and alpha blend factor is `1.0 - blend constant alpha` (see ``drawListSetBlendConstants(drawList:color:)``). + case oneMinusConstantAlpha = 13 // BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA + /// Color blend factor is `min(source alpha, 1.0 - destination alpha)`. Alpha blend factor is `1.0`. + case srcAlphaSaturate = 14 // BLEND_FACTOR_SRC_ALPHA_SATURATE + /// Color blend factor is `second source color`. Alpha blend factor is `second source alpha`. Only relevant for dual-source blending. + case src1Color = 15 // BLEND_FACTOR_SRC1_COLOR + /// Color blend factor is `1.0 - second source color`. Alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending. + case oneMinusSrc1Color = 16 // BLEND_FACTOR_ONE_MINUS_SRC1_COLOR + /// Color and alpha blend factor is `second source alpha`. Only relevant for dual-source blending. + case src1Alpha = 17 // BLEND_FACTOR_SRC1_ALPHA + /// Color and alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending. + case oneMinusSrc1Alpha = 18 // BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA + /// Represents the size of the ``RenderingDevice/BlendFactor`` enum. + case max = 19 // BLEND_FACTOR_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .zero: return ".zero" + case .one: return ".one" + case .srcColor: return ".srcColor" + case .oneMinusSrcColor: return ".oneMinusSrcColor" + case .dstColor: return ".dstColor" + case .oneMinusDstColor: return ".oneMinusDstColor" + case .srcAlpha: return ".srcAlpha" + case .oneMinusSrcAlpha: return ".oneMinusSrcAlpha" + case .dstAlpha: return ".dstAlpha" + case .oneMinusDstAlpha: return ".oneMinusDstAlpha" + case .constantColor: return ".constantColor" + case .oneMinusConstantColor: return ".oneMinusConstantColor" + case .constantAlpha: return ".constantAlpha" + case .oneMinusConstantAlpha: return ".oneMinusConstantAlpha" + case .srcAlphaSaturate: return ".srcAlphaSaturate" + case .src1Color: return ".src1Color" + case .oneMinusSrc1Color: return ".oneMinusSrc1Color" + case .src1Alpha: return ".src1Alpha" + case .oneMinusSrc1Alpha: return ".oneMinusSrc1Alpha" + case .max: return ".max" + } + + } + + } + + public enum BlendOperation: Int64, CaseIterable, CustomDebugStringConvertible { + /// Additive blending operation (`source + destination`). + case add = 0 // BLEND_OP_ADD + /// Subtractive blending operation (`source - destination`). + case subtract = 1 // BLEND_OP_SUBTRACT + /// Reverse subtractive blending operation (`destination - source`). + case reverseSubtract = 2 // BLEND_OP_REVERSE_SUBTRACT + /// Minimum blending operation (keep the lowest value of the two). + case minimum = 3 // BLEND_OP_MINIMUM + /// Maximum blending operation (keep the highest value of the two). + case maximum = 4 // BLEND_OP_MAXIMUM + /// Represents the size of the ``RenderingDevice/BlendOperation`` enum. + case max = 5 // BLEND_OP_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .add: return ".add" + case .subtract: return ".subtract" + case .reverseSubtract: return ".reverseSubtract" + case .minimum: return ".minimum" + case .maximum: return ".maximum" + case .max: return ".max" + } + + } + + } + + public struct PipelineDynamicStateFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Allows dynamically changing the width of rendering lines. + public static let lineWidth = PipelineDynamicStateFlags (rawValue: 1) + /// Allows dynamically changing the depth bias. + public static let depthBias = PipelineDynamicStateFlags (rawValue: 2) + /// + public static let blendConstants = PipelineDynamicStateFlags (rawValue: 4) + /// + public static let depthBounds = PipelineDynamicStateFlags (rawValue: 8) + /// + public static let stencilCompareMask = PipelineDynamicStateFlags (rawValue: 16) + /// + public static let stencilWriteMask = PipelineDynamicStateFlags (rawValue: 32) + /// + public static let stencilReference = PipelineDynamicStateFlags (rawValue: 64) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.lineWidth) { result += "lineWidth, " } + if self.contains (.depthBias) { result += "depthBias, " } + if self.contains (.blendConstants) { result += "blendConstants, " } + if self.contains (.depthBounds) { result += "depthBounds, " } + if self.contains (.stencilCompareMask) { result += "stencilCompareMask, " } + if self.contains (.stencilWriteMask) { result += "stencilWriteMask, " } + if self.contains (.stencilReference) { result += "stencilReference, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum InitialAction: Int64, CaseIterable, CustomDebugStringConvertible { + /// Load the previous contents of the framebuffer. + case load = 0 // INITIAL_ACTION_LOAD + /// Clear the whole framebuffer or its specified region. + case clear = 1 // INITIAL_ACTION_CLEAR + /// Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them. + case discard = 2 // INITIAL_ACTION_DISCARD + /// Represents the size of the ``RenderingDevice/InitialAction`` enum. + case max = 3 // INITIAL_ACTION_MAX + /// + // case clearRegion = 1 // INITIAL_ACTION_CLEAR_REGION + /// + // case clearRegionContinue = 1 // INITIAL_ACTION_CLEAR_REGION_CONTINUE + /// + // case keep = 0 // INITIAL_ACTION_KEEP + /// + // case drop = 2 // INITIAL_ACTION_DROP + /// + // case `continue` = 0 // INITIAL_ACTION_CONTINUE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .load: return ".load" + case .clear: return ".clear" + case .discard: return ".discard" + case .max: return ".max" + } + + } + + } + + public enum FinalAction: Int64, CaseIterable, CustomDebugStringConvertible { + /// Store the result of the draw list in the framebuffer. This is generally what you want to do. + case store = 0 // FINAL_ACTION_STORE + /// Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list. + case discard = 1 // FINAL_ACTION_DISCARD + /// Represents the size of the ``RenderingDevice/FinalAction`` enum. + case max = 2 // FINAL_ACTION_MAX + /// + // case read = 0 // FINAL_ACTION_READ + /// + // case `continue` = 0 // FINAL_ACTION_CONTINUE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .store: return ".store" + case .discard: return ".discard" + case .max: return ".max" + } + + } + + } + + public enum ShaderStage: Int64, CaseIterable, CustomDebugStringConvertible { + /// Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices). + case vertex = 0 // SHADER_STAGE_VERTEX + /// Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader. + case fragment = 1 // SHADER_STAGE_FRAGMENT + /// Tessellation control shader stage. This can be used to create additional geometry from a shader. + case tesselationControl = 2 // SHADER_STAGE_TESSELATION_CONTROL + /// Tessellation evaluation shader stage. This can be used to create additional geometry from a shader. + case tesselationEvaluation = 3 // SHADER_STAGE_TESSELATION_EVALUATION + /// Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU. + case compute = 4 // SHADER_STAGE_COMPUTE + /// Represents the size of the ``RenderingDevice/ShaderStage`` enum. + case max = 5 // SHADER_STAGE_MAX + /// Vertex shader stage bit (see also ``ShaderStage/vertex``). + // case vertexBit = 1 // SHADER_STAGE_VERTEX_BIT + /// Fragment shader stage bit (see also ``ShaderStage/fragment``). + // case fragmentBit = 2 // SHADER_STAGE_FRAGMENT_BIT + /// Tessellation control shader stage bit (see also ``ShaderStage/tesselationControl``). + // case tesselationControlBit = 4 // SHADER_STAGE_TESSELATION_CONTROL_BIT + /// Tessellation evaluation shader stage bit (see also ``ShaderStage/tesselationEvaluation``). + case tesselationEvaluationBit = 8 // SHADER_STAGE_TESSELATION_EVALUATION_BIT + /// Compute shader stage bit (see also ``ShaderStage/compute``). + case computeBit = 16 // SHADER_STAGE_COMPUTE_BIT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .vertex: return ".vertex" + case .fragment: return ".fragment" + case .tesselationControl: return ".tesselationControl" + case .tesselationEvaluation: return ".tesselationEvaluation" + case .compute: return ".compute" + case .max: return ".max" + case .tesselationEvaluationBit: return ".tesselationEvaluationBit" + case .computeBit: return ".computeBit" + } + + } + + } + + public enum ShaderLanguage: Int64, CaseIterable, CustomDebugStringConvertible { + /// Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders. + case glsl = 0 // SHADER_LANGUAGE_GLSL + /// Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan). + case hlsl = 1 // SHADER_LANGUAGE_HLSL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .glsl: return ".glsl" + case .hlsl: return ".hlsl" + } + + } + + } + + public enum PipelineSpecializationConstantType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Boolean specialization constant. + case bool = 0 // PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL + /// Integer specialization constant. + case int = 1 // PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT + /// Floating-point specialization constant. + case float = 2 // PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bool: return ".bool" + case .int: return ".int" + case .float: return ".float" + } + + } + + } + + public enum Limit: Int64, CaseIterable, CustomDebugStringConvertible { + /// Maximum number of uniform sets that can be bound at a given time. + case maxBoundUniformSets = 0 // LIMIT_MAX_BOUND_UNIFORM_SETS + /// Maximum number of color framebuffer attachments that can be used at a given time. + case maxFramebufferColorAttachments = 1 // LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS + /// Maximum number of textures that can be used per uniform set. + case maxTexturesPerUniformSet = 2 // LIMIT_MAX_TEXTURES_PER_UNIFORM_SET + /// Maximum number of samplers that can be used per uniform set. + case maxSamplersPerUniformSet = 3 // LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET + /// Maximum number of storage buffers per uniform set. + case maxStorageBuffersPerUniformSet = 4 // LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET + /// Maximum number of storage images per uniform set. + case maxStorageImagesPerUniformSet = 5 // LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET + /// Maximum number of uniform buffers per uniform set. + case maxUniformBuffersPerUniformSet = 6 // LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET + /// Maximum index for an indexed draw command. + case maxDrawIndexedIndex = 7 // LIMIT_MAX_DRAW_INDEXED_INDEX + /// Maximum height of a framebuffer (in pixels). + case maxFramebufferHeight = 8 // LIMIT_MAX_FRAMEBUFFER_HEIGHT + /// Maximum width of a framebuffer (in pixels). + case maxFramebufferWidth = 9 // LIMIT_MAX_FRAMEBUFFER_WIDTH + /// Maximum number of texture array layers. + case maxTextureArrayLayers = 10 // LIMIT_MAX_TEXTURE_ARRAY_LAYERS + /// Maximum supported 1-dimensional texture size (in pixels on a single axis). + case maxTextureSize1d = 11 // LIMIT_MAX_TEXTURE_SIZE_1D + /// Maximum supported 2-dimensional texture size (in pixels on a single axis). + case maxTextureSize2d = 12 // LIMIT_MAX_TEXTURE_SIZE_2D + /// Maximum supported 3-dimensional texture size (in pixels on a single axis). + case maxTextureSize3d = 13 // LIMIT_MAX_TEXTURE_SIZE_3D + /// Maximum supported cubemap texture size (in pixels on a single axis of a single face). + case maxTextureSizeCube = 14 // LIMIT_MAX_TEXTURE_SIZE_CUBE + /// Maximum number of textures per shader stage. + case maxTexturesPerShaderStage = 15 // LIMIT_MAX_TEXTURES_PER_SHADER_STAGE + /// Maximum number of samplers per shader stage. + case maxSamplersPerShaderStage = 16 // LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE + /// Maximum number of storage buffers per shader stage. + case maxStorageBuffersPerShaderStage = 17 // LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE + /// Maximum number of storage images per shader stage. + case maxStorageImagesPerShaderStage = 18 // LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE + /// Maximum number of uniform buffers per uniform set. + case maxUniformBuffersPerShaderStage = 19 // LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE + /// Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value. + case maxPushConstantSize = 20 // LIMIT_MAX_PUSH_CONSTANT_SIZE + /// Maximum size of a uniform buffer. + case maxUniformBufferSize = 21 // LIMIT_MAX_UNIFORM_BUFFER_SIZE + /// Maximum vertex input attribute offset. + case maxVertexInputAttributeOffset = 22 // LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET + /// Maximum number of vertex input attributes. + case maxVertexInputAttributes = 23 // LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES + /// Maximum number of vertex input bindings. + case maxVertexInputBindings = 24 // LIMIT_MAX_VERTEX_INPUT_BINDINGS + /// Maximum vertex input binding stride. + case maxVertexInputBindingStride = 25 // LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE + /// Minimum uniform buffer offset alignment. + case minUniformBufferOffsetAlignment = 26 // LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT + /// Maximum shared memory size for compute shaders. + case maxComputeSharedMemorySize = 27 // LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE + /// Maximum number of workgroups for compute shaders on the X axis. + case maxComputeWorkgroupCountX = 28 // LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X + /// Maximum number of workgroups for compute shaders on the Y axis. + case maxComputeWorkgroupCountY = 29 // LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y + /// Maximum number of workgroups for compute shaders on the Z axis. + case maxComputeWorkgroupCountZ = 30 // LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z + /// Maximum number of workgroup invocations for compute shaders. + case maxComputeWorkgroupInvocations = 31 // LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS + /// Maximum workgroup size for compute shaders on the X axis. + case maxComputeWorkgroupSizeX = 32 // LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X + /// Maximum workgroup size for compute shaders on the Y axis. + case maxComputeWorkgroupSizeY = 33 // LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y + /// Maximum workgroup size for compute shaders on the Z axis. + case maxComputeWorkgroupSizeZ = 34 // LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z + /// Maximum viewport width (in pixels). + case maxViewportDimensionsX = 35 // LIMIT_MAX_VIEWPORT_DIMENSIONS_X + /// Maximum viewport height (in pixels). + case maxViewportDimensionsY = 36 // LIMIT_MAX_VIEWPORT_DIMENSIONS_Y + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .maxBoundUniformSets: return ".maxBoundUniformSets" + case .maxFramebufferColorAttachments: return ".maxFramebufferColorAttachments" + case .maxTexturesPerUniformSet: return ".maxTexturesPerUniformSet" + case .maxSamplersPerUniformSet: return ".maxSamplersPerUniformSet" + case .maxStorageBuffersPerUniformSet: return ".maxStorageBuffersPerUniformSet" + case .maxStorageImagesPerUniformSet: return ".maxStorageImagesPerUniformSet" + case .maxUniformBuffersPerUniformSet: return ".maxUniformBuffersPerUniformSet" + case .maxDrawIndexedIndex: return ".maxDrawIndexedIndex" + case .maxFramebufferHeight: return ".maxFramebufferHeight" + case .maxFramebufferWidth: return ".maxFramebufferWidth" + case .maxTextureArrayLayers: return ".maxTextureArrayLayers" + case .maxTextureSize1d: return ".maxTextureSize1d" + case .maxTextureSize2d: return ".maxTextureSize2d" + case .maxTextureSize3d: return ".maxTextureSize3d" + case .maxTextureSizeCube: return ".maxTextureSizeCube" + case .maxTexturesPerShaderStage: return ".maxTexturesPerShaderStage" + case .maxSamplersPerShaderStage: return ".maxSamplersPerShaderStage" + case .maxStorageBuffersPerShaderStage: return ".maxStorageBuffersPerShaderStage" + case .maxStorageImagesPerShaderStage: return ".maxStorageImagesPerShaderStage" + case .maxUniformBuffersPerShaderStage: return ".maxUniformBuffersPerShaderStage" + case .maxPushConstantSize: return ".maxPushConstantSize" + case .maxUniformBufferSize: return ".maxUniformBufferSize" + case .maxVertexInputAttributeOffset: return ".maxVertexInputAttributeOffset" + case .maxVertexInputAttributes: return ".maxVertexInputAttributes" + case .maxVertexInputBindings: return ".maxVertexInputBindings" + case .maxVertexInputBindingStride: return ".maxVertexInputBindingStride" + case .minUniformBufferOffsetAlignment: return ".minUniformBufferOffsetAlignment" + case .maxComputeSharedMemorySize: return ".maxComputeSharedMemorySize" + case .maxComputeWorkgroupCountX: return ".maxComputeWorkgroupCountX" + case .maxComputeWorkgroupCountY: return ".maxComputeWorkgroupCountY" + case .maxComputeWorkgroupCountZ: return ".maxComputeWorkgroupCountZ" + case .maxComputeWorkgroupInvocations: return ".maxComputeWorkgroupInvocations" + case .maxComputeWorkgroupSizeX: return ".maxComputeWorkgroupSizeX" + case .maxComputeWorkgroupSizeY: return ".maxComputeWorkgroupSizeY" + case .maxComputeWorkgroupSizeZ: return ".maxComputeWorkgroupSizeZ" + case .maxViewportDimensionsX: return ".maxViewportDimensionsX" + case .maxViewportDimensionsY: return ".maxViewportDimensionsY" + } + + } + + } + + public enum MemoryType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Memory taken by textures. + case textures = 0 // MEMORY_TEXTURES + /// Memory taken by buffers. + case buffers = 1 // MEMORY_BUFFERS + /// Total memory taken. This is greater than the sum of ``MemoryType/textures`` and ``MemoryType/buffers``, as it also includes miscellaneous memory usage. + case total = 2 // MEMORY_TOTAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .textures: return ".textures" + case .buffers: return ".buffers" + case .total: return ".total" + } + + } + + } + + /* Constants */ + /// Returned by functions that return an ID if a value is invalid. + public static let invalidId = -1 + /// Returned by functions that return a format ID if a value is invalid. + public static let invalidFormatId = -1 + /* Methods */ + fileprivate static var method_texture_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3709173589)! + } + + } + + }() + + /// Creates a new texture. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + /// > Note: Not to be confused with ``RenderingServer/texture2dCreate(image:)``, which creates the Godot-specific ``Texture2D`` resource as opposed to the graphics API's own texture type. + /// + public final func textureCreate(format: RDTextureFormat?, view: RDTextureView?, data: VariantCollection = VariantCollection ()) -> RID { + let _result: RID = RID () + withUnsafePointer(to: format?.handle) { pArg0 in + withUnsafePointer(to: view?.handle) { pArg1 in + withUnsafePointer(to: data.array.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_create_shared: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_create_shared") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3178156134)! + } + + } + + }() + + /// Creates a shared texture using the specified `view` and the texture information from `withTexture`. + public final func textureCreateShared(view: RDTextureView?, withTexture: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: view?.handle) { pArg0 in + withUnsafePointer(to: withTexture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_create_shared, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_create_shared_from_slice: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_create_shared_from_slice") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1808971279)! + } + + } + + }() + + /// Creates a shared texture using the specified `view` and the texture information from `withTexture`'s `layer` and `mipmap`. The number of included mipmaps from the original texture can be controlled using the `mipmaps` parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use ``textureCreateShared(view:withTexture:)`` + /// + /// For 2D textures (which only have one layer), `layer` must be `0`. + /// + /// > Note: Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps. + /// + public final func textureCreateSharedFromSlice(view: RDTextureView?, withTexture: RID, layer: UInt32, mipmap: UInt32, mipmaps: UInt32 = 1, sliceType: RenderingDevice.TextureSliceType = .textureSlice2d) -> RID { + let _result: RID = RID () + withUnsafePointer(to: view?.handle) { pArg0 in + withUnsafePointer(to: withTexture.content) { pArg1 in + withUnsafePointer(to: layer) { pArg2 in + withUnsafePointer(to: mipmap) { pArg3 in + withUnsafePointer(to: mipmaps) { pArg4 in + withUnsafePointer(to: sliceType.rawValue) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_create_shared_from_slice, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_create_from_extension: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_create_from_extension") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1397171480)! + } + + } + + }() + + /// Returns an RID for an existing `image` (`VkImage`) with the given `type`, `format`, `samples`, `usageFlags`, `width`, `height`, `depth`, and `layers`. This can be used to allow Godot to render onto foreign images. + public final func textureCreateFromExtension(type: RenderingDevice.TextureType, format: RenderingDevice.DataFormat, samples: RenderingDevice.TextureSamples, usageFlags: RenderingDevice.TextureUsageBits, image: UInt, width: UInt, height: UInt, depth: UInt, layers: UInt) -> RID { + let _result: RID = RID () + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: format.rawValue) { pArg1 in + withUnsafePointer(to: samples.rawValue) { pArg2 in + withUnsafePointer(to: usageFlags.rawValue) { pArg3 in + withUnsafePointer(to: image) { pArg4 in + withUnsafePointer(to: width) { pArg5 in + withUnsafePointer(to: height) { pArg6 in + withUnsafePointer(to: depth) { pArg7 in + withUnsafePointer(to: layers) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_create_from_extension, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_update: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_update") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1349464008)! + } + + } + + }() + + /// Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), `layer` must be `0`. Returns ``@GlobalScope.OK`` if the update was successful, ``@GlobalScope.ERR_INVALID_PARAMETER`` otherwise. + /// + /// > Note: Updating textures is forbidden during creation of a draw or compute list. + /// + /// > Note: The existing `texture` can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to update this texture. + /// + /// > Note: The existing `texture` requires the ``TextureUsageBits/canUpdateBit`` to be updatable. + /// + public final func textureUpdate(texture: RID, layer: UInt32, data: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_update, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_texture_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_data") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1859412099)! + } + + } + + }() + + /// Returns the `texture` data for the specified `layer` as raw binary data. For 2D textures (which only have one layer), `layer` must be `0`. + /// + /// > Note: `texture` can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to retrieve this texture. Otherwise, an error is printed and a empty ``PackedByteArray`` is returned. + /// + /// > Note: `texture` requires the ``TextureUsageBits/canCopyFromBit`` to be retrieved. Otherwise, an error is printed and a empty ``PackedByteArray`` is returned. + /// + public final func textureGetData(texture: RID, layer: UInt32) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_get_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_is_format_supported_for_usage: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_is_format_supported_for_usage") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2592520478)! + } + + } + + }() + + /// Returns `true` if the specified `format` is supported for the given `usageFlags`, `false` otherwise. + public final func textureIsFormatSupportedForUsage(format: RenderingDevice.DataFormat, usageFlags: RenderingDevice.TextureUsageBits) -> Bool { + var _result: Bool = false + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: usageFlags.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_is_format_supported_for_usage, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_is_shared: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_is_shared") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if the `texture` is shared, `false` otherwise. See ``RDTextureView``. + public final func textureIsShared(texture: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_is_shared, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_texture_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_is_valid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if the `texture` is valid, `false` otherwise. + public final func textureIsValid(texture: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_texture_copy: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_copy") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2859522160)! + } + + } + + }() + + /// Copies the `fromTexture` to `toTexture` with the specified `fromPos`, `toPos` and `size` coordinates. The Z axis of the `fromPos`, `toPos` and `size` must be `0` for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being `0` for textures without mipmaps or single-layer textures. Returns ``@GlobalScope.OK`` if the texture copy was successful or ``@GlobalScope.ERR_INVALID_PARAMETER`` otherwise. + /// + /// > Note: `fromTexture` texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to copy this texture. + /// + /// > Note: `fromTexture` texture requires the ``TextureUsageBits/canCopyFromBit`` to be retrieved. + /// + /// > Note: `toTexture` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to copy this texture. + /// + /// > Note: `toTexture` requires the ``TextureUsageBits/canCopyToBit`` to be retrieved. + /// + /// > Note: `fromTexture` and `toTexture` must be of the same type (color or depth). + /// + public final func textureCopy(fromTexture: RID, toTexture: RID, fromPos: Vector3, toPos: Vector3, size: Vector3, srcMipmap: UInt32, dstMipmap: UInt32, srcLayer: UInt32, dstLayer: UInt32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromTexture.content) { pArg0 in + withUnsafePointer(to: toTexture.content) { pArg1 in + withUnsafePointer(to: fromPos) { pArg2 in + withUnsafePointer(to: toPos) { pArg3 in + withUnsafePointer(to: size) { pArg4 in + withUnsafePointer(to: srcMipmap) { pArg5 in + withUnsafePointer(to: dstMipmap) { pArg6 in + withUnsafePointer(to: srcLayer) { pArg7 in + withUnsafePointer(to: dstLayer) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_copy, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_texture_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_clear") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3477703247)! + } + + } + + }() + + /// Clears the specified `texture` by replacing all of its pixels with the specified `color`. `baseMipmap` and `mipmapCount` determine which mipmaps of the texture are affected by this clear operation, while `baseLayer` and `layerCount` determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), `baseLayer` must be `0` and `layerCount` must be `1`. + /// + /// > Note: `texture` can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to clear this texture. + /// + public final func textureClear(texture: RID, color: Color, baseMipmap: UInt32, mipmapCount: UInt32, baseLayer: UInt32, layerCount: UInt32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: baseMipmap) { pArg2 in + withUnsafePointer(to: mipmapCount) { pArg3 in + withUnsafePointer(to: baseLayer) { pArg4 in + withUnsafePointer(to: layerCount) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_clear, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_texture_resolve_multisample: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_resolve_multisample") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3181288260)! + } + + } + + }() + + /// Resolves the `fromTexture` texture onto `toTexture` with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns ``@GlobalScope.OK`` if successful, ``@GlobalScope.ERR_INVALID_PARAMETER`` otherwise. + /// + /// > Note: `fromTexture` and `toTexture` textures must have the same dimension, format and type (color or depth). + /// + /// > Note: `fromTexture` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to resolve this texture. + /// + /// > Note: `fromTexture` requires the ``TextureUsageBits/canCopyFromBit`` to be retrieved. + /// + /// > Note: `fromTexture` must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). + /// + /// > Note: `toTexture` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to ``FinalAction/`continue```) to resolve this texture. + /// + /// > Note: `toTexture` texture requires the ``TextureUsageBits/canCopyToBit`` to be retrieved. + /// + /// > Note: `toTexture` texture must **not** be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). + /// + public final func textureResolveMultisample(fromTexture: RID, toTexture: RID) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: fromTexture.content) { pArg0 in + withUnsafePointer(to: toTexture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_resolve_multisample, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_texture_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_format") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1374471690)! + } + + } + + }() + + /// Returns the data format used to create this texture. + public final func textureGetFormat(texture: RID) -> RDTextureFormat? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_get_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_texture_get_native_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_native_handle") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3917799429)! + } + + } + + }() + + /// Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. + /// + /// > Note: This function returns a `uint64_t` which internally maps to a `GLuint` (OpenGL) or `VkImage` (Vulkan). + /// + public final func textureGetNativeHandle(texture: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_get_native_handle, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_format_create: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_format_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 697032759)! + } + + } + + }() + + /// Creates a new framebuffer format with the specified `attachments` and `viewCount`. Returns the new framebuffer's unique framebuffer format ID. + /// + /// If `viewCount` is greater than or equal to `2`, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. + /// + public final func framebufferFormatCreate(attachments: ObjectCollection, viewCount: UInt32 = 1) -> Int { + var _result: Int = 0 + withUnsafePointer(to: attachments.array.content) { pArg0 in + withUnsafePointer(to: viewCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_format_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_format_create_multipass: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_format_create_multipass") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2647479094)! + } + + } + + }() + + /// Creates a multipass framebuffer format with the specified `attachments`, `passes` and `viewCount` and returns its ID. If `viewCount` is greater than or equal to `2`, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. + public final func framebufferFormatCreateMultipass(attachments: ObjectCollection, passes: ObjectCollection, viewCount: UInt32 = 1) -> Int { + var _result: Int = 0 + withUnsafePointer(to: attachments.array.content) { pArg0 in + withUnsafePointer(to: passes.array.content) { pArg1 in + withUnsafePointer(to: viewCount) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_format_create_multipass, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_format_create_empty: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_format_create_empty") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 555930169)! + } + + } + + }() + + /// Creates a new empty framebuffer format with the specified number of `samples` and returns its ID. + public final func framebufferFormatCreateEmpty(samples: RenderingDevice.TextureSamples = .textureSamples1) -> Int { + var _result: Int = 0 + withUnsafePointer(to: samples.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_format_create_empty, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_format_get_texture_samples: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_format_get_texture_samples") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4223391010)! + } + + } + + }() + + /// Returns the number of texture samples used for the given framebuffer `format` ID (returned by ``framebufferGetFormat(framebuffer:)``). + public final func framebufferFormatGetTextureSamples(format: Int, renderPass: UInt32 = 0) -> RenderingDevice.TextureSamples { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: format) { pArg0 in + withUnsafePointer(to: renderPass) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_format_get_texture_samples, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return RenderingDevice.TextureSamples (rawValue: _result)! + } + + fileprivate static var method_framebuffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3284231055)! + } + + } + + }() + + /// Creates a new framebuffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func framebufferCreate(textures: VariantCollection, validateWithFormat: Int = -1, viewCount: UInt32 = 1) -> RID { + let _result: RID = RID () + withUnsafePointer(to: textures.array.content) { pArg0 in + withUnsafePointer(to: validateWithFormat) { pArg1 in + withUnsafePointer(to: viewCount) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_create_multipass: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_create_multipass") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1750306695)! + } + + } + + }() + + /// Creates a new multipass framebuffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func framebufferCreateMultipass(textures: VariantCollection, passes: ObjectCollection, validateWithFormat: Int = -1, viewCount: UInt32 = 1) -> RID { + let _result: RID = RID () + withUnsafePointer(to: textures.array.content) { pArg0 in + withUnsafePointer(to: passes.array.content) { pArg1 in + withUnsafePointer(to: validateWithFormat) { pArg2 in + withUnsafePointer(to: viewCount) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_create_multipass, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_create_empty: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_create_empty") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3058360618)! + } + + } + + }() + + /// Creates a new empty framebuffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func framebufferCreateEmpty(size: Vector2i, samples: RenderingDevice.TextureSamples = .textureSamples1, validateWithFormat: Int = -1) -> RID { + let _result: RID = RID () + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: samples.rawValue) { pArg1 in + withUnsafePointer(to: validateWithFormat) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_create_empty, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_get_format") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3917799429)! + } + + } + + }() + + /// Returns the format ID of the framebuffer specified by the `framebuffer` RID. This ID is guaranteed to be unique for the same formats and does not need to be freed. + public final func framebufferGetFormat(framebuffer: RID) -> Int { + var _result: Int = 0 + withUnsafePointer(to: framebuffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_get_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_framebuffer_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("framebuffer_is_valid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4155700596)! + } + + } + + }() + + /// Returns `true` if the framebuffer specified by the `framebuffer` RID is valid, `false` otherwise. + public final func framebufferIsValid(framebuffer: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: framebuffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_framebuffer_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_sampler_create: GDExtensionMethodBindPtr = { + let methodName = StringName("sampler_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2327892535)! + } + + } + + }() + + /// Creates a new sampler. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func samplerCreate(state: RDSamplerState?) -> RID { + let _result: RID = RID () + withUnsafePointer(to: state?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_sampler_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_sampler_is_format_supported_for_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("sampler_is_format_supported_for_filter") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2247922238)! + } + + } + + }() + + /// Returns `true` if implementation supports using a texture of `format` with the given `samplerFilter`. + public final func samplerIsFormatSupportedForFilter(format: RenderingDevice.DataFormat, samplerFilter: RenderingDevice.SamplerFilter) -> Bool { + var _result: Bool = false + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: samplerFilter.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_sampler_is_format_supported_for_filter, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_vertex_buffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("vertex_buffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3410049843)! + } + + } + + }() + + /// It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func vertexBufferCreate(sizeBytes: UInt32, data: PackedByteArray = PackedByteArray(), useAsStorage: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: sizeBytes) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: useAsStorage) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_vertex_buffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_vertex_format_create: GDExtensionMethodBindPtr = { + let methodName = StringName("vertex_format_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1242678479)! + } + + } + + }() + + /// Creates a new vertex format with the specified `vertexDescriptions`. Returns a unique vertex format ID corresponding to the newly created vertex format. + public final func vertexFormatCreate(vertexDescriptions: ObjectCollection) -> Int { + var _result: Int = 0 + withUnsafePointer(to: vertexDescriptions.array.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_vertex_format_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_vertex_array_create: GDExtensionMethodBindPtr = { + let methodName = StringName("vertex_array_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3799816279)! + } + + } + + }() + + /// Creates a vertex array based on the specified buffers. Optionally, `offsets` (in bytes) may be defined for each buffer. + public final func vertexArrayCreate(vertexCount: UInt32, vertexFormat: Int, srcBuffers: VariantCollection, offsets: PackedInt64Array = PackedInt64Array()) -> RID { + let _result: RID = RID () + withUnsafePointer(to: vertexCount) { pArg0 in + withUnsafePointer(to: vertexFormat) { pArg1 in + withUnsafePointer(to: srcBuffers.array.content) { pArg2 in + withUnsafePointer(to: offsets.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_vertex_array_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_index_buffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("index_buffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935920523)! + } + + } + + }() + + /// Creates a new index buffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func indexBufferCreate(sizeIndices: UInt32, format: RenderingDevice.IndexBufferFormat, data: PackedByteArray = PackedByteArray(), useRestartIndices: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: sizeIndices) { pArg0 in + withUnsafePointer(to: format.rawValue) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: useRestartIndices) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_index_buffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_index_array_create: GDExtensionMethodBindPtr = { + let methodName = StringName("index_array_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2256026069)! + } + + } + + }() + + /// Creates a new index array. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func indexArrayCreate(indexBuffer: RID, indexOffset: UInt32, indexCount: UInt32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: indexBuffer.content) { pArg0 in + withUnsafePointer(to: indexOffset) { pArg1 in + withUnsafePointer(to: indexCount) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_index_array_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shader_compile_spirv_from_source: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_compile_spirv_from_source") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1178973306)! + } + + } + + }() + + /// Compiles a SPIR-V from the shader source code in `shaderSource` and returns the SPIR-V as a ``RDShaderSPIRV``. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using ``shaderCompileBinaryFromSpirv(spirvData:name:)``. + /// + /// If `allowCache` is `true`, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If `allowCache` is `false`, Godot's shader cache is ignored and the shader will always be recompiled. + /// + public final func shaderCompileSpirvFromSource(shaderSource: RDShaderSource?, allowCache: Bool = true) -> RDShaderSPIRV? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: shaderSource?.handle) { pArg0 in + withUnsafePointer(to: allowCache) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_compile_spirv_from_source, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_shader_compile_binary_from_spirv: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_compile_binary_from_spirv") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 134910450)! + } + + } + + }() + + /// Compiles a binary shader from `spirvData` and returns the compiled binary data as a ``PackedByteArray``. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also ``shaderCompileSpirvFromSource(shaderSource:allowCache:)``. + /// + /// `name` is an optional human-readable name that can be given to the compiled shader for organizational purposes. + /// + public final func shaderCompileBinaryFromSpirv(spirvData: RDShaderSPIRV?, name: String = "") -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: spirvData?.handle) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_compile_binary_from_spirv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shader_create_from_spirv: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_create_from_spirv") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 342949005)! + } + + } + + }() + + /// Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. See also ``shaderCompileSpirvFromSource(shaderSource:allowCache:)`` and ``shaderCreateFromBytecode(binaryData:placeholderRid:)``. + /// + public final func shaderCreateFromSpirv(spirvData: RDShaderSPIRV?, name: String = "") -> RID { + let _result: RID = RID () + withUnsafePointer(to: spirvData?.handle) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_create_from_spirv, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shader_create_from_bytecode: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_create_from_bytecode") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1687031350)! + } + + } + + }() + + /// Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. See also ``shaderCompileBinaryFromSpirv(spirvData:name:)`` and ``shaderCreateFromSpirv(spirvData:name:)``. + /// + public final func shaderCreateFromBytecode(binaryData: PackedByteArray, placeholderRid: RID = RID()) -> RID { + let _result: RID = RID () + withUnsafePointer(to: binaryData.content) { pArg0 in + withUnsafePointer(to: placeholderRid.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_create_from_bytecode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shader_create_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_create_placeholder") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Create a placeholder RID by allocating an RID without initializing it for use in ``shaderCreateFromBytecode(binaryData:placeholderRid:)``. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. + public final func shaderCreatePlaceholder() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_create_placeholder, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shader_get_vertex_input_attribute_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_get_vertex_input_attribute_mask") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3917799429)! + } + + } + + }() + + /// Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. `layout(location = ...)`) of the input variables (specified in GLSL by the `in` keyword). + public final func shaderGetVertexInputAttributeMask(shader: RID) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_shader_get_vertex_input_attribute_mask, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_uniform_buffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("uniform_buffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 34556762)! + } + + } + + }() + + /// Creates a new uniform buffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func uniformBufferCreate(sizeBytes: UInt32, data: PackedByteArray = PackedByteArray()) -> RID { + let _result: RID = RID () + withUnsafePointer(to: sizeBytes) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_uniform_buffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_storage_buffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("storage_buffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2316365934)! + } + + } + + }() + + /// Creates a storage buffer with the specified `data` and `usage`. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func storageBufferCreate(sizeBytes: UInt32, data: PackedByteArray = PackedByteArray(), usage: RenderingDevice.StorageBufferUsage = []) -> RID { + let _result: RID = RID () + withUnsafePointer(to: sizeBytes) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: usage.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_storage_buffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_buffer_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_buffer_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1470338698)! + } + + } + + }() + + /// Creates a new texture buffer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func textureBufferCreate(sizeBytes: UInt32, format: RenderingDevice.DataFormat, data: PackedByteArray = PackedByteArray()) -> RID { + let _result: RID = RID () + withUnsafePointer(to: sizeBytes) { pArg0 in + withUnsafePointer(to: format.rawValue) { pArg1 in + withUnsafePointer(to: data.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_texture_buffer_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_uniform_set_create: GDExtensionMethodBindPtr = { + let methodName = StringName("uniform_set_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2280795797)! + } + + } + + }() + + /// Creates a new uniform set. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func uniformSetCreate(uniforms: ObjectCollection, shader: RID, shaderSet: UInt32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: uniforms.array.content) { pArg0 in + withUnsafePointer(to: shader.content) { pArg1 in + withUnsafePointer(to: shaderSet) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_uniform_set_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_uniform_set_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("uniform_set_is_valid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Checks if the `uniformSet` is valid, i.e. is owned. + public final func uniformSetIsValid(uniformSet: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: uniformSet.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_uniform_set_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_buffer_copy: GDExtensionMethodBindPtr = { + let methodName = StringName("buffer_copy") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 864257779)! + } + + } + + }() + + /// Copies `size` bytes from the `srcBuffer` at `srcOffset` into `dstBuffer` at `dstOffset`. + /// + /// Prints an error if: + /// + /// - `size` exceeds the size of either `srcBuffer` or `dstBuffer` at their corresponding offsets + /// + /// - a draw list is currently active (created by ``drawListBegin(framebuffer:initialColorAction:finalColorAction:initialDepthAction:finalDepthAction:clearColorValues:clearDepth:clearStencil:region:)``) + /// + /// - a compute list is currently active (created by ``computeListBegin()``) + /// + public final func bufferCopy(srcBuffer: RID, dstBuffer: RID, srcOffset: UInt32, dstOffset: UInt32, size: UInt32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: srcBuffer.content) { pArg0 in + withUnsafePointer(to: dstBuffer.content) { pArg1 in + withUnsafePointer(to: srcOffset) { pArg2 in + withUnsafePointer(to: dstOffset) { pArg3 in + withUnsafePointer(to: size) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_buffer_copy, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_buffer_update: GDExtensionMethodBindPtr = { + let methodName = StringName("buffer_update") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3454956949)! + } + + } + + }() + + /// Updates a region of `sizeBytes` bytes, starting at `offset`, in the buffer, with the specified `data`. + /// + /// Prints an error if: + /// + /// - the region specified by `offset` + `sizeBytes` exceeds the buffer + /// + /// - a draw list is currently active (created by ``drawListBegin(framebuffer:initialColorAction:finalColorAction:initialDepthAction:finalDepthAction:clearColorValues:clearDepth:clearStencil:region:)``) + /// + /// - a compute list is currently active (created by ``computeListBegin()``) + /// + public final func bufferUpdate(buffer: RID, offset: UInt32, sizeBytes: UInt32, data: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: sizeBytes) { pArg2 in + withUnsafePointer(to: data.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_buffer_update, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_buffer_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("buffer_clear") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2452320800)! + } + + } + + }() + + /// Clears the contents of the `buffer`, clearing `sizeBytes` bytes, starting at `offset`. + /// + /// Prints an error if: + /// + /// - the size isn't a multiple of four + /// + /// - the region specified by `offset` + `sizeBytes` exceeds the buffer + /// + /// - a draw list is currently active (created by ``drawListBegin(framebuffer:initialColorAction:finalColorAction:initialDepthAction:finalDepthAction:clearColorValues:clearDepth:clearStencil:region:)``) + /// + /// - a compute list is currently active (created by ``computeListBegin()``) + /// + public final func bufferClear(buffer: RID, offset: UInt32, sizeBytes: UInt32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: sizeBytes) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_buffer_clear, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_buffer_get_data: GDExtensionMethodBindPtr = { + let methodName = StringName("buffer_get_data") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3101830688)! + } + + } + + }() + + /// Returns a copy of the data of the specified `buffer`, optionally `offsetBytes` and `sizeBytes` can be set to copy only a portion of the buffer. + public final func bufferGetData(buffer: RID, offsetBytes: UInt32 = 0, sizeBytes: UInt32 = 0) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: offsetBytes) { pArg1 in + withUnsafePointer(to: sizeBytes) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_buffer_get_data, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_render_pipeline_create: GDExtensionMethodBindPtr = { + let methodName = StringName("render_pipeline_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2385451958)! + } + + } + + }() + + /// Creates a new render pipeline. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func renderPipelineCreate(shader: RID, framebufferFormat: Int, vertexFormat: Int, primitive: RenderingDevice.RenderPrimitive, rasterizationState: RDPipelineRasterizationState?, multisampleState: RDPipelineMultisampleState?, stencilState: RDPipelineDepthStencilState?, colorBlendState: RDPipelineColorBlendState?, dynamicStateFlags: RenderingDevice.PipelineDynamicStateFlags = [], forRenderPass: UInt32 = 0, specializationConstants: ObjectCollection) -> RID { + let _result: RID = RID () + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: framebufferFormat) { pArg1 in + withUnsafePointer(to: vertexFormat) { pArg2 in + withUnsafePointer(to: primitive.rawValue) { pArg3 in + withUnsafePointer(to: rasterizationState?.handle) { pArg4 in + withUnsafePointer(to: multisampleState?.handle) { pArg5 in + withUnsafePointer(to: stencilState?.handle) { pArg6 in + withUnsafePointer(to: colorBlendState?.handle) { pArg7 in + withUnsafePointer(to: dynamicStateFlags.rawValue) { pArg8 in + withUnsafePointer(to: forRenderPass) { pArg9 in + withUnsafePointer(to: specializationConstants.array.content) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_render_pipeline_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_render_pipeline_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("render_pipeline_is_valid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if the render pipeline specified by the `renderPipeline` RID is valid, `false` otherwise. + public final func renderPipelineIsValid(renderPipeline: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: renderPipeline.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_render_pipeline_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_compute_pipeline_create: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_pipeline_create") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1448838280)! + } + + } + + }() + + /// Creates a new compute pipeline. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingDevice's ``freeRid(_:)`` method. + /// + public final func computePipelineCreate(shader: RID, specializationConstants: ObjectCollection) -> RID { + let _result: RID = RID () + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: specializationConstants.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_pipeline_create, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_compute_pipeline_is_valid: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_pipeline_is_valid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if the compute pipeline specified by the `computePipeline` RID is valid, `false` otherwise. + public final func computePipelineIsValid(computePipeline: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: computePipeline.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_pipeline_is_valid, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_width: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_width") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named `screen`, this returns the _window_ size. See also ``screenGetHeight(screen:)``. + /// + /// > Note: Only the main ``RenderingDevice`` returned by ``RenderingServer/getRenderingDevice()`` has a width. If called on a local ``RenderingDevice``, this method prints an error and returns ``invalidId``. + /// + public final func screenGetWidth(screen: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_screen_get_width, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_height: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_height") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named `screen`, this returns the _window_ size. See also ``screenGetWidth(screen:)``. + /// + /// > Note: Only the main ``RenderingDevice`` returned by ``RenderingServer/getRenderingDevice()`` has a height. If called on a local ``RenderingDevice``, this method prints an error and returns ``invalidId``. + /// + public final func screenGetHeight(screen: Int32 = 0) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_screen_get_height, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_screen_get_framebuffer_format: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_get_framebuffer_format") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1591665591)! + } + + } + + }() + + /// Returns the framebuffer format of the given screen. + /// + /// > Note: Only the main ``RenderingDevice`` returned by ``RenderingServer/getRenderingDevice()`` has a format. If called on a local ``RenderingDevice``, this method prints an error and returns ``invalidId``. + /// + public final func screenGetFramebufferFormat(screen: Int32 = 0) -> Int { + var _result: Int = 0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_screen_get_framebuffer_format, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_draw_list_begin_for_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_begin_for_screen") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3988079995)! + } + + } + + }() + + /// High-level variant of ``drawListBegin(framebuffer:initialColorAction:finalColorAction:initialDepthAction:finalDepthAction:clearColorValues:clearDepth:clearStencil:region:)``, with the parameters automatically being adjusted for drawing onto the window specified by the `screen` ID. + /// + /// > Note: Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, ``drawListBeginForScreen(_:clearColor:)`` returns ``invalidId``. + /// + public final func drawListBeginForScreen(_ screen: Int32 = 0, clearColor: Color = Color (r: 0, g: 0, b: 0, a: 1)) -> Int { + var _result: Int = 0 + withUnsafePointer(to: screen) { pArg0 in + withUnsafePointer(to: clearColor) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_begin_for_screen, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_list_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_begin") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2686605154)! + } + + } + + }() + + /// Starts a list of raster drawing commands created with the `draw_*` methods. The returned value should be passed to other `draw_list_*` functions. + /// + /// Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using ``drawListEnd()``. + /// + /// A simple drawing operation might look like this (code is not a complete example): + /// + public final func drawListBegin(framebuffer: RID, initialColorAction: RenderingDevice.InitialAction, finalColorAction: RenderingDevice.FinalAction, initialDepthAction: RenderingDevice.InitialAction, finalDepthAction: RenderingDevice.FinalAction, clearColorValues: PackedColorArray = PackedColorArray(), clearDepth: Double = 1.0, clearStencil: UInt32 = 0, region: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0)) -> Int { + var _result: Int = 0 + withUnsafePointer(to: framebuffer.content) { pArg0 in + withUnsafePointer(to: initialColorAction.rawValue) { pArg1 in + withUnsafePointer(to: finalColorAction.rawValue) { pArg2 in + withUnsafePointer(to: initialDepthAction.rawValue) { pArg3 in + withUnsafePointer(to: finalDepthAction.rawValue) { pArg4 in + withUnsafePointer(to: clearColorValues.content) { pArg5 in + withUnsafePointer(to: clearDepth) { pArg6 in + withUnsafePointer(to: clearStencil) { pArg7 in + withUnsafePointer(to: region) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_begin, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_list_begin_split: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_begin_split") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2406300660)! + } + + } + + }() + + /// This method does nothing and always returns an empty ``PackedInt64Array``. + public final func drawListBeginSplit(framebuffer: RID, splits: UInt32, initialColorAction: RenderingDevice.InitialAction, finalColorAction: RenderingDevice.FinalAction, initialDepthAction: RenderingDevice.InitialAction, finalDepthAction: RenderingDevice.FinalAction, clearColorValues: PackedColorArray = PackedColorArray(), clearDepth: Double = 1.0, clearStencil: UInt32 = 0, region: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), storageTextures: VariantCollection = VariantCollection ()) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: framebuffer.content) { pArg0 in + withUnsafePointer(to: splits) { pArg1 in + withUnsafePointer(to: initialColorAction.rawValue) { pArg2 in + withUnsafePointer(to: finalColorAction.rawValue) { pArg3 in + withUnsafePointer(to: initialDepthAction.rawValue) { pArg4 in + withUnsafePointer(to: finalDepthAction.rawValue) { pArg5 in + withUnsafePointer(to: clearColorValues.content) { pArg6 in + withUnsafePointer(to: clearDepth) { pArg7 in + withUnsafePointer(to: clearStencil) { pArg8 in + withUnsafePointer(to: region) { pArg9 in + withUnsafePointer(to: storageTextures.array.content) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_begin_split, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_draw_list_set_blend_constants: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_set_blend_constants") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2878471219)! + } + + } + + }() + + /// Sets blend constants for the specified `drawList` to `color`. Blend constants are used only if the graphics pipeline is created with ``PipelineDynamicStateFlags/blendConstants`` flag set. + public final func drawListSetBlendConstants(drawList: Int, color: Color) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_set_blend_constants, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_bind_render_pipeline: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_bind_render_pipeline") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4040184819)! + } + + } + + }() + + /// Binds `renderPipeline` to the specified `drawList`. + public final func drawListBindRenderPipeline(drawList: Int, renderPipeline: RID) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: renderPipeline.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_bind_render_pipeline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_bind_uniform_set: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_bind_uniform_set") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 749655778)! + } + + } + + }() + + /// Binds `uniformSet` to the specified `drawList`. A `setIndex` must also be specified, which is an identifier starting from `0` that must match the one expected by the draw list. + public final func drawListBindUniformSet(drawList: Int, uniformSet: RID, setIndex: UInt32) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: uniformSet.content) { pArg1 in + withUnsafePointer(to: setIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_bind_uniform_set, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_bind_vertex_array: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_bind_vertex_array") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4040184819)! + } + + } + + }() + + /// Binds `vertexArray` to the specified `drawList`. + public final func drawListBindVertexArray(drawList: Int, vertexArray: RID) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: vertexArray.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_bind_vertex_array, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_bind_index_array: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_bind_index_array") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4040184819)! + } + + } + + }() + + /// Binds `indexArray` to the specified `drawList`. + public final func drawListBindIndexArray(drawList: Int, indexArray: RID) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: indexArray.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_bind_index_array, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_set_push_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_set_push_constant") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2772371345)! + } + + } + + }() + + /// Sets the push constant data to `buffer` for the specified `drawList`. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in `sizeBytes` (this can be obtained by calling the ``PackedByteArray/size()`` method on the passed `buffer`). + public final func drawListSetPushConstant(drawList: Int, buffer: PackedByteArray, sizeBytes: UInt32) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: buffer.content) { pArg1 in + withUnsafePointer(to: sizeBytes) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_set_push_constant, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_draw: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_draw") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4230067973)! + } + + } + + }() + + /// Submits `drawList` for rendering on the GPU. This is the raster equivalent to ``computeListDispatch(computeList:xGroups:yGroups:zGroups:)``. + public final func drawListDraw(drawList: Int, useIndices: Bool, instances: UInt32, proceduralVertexCount: UInt32 = 0) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: useIndices) { pArg1 in + withUnsafePointer(to: instances) { pArg2 in + withUnsafePointer(to: proceduralVertexCount) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_draw, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_enable_scissor: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_enable_scissor") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 244650101)! + } + + } + + }() + + /// Creates a scissor rectangle and enables it for the specified `drawList`. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also ``drawListDisableScissor(drawList:)``. + /// + /// > Note: The specified `rect` is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions. + /// + public final func drawListEnableScissor(drawList: Int, rect: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0)) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_enable_scissor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_list_disable_scissor: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_disable_scissor") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes and disables the scissor rectangle for the specified `drawList`. See also ``drawListEnableScissor(drawList:rect:)``. + public final func drawListDisableScissor(drawList: Int) { + withUnsafePointer(to: drawList) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_disable_scissor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_draw_list_switch_to_next_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_switch_to_next_pass") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Switches to the next draw pass. + public final func drawListSwitchToNextPass() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_switch_to_next_pass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_draw_list_switch_to_next_pass_split: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_switch_to_next_pass_split") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2865087369)! + } + + } + + }() + + /// This method does nothing and always returns an empty ``PackedInt64Array``. + public final func drawListSwitchToNextPassSplit(splits: UInt32) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: splits) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_switch_to_next_pass_split, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_draw_list_end: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_list_end") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Finishes a list of raster drawing commands created with the `draw_*` methods. + public final func drawListEnd() { + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_list_end, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_compute_list_begin: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_begin") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Starts a list of compute commands created with the `compute_*` methods. The returned value should be passed to other `compute_list_*` functions. + /// + /// Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using ``computeListEnd()``. + /// + /// A simple compute operation might look like this (code is not a complete example): + /// + public final func computeListBegin() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_begin, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_compute_list_bind_compute_pipeline: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_bind_compute_pipeline") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4040184819)! + } + + } + + }() + + /// Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside ``computeListDispatch(computeList:xGroups:yGroups:zGroups:)``. + public final func computeListBindComputePipeline(computeList: Int, computePipeline: RID) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: computePipeline.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_bind_compute_pipeline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_compute_list_set_push_constant: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_set_push_constant") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2772371345)! + } + + } + + }() + + /// Sets the push constant data to `buffer` for the specified `computeList`. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in `sizeBytes` (this can be obtained by calling the ``PackedByteArray/size()`` method on the passed `buffer`). + public final func computeListSetPushConstant(computeList: Int, buffer: PackedByteArray, sizeBytes: UInt32) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: buffer.content) { pArg1 in + withUnsafePointer(to: sizeBytes) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_set_push_constant, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compute_list_bind_uniform_set: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_bind_uniform_set") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 749655778)! + } + + } + + }() + + /// Binds the `uniformSet` to this `computeList`. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier. + public final func computeListBindUniformSet(computeList: Int, uniformSet: RID, setIndex: UInt32) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: uniformSet.content) { pArg1 in + withUnsafePointer(to: setIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_bind_uniform_set, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compute_list_dispatch: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_dispatch") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4275841770)! + } + + } + + }() + + /// Submits the compute list for processing on the GPU. This is the compute equivalent to ``drawListDraw(drawList:useIndices:instances:proceduralVertexCount:)``. + public final func computeListDispatch(computeList: Int, xGroups: UInt32, yGroups: UInt32, zGroups: UInt32) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: xGroups) { pArg1 in + withUnsafePointer(to: yGroups) { pArg2 in + withUnsafePointer(to: zGroups) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_dispatch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compute_list_dispatch_indirect: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_dispatch_indirect") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 749655778)! + } + + } + + }() + + /// Submits the compute list for processing on the GPU with the given group counts stored in the `buffer` at `offset`. Buffer must have been created with ``StorageBufferUsage/storageBufferUsageDispatchIndirect`` flag. + public final func computeListDispatchIndirect(computeList: Int, buffer: RID, offset: UInt32) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: buffer.content) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_dispatch_indirect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compute_list_add_barrier: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_add_barrier") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Raises a Vulkan compute barrier in the specified `computeList`. + public final func computeListAddBarrier(computeList: Int) { + withUnsafePointer(to: computeList) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_add_barrier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_compute_list_end: GDExtensionMethodBindPtr = { + let methodName = StringName("compute_list_end") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Finishes a list of compute commands created with the `compute_*` methods. + public final func computeListEnd() { + gi.object_method_bind_ptrcall(RenderingDevice.method_compute_list_end, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly. + public final func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_free_rid, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_capture_timestamp: GDExtensionMethodBindPtr = { + let methodName = StringName("capture_timestamp") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Creates a timestamp marker with the specified `name`. This is used for performance reporting with the ``getCapturedTimestampCpuTime(index:)``, ``getCapturedTimestampGpuTime(index:)`` and ``getCapturedTimestampName(index:)`` methods. + public final func captureTimestamp(name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_capture_timestamp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_captured_timestamps_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_captured_timestamps_count") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of timestamps (rendering steps) available for profiling. + public final func getCapturedTimestampsCount() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RenderingDevice.method_get_captured_timestamps_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_captured_timestamps_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_captured_timestamps_frame") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the index of the last frame rendered that has rendering timestamps available for querying. + public final func getCapturedTimestampsFrame() -> UInt { + var _result: UInt = 0 + gi.object_method_bind_ptrcall(RenderingDevice.method_get_captured_timestamps_frame, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_captured_timestamp_gpu_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_captured_timestamp_gpu_time") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the timestamp in GPU time for the rendering step specified by `index` (in microseconds since the engine started). See also ``getCapturedTimestampCpuTime(index:)`` and ``captureTimestamp(name:)``. + public final func getCapturedTimestampGpuTime(index: UInt32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_get_captured_timestamp_gpu_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_captured_timestamp_cpu_time: GDExtensionMethodBindPtr = { + let methodName = StringName("get_captured_timestamp_cpu_time") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the timestamp in CPU time for the rendering step specified by `index` (in microseconds since the engine started). See also ``getCapturedTimestampGpuTime(index:)`` and ``captureTimestamp(name:)``. + public final func getCapturedTimestampCpuTime(index: UInt32) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_get_captured_timestamp_cpu_time, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_captured_timestamp_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_captured_timestamp_name") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the timestamp's name for the rendering step specified by `index`. See also ``captureTimestamp(name:)``. + public final func getCapturedTimestampName(index: UInt32) -> String { + let _result = GString () + withUnsafePointer(to: index) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_get_captured_timestamp_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_limit_get: GDExtensionMethodBindPtr = { + let methodName = StringName("limit_get") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1559202131)! + } + + } + + }() + + /// Returns the value of the specified `limit`. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur. + /// + /// Limits for various graphics hardware can be found in the Vulkan Hardware Database. + /// + public final func limitGet(limit: RenderingDevice.Limit) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: limit.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_limit_get, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_frame_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_delay") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main ``RenderingDevice``, frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local ``RenderingDevice``s only have 1 frame. + public final func getFrameDelay() -> UInt32 { + var _result: UInt32 = 0 + gi.object_method_bind_ptrcall(RenderingDevice.method_get_frame_delay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_submit: GDExtensionMethodBindPtr = { + let methodName = StringName("submit") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling ``sync()``). + /// + /// > Note: Only available in local RenderingDevices. + /// + public final func submit() { + gi.object_method_bind_ptrcall(RenderingDevice.method_submit, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("sync") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. + /// + /// > Note: Only available in local RenderingDevices. + /// + /// > Note: ``sync()`` can only be called after a ``submit()``. + /// + public final func sync() { + gi.object_method_bind_ptrcall(RenderingDevice.method_sync, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_barrier: GDExtensionMethodBindPtr = { + let methodName = StringName("barrier") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3718155691)! + } + + } + + }() + + /// This method does nothing. + public final func barrier(from: RenderingDevice.BarrierMask = [.vertex, .fragment, .compute, .transfer, .raster, .allBarriers], to: RenderingDevice.BarrierMask = [.vertex, .fragment, .compute, .transfer, .raster, .allBarriers]) { + withUnsafePointer(to: from.rawValue) { pArg0 in + withUnsafePointer(to: to.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_barrier, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_full_barrier: GDExtensionMethodBindPtr = { + let methodName = StringName("full_barrier") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// This method does nothing. + public final func fullBarrier() { + gi.object_method_bind_ptrcall(RenderingDevice.method_full_barrier, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_create_local_device: GDExtensionMethodBindPtr = { + let methodName = StringName("create_local_device") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2846302423)! + } + + } + + }() + + /// Create a new local ``RenderingDevice``. This is most useful for performing compute operations on the GPU independently from the rest of the engine. + public final func createLocalDevice() -> RenderingDevice? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RenderingDevice.method_create_local_device, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_resource_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_resource_name") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2726140452)! + } + + } + + }() + + /// Sets the resource name for `id` to `name`. This is used for debugging with third-party tools such as RenderDoc. + /// + /// The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error. + /// + /// > Note: Resource names are only set when the engine runs in verbose mode (``OS/isStdoutVerbose()`` = `true`), or when using an engine build compiled with the `dev_mode=yes` SCons option. The graphics driver must also support the `VK_EXT_DEBUG_UTILS_EXTENSION_NAME` Vulkan extension for named resources to work. + /// + public final func setResourceName(id: RID, name: String) { + withUnsafePointer(to: id.content) { pArg0 in + let name = GString(name) + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_set_resource_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_command_begin_label: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_command_begin_label") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1636512886)! + } + + } + + }() + + /// Create a command buffer debug label region that can be displayed in third-party tools such as RenderDoc. All regions must be ended with a ``drawCommandEndLabel()`` call. When viewed from the linear series of submissions to a single queue, calls to ``drawCommandBeginLabel(name:color:)`` and ``drawCommandEndLabel()`` must be matched and balanced. + /// + /// The `VK_EXT_DEBUG_UTILS_EXTENSION_NAME` Vulkan extension must be available and enabled for command buffer debug label region to work. See also ``drawCommandEndLabel()``. + /// + public final func drawCommandBeginLabel(name: String, color: Color) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_command_begin_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_command_insert_label: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_command_insert_label") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1636512886)! + } + + } + + }() + + /// This method does nothing. + public final func drawCommandInsertLabel(name: String, color: Color) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_command_insert_label, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_draw_command_end_label: GDExtensionMethodBindPtr = { + let methodName = StringName("draw_command_end_label") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Ends the command buffer debug label region started by a ``drawCommandBeginLabel(name:color:)`` call. + public final func drawCommandEndLabel() { + gi.object_method_bind_ptrcall(RenderingDevice.method_draw_command_end_label, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_device_vendor_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_device_vendor_name") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to ``RenderingServer/getVideoAdapterVendor()``. See also ``getDeviceName()``. + public final func getDeviceVendorName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RenderingDevice.method_get_device_vendor_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_device_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_device_name") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to ``RenderingServer/getVideoAdapterName()``. See also ``getDeviceVendorName()``. + public final func getDeviceName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RenderingDevice.method_get_device_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_device_pipeline_cache_uuid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_device_pipeline_cache_uuid") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache. + public final func getDevicePipelineCacheUuid() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RenderingDevice.method_get_device_pipeline_cache_uuid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_memory_usage: GDExtensionMethodBindPtr = { + let methodName = StringName("get_memory_usage") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 251690689)! + } + + } + + }() + + /// Returns the memory usage in bytes corresponding to the given `type`. When using Vulkan, these statistics are calculated by Vulkan Memory Allocator. + public final func getMemoryUsage(type: RenderingDevice.MemoryType) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: type.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_get_memory_usage, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_driver_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("get_driver_resource") + return withUnsafePointer(to: &RenderingDevice.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501815484)! + } + + } + + }() + + /// Returns the unique identifier of the driver `resource` for the specified `rid`. Some driver resource types ignore the specified `rid` (see ``RenderingDevice/DriverResource`` descriptions). `index` is always ignored but must be specified anyway. + public final func getDriverResource(_ resource: RenderingDevice.DriverResource, rid: RID, index: UInt) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: resource.rawValue) { pArg0 in + withUnsafePointer(to: rid.content) { pArg1 in + withUnsafePointer(to: index) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RenderingDevice.method_get_driver_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RenderingServer.swift b/Sources/SwiftGodot/Generated/Api/RenderingServer.swift new file mode 100644 index 000000000..8686ed8e5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RenderingServer.swift @@ -0,0 +1,17074 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Server for anything visible. +/// +/// The rendering server is the API backend for everything visible. The whole scene system mounts on it to display. The rendering server is completely opaque: the internals are entirely implementation-specific and cannot be accessed. +/// +/// The rendering server can be used to bypass the scene/``Node`` system entirely. This can improve performance in cases where the scene system is the bottleneck, but won't improve performance otherwise (for instance, if the GPU is already fully utilized). +/// +/// Resources are created using the `*_create` functions. These functions return ``RID``s which are not references to the objects themselves, but opaque _pointers_ towards these objects. +/// +/// All objects are drawn to a viewport. You can use the ``Viewport`` attached to the ``SceneTree`` or you can create one yourself with ``viewportCreate()``. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using ``viewportSetScenario(viewport:scenario:)`` or ``viewportAttachCanvas(viewport:canvas:)``. +/// +/// **Scenarios:** In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the rendering server from a running game, the scenario can be accessed from the scene tree from any ``Node3D`` node with ``Node3D/getWorld3d()``. Otherwise, a scenario can be created with ``scenarioCreate()``. +/// +/// Similarly, in 2D, a canvas is needed to draw all canvas items. +/// +/// **3D:** In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using ``instanceSetBase(instance:base:)``. The instance must also be attached to the scenario using ``instanceSetScenario(instance:scenario:)`` in order to be visible. RenderingServer methods that don't have a prefix are usually 3D-specific (but not always). +/// +/// **2D:** In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. 2D-specific RenderingServer methods generally start with `canvas_*`. +/// +/// **Headless mode:** Starting the engine with the `--headless` command line argument disables all rendering and window management functions. Most functions from ``RenderingServer`` will return dummy values in this case. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``framePreDraw`` +/// - ``framePostDraw`` +open class RenderingServer: Object { + /// The shared instance of this class + public static var shared: RenderingServer = { + return withUnsafePointer (to: &RenderingServer.godotClassName.content) { ptr in + RenderingServer (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "RenderingServer" } + public enum TextureLayeredType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Array of 2-dimensional textures (see ``Texture2DArray``). + case textureLayered2dArray = 0 // TEXTURE_LAYERED_2D_ARRAY + /// Cubemap texture (see ``Cubemap``). + case cubemap = 1 // TEXTURE_LAYERED_CUBEMAP + /// Array of cubemap textures (see ``CubemapArray``). + case cubemapArray = 2 // TEXTURE_LAYERED_CUBEMAP_ARRAY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .textureLayered2dArray: return ".textureLayered2dArray" + case .cubemap: return ".cubemap" + case .cubemapArray: return ".cubemapArray" + } + + } + + } + + public enum CubeMapLayer: Int64, CaseIterable, CustomDebugStringConvertible { + /// Left face of a ``Cubemap``. + case left = 0 // CUBEMAP_LAYER_LEFT + /// Right face of a ``Cubemap``. + case right = 1 // CUBEMAP_LAYER_RIGHT + /// Bottom face of a ``Cubemap``. + case bottom = 2 // CUBEMAP_LAYER_BOTTOM + /// Top face of a ``Cubemap``. + case top = 3 // CUBEMAP_LAYER_TOP + /// Front face of a ``Cubemap``. + case front = 4 // CUBEMAP_LAYER_FRONT + /// Back face of a ``Cubemap``. + case back = 5 // CUBEMAP_LAYER_BACK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .left: return ".left" + case .right: return ".right" + case .bottom: return ".bottom" + case .top: return ".top" + case .front: return ".front" + case .back: return ".back" + } + + } + + } + + public enum ShaderMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Shader is a 3D shader. + case spatial = 0 // SHADER_SPATIAL + /// Shader is a 2D shader. + case canvasItem = 1 // SHADER_CANVAS_ITEM + /// Shader is a particle shader (can be used in both 2D and 3D). + case particles = 2 // SHADER_PARTICLES + /// Shader is a 3D sky shader. + case sky = 3 // SHADER_SKY + /// Shader is a 3D fog shader. + case fog = 4 // SHADER_FOG + /// Represents the size of the ``RenderingServer/ShaderMode`` enum. + case max = 5 // SHADER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .spatial: return ".spatial" + case .canvasItem: return ".canvasItem" + case .particles: return ".particles" + case .sky: return ".sky" + case .fog: return ".fog" + case .max: return ".max" + } + + } + + } + + public enum ArrayType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Array is a vertex position array. + case vertex = 0 // ARRAY_VERTEX + /// Array is a normal array. + case normal = 1 // ARRAY_NORMAL + /// Array is a tangent array. + case tangent = 2 // ARRAY_TANGENT + /// Array is a vertex color array. + case color = 3 // ARRAY_COLOR + /// Array is a UV coordinates array. + case texUv = 4 // ARRAY_TEX_UV + /// Array is a UV coordinates array for the second set of UV coordinates. + case texUv2 = 5 // ARRAY_TEX_UV2 + /// Array is a custom data array for the first set of custom data. + case custom0 = 6 // ARRAY_CUSTOM0 + /// Array is a custom data array for the second set of custom data. + case custom1 = 7 // ARRAY_CUSTOM1 + /// Array is a custom data array for the third set of custom data. + case custom2 = 8 // ARRAY_CUSTOM2 + /// Array is a custom data array for the fourth set of custom data. + case custom3 = 9 // ARRAY_CUSTOM3 + /// Array contains bone information. + case bones = 10 // ARRAY_BONES + /// Array is weight information. + case weights = 11 // ARRAY_WEIGHTS + /// Array is an index array. + case index = 12 // ARRAY_INDEX + /// Represents the size of the ``RenderingServer/ArrayType`` enum. + case max = 13 // ARRAY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .vertex: return ".vertex" + case .normal: return ".normal" + case .tangent: return ".tangent" + case .color: return ".color" + case .texUv: return ".texUv" + case .texUv2: return ".texUv2" + case .custom0: return ".custom0" + case .custom1: return ".custom1" + case .custom2: return ".custom2" + case .custom3: return ".custom3" + case .bones: return ".bones" + case .weights: return ".weights" + case .index: return ".index" + case .max: return ".max" + } + + } + + } + + public enum ArrayCustomFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the `[0.0, 1.0]` range. + case rgba8Unorm = 0 // ARRAY_CUSTOM_RGBA8_UNORM + /// Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the `[-1.0, 1.0]` range. + case rgba8Snorm = 1 // ARRAY_CUSTOM_RGBA8_SNORM + /// Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision. + case rgHalf = 2 // ARRAY_CUSTOM_RG_HALF + /// Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision. + case rgbaHalf = 3 // ARRAY_CUSTOM_RGBA_HALF + /// Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision. + case rFloat = 4 // ARRAY_CUSTOM_R_FLOAT + /// Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision. + case rgFloat = 5 // ARRAY_CUSTOM_RG_FLOAT + /// Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision. + case rgbFloat = 6 // ARRAY_CUSTOM_RGB_FLOAT + /// Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision. + case rgbaFloat = 7 // ARRAY_CUSTOM_RGBA_FLOAT + /// Represents the size of the ``RenderingServer/ArrayCustomFormat`` enum. + case max = 8 // ARRAY_CUSTOM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .rgba8Unorm: return ".rgba8Unorm" + case .rgba8Snorm: return ".rgba8Snorm" + case .rgHalf: return ".rgHalf" + case .rgbaHalf: return ".rgbaHalf" + case .rFloat: return ".rFloat" + case .rgFloat: return ".rgFloat" + case .rgbFloat: return ".rgbFloat" + case .rgbaFloat: return ".rgbaFloat" + case .max: return ".max" + } + + } + + } + + public struct ArrayFormat: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Flag used to mark a vertex position array. + public static let formatVertex = ArrayFormat (rawValue: 1) + /// Flag used to mark a normal array. + public static let formatNormal = ArrayFormat (rawValue: 2) + /// Flag used to mark a tangent array. + public static let formatTangent = ArrayFormat (rawValue: 4) + /// Flag used to mark a vertex color array. + public static let formatColor = ArrayFormat (rawValue: 8) + /// Flag used to mark a UV coordinates array. + public static let formatTexUv = ArrayFormat (rawValue: 16) + /// Flag used to mark a UV coordinates array for the second UV coordinates. + public static let formatTexUv2 = ArrayFormat (rawValue: 32) + /// Flag used to mark an array of custom per-vertex data for the first set of custom data. + public static let formatCustom0 = ArrayFormat (rawValue: 64) + /// Flag used to mark an array of custom per-vertex data for the second set of custom data. + public static let formatCustom1 = ArrayFormat (rawValue: 128) + /// Flag used to mark an array of custom per-vertex data for the third set of custom data. + public static let formatCustom2 = ArrayFormat (rawValue: 256) + /// Flag used to mark an array of custom per-vertex data for the fourth set of custom data. + public static let formatCustom3 = ArrayFormat (rawValue: 512) + /// Flag used to mark a bone information array. + public static let formatBones = ArrayFormat (rawValue: 1024) + /// Flag used to mark a weights array. + public static let formatWeights = ArrayFormat (rawValue: 2048) + /// Flag used to mark an index array. + public static let formatIndex = ArrayFormat (rawValue: 4096) + /// + public static let formatBlendShapeMask = ArrayFormat (rawValue: 7) + /// + public static let formatCustomBase = ArrayFormat (rawValue: 13) + /// + public static let formatCustomBits = ArrayFormat (rawValue: 3) + /// + public static let formatCustom0Shift = ArrayFormat (rawValue: 13) + /// + public static let formatCustom1Shift = ArrayFormat (rawValue: 16) + /// + public static let formatCustom2Shift = ArrayFormat (rawValue: 19) + /// + public static let formatCustom3Shift = ArrayFormat (rawValue: 22) + /// + public static let formatCustomMask = ArrayFormat (rawValue: 7) + /// + public static let compressFlagsBase = ArrayFormat (rawValue: 25) + /// Flag used to mark that the array contains 2D vertices. + public static let flagUse2dVertices = ArrayFormat (rawValue: 33554432) + /// + public static let flagUseDynamicUpdate = ArrayFormat (rawValue: 67108864) + /// Flag used to mark that the array uses 8 bone weights instead of 4. + public static let flagUse8BoneWeights = ArrayFormat (rawValue: 134217728) + /// Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information. + public static let flagUsesEmptyVertexArray = ArrayFormat (rawValue: 268435456) + /// Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. + public static let flagCompressAttributes = ArrayFormat (rawValue: 536870912) + /// Flag used to mark the start of the bits used to store the mesh version. + public static let flagFormatVersionBase = ArrayFormat (rawValue: 35) + /// Flag used to shift a mesh format int to bring the version into the lowest digits. + public static let flagFormatVersionShift = ArrayFormat (rawValue: 35) + /// Flag used to record the second iteration of the mesh version flag. The primary difference between this and ``ArrayFormat/flagFormatVersion1`` is that this version supports ``ArrayFormat/flagCompressAttributes`` and in this version vertex positions are de-interleaved from normals and tangents. + public static let flagFormatVersion2 = ArrayFormat (rawValue: 34359738368) + /// Flag used to record the current version that the engine expects. Currently this is the same as ``ArrayFormat/flagFormatVersion2``. + public static let flagFormatCurrentVersion = ArrayFormat (rawValue: 34359738368) + /// Flag used to isolate the bits used for mesh version after using ``ArrayFormat/flagFormatVersionShift`` to shift them into place. + public static let flagFormatVersionMask = ArrayFormat (rawValue: 255) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.formatVertex) { result += "formatVertex, " } + if self.contains (.formatNormal) { result += "formatNormal, " } + if self.contains (.formatTangent) { result += "formatTangent, " } + if self.contains (.formatColor) { result += "formatColor, " } + if self.contains (.formatTexUv) { result += "formatTexUv, " } + if self.contains (.formatTexUv2) { result += "formatTexUv2, " } + if self.contains (.formatCustom0) { result += "formatCustom0, " } + if self.contains (.formatCustom1) { result += "formatCustom1, " } + if self.contains (.formatCustom2) { result += "formatCustom2, " } + if self.contains (.formatCustom3) { result += "formatCustom3, " } + if self.contains (.formatBones) { result += "formatBones, " } + if self.contains (.formatWeights) { result += "formatWeights, " } + if self.contains (.formatIndex) { result += "formatIndex, " } + if self.contains (.formatBlendShapeMask) { result += "formatBlendShapeMask, " } + if self.contains (.formatCustomBase) { result += "formatCustomBase, " } + if self.contains (.formatCustomBits) { result += "formatCustomBits, " } + if self.contains (.formatCustom0Shift) { result += "formatCustom0Shift, " } + if self.contains (.formatCustom1Shift) { result += "formatCustom1Shift, " } + if self.contains (.formatCustom2Shift) { result += "formatCustom2Shift, " } + if self.contains (.formatCustom3Shift) { result += "formatCustom3Shift, " } + if self.contains (.formatCustomMask) { result += "formatCustomMask, " } + if self.contains (.compressFlagsBase) { result += "compressFlagsBase, " } + if self.contains (.flagUse2dVertices) { result += "flagUse2dVertices, " } + if self.contains (.flagUseDynamicUpdate) { result += "flagUseDynamicUpdate, " } + if self.contains (.flagUse8BoneWeights) { result += "flagUse8BoneWeights, " } + if self.contains (.flagUsesEmptyVertexArray) { result += "flagUsesEmptyVertexArray, " } + if self.contains (.flagCompressAttributes) { result += "flagCompressAttributes, " } + if self.contains (.flagFormatVersionBase) { result += "flagFormatVersionBase, " } + if self.contains (.flagFormatVersionShift) { result += "flagFormatVersionShift, " } + if self.contains (.flagFormatVersion2) { result += "flagFormatVersion2, " } + if self.contains (.flagFormatCurrentVersion) { result += "flagFormatCurrentVersion, " } + if self.contains (.flagFormatVersionMask) { result += "flagFormatVersionMask, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + public enum PrimitiveType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Primitive to draw consists of points. + case points = 0 // PRIMITIVE_POINTS + /// Primitive to draw consists of lines. + case lines = 1 // PRIMITIVE_LINES + /// Primitive to draw consists of a line strip from start to end. + case lineStrip = 2 // PRIMITIVE_LINE_STRIP + /// Primitive to draw consists of triangles. + case triangles = 3 // PRIMITIVE_TRIANGLES + /// Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). + case triangleStrip = 4 // PRIMITIVE_TRIANGLE_STRIP + /// Represents the size of the ``RenderingServer/PrimitiveType`` enum. + case max = 5 // PRIMITIVE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .points: return ".points" + case .lines: return ".lines" + case .lineStrip: return ".lineStrip" + case .triangles: return ".triangles" + case .triangleStrip: return ".triangleStrip" + case .max: return ".max" + } + + } + + } + + public enum BlendShapeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Blend shapes are normalized. + case normalized = 0 // BLEND_SHAPE_MODE_NORMALIZED + /// Blend shapes are relative to base weight. + case relative = 1 // BLEND_SHAPE_MODE_RELATIVE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .normalized: return ".normalized" + case .relative: return ".relative" + } + + } + + } + + public enum MultimeshTransformFormat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use ``Transform2D`` to store MultiMesh transform. + case multimeshTransform2d = 0 // MULTIMESH_TRANSFORM_2D + /// Use ``Transform3D`` to store MultiMesh transform. + case multimeshTransform3d = 1 // MULTIMESH_TRANSFORM_3D + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .multimeshTransform2d: return ".multimeshTransform2d" + case .multimeshTransform3d: return ".multimeshTransform3d" + } + + } + + } + + public enum LightProjectorFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. + case nearest = 0 // LIGHT_PROJECTOR_FILTER_NEAREST + /// Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. + case linear = 1 // LIGHT_PROJECTOR_FILTER_LINEAR + /// Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + case nearestMipmaps = 2 // LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS + /// Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + case linearMipmaps = 3 // LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS + /// Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case nearestMipmapsAnisotropic = 4 // LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC + /// Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case linearMipmapsAnisotropic = 5 // LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .linear: return ".linear" + case .nearestMipmaps: return ".nearestMipmaps" + case .linearMipmaps: return ".linearMipmaps" + case .nearestMipmapsAnisotropic: return ".nearestMipmapsAnisotropic" + case .linearMipmapsAnisotropic: return ".linearMipmapsAnisotropic" + } + + } + + } + + public enum LightType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Directional (sun/moon) light (see ``DirectionalLight3D``). + case directional = 0 // LIGHT_DIRECTIONAL + /// Omni light (see ``OmniLight3D``). + case omni = 1 // LIGHT_OMNI + /// Spot light (see ``SpotLight3D``). + case spot = 2 // LIGHT_SPOT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .directional: return ".directional" + case .omni: return ".omni" + case .spot: return ".spot" + } + + } + + } + + public enum LightParam: Int64, CaseIterable, CustomDebugStringConvertible { + /// The light's energy multiplier. + case energy = 0 // LIGHT_PARAM_ENERGY + /// The light's indirect energy multiplier (final indirect energy is ``LightParam/energy`` * ``LightParam/indirectEnergy``). + case indirectEnergy = 1 // LIGHT_PARAM_INDIRECT_ENERGY + /// The light's volumetric fog energy multiplier (final volumetric fog energy is ``LightParam/energy`` * ``LightParam/volumetricFogEnergy``). + case volumetricFogEnergy = 2 // LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY + /// The light's influence on specularity. + case specular = 3 // LIGHT_PARAM_SPECULAR + /// The light's range. + case range = 4 // LIGHT_PARAM_RANGE + /// The size of the light when using spot light or omni light. The angular size of the light when using directional light. + case size = 5 // LIGHT_PARAM_SIZE + /// The light's attenuation. + case attenuation = 6 // LIGHT_PARAM_ATTENUATION + /// The spotlight's angle. + case spotAngle = 7 // LIGHT_PARAM_SPOT_ANGLE + /// The spotlight's attenuation. + case spotAttenuation = 8 // LIGHT_PARAM_SPOT_ATTENUATION + /// The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). + case shadowMaxDistance = 9 // LIGHT_PARAM_SHADOW_MAX_DISTANCE + /// Proportion of shadow atlas occupied by the first split. + case shadowSplit1Offset = 10 // LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET + /// Proportion of shadow atlas occupied by the second split. + case shadowSplit2Offset = 11 // LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET + /// Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. + case shadowSplit3Offset = 12 // LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET + /// Proportion of shadow max distance where the shadow will start to fade out. + case shadowFadeStart = 13 // LIGHT_PARAM_SHADOW_FADE_START + /// Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. + case shadowNormalBias = 14 // LIGHT_PARAM_SHADOW_NORMAL_BIAS + /// Bias the shadow lookup to fix self-shadowing artifacts. + case shadowBias = 15 // LIGHT_PARAM_SHADOW_BIAS + /// Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to `0` turns off the pancaking effect. + case shadowPancakeSize = 16 // LIGHT_PARAM_SHADOW_PANCAKE_SIZE + /// The light's shadow opacity. Values lower than `1.0` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. + case shadowOpacity = 17 // LIGHT_PARAM_SHADOW_OPACITY + /// Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. + case shadowBlur = 18 // LIGHT_PARAM_SHADOW_BLUR + /// + case transmittanceBias = 19 // LIGHT_PARAM_TRANSMITTANCE_BIAS + /// Constant representing the intensity of the light, measured in Lumens when dealing with a ``SpotLight3D`` or ``OmniLight3D``, or measured in Lux with a ``DirectionalLight3D``. Only used when ``ProjectSettings/rendering/lightsAndShadows/usePhysicalLightUnits`` is `true`. + case intensity = 20 // LIGHT_PARAM_INTENSITY + /// Represents the size of the ``RenderingServer/LightParam`` enum. + case max = 21 // LIGHT_PARAM_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .energy: return ".energy" + case .indirectEnergy: return ".indirectEnergy" + case .volumetricFogEnergy: return ".volumetricFogEnergy" + case .specular: return ".specular" + case .range: return ".range" + case .size: return ".size" + case .attenuation: return ".attenuation" + case .spotAngle: return ".spotAngle" + case .spotAttenuation: return ".spotAttenuation" + case .shadowMaxDistance: return ".shadowMaxDistance" + case .shadowSplit1Offset: return ".shadowSplit1Offset" + case .shadowSplit2Offset: return ".shadowSplit2Offset" + case .shadowSplit3Offset: return ".shadowSplit3Offset" + case .shadowFadeStart: return ".shadowFadeStart" + case .shadowNormalBias: return ".shadowNormalBias" + case .shadowBias: return ".shadowBias" + case .shadowPancakeSize: return ".shadowPancakeSize" + case .shadowOpacity: return ".shadowOpacity" + case .shadowBlur: return ".shadowBlur" + case .transmittanceBias: return ".transmittanceBias" + case .intensity: return ".intensity" + case .max: return ".max" + } + + } + + } + + public enum LightBakeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. + case disabled = 0 // LIGHT_BAKE_DISABLED + /// Light is taken into account in static baking (``VoxelGI``, ``LightmapGI``, SDFGI (``Environment/sdfgiEnabled``)). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. + case `static` = 1 // LIGHT_BAKE_STATIC + /// Light is taken into account in dynamic baking (``VoxelGI`` and SDFGI (``Environment/sdfgiEnabled``) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to ``LightBakeMode/`static```. This has a greater performance cost compared to ``LightBakeMode/`static```. When using SDFGI, the update speed of dynamic lights is affected by ``ProjectSettings/rendering/globalIllumination/sdfgi/framesToUpdateLights``. + case dynamic = 2 // LIGHT_BAKE_DYNAMIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`static`: return ".`static`" + case .dynamic: return ".dynamic" + } + + } + + } + + public enum LightOmniShadowMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use a dual paraboloid shadow map for omni lights. + case dualParaboloid = 0 // LIGHT_OMNI_SHADOW_DUAL_PARABOLOID + /// Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. + case cube = 1 // LIGHT_OMNI_SHADOW_CUBE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .dualParaboloid: return ".dualParaboloid" + case .cube: return ".cube" + } + + } + + } + + public enum LightDirectionalShadowMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use orthogonal shadow projection for directional light. + case orthogonal = 0 // LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL + /// Use 2 splits for shadow projection when using directional light. + case parallel2Splits = 1 // LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS + /// Use 4 splits for shadow projection when using directional light. + case parallel4Splits = 2 // LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .orthogonal: return ".orthogonal" + case .parallel2Splits: return ".parallel2Splits" + case .parallel4Splits: return ".parallel4Splits" + } + + } + + } + + public enum LightDirectionalSkyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use DirectionalLight3D in both sky rendering and scene lighting. + case lightAndSky = 0 // LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY + /// Only use DirectionalLight3D in scene lighting. + case lightOnly = 1 // LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY + /// Only use DirectionalLight3D in sky rendering. + case skyOnly = 2 // LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .lightAndSky: return ".lightAndSky" + case .lightOnly: return ".lightOnly" + case .skyOnly: return ".skyOnly" + } + + } + + } + + public enum ShadowQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the ``Light3D/shadowBlur`` property is ignored if ``Light3D/lightSize`` and ``Light3D/lightAngularDistance`` is `0.0`. + /// + /// > Note: The variable shadow blur performed by ``Light3D/lightSize`` and ``Light3D/lightAngularDistance`` is still effective when using hard shadow filtering. In this case, ``Light3D/shadowBlur`` _is_ taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra. + /// + case hard = 0 // SHADOW_QUALITY_HARD + /// Very low shadow filtering quality (faster). When using this quality setting, ``Light3D/shadowBlur`` is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose ``Light3D/lightSize`` or ``Light3D/lightAngularDistance`` is `0.0`). + case softVeryLow = 1 // SHADOW_QUALITY_SOFT_VERY_LOW + /// Low shadow filtering quality (fast). + case softLow = 2 // SHADOW_QUALITY_SOFT_LOW + /// Medium low shadow filtering quality (average). + case softMedium = 3 // SHADOW_QUALITY_SOFT_MEDIUM + /// High low shadow filtering quality (slow). When using this quality setting, ``Light3D/shadowBlur`` is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose ``Light3D/lightSize`` or ``Light3D/lightAngularDistance`` is `0.0`). + case softHigh = 4 // SHADOW_QUALITY_SOFT_HIGH + /// Highest low shadow filtering quality (slowest). When using this quality setting, ``Light3D/shadowBlur`` is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose ``Light3D/lightSize`` or ``Light3D/lightAngularDistance`` is `0.0`). + case softUltra = 5 // SHADOW_QUALITY_SOFT_ULTRA + /// Represents the size of the ``RenderingServer/ShadowQuality`` enum. + case max = 6 // SHADOW_QUALITY_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .hard: return ".hard" + case .softVeryLow: return ".softVeryLow" + case .softLow: return ".softLow" + case .softMedium: return ".softMedium" + case .softHigh: return ".softHigh" + case .softUltra: return ".softUltra" + case .max: return ".max" + } + + } + + } + + public enum ReflectionProbeUpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Reflection probe will update reflections once and then stop. + case once = 0 // REFLECTION_PROBE_UPDATE_ONCE + /// Reflection probe will update each frame. This mode is necessary to capture moving objects. + case always = 1 // REFLECTION_PROBE_UPDATE_ALWAYS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .once: return ".once" + case .always: return ".always" + } + + } + + } + + public enum ReflectionProbeAmbientMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not apply any ambient lighting inside the reflection probe's box defined by its size. + case disabled = 0 // REFLECTION_PROBE_AMBIENT_DISABLED + /// Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size. + case environment = 1 // REFLECTION_PROBE_AMBIENT_ENVIRONMENT + /// Apply custom ambient lighting inside the reflection probe's box defined by its size. See ``reflectionProbeSetAmbientColor(probe:color:)`` and ``reflectionProbeSetAmbientEnergy(probe:energy:)``. + case color = 2 // REFLECTION_PROBE_AMBIENT_COLOR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .environment: return ".environment" + case .color: return ".color" + } + + } + + } + + public enum DecalTexture: Int64, CaseIterable, CustomDebugStringConvertible { + /// Albedo texture slot in a decal (``Decal/textureAlbedo``). + case albedo = 0 // DECAL_TEXTURE_ALBEDO + /// Normal map texture slot in a decal (``Decal/textureNormal``). + case normal = 1 // DECAL_TEXTURE_NORMAL + /// Occlusion/Roughness/Metallic texture slot in a decal (``Decal/textureOrm``). + case orm = 2 // DECAL_TEXTURE_ORM + /// Emission texture slot in a decal (``Decal/textureEmission``). + case emission = 3 // DECAL_TEXTURE_EMISSION + /// Represents the size of the ``RenderingServer/DecalTexture`` enum. + case max = 4 // DECAL_TEXTURE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .albedo: return ".albedo" + case .normal: return ".normal" + case .orm: return ".orm" + case .emission: return ".emission" + case .max: return ".max" + } + + } + + } + + public enum DecalFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. + case nearest = 0 // DECAL_FILTER_NEAREST + /// Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. + case linear = 1 // DECAL_FILTER_LINEAR + /// Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + case nearestMipmaps = 2 // DECAL_FILTER_NEAREST_MIPMAPS + /// Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. + case linearMipmaps = 3 // DECAL_FILTER_LINEAR_MIPMAPS + /// Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case nearestMipmapsAnisotropic = 4 // DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC + /// Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + case linearMipmapsAnisotropic = 5 // DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .nearest: return ".nearest" + case .linear: return ".linear" + case .nearestMipmaps: return ".nearestMipmaps" + case .linearMipmaps: return ".linearMipmaps" + case .nearestMipmapsAnisotropic: return ".nearestMipmapsAnisotropic" + case .linearMipmapsAnisotropic: return ".linearMipmapsAnisotropic" + } + + } + + } + + public enum VoxelGIQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Low ``VoxelGI`` rendering quality using 4 cones. + case low = 0 // VOXEL_GI_QUALITY_LOW + /// High ``VoxelGI`` rendering quality using 6 cones. + case high = 1 // VOXEL_GI_QUALITY_HIGH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .low: return ".low" + case .high: return ".high" + } + + } + + } + + public enum ParticlesMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// 2D particles. + case particlesMode2d = 0 // PARTICLES_MODE_2D + /// 3D particles. + case particlesMode3d = 1 // PARTICLES_MODE_3D + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .particlesMode2d: return ".particlesMode2d" + case .particlesMode3d: return ".particlesMode3d" + } + + } + + } + + public enum ParticlesTransformAlign: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case disabled = 0 // PARTICLES_TRANSFORM_ALIGN_DISABLED + /// + case zBillboard = 1 // PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD + /// + case yToVelocity = 2 // PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY + /// + case zBillboardYToVelocity = 3 // PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .zBillboard: return ".zBillboard" + case .yToVelocity: return ".yToVelocity" + case .zBillboardYToVelocity: return ".zBillboardYToVelocity" + } + + } + + } + + public enum ParticlesDrawOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// Draw particles in the order that they appear in the particles array. + case index = 0 // PARTICLES_DRAW_ORDER_INDEX + /// Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front. + case lifetime = 1 // PARTICLES_DRAW_ORDER_LIFETIME + /// Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front. + case reverseLifetime = 2 // PARTICLES_DRAW_ORDER_REVERSE_LIFETIME + /// Sort particles based on their distance to the camera. + case viewDepth = 3 // PARTICLES_DRAW_ORDER_VIEW_DEPTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .index: return ".index" + case .lifetime: return ".lifetime" + case .reverseLifetime: return ".reverseLifetime" + case .viewDepth: return ".viewDepth" + } + + } + + } + + public enum ParticlesCollisionType: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case sphereAttract = 0 // PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT + /// + case boxAttract = 1 // PARTICLES_COLLISION_TYPE_BOX_ATTRACT + /// + case vectorFieldAttract = 2 // PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT + /// + case sphereCollide = 3 // PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE + /// + case boxCollide = 4 // PARTICLES_COLLISION_TYPE_BOX_COLLIDE + /// + case sdfCollide = 5 // PARTICLES_COLLISION_TYPE_SDF_COLLIDE + /// + case heightfieldCollide = 6 // PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .sphereAttract: return ".sphereAttract" + case .boxAttract: return ".boxAttract" + case .vectorFieldAttract: return ".vectorFieldAttract" + case .sphereCollide: return ".sphereCollide" + case .boxCollide: return ".boxCollide" + case .sdfCollide: return ".sdfCollide" + case .heightfieldCollide: return ".heightfieldCollide" + } + + } + + } + + public enum ParticlesCollisionHeightfieldResolution: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case particlesCollisionHeightfieldResolution256 = 0 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256 + /// + case particlesCollisionHeightfieldResolution512 = 1 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512 + /// + case particlesCollisionHeightfieldResolution1024 = 2 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024 + /// + case particlesCollisionHeightfieldResolution2048 = 3 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048 + /// + case particlesCollisionHeightfieldResolution4096 = 4 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096 + /// + case particlesCollisionHeightfieldResolution8192 = 5 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192 + /// Represents the size of the ``RenderingServer/ParticlesCollisionHeightfieldResolution`` enum. + case max = 6 // PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .particlesCollisionHeightfieldResolution256: return ".particlesCollisionHeightfieldResolution256" + case .particlesCollisionHeightfieldResolution512: return ".particlesCollisionHeightfieldResolution512" + case .particlesCollisionHeightfieldResolution1024: return ".particlesCollisionHeightfieldResolution1024" + case .particlesCollisionHeightfieldResolution2048: return ".particlesCollisionHeightfieldResolution2048" + case .particlesCollisionHeightfieldResolution4096: return ".particlesCollisionHeightfieldResolution4096" + case .particlesCollisionHeightfieldResolution8192: return ".particlesCollisionHeightfieldResolution8192" + case .max: return ".max" + } + + } + + } + + public enum FogVolumeShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// ``FogVolume`` will be shaped like an ellipsoid (stretched sphere). + case ellipsoid = 0 // FOG_VOLUME_SHAPE_ELLIPSOID + /// ``FogVolume`` will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the size. The cone will be adjusted to fit within the size. Rotate the ``FogVolume`` node to reorient the cone. Non-uniform scaling via size is not supported (scale the ``FogVolume`` node instead). + case cone = 1 // FOG_VOLUME_SHAPE_CONE + /// ``FogVolume`` will be shaped like an upright cylinder (in local coordinates). Rotate the ``FogVolume`` node to reorient the cylinder. The cylinder will be adjusted to fit within the size. Non-uniform scaling via size is not supported (scale the ``FogVolume`` node instead). + case cylinder = 2 // FOG_VOLUME_SHAPE_CYLINDER + /// ``FogVolume`` will be shaped like a box. + case box = 3 // FOG_VOLUME_SHAPE_BOX + /// ``FogVolume`` will have no shape, will cover the whole world and will not be culled. + case world = 4 // FOG_VOLUME_SHAPE_WORLD + /// Represents the size of the ``RenderingServer/FogVolumeShape`` enum. + case max = 5 // FOG_VOLUME_SHAPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ellipsoid: return ".ellipsoid" + case .cone: return ".cone" + case .cylinder: return ".cylinder" + case .box: return ".box" + case .world: return ".world" + case .max: return ".max" + } + + } + + } + + public enum ViewportScaling3DMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using ``Viewport/scaling3dScale``. Values less than `1.0` will result in undersampling while values greater than `1.0` will result in supersampling. A value of `1.0` disables scaling. + case bilinear = 0 // VIEWPORT_SCALING_3D_MODE_BILINEAR + /// Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using ``Viewport/scaling3dScale``. Values less than `1.0` will be result in the viewport being upscaled using FSR. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling. + case fsr = 1 // VIEWPORT_SCALING_3D_MODE_FSR + /// Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using ``Viewport/scaling3dScale``. Values less than `1.0` will be result in the viewport being upscaled using FSR2. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use FSR2 at native resolution as a TAA solution. + case fsr2 = 2 // VIEWPORT_SCALING_3D_MODE_FSR2 + /// Represents the size of the ``RenderingServer/ViewportScaling3DMode`` enum. + case max = 3 // VIEWPORT_SCALING_3D_MODE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bilinear: return ".bilinear" + case .fsr: return ".fsr" + case .fsr2: return ".fsr2" + case .max: return ".max" + } + + } + + } + + public enum ViewportUpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not update the viewport's render target. + case disabled = 0 // VIEWPORT_UPDATE_DISABLED + /// Update the viewport's render target once, then switch to ``ViewportUpdateMode/disabled``. + case once = 1 // VIEWPORT_UPDATE_ONCE + /// Update the viewport's render target only when it is visible. This is the default value. + case whenVisible = 2 // VIEWPORT_UPDATE_WHEN_VISIBLE + /// Update the viewport's render target only when its parent is visible. + case whenParentVisible = 3 // VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE + /// Always update the viewport's render target. + case always = 4 // VIEWPORT_UPDATE_ALWAYS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .once: return ".once" + case .whenVisible: return ".whenVisible" + case .whenParentVisible: return ".whenParentVisible" + case .always: return ".always" + } + + } + + } + + public enum ViewportClearMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Always clear the viewport's render target before drawing. + case always = 0 // VIEWPORT_CLEAR_ALWAYS + /// Never clear the viewport's render target. + case never = 1 // VIEWPORT_CLEAR_NEVER + /// Clear the viewport's render target on the next frame, then switch to ``ViewportClearMode/never``. + case onlyNextFrame = 2 // VIEWPORT_CLEAR_ONLY_NEXT_FRAME + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .always: return ".always" + case .never: return ".never" + case .onlyNextFrame: return ".onlyNextFrame" + } + + } + + } + + public enum ViewportEnvironmentMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disable rendering of 3D environment over 2D canvas. + case disabled = 0 // VIEWPORT_ENVIRONMENT_DISABLED + /// Enable rendering of 3D environment over 2D canvas. + case enabled = 1 // VIEWPORT_ENVIRONMENT_ENABLED + /// Inherit enable/disable value from parent. If the topmost parent is also set to ``ViewportEnvironmentMode/inherit``, then this has the same behavior as ``ViewportEnvironmentMode/enabled``. + case inherit = 2 // VIEWPORT_ENVIRONMENT_INHERIT + /// Represents the size of the ``RenderingServer/ViewportEnvironmentMode`` enum. + case max = 3 // VIEWPORT_ENVIRONMENT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .inherit: return ".inherit" + case .max: return ".max" + } + + } + + } + + public enum ViewportSDFOversize: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and ``GPUParticles3D`` collision may stop working earlier than intended. This has the lowest GPU requirements. + case viewportSdfOversize100Percent = 0 // VIEWPORT_SDF_OVERSIZE_100_PERCENT + /// 2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). + case viewportSdfOversize120Percent = 1 // VIEWPORT_SDF_OVERSIZE_120_PERCENT + /// 2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left). + case viewportSdfOversize150Percent = 2 // VIEWPORT_SDF_OVERSIZE_150_PERCENT + /// 2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements. + case viewportSdfOversize200Percent = 3 // VIEWPORT_SDF_OVERSIZE_200_PERCENT + /// Represents the size of the ``RenderingServer/ViewportSDFOversize`` enum. + case max = 4 // VIEWPORT_SDF_OVERSIZE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .viewportSdfOversize100Percent: return ".viewportSdfOversize100Percent" + case .viewportSdfOversize120Percent: return ".viewportSdfOversize120Percent" + case .viewportSdfOversize150Percent: return ".viewportSdfOversize150Percent" + case .viewportSdfOversize200Percent: return ".viewportSdfOversize200Percent" + case .max: return ".max" + } + + } + + } + + public enum ViewportSDFScale: Int64, CaseIterable, CustomDebugStringConvertible { + /// Full resolution 2D signed distance field scale. This has the highest GPU requirements. + case viewportSdfScale100Percent = 0 // VIEWPORT_SDF_SCALE_100_PERCENT + /// Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count). + case viewportSdfScale50Percent = 1 // VIEWPORT_SDF_SCALE_50_PERCENT + /// Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements. + case viewportSdfScale25Percent = 2 // VIEWPORT_SDF_SCALE_25_PERCENT + /// Represents the size of the ``RenderingServer/ViewportSDFScale`` enum. + case max = 3 // VIEWPORT_SDF_SCALE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .viewportSdfScale100Percent: return ".viewportSdfScale100Percent" + case .viewportSdfScale50Percent: return ".viewportSdfScale50Percent" + case .viewportSdfScale25Percent: return ".viewportSdfScale25Percent" + case .max: return ".max" + } + + } + + } + + public enum ViewportMSAA: Int64, CaseIterable, CustomDebugStringConvertible { + /// Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting. + case disabled = 0 // VIEWPORT_MSAA_DISABLED + /// Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance. + case viewportMsaa2x = 1 // VIEWPORT_MSAA_2X + /// Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance. + case viewportMsaa4x = 2 // VIEWPORT_MSAA_4X + /// Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware. + case viewportMsaa8x = 3 // VIEWPORT_MSAA_8X + /// Represents the size of the ``RenderingServer/ViewportMSAA`` enum. + case max = 4 // VIEWPORT_MSAA_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .viewportMsaa2x: return ".viewportMsaa2x" + case .viewportMsaa4x: return ".viewportMsaa4x" + case .viewportMsaa8x: return ".viewportMsaa8x" + case .max: return ".max" + } + + } + + } + + public enum ViewportScreenSpaceAA: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not perform any antialiasing in the full screen post-process. + case disabled = 0 // VIEWPORT_SCREEN_SPACE_AA_DISABLED + /// Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. + case fxaa = 1 // VIEWPORT_SCREEN_SPACE_AA_FXAA + /// Represents the size of the ``RenderingServer/ViewportScreenSpaceAA`` enum. + case max = 2 // VIEWPORT_SCREEN_SPACE_AA_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .fxaa: return ".fxaa" + case .max: return ".max" + } + + } + + } + + public enum ViewportOcclusionCullingBuildQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling. + case low = 0 // VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW + /// Medium occlusion culling BVH build quality (as defined by Embree). + case medium = 1 // VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM + /// High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling. + case high = 2 // VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + } + + } + + } + + public enum ViewportRenderInfo: Int64, CaseIterable, CustomDebugStringConvertible { + /// Number of objects drawn in a single frame. + case objectsInFrame = 0 // VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME + /// Number of points, lines, or triangles drawn in a single frame. + case primitivesInFrame = 1 // VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME + /// Number of draw calls during this frame. + case drawCallsInFrame = 2 // VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME + /// Represents the size of the ``RenderingServer/ViewportRenderInfo`` enum. + case max = 3 // VIEWPORT_RENDER_INFO_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .objectsInFrame: return ".objectsInFrame" + case .primitivesInFrame: return ".primitivesInFrame" + case .drawCallsInFrame: return ".drawCallsInFrame" + case .max: return ".max" + } + + } + + } + + public enum ViewportRenderInfoType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Visible render pass (excluding shadows). + case visible = 0 // VIEWPORT_RENDER_INFO_TYPE_VISIBLE + /// Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. + case shadow = 1 // VIEWPORT_RENDER_INFO_TYPE_SHADOW + /// Canvas item rendering. This includes all 2D rendering. + case canvas = 2 // VIEWPORT_RENDER_INFO_TYPE_CANVAS + /// Represents the size of the ``RenderingServer/ViewportRenderInfoType`` enum. + case max = 3 // VIEWPORT_RENDER_INFO_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .visible: return ".visible" + case .shadow: return ".shadow" + case .canvas: return ".canvas" + case .max: return ".max" + } + + } + + } + + public enum ViewportDebugDraw: Int64, CaseIterable, CustomDebugStringConvertible { + /// Debug draw is disabled. Default setting. + case disabled = 0 // VIEWPORT_DEBUG_DRAW_DISABLED + /// Objects are displayed without light information. + case unshaded = 1 // VIEWPORT_DEBUG_DRAW_UNSHADED + /// Objects are displayed with only light information. + case lighting = 2 // VIEWPORT_DEBUG_DRAW_LIGHTING + /// Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others. + /// + /// > Note: When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore. + /// + case overdraw = 3 // VIEWPORT_DEBUG_DRAW_OVERDRAW + /// Debug draw draws objects in wireframe. + case wireframe = 4 // VIEWPORT_DEBUG_DRAW_WIREFRAME + /// Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects. + case normalBuffer = 5 // VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER + /// Objects are displayed with only the albedo value from ``VoxelGI``s. + case voxelGiAlbedo = 6 // VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO + /// Objects are displayed with only the lighting value from ``VoxelGI``s. + case voxelGiLighting = 7 // VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING + /// Objects are displayed with only the emission color from ``VoxelGI``s. + case voxelGiEmission = 8 // VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION + /// Draws the shadow atlas that stores shadows from ``OmniLight3D``s and ``SpotLight3D``s in the upper left quadrant of the ``Viewport``. + case shadowAtlas = 9 // VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS + /// Draws the shadow atlas that stores shadows from ``DirectionalLight3D``s in the upper left quadrant of the ``Viewport``. + /// + /// The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for ``ViewportDebugDraw/pssmSplits``. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices. + /// + /// The last cascade shows all frustum slices to illustrate the coverage of all slices. + /// + case directionalShadowAtlas = 10 // VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS + /// Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure. + case sceneLuminance = 11 // VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE + /// Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have ``Environment/ssaoEnabled`` set in your ``WorldEnvironment``. + case ssao = 12 // VIEWPORT_DEBUG_DRAW_SSAO + /// Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have ``Environment/ssilEnabled`` set in your ``WorldEnvironment``. + case ssil = 13 // VIEWPORT_DEBUG_DRAW_SSIL + /// Colors each PSSM split for the ``DirectionalLight3D``s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. + case pssmSplits = 14 // VIEWPORT_DEBUG_DRAW_PSSM_SPLITS + /// Draws the decal atlas that stores decal textures from ``Decal``s. + case decalAtlas = 15 // VIEWPORT_DEBUG_DRAW_DECAL_ATLAS + /// Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections. + case sdfgi = 16 // VIEWPORT_DEBUG_DRAW_SDFGI + /// Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene. + case sdfgiProbes = 17 // VIEWPORT_DEBUG_DRAW_SDFGI_PROBES + /// Draws the global illumination buffer (``VoxelGI`` or SDFGI). + case giBuffer = 18 // VIEWPORT_DEBUG_DRAW_GI_BUFFER + /// Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance. + case disableLod = 19 // VIEWPORT_DEBUG_DRAW_DISABLE_LOD + /// Draws the ``OmniLight3D`` cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. + case clusterOmniLights = 20 // VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS + /// Draws the ``SpotLight3D`` cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. + case clusterSpotLights = 21 // VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS + /// Draws the ``Decal`` cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals. + case clusterDecals = 22 // VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS + /// Draws the ``ReflectionProbe`` cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes. + case clusterReflectionProbes = 23 // VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES + /// Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects. + case occluders = 24 // VIEWPORT_DEBUG_DRAW_OCCLUDERS + /// Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay. + case motionVectors = 25 // VIEWPORT_DEBUG_DRAW_MOTION_VECTORS + /// Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects. + case internalBuffer = 26 // VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .unshaded: return ".unshaded" + case .lighting: return ".lighting" + case .overdraw: return ".overdraw" + case .wireframe: return ".wireframe" + case .normalBuffer: return ".normalBuffer" + case .voxelGiAlbedo: return ".voxelGiAlbedo" + case .voxelGiLighting: return ".voxelGiLighting" + case .voxelGiEmission: return ".voxelGiEmission" + case .shadowAtlas: return ".shadowAtlas" + case .directionalShadowAtlas: return ".directionalShadowAtlas" + case .sceneLuminance: return ".sceneLuminance" + case .ssao: return ".ssao" + case .ssil: return ".ssil" + case .pssmSplits: return ".pssmSplits" + case .decalAtlas: return ".decalAtlas" + case .sdfgi: return ".sdfgi" + case .sdfgiProbes: return ".sdfgiProbes" + case .giBuffer: return ".giBuffer" + case .disableLod: return ".disableLod" + case .clusterOmniLights: return ".clusterOmniLights" + case .clusterSpotLights: return ".clusterSpotLights" + case .clusterDecals: return ".clusterDecals" + case .clusterReflectionProbes: return ".clusterReflectionProbes" + case .occluders: return ".occluders" + case .motionVectors: return ".motionVectors" + case .internalBuffer: return ".internalBuffer" + } + + } + + } + + public enum ViewportVRSMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Variable rate shading is disabled. + case disabled = 0 // VIEWPORT_VRS_DISABLED + /// Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. + case texture = 1 // VIEWPORT_VRS_TEXTURE + /// Variable rate shading texture is supplied by the primary ``XRInterface``. Note that this may override the update mode. + case xr = 2 // VIEWPORT_VRS_XR + /// Represents the size of the ``RenderingServer/ViewportVRSMode`` enum. + case max = 3 // VIEWPORT_VRS_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .texture: return ".texture" + case .xr: return ".xr" + case .max: return ".max" + } + + } + + } + + public enum ViewportVRSUpdateMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The input texture for variable rate shading will not be processed. + case disabled = 0 // VIEWPORT_VRS_UPDATE_DISABLED + /// The input texture for variable rate shading will be processed once. + case once = 1 // VIEWPORT_VRS_UPDATE_ONCE + /// The input texture for variable rate shading will be processed each frame. + case always = 2 // VIEWPORT_VRS_UPDATE_ALWAYS + /// Represents the size of the ``RenderingServer/ViewportVRSUpdateMode`` enum. + case max = 3 // VIEWPORT_VRS_UPDATE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .once: return ".once" + case .always: return ".always" + case .max: return ".max" + } + + } + + } + + public enum SkyMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Automatically selects the appropriate process mode based on your sky shader. If your shader uses `TIME` or `POSITION`, this will use ``SkyMode/realtime``. If your shader uses any of the `LIGHT_*` variables or any custom uniforms, this uses ``SkyMode/incremental``. Otherwise, this defaults to ``SkyMode/quality``. + case automatic = 0 // SKY_MODE_AUTOMATIC + /// Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than ``SkyMode/realtime`` but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing ``ProjectSettings/rendering/reflections/skyReflections/ggxSamples``. + case quality = 1 // SKY_MODE_QUALITY + /// Uses the same high quality importance sampling to process the radiance map as ``SkyMode/quality``, but updates over several frames. The number of frames is determined by ``ProjectSettings/rendering/reflections/skyReflections/roughnessLayers``. Use this when you need highest quality radiance maps, but have a sky that updates slowly. + case incremental = 2 // SKY_MODE_INCREMENTAL + /// Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on ``ProjectSettings/rendering/reflections/skyReflections/fastFilterHighQuality``. + /// + /// > Note: The fast filtering algorithm is limited to 256×256 cubemaps, so ``skySetRadianceSize(sky:radianceSize:)`` must be set to `256`. Otherwise, a warning is printed and the overridden radiance size is ignored. + /// + case realtime = 3 // SKY_MODE_REALTIME + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .automatic: return ".automatic" + case .quality: return ".quality" + case .incremental: return ".incremental" + case .realtime: return ".realtime" + } + + } + + } + + public enum CompositorEffectFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// The rendering effect requires the color buffer to be resolved if MSAA is enabled. + case accessResolvedColor = 1 // COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR + /// The rendering effect requires the depth buffer to be resolved if MSAA is enabled. + case accessResolvedDepth = 2 // COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH + /// The rendering effect requires motion vectors to be produced. + case needsMotionVectors = 4 // COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS + /// The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only). + case needsRoughness = 8 // COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS + /// The rendering effect requires specular data to be separated out (Forward+ only). + case needsSeparateSpecular = 16 // COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .accessResolvedColor: return ".accessResolvedColor" + case .accessResolvedDepth: return ".accessResolvedDepth" + case .needsMotionVectors: return ".needsMotionVectors" + case .needsRoughness: return ".needsRoughness" + case .needsSeparateSpecular: return ".needsSeparateSpecular" + } + + } + + } + + public enum CompositorEffectCallbackType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The callback is called before our opaque rendering pass, but after depth prepass (if applicable). + case preOpaque = 0 // COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE + /// The callback is called after our opaque rendering pass, but before our sky is rendered. + case postOpaque = 1 // COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE + /// The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). + case postSky = 2 // COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY + /// The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. + case preTransparent = 3 // COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT + /// The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. + case postTransparent = 4 // COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT + /// + case any = -1 // COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .preOpaque: return ".preOpaque" + case .postOpaque: return ".postOpaque" + case .postSky: return ".postSky" + case .preTransparent: return ".preTransparent" + case .postTransparent: return ".postTransparent" + case .any: return ".any" + } + + } + + } + + public enum EnvironmentBG: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use the clear color as background. + case clearColor = 0 // ENV_BG_CLEAR_COLOR + /// Use a specified color as the background. + case color = 1 // ENV_BG_COLOR + /// Use a sky resource for the background. + case sky = 2 // ENV_BG_SKY + /// Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. + case canvas = 3 // ENV_BG_CANVAS + /// Do not clear the background, use whatever was rendered last frame as the background. + case keep = 4 // ENV_BG_KEEP + /// Displays a camera feed in the background. + case cameraFeed = 5 // ENV_BG_CAMERA_FEED + /// Represents the size of the ``RenderingServer/EnvironmentBG`` enum. + case max = 6 // ENV_BG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .clearColor: return ".clearColor" + case .color: return ".color" + case .sky: return ".sky" + case .canvas: return ".canvas" + case .keep: return ".keep" + case .cameraFeed: return ".cameraFeed" + case .max: return ".max" + } + + } + + } + + public enum EnvironmentAmbientSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Gather ambient light from whichever source is specified as the background. + case bg = 0 // ENV_AMBIENT_SOURCE_BG + /// Disable ambient light. + case disabled = 1 // ENV_AMBIENT_SOURCE_DISABLED + /// Specify a specific ``Color`` for ambient light. + case color = 2 // ENV_AMBIENT_SOURCE_COLOR + /// Gather ambient light from the ``Sky`` regardless of what the background is. + case sky = 3 // ENV_AMBIENT_SOURCE_SKY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bg: return ".bg" + case .disabled: return ".disabled" + case .color: return ".color" + case .sky: return ".sky" + } + + } + + } + + public enum EnvironmentReflectionSource: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use the background for reflections. + case bg = 0 // ENV_REFLECTION_SOURCE_BG + /// Disable reflections. + case disabled = 1 // ENV_REFLECTION_SOURCE_DISABLED + /// Use the ``Sky`` for reflections regardless of what the background is. + case sky = 2 // ENV_REFLECTION_SOURCE_SKY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bg: return ".bg" + case .disabled: return ".disabled" + case .sky: return ".sky" + } + + } + + } + + public enum EnvironmentGlowBlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. + case additive = 0 // ENV_GLOW_BLEND_MODE_ADDITIVE + /// Screen glow blending mode. Increases brightness, used frequently with bloom. + case screen = 1 // ENV_GLOW_BLEND_MODE_SCREEN + /// Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). + case softlight = 2 // ENV_GLOW_BLEND_MODE_SOFTLIGHT + /// Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. + case replace = 3 // ENV_GLOW_BLEND_MODE_REPLACE + /// Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. + case mix = 4 // ENV_GLOW_BLEND_MODE_MIX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .additive: return ".additive" + case .screen: return ".screen" + case .softlight: return ".softlight" + case .replace: return ".replace" + case .mix: return ".mix" + } + + } + + } + + public enum EnvironmentFogMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use a physically-based fog model defined primarily by fog density. + case exponential = 0 // ENV_FOG_MODE_EXPONENTIAL + /// Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. + case depth = 1 // ENV_FOG_MODE_DEPTH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .exponential: return ".exponential" + case .depth: return ".depth" + } + + } + + } + + public enum EnvironmentToneMapper: Int64, CaseIterable, CustomDebugStringConvertible { + /// Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. + case linear = 0 // ENV_TONE_MAPPER_LINEAR + /// Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: `color = color / (1 + color)`. This avoids clipping bright highlights, but the resulting image can look a bit dull. + case reinhard = 1 // ENV_TONE_MAPPER_REINHARD + /// Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than ``EnvironmentToneMapper/reinhard``. + case filmic = 2 // ENV_TONE_MAPPER_FILMIC + /// Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to ``EnvironmentToneMapper/reinhard`` and ``EnvironmentToneMapper/filmic``. + /// + /// > Note: This tonemapping operator is called "ACES Fitted" in Godot 3.x. + /// + case aces = 3 // ENV_TONE_MAPPER_ACES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .linear: return ".linear" + case .reinhard: return ".reinhard" + case .filmic: return ".filmic" + case .aces: return ".aces" + } + + } + + } + + public enum EnvironmentSSRRoughnessQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. + case disabled = 0 // ENV_SSR_ROUGHNESS_QUALITY_DISABLED + /// Low quality of roughness filter for screen-space reflections. + case low = 1 // ENV_SSR_ROUGHNESS_QUALITY_LOW + /// Medium quality of roughness filter for screen-space reflections. + case medium = 2 // ENV_SSR_ROUGHNESS_QUALITY_MEDIUM + /// High quality of roughness filter for screen-space reflections. This is the slowest option. + case high = 3 // ENV_SSR_ROUGHNESS_QUALITY_HIGH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + } + + } + + } + + public enum EnvironmentSSAOQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lowest quality of screen-space ambient occlusion. + case veryLow = 0 // ENV_SSAO_QUALITY_VERY_LOW + /// Low quality screen-space ambient occlusion. + case low = 1 // ENV_SSAO_QUALITY_LOW + /// Medium quality screen-space ambient occlusion. + case medium = 2 // ENV_SSAO_QUALITY_MEDIUM + /// High quality screen-space ambient occlusion. + case high = 3 // ENV_SSAO_QUALITY_HIGH + /// Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. + case ultra = 4 // ENV_SSAO_QUALITY_ULTRA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .veryLow: return ".veryLow" + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + case .ultra: return ".ultra" + } + + } + + } + + public enum EnvironmentSSILQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lowest quality of screen-space indirect lighting. + case veryLow = 0 // ENV_SSIL_QUALITY_VERY_LOW + /// Low quality screen-space indirect lighting. + case low = 1 // ENV_SSIL_QUALITY_LOW + /// High quality screen-space indirect lighting. + case medium = 2 // ENV_SSIL_QUALITY_MEDIUM + /// High quality screen-space indirect lighting. + case high = 3 // ENV_SSIL_QUALITY_HIGH + /// Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. + case ultra = 4 // ENV_SSIL_QUALITY_ULTRA + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .veryLow: return ".veryLow" + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + case .ultra: return ".ultra" + } + + } + + } + + public enum EnvironmentSDFGIYScale: Int64, CaseIterable, CustomDebugStringConvertible { + /// Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. + case envSdfgiYScale50Percent = 0 // ENV_SDFGI_Y_SCALE_50_PERCENT + /// Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. + case envSdfgiYScale75Percent = 1 // ENV_SDFGI_Y_SCALE_75_PERCENT + /// Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. + case envSdfgiYScale100Percent = 2 // ENV_SDFGI_Y_SCALE_100_PERCENT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .envSdfgiYScale50Percent: return ".envSdfgiYScale50Percent" + case .envSdfgiYScale75Percent: return ".envSdfgiYScale75Percent" + case .envSdfgiYScale100Percent: return ".envSdfgiYScale100Percent" + } + + } + + } + + public enum EnvironmentSDFGIRayCount: Int64, CaseIterable, CustomDebugStringConvertible { + /// Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result. + case envSdfgiRayCount4 = 0 // ENV_SDFGI_RAY_COUNT_4 + /// Throw 8 rays per frame when converging SDFGI. + case envSdfgiRayCount8 = 1 // ENV_SDFGI_RAY_COUNT_8 + /// Throw 16 rays per frame when converging SDFGI. + case envSdfgiRayCount16 = 2 // ENV_SDFGI_RAY_COUNT_16 + /// Throw 32 rays per frame when converging SDFGI. + case envSdfgiRayCount32 = 3 // ENV_SDFGI_RAY_COUNT_32 + /// Throw 64 rays per frame when converging SDFGI. + case envSdfgiRayCount64 = 4 // ENV_SDFGI_RAY_COUNT_64 + /// Throw 96 rays per frame when converging SDFGI. This has high GPU requirements. + case envSdfgiRayCount96 = 5 // ENV_SDFGI_RAY_COUNT_96 + /// Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result. + case envSdfgiRayCount128 = 6 // ENV_SDFGI_RAY_COUNT_128 + /// Represents the size of the ``RenderingServer/EnvironmentSDFGIRayCount`` enum. + case max = 7 // ENV_SDFGI_RAY_COUNT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .envSdfgiRayCount4: return ".envSdfgiRayCount4" + case .envSdfgiRayCount8: return ".envSdfgiRayCount8" + case .envSdfgiRayCount16: return ".envSdfgiRayCount16" + case .envSdfgiRayCount32: return ".envSdfgiRayCount32" + case .envSdfgiRayCount64: return ".envSdfgiRayCount64" + case .envSdfgiRayCount96: return ".envSdfgiRayCount96" + case .envSdfgiRayCount128: return ".envSdfgiRayCount128" + case .max: return ".max" + } + + } + + } + + public enum EnvironmentSDFGIFramesToConverge: Int64, CaseIterable, CustomDebugStringConvertible { + /// Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count. + case in5Frames = 0 // ENV_SDFGI_CONVERGE_IN_5_FRAMES + /// Configure SDFGI to fully converge over 10 frames. + case in10Frames = 1 // ENV_SDFGI_CONVERGE_IN_10_FRAMES + /// Configure SDFGI to fully converge over 15 frames. + case in15Frames = 2 // ENV_SDFGI_CONVERGE_IN_15_FRAMES + /// Configure SDFGI to fully converge over 20 frames. + case in20Frames = 3 // ENV_SDFGI_CONVERGE_IN_20_FRAMES + /// Configure SDFGI to fully converge over 25 frames. + case in25Frames = 4 // ENV_SDFGI_CONVERGE_IN_25_FRAMES + /// Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count. + case in30Frames = 5 // ENV_SDFGI_CONVERGE_IN_30_FRAMES + /// Represents the size of the ``RenderingServer/EnvironmentSDFGIFramesToConverge`` enum. + case max = 6 // ENV_SDFGI_CONVERGE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .in5Frames: return ".in5Frames" + case .in10Frames: return ".in10Frames" + case .in15Frames: return ".in15Frames" + case .in20Frames: return ".in20Frames" + case .in25Frames: return ".in25Frames" + case .in30Frames: return ".in30Frames" + case .max: return ".max" + } + + } + + } + + public enum EnvironmentSDFGIFramesToUpdateLight: Int64, CaseIterable, CustomDebugStringConvertible { + /// Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements. + case in1Frame = 0 // ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME + /// Update indirect light from dynamic lights in SDFGI over 2 frames. + case in2Frames = 1 // ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES + /// Update indirect light from dynamic lights in SDFGI over 4 frames. + case in4Frames = 2 // ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES + /// Update indirect light from dynamic lights in SDFGI over 8 frames. + case in8Frames = 3 // ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES + /// Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements. + case in16Frames = 4 // ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES + /// Represents the size of the ``RenderingServer/EnvironmentSDFGIFramesToUpdateLight`` enum. + case max = 5 // ENV_SDFGI_UPDATE_LIGHT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .in1Frame: return ".in1Frame" + case .in2Frames: return ".in2Frames" + case .in4Frames: return ".in4Frames" + case .in8Frames: return ".in8Frames" + case .in16Frames: return ".in16Frames" + case .max: return ".max" + } + + } + + } + + public enum SubSurfaceScatteringQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disables subsurface scattering entirely, even on materials that have ``BaseMaterial3D/subsurfScatterEnabled`` set to `true`. This has the lowest GPU requirements. + case disabled = 0 // SUB_SURFACE_SCATTERING_QUALITY_DISABLED + /// Low subsurface scattering quality. + case low = 1 // SUB_SURFACE_SCATTERING_QUALITY_LOW + /// Medium subsurface scattering quality. + case medium = 2 // SUB_SURFACE_SCATTERING_QUALITY_MEDIUM + /// High subsurface scattering quality. This has the highest GPU requirements. + case high = 3 // SUB_SURFACE_SCATTERING_QUALITY_HIGH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + } + + } + + } + + public enum DOFBokehShape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. + case box = 0 // DOF_BOKEH_BOX + /// Calculates DOF blur using a hexagon shaped filter. + case hexagon = 1 // DOF_BOKEH_HEXAGON + /// Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). + case circle = 2 // DOF_BOKEH_CIRCLE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .box: return ".box" + case .hexagon: return ".hexagon" + case .circle: return ".circle" + } + + } + + } + + public enum DOFBlurQuality: Int64, CaseIterable, CustomDebugStringConvertible { + /// Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. + case veryLow = 0 // DOF_BLUR_QUALITY_VERY_LOW + /// Low quality DOF blur. + case low = 1 // DOF_BLUR_QUALITY_LOW + /// Medium quality DOF blur. + case medium = 2 // DOF_BLUR_QUALITY_MEDIUM + /// Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. + case high = 3 // DOF_BLUR_QUALITY_HIGH + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .veryLow: return ".veryLow" + case .low: return ".low" + case .medium: return ".medium" + case .high: return ".high" + } + + } + + } + + public enum InstanceType: Int64, CaseIterable, CustomDebugStringConvertible { + /// The instance does not have a type. + case none = 0 // INSTANCE_NONE + /// The instance is a mesh. + case mesh = 1 // INSTANCE_MESH + /// The instance is a multimesh. + case multimesh = 2 // INSTANCE_MULTIMESH + /// The instance is a particle emitter. + case particles = 3 // INSTANCE_PARTICLES + /// The instance is a GPUParticles collision shape. + case particlesCollision = 4 // INSTANCE_PARTICLES_COLLISION + /// The instance is a light. + case light = 5 // INSTANCE_LIGHT + /// The instance is a reflection probe. + case reflectionProbe = 6 // INSTANCE_REFLECTION_PROBE + /// The instance is a decal. + case decal = 7 // INSTANCE_DECAL + /// The instance is a VoxelGI. + case voxelGi = 8 // INSTANCE_VOXEL_GI + /// The instance is a lightmap. + case lightmap = 9 // INSTANCE_LIGHTMAP + /// The instance is an occlusion culling occluder. + case occluder = 10 // INSTANCE_OCCLUDER + /// The instance is a visible on-screen notifier. + case visiblityNotifier = 11 // INSTANCE_VISIBLITY_NOTIFIER + /// The instance is a fog volume. + case fogVolume = 12 // INSTANCE_FOG_VOLUME + /// Represents the size of the ``RenderingServer/InstanceType`` enum. + case max = 13 // INSTANCE_MAX + /// A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). + case geometryMask = 14 // INSTANCE_GEOMETRY_MASK + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .mesh: return ".mesh" + case .multimesh: return ".multimesh" + case .particles: return ".particles" + case .particlesCollision: return ".particlesCollision" + case .light: return ".light" + case .reflectionProbe: return ".reflectionProbe" + case .decal: return ".decal" + case .voxelGi: return ".voxelGi" + case .lightmap: return ".lightmap" + case .occluder: return ".occluder" + case .visiblityNotifier: return ".visiblityNotifier" + case .fogVolume: return ".fogVolume" + case .max: return ".max" + case .geometryMask: return ".geometryMask" + } + + } + + } + + public enum InstanceFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Allows the instance to be used in baked lighting. + case useBakedLight = 0 // INSTANCE_FLAG_USE_BAKED_LIGHT + /// Allows the instance to be used with dynamic global illumination. + case useDynamicGi = 1 // INSTANCE_FLAG_USE_DYNAMIC_GI + /// When set, manually requests to draw geometry on next frame. + case drawNextFrameIfVisible = 2 // INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE + /// Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling. + case ignoreOcclusionCulling = 3 // INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING + /// Represents the size of the ``RenderingServer/InstanceFlags`` enum. + case max = 4 // INSTANCE_FLAG_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .useBakedLight: return ".useBakedLight" + case .useDynamicGi: return ".useDynamicGi" + case .drawNextFrameIfVisible: return ".drawNextFrameIfVisible" + case .ignoreOcclusionCulling: return ".ignoreOcclusionCulling" + case .max: return ".max" + } + + } + + } + + public enum ShadowCastingSetting: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disable shadows from this instance. + case off = 0 // SHADOW_CASTING_SETTING_OFF + /// Cast shadows from this instance. + case on = 1 // SHADOW_CASTING_SETTING_ON + /// Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. + case doubleSided = 2 // SHADOW_CASTING_SETTING_DOUBLE_SIDED + /// Only render the shadows from the object. The object itself will not be drawn. + case shadowsOnly = 3 // SHADOW_CASTING_SETTING_SHADOWS_ONLY + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .off: return ".off" + case .on: return ".on" + case .doubleSided: return ".doubleSided" + case .shadowsOnly: return ".shadowsOnly" + } + + } + + } + + public enum VisibilityRangeFadeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Disable visibility range fading for the given instance. + case disabled = 0 // VISIBILITY_RANGE_FADE_DISABLED + /// Fade-out the given instance when it approaches its visibility range limits. + case `self` = 1 // VISIBILITY_RANGE_FADE_SELF + /// Fade-in the given instance's dependencies when reaching its visibility range limits. + case dependencies = 2 // VISIBILITY_RANGE_FADE_DEPENDENCIES + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .`self`: return ".`self`" + case .dependencies: return ".dependencies" + } + + } + + } + + public enum BakeChannels: Int64, CaseIterable, CustomDebugStringConvertible { + /// Index of ``Image`` in array of ``Image``s returned by ``bakeRenderUv2(base:materialOverrides:imageSize:)``. Image uses ``Image/Format/rgba8`` and contains albedo color in the `.rgb` channels and alpha in the `.a` channel. + case albedoAlpha = 0 // BAKE_CHANNEL_ALBEDO_ALPHA + /// Index of ``Image`` in array of ``Image``s returned by ``bakeRenderUv2(base:materialOverrides:imageSize:)``. Image uses ``Image/Format/rgba8`` and contains the per-pixel normal of the object in the `.rgb` channels and nothing in the `.a` channel. The per-pixel normal is encoded as `normal * 0.5 + 0.5`. + case normal = 1 // BAKE_CHANNEL_NORMAL + /// Index of ``Image`` in array of ``Image``s returned by ``bakeRenderUv2(base:materialOverrides:imageSize:)``. Image uses ``Image/Format/rgba8`` and contains ambient occlusion (from material and decals only) in the `.r` channel, roughness in the `.g` channel, metallic in the `.b` channel and sub surface scattering amount in the `.a` channel. + case orm = 2 // BAKE_CHANNEL_ORM + /// Index of ``Image`` in array of ``Image``s returned by ``bakeRenderUv2(base:materialOverrides:imageSize:)``. Image uses ``Image/Format/rgbah`` and contains emission color in the `.rgb` channels and nothing in the `.a` channel. + case emission = 3 // BAKE_CHANNEL_EMISSION + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .albedoAlpha: return ".albedoAlpha" + case .normal: return ".normal" + case .orm: return ".orm" + case .emission: return ".emission" + } + + } + + } + + public enum CanvasTextureChannel: Int64, CaseIterable, CustomDebugStringConvertible { + /// Diffuse canvas texture (``CanvasTexture/diffuseTexture``). + case diffuse = 0 // CANVAS_TEXTURE_CHANNEL_DIFFUSE + /// Normal map canvas texture (``CanvasTexture/normalTexture``). + case normal = 1 // CANVAS_TEXTURE_CHANNEL_NORMAL + /// Specular map canvas texture (``CanvasTexture/specularTexture``). + case specular = 2 // CANVAS_TEXTURE_CHANNEL_SPECULAR + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .diffuse: return ".diffuse" + case .normal: return ".normal" + case .specular: return ".specular" + } + + } + + } + + public enum NinePatchAxisMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// The nine patch gets stretched where needed. + case stretch = 0 // NINE_PATCH_STRETCH + /// The nine patch gets filled with tiles where needed. + case tile = 1 // NINE_PATCH_TILE + /// The nine patch gets filled with tiles where needed and stretches them a bit if needed. + case tileFit = 2 // NINE_PATCH_TILE_FIT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .stretch: return ".stretch" + case .tile: return ".tile" + case .tileFit: return ".tileFit" + } + + } + + } + + public enum CanvasItemTextureFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Uses the default filter mode for this ``Viewport``. + case `default` = 0 // CANVAS_ITEM_TEXTURE_FILTER_DEFAULT + /// The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). + case nearest = 1 // CANVAS_ITEM_TEXTURE_FILTER_NEAREST + /// The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). + case linear = 2 // CANVAS_ITEM_TEXTURE_FILTER_LINEAR + /// The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look pixelated from up close, and smooth from a distance. + /// + /// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to ``Camera2D`` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + /// + case nearestWithMipmaps = 3 // CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS + /// The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`). This makes the texture look smooth from up close, and smooth from a distance. + /// + /// Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to ``Camera2D`` zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + /// + case linearWithMipmaps = 4 // CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS + /// The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + /// + /// > Note: This texture filter is rarely useful in 2D projects. ``CanvasItemTextureFilter/nearestWithMipmaps`` is usually more appropriate in this case. + /// + case nearestWithMipmapsAnisotropic = 5 // CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC + /// The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ``ProjectSettings/rendering/textures/defaultFilters/useNearestMipmapFilter`` is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ``ProjectSettings/rendering/textures/defaultFilters/anisotropicFilteringLevel``. + /// + /// > Note: This texture filter is rarely useful in 2D projects. ``CanvasItemTextureFilter/linearWithMipmaps`` is usually more appropriate in this case. + /// + case linearWithMipmapsAnisotropic = 6 // CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC + /// Max value for ``RenderingServer/CanvasItemTextureFilter`` enum. + case max = 7 // CANVAS_ITEM_TEXTURE_FILTER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .nearest: return ".nearest" + case .linear: return ".linear" + case .nearestWithMipmaps: return ".nearestWithMipmaps" + case .linearWithMipmaps: return ".linearWithMipmaps" + case .nearestWithMipmapsAnisotropic: return ".nearestWithMipmapsAnisotropic" + case .linearWithMipmapsAnisotropic: return ".linearWithMipmapsAnisotropic" + case .max: return ".max" + } + + } + + } + + public enum CanvasItemTextureRepeat: Int64, CaseIterable, CustomDebugStringConvertible { + /// Uses the default repeat mode for this ``Viewport``. + case `default` = 0 // CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT + /// Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. + case disabled = 1 // CANVAS_ITEM_TEXTURE_REPEAT_DISABLED + /// Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. + case enabled = 2 // CANVAS_ITEM_TEXTURE_REPEAT_ENABLED + /// Flip the texture when repeating so that the edge lines up instead of abruptly changing. + case mirror = 3 // CANVAS_ITEM_TEXTURE_REPEAT_MIRROR + /// Max value for ``RenderingServer/CanvasItemTextureRepeat`` enum. + case max = 4 // CANVAS_ITEM_TEXTURE_REPEAT_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .disabled: return ".disabled" + case .enabled: return ".enabled" + case .mirror: return ".mirror" + case .max: return ".max" + } + + } + + } + + public enum CanvasGroupMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Child draws over parent and is not clipped. + case disabled = 0 // CANVAS_GROUP_MODE_DISABLED + /// Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. + case clipOnly = 1 // CANVAS_GROUP_MODE_CLIP_ONLY + /// Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. + case clipAndDraw = 2 // CANVAS_GROUP_MODE_CLIP_AND_DRAW + /// + case transparent = 3 // CANVAS_GROUP_MODE_TRANSPARENT + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .clipOnly: return ".clipOnly" + case .clipAndDraw: return ".clipAndDraw" + case .transparent: return ".transparent" + } + + } + + } + + public enum CanvasLightMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// 2D point light (see ``PointLight2D``). + case point = 0 // CANVAS_LIGHT_MODE_POINT + /// 2D directional (sun/moon) light (see ``DirectionalLight2D``). + case directional = 1 // CANVAS_LIGHT_MODE_DIRECTIONAL + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .point: return ".point" + case .directional: return ".directional" + } + + } + + } + + public enum CanvasLightBlendMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Adds light color additive to the canvas. + case add = 0 // CANVAS_LIGHT_BLEND_MODE_ADD + /// Adds light color subtractive to the canvas. + case sub = 1 // CANVAS_LIGHT_BLEND_MODE_SUB + /// The light adds color depending on transparency. + case mix = 2 // CANVAS_LIGHT_BLEND_MODE_MIX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .add: return ".add" + case .sub: return ".sub" + case .mix: return ".mix" + } + + } + + } + + public enum CanvasLightShadowFilter: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not apply a filter to canvas light shadows. + case none = 0 // CANVAS_LIGHT_FILTER_NONE + /// Use PCF5 filtering to filter canvas light shadows. + case pcf5 = 1 // CANVAS_LIGHT_FILTER_PCF5 + /// Use PCF13 filtering to filter canvas light shadows. + case pcf13 = 2 // CANVAS_LIGHT_FILTER_PCF13 + /// Max value of the ``RenderingServer/CanvasLightShadowFilter`` enum. + case max = 3 // CANVAS_LIGHT_FILTER_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .none: return ".none" + case .pcf5: return ".pcf5" + case .pcf13: return ".pcf13" + case .max: return ".max" + } + + } + + } + + public enum CanvasOccluderPolygonCullMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Culling of the canvas occluder is disabled. + case disabled = 0 // CANVAS_OCCLUDER_POLYGON_CULL_DISABLED + /// Culling of the canvas occluder is clockwise. + case clockwise = 1 // CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE + /// Culling of the canvas occluder is counterclockwise. + case counterClockwise = 2 // CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .clockwise: return ".clockwise" + case .counterClockwise: return ".counterClockwise" + } + + } + + } + + public enum GlobalShaderParameterType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Boolean global shader parameter (`global uniform bool ...`). + case bool = 0 // GLOBAL_VAR_TYPE_BOOL + /// 2-dimensional boolean vector global shader parameter (`global uniform bvec2 ...`). + case bvec2 = 1 // GLOBAL_VAR_TYPE_BVEC2 + /// 3-dimensional boolean vector global shader parameter (`global uniform bvec3 ...`). + case bvec3 = 2 // GLOBAL_VAR_TYPE_BVEC3 + /// 4-dimensional boolean vector global shader parameter (`global uniform bvec4 ...`). + case bvec4 = 3 // GLOBAL_VAR_TYPE_BVEC4 + /// Integer global shader parameter (`global uniform int ...`). + case int = 4 // GLOBAL_VAR_TYPE_INT + /// 2-dimensional integer vector global shader parameter (`global uniform ivec2 ...`). + case ivec2 = 5 // GLOBAL_VAR_TYPE_IVEC2 + /// 3-dimensional integer vector global shader parameter (`global uniform ivec3 ...`). + case ivec3 = 6 // GLOBAL_VAR_TYPE_IVEC3 + /// 4-dimensional integer vector global shader parameter (`global uniform ivec4 ...`). + case ivec4 = 7 // GLOBAL_VAR_TYPE_IVEC4 + /// 2-dimensional integer rectangle global shader parameter (`global uniform ivec4 ...`). Equivalent to ``GlobalShaderParameterType/ivec4`` in shader code, but exposed as a ``Rect2i`` in the editor UI. + case rect2i = 8 // GLOBAL_VAR_TYPE_RECT2I + /// Unsigned integer global shader parameter (`global uniform uint ...`). + case uint = 9 // GLOBAL_VAR_TYPE_UINT + /// 2-dimensional unsigned integer vector global shader parameter (`global uniform uvec2 ...`). + case uvec2 = 10 // GLOBAL_VAR_TYPE_UVEC2 + /// 3-dimensional unsigned integer vector global shader parameter (`global uniform uvec3 ...`). + case uvec3 = 11 // GLOBAL_VAR_TYPE_UVEC3 + /// 4-dimensional unsigned integer vector global shader parameter (`global uniform uvec4 ...`). + case uvec4 = 12 // GLOBAL_VAR_TYPE_UVEC4 + /// Single-precision floating-point global shader parameter (`global uniform float ...`). + case float = 13 // GLOBAL_VAR_TYPE_FLOAT + /// 2-dimensional floating-point vector global shader parameter (`global uniform vec2 ...`). + case vec2 = 14 // GLOBAL_VAR_TYPE_VEC2 + /// 3-dimensional floating-point vector global shader parameter (`global uniform vec3 ...`). + case vec3 = 15 // GLOBAL_VAR_TYPE_VEC3 + /// 4-dimensional floating-point vector global shader parameter (`global uniform vec4 ...`). + case vec4 = 16 // GLOBAL_VAR_TYPE_VEC4 + /// Color global shader parameter (`global uniform vec4 ...`). Equivalent to ``GlobalShaderParameterType/vec4`` in shader code, but exposed as a ``Color`` in the editor UI. + case color = 17 // GLOBAL_VAR_TYPE_COLOR + /// 2-dimensional floating-point rectangle global shader parameter (`global uniform vec4 ...`). Equivalent to ``GlobalShaderParameterType/vec4`` in shader code, but exposed as a ``Rect2`` in the editor UI. + case rect2 = 18 // GLOBAL_VAR_TYPE_RECT2 + /// 2×2 matrix global shader parameter (`global uniform mat2 ...`). Exposed as a ``PackedInt32Array`` in the editor UI. + case mat2 = 19 // GLOBAL_VAR_TYPE_MAT2 + /// 3×3 matrix global shader parameter (`global uniform mat3 ...`). Exposed as a ``Basis`` in the editor UI. + case mat3 = 20 // GLOBAL_VAR_TYPE_MAT3 + /// 4×4 matrix global shader parameter (`global uniform mat4 ...`). Exposed as a ``Projection`` in the editor UI. + case mat4 = 21 // GLOBAL_VAR_TYPE_MAT4 + /// 2-dimensional transform global shader parameter (`global uniform mat2x3 ...`). Exposed as a ``Transform2D`` in the editor UI. + case transform2d = 22 // GLOBAL_VAR_TYPE_TRANSFORM_2D + /// 3-dimensional transform global shader parameter (`global uniform mat3x4 ...`). Exposed as a ``Transform3D`` in the editor UI. + case transform = 23 // GLOBAL_VAR_TYPE_TRANSFORM + /// 2D sampler global shader parameter (`global uniform sampler2D ...`). Exposed as a ``Texture2D`` in the editor UI. + case sampler2d = 24 // GLOBAL_VAR_TYPE_SAMPLER2D + /// 2D sampler array global shader parameter (`global uniform sampler2DArray ...`). Exposed as a ``Texture2DArray`` in the editor UI. + case sampler2darray = 25 // GLOBAL_VAR_TYPE_SAMPLER2DARRAY + /// 3D sampler global shader parameter (`global uniform sampler3D ...`). Exposed as a ``Texture3D`` in the editor UI. + case sampler3d = 26 // GLOBAL_VAR_TYPE_SAMPLER3D + /// Cubemap sampler global shader parameter (`global uniform samplerCube ...`). Exposed as a ``Cubemap`` in the editor UI. + case samplercube = 27 // GLOBAL_VAR_TYPE_SAMPLERCUBE + /// Represents the size of the ``RenderingServer/GlobalShaderParameterType`` enum. + case max = 28 // GLOBAL_VAR_TYPE_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .bool: return ".bool" + case .bvec2: return ".bvec2" + case .bvec3: return ".bvec3" + case .bvec4: return ".bvec4" + case .int: return ".int" + case .ivec2: return ".ivec2" + case .ivec3: return ".ivec3" + case .ivec4: return ".ivec4" + case .rect2i: return ".rect2i" + case .uint: return ".uint" + case .uvec2: return ".uvec2" + case .uvec3: return ".uvec3" + case .uvec4: return ".uvec4" + case .float: return ".float" + case .vec2: return ".vec2" + case .vec3: return ".vec3" + case .vec4: return ".vec4" + case .color: return ".color" + case .rect2: return ".rect2" + case .mat2: return ".mat2" + case .mat3: return ".mat3" + case .mat4: return ".mat4" + case .transform2d: return ".transform2d" + case .transform: return ".transform" + case .sampler2d: return ".sampler2d" + case .sampler2darray: return ".sampler2darray" + case .sampler3d: return ".sampler3d" + case .samplercube: return ".samplercube" + case .max: return ".max" + } + + } + + } + + public enum RenderingInfo: Int64, CaseIterable, CustomDebugStringConvertible { + /// Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation. + case totalObjectsInFrame = 0 // RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME + /// Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation. + case totalPrimitivesInFrame = 1 // RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME + /// Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation. + case totalDrawCallsInFrame = 2 // RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME + /// Texture memory used (in bytes). + case textureMemUsed = 3 // RENDERING_INFO_TEXTURE_MEM_USED + /// Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally. + case bufferMemUsed = 4 // RENDERING_INFO_BUFFER_MEM_USED + /// Video memory used (in bytes). When using the Forward+ or mobile rendering backends, this is always greater than the sum of ``RenderingInfo/textureMemUsed`` and ``RenderingInfo/bufferMemUsed``, since there is miscellaneous data not accounted for by those two metrics. When using the GL Compatibility backend, this is equal to the sum of ``RenderingInfo/textureMemUsed`` and ``RenderingInfo/bufferMemUsed``. + case videoMemUsed = 5 // RENDERING_INFO_VIDEO_MEM_USED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .totalObjectsInFrame: return ".totalObjectsInFrame" + case .totalPrimitivesInFrame: return ".totalPrimitivesInFrame" + case .totalDrawCallsInFrame: return ".totalDrawCallsInFrame" + case .textureMemUsed: return ".textureMemUsed" + case .bufferMemUsed: return ".bufferMemUsed" + case .videoMemUsed: return ".videoMemUsed" + } + + } + + } + + public enum Features: Int64, CaseIterable, CustomDebugStringConvertible { + /// + case shaders = 0 // FEATURE_SHADERS + /// + case multithreaded = 1 // FEATURE_MULTITHREADED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .shaders: return ".shaders" + case .multithreaded: return ".multithreaded" + } + + } + + } + + /* Constants */ + /// Marks an error that shows that the index array is empty. + public static let noIndexArray = -1 + /// Number of weights/bones per vertex. + public static let arrayWeightsSize = 4 + /// The minimum Z-layer for canvas items. + public static let canvasItemZMin = -4096 + /// The maximum Z-layer for canvas items. + public static let canvasItemZMax = 4096 + /// The maximum number of glow levels that can be used with the glow post-processing effect. + public static let maxGlowLevels = 7 + /// + public static let maxCursors = 8 + /// The maximum number of directional lights that can be rendered at a given time in 2D. + public static let max2dDirectionalLights = 8 + /// The maximum number of surfaces a mesh can have. + public static let maxMeshSurfaces = 256 + /// The minimum renderpriority of all materials. + public static let materialRenderPriorityMin = -128 + /// The maximum renderpriority of all materials. + public static let materialRenderPriorityMax = 127 + /// The number of custom data arrays available (``ArrayType/custom0``, ``ArrayType/custom1``, ``ArrayType/custom2``, ``ArrayType/custom3``). + public static let arrayCustomCount = 4 + /// + public static let particlesEmitFlagPosition = 1 + /// + public static let particlesEmitFlagRotationScale = 2 + /// + public static let particlesEmitFlagVelocity = 4 + /// + public static let particlesEmitFlagColor = 8 + /// + public static let particlesEmitFlagCustom = 16 + + /* Properties */ + + /// If `false`, disables rendering completely, but the engine logic is still being processed. You can call ``forceDraw(swapBuffers:frameStep:)`` to draw a frame even with rendering disabled. + static public var renderLoopEnabled: Bool { + get { + return is_render_loop_enabled () + } + + set { + set_render_loop_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_texture_2d_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2010018390)! + } + + } + + }() + + /// Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``Texture2D``. + /// + /// > Note: Not to be confused with ``RenderingDevice/textureCreate(format:view:data:)``, which creates the graphics API's own texture type as opposed to the Godot-specific ``Texture2D`` resource. + /// + public static func texture2dCreate(image: Image?) -> RID { + let _result: RID = RID () + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_texture_2d_layered_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_layered_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 913689023)! + } + + } + + }() + + /// Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``TextureLayered``. + /// + public static func texture2dLayeredCreate(layers: ObjectCollection, layeredType: RenderingServer.TextureLayeredType) -> RID { + let _result: RID = RID () + withUnsafePointer(to: layers.array.content) { pArg0 in + withUnsafePointer(to: layeredType.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_layered_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_3d_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_3d_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4036838706)! + } + + } + + }() + + /// > Note: The equivalent resource is ``Texture3D``. + public static func texture3dCreate(format: Image.Format, width: Int32, height: Int32, depth: Int32, mipmaps: Bool, data: ObjectCollection) -> RID { + let _result: RID = RID () + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: depth) { pArg3 in + withUnsafePointer(to: mipmaps) { pArg4 in + withUnsafePointer(to: data.array.content) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_texture_3d_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_proxy_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_proxy_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 41030802)! + } + + } + + }() + + /// This method does nothing and always returns an invalid ``RID``. + public static func textureProxyCreate(base: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: base.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_proxy_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_texture_2d_update: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_update") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 999539803)! + } + + } + + }() + + /// Updates the texture specified by the `texture` ``RID`` with the data in `image`. A `layer` must also be specified, which should be `0` when updating a single-layer texture (``Texture2D``). + /// + /// > Note: The `image` must have the same width, height and format as the current `texture` data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use ``textureReplace(texture:byTexture:)`` instead. + /// + public static func texture2dUpdate(texture: RID, image: Image?, layer: Int32) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: image?.handle) { pArg1 in + withUnsafePointer(to: layer) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_texture_3d_update: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_3d_update") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 684822712)! + } + + } + + }() + + /// Updates the texture specified by the `texture` ``RID``'s data with the data in `data`. All the texture's layers must be replaced at once. + /// + /// > Note: The `texture` must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use ``textureReplace(texture:byTexture:)`` instead. + /// + public static func texture3dUpdate(texture: RID, data: ObjectCollection) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: data.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_3d_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_texture_proxy_update: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_proxy_update") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// This method does nothing. + public static func textureProxyUpdate(texture: RID, proxyTo: RID) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: proxyTo.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_proxy_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_texture_2d_placeholder_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_placeholder_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions, although it does nothing when used. See also ``texture2dLayeredPlaceholderCreate(layeredType:)`` + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``PlaceholderTexture2D``. + /// + public static func texture2dPlaceholderCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_texture_2d_placeholder_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_texture_2d_layered_placeholder_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_layered_placeholder_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1394585590)! + } + + } + + }() + + /// Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions, although it does nothing when used. See also ``texture2dPlaceholderCreate()``. + /// + /// > Note: The equivalent resource is ``PlaceholderTextureLayered``. + /// + public static func texture2dLayeredPlaceholderCreate(layeredType: RenderingServer.TextureLayeredType) -> RID { + let _result: RID = RID () + withUnsafePointer(to: layeredType.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_layered_placeholder_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_texture_3d_placeholder_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_3d_placeholder_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_3d_*` RenderingServer functions, although it does nothing when used. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``PlaceholderTexture3D``. + /// + public static func texture3dPlaceholderCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_texture_3d_placeholder_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_texture_2d_get: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_get") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4206205781)! + } + + } + + }() + + /// Returns an ``Image`` instance from the given `texture` ``RID``. + /// + /// Example of getting the test texture from ``getTestTexture()`` and applying it to a ``Sprite2D`` node: + /// + public static func texture2dGet(texture: RID) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_get, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_texture_2d_layer_get: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_2d_layer_get") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2705440895)! + } + + } + + }() + + /// Returns an ``Image`` instance from the given `texture` ``RID`` and `layer`. + public static func texture2dLayerGet(texture: RID, layer: Int32) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: layer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_2d_layer_get, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_texture_3d_get: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_3d_get") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns 3D texture data as an array of ``Image``s for the specified texture ``RID``. + public static func texture3dGet(texture: RID) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_3d_get, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_texture_replace: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_replace") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Replaces `texture`'s texture data by the texture specified by the `byTexture` RID, without changing `texture`'s RID. + public static func textureReplace(texture: RID, byTexture: RID) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: byTexture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_replace, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_texture_set_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_set_size_override") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// + public static func textureSetSizeOverride(texture: RID, width: Int32, height: Int32) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_texture_set_size_override, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_texture_set_path: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_set_path") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2726140452)! + } + + } + + }() + + /// + public static func textureSetPath(texture: RID, path: String) { + withUnsafePointer(to: texture.content) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_set_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_texture_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_path") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 642473191)! + } + + } + + }() + + /// + public static func textureGetPath(texture: RID) -> String { + let _result = GString () + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_get_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_texture_get_format: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_format") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1932918979)! + } + + } + + }() + + /// Returns the format for the texture. + public static func textureGetFormat(texture: RID) -> Image.Format { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_texture_get_format, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Image.Format (rawValue: _result)! + } + + fileprivate static var method_texture_set_force_redraw_if_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_set_force_redraw_if_visible") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// + public static func textureSetForceRedrawIfVisible(texture: RID, enable: Bool) { + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_set_force_redraw_if_visible, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_texture_rd_create: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_rd_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1434128712)! + } + + } + + }() + + /// Creates a new texture object based on a texture created directly on the ``RenderingDevice``. If the texture contains layers, `layerType` is used to define the layer type. + public static func textureRdCreate(rdTexture: RID, layerType: RenderingServer.TextureLayeredType = .textureLayered2dArray) -> RID { + let _result: RID = RID () + withUnsafePointer(to: rdTexture.content) { pArg0 in + withUnsafePointer(to: layerType.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_rd_create, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_get_rd_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_rd_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2790148051)! + } + + } + + }() + + /// Returns a texture ``RID`` that can be used with ``RenderingDevice``. + public static func textureGetRdTexture(_ texture: RID, srgb: Bool = false) -> RID { + let _result: RID = RID () + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: srgb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_get_rd_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_texture_get_native_handle: GDExtensionMethodBindPtr = { + let methodName = StringName("texture_get_native_handle") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1834114100)! + } + + } + + }() + + /// Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. + /// + /// > Note: This function returns a `uint64_t` which internally maps to a `GLuint` (OpenGL) or `VkImage` (Vulkan). + /// + public static func textureGetNativeHandle(texture: RID, srgb: Bool = false) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: texture.content) { pArg0 in + withUnsafePointer(to: srgb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_texture_get_native_handle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_shader_create: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `shader_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``Shader``. + /// + public static func shaderCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_shader_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_shader_set_code: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_set_code") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2726140452)! + } + + } + + }() + + /// Sets the shader's source code (which triggers recompilation after being changed). + public static func shaderSetCode(shader: RID, code: String) { + withUnsafePointer(to: shader.content) { pArg0 in + let code = GString(code) + withUnsafePointer(to: code.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shader_set_code, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shader_set_path_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_set_path_hint") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2726140452)! + } + + } + + }() + + /// Sets the path hint for the specified shader. This should generally match the ``Shader`` resource's ``Resource/resourcePath``. + public static func shaderSetPathHint(shader: RID, path: String) { + withUnsafePointer(to: shader.content) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shader_set_path_hint, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_shader_get_code: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_get_code") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 642473191)! + } + + } + + }() + + /// Returns a shader's source code as a string. + public static func shaderGetCode(shader: RID) -> String { + let _result = GString () + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_shader_get_code, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_shader_parameter_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shader_parameter_list") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns the parameters of a shader. + public static func getShaderParameterList(shader: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_shader_parameter_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_shader_get_parameter_default: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_get_parameter_default") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2621281810)! + } + + } + + }() + + /// Returns the default value for the specified shader uniform. This is usually the value written in the shader source code. + public static func shaderGetParameterDefault(shader: RID, name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_shader_get_parameter_default, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_shader_set_default_texture_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_set_default_texture_parameter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4094001817)! + } + + } + + }() + + /// Sets a shader's default texture. Overwrites the texture given by name. + /// + /// > Note: If the sampler array is used use `index` to access the specified texture. + /// + public static func shaderSetDefaultTextureParameter(shader: RID, name: StringName, texture: RID, index: Int32 = 0) { + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: index) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_shader_set_default_texture_parameter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_shader_get_default_texture_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("shader_get_default_texture_parameter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1464608890)! + } + + } + + }() + + /// Returns a default texture from a shader searched by name. + /// + /// > Note: If the sampler array is used use `index` to access the specified texture. + /// + public static func shaderGetDefaultTextureParameter(shader: RID, name: StringName, index: Int32 = 0) -> RID { + let _result: RID = RID () + withUnsafePointer(to: shader.content) { pArg0 in + withUnsafePointer(to: name.content) { pArg1 in + withUnsafePointer(to: index) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_shader_get_default_texture_parameter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_material_create: GDExtensionMethodBindPtr = { + let methodName = StringName("material_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `material_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``Material``. + /// + public static func materialCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_material_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_material_set_shader: GDExtensionMethodBindPtr = { + let methodName = StringName("material_set_shader") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a shader material's shader. + public static func materialSetShader(shaderMaterial: RID, shader: RID) { + withUnsafePointer(to: shaderMaterial.content) { pArg0 in + withUnsafePointer(to: shader.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_material_set_shader, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_material_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("material_set_param") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3477296213)! + } + + } + + }() + + /// Sets a material's parameter. + public static func materialSetParam(material: RID, parameter: StringName, value: Variant?) { + withUnsafePointer(to: material.content) { pArg0 in + withUnsafePointer(to: parameter.content) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_material_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_material_get_param: GDExtensionMethodBindPtr = { + let methodName = StringName("material_get_param") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2621281810)! + } + + } + + }() + + /// Returns the value of a certain material's parameter. + public static func materialGetParam(material: RID, parameter: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: material.content) { pArg0 in + withUnsafePointer(to: parameter.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_material_get_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_material_set_render_priority: GDExtensionMethodBindPtr = { + let methodName = StringName("material_set_render_priority") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets a material's render priority. + public static func materialSetRenderPriority(material: RID, priority: Int32) { + withUnsafePointer(to: material.content) { pArg0 in + withUnsafePointer(to: priority) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_material_set_render_priority, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_material_set_next_pass: GDExtensionMethodBindPtr = { + let methodName = StringName("material_set_next_pass") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets an object's next material. + public static func materialSetNextPass(material: RID, nextMaterial: RID) { + withUnsafePointer(to: material.content) { pArg0 in + withUnsafePointer(to: nextMaterial.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_material_set_next_pass, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_create_from_surfaces: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_create_from_surfaces") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4291747531)! + } + + } + + }() + + /// + public static func meshCreateFromSurfaces(_ surfaces: VariantCollection, blendShapeCount: Int32 = 0) -> RID { + let _result: RID = RID () + withUnsafePointer(to: surfaces.array.content) { pArg0 in + withUnsafePointer(to: blendShapeCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_create_from_surfaces, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_create: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this mesh to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent resource is ``Mesh``. + /// + public static func meshCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_mesh_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_mesh_surface_get_format_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_format_offset") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2981368685)! + } + + } + + }() + + /// Returns the offset of a given attribute by `arrayIndex` in the start of its respective buffer. + public static func meshSurfaceGetFormatOffset(format: RenderingServer.ArrayFormat, vertexCount: Int32, arrayIndex: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: vertexCount) { pArg1 in + withUnsafePointer(to: arrayIndex) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_format_offset, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_format_vertex_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_format_vertex_stride") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3188363337)! + } + + } + + }() + + /// Returns the stride of the vertex positions for a mesh with given `format`. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents). + public static func meshSurfaceGetFormatVertexStride(format: RenderingServer.ArrayFormat, vertexCount: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: vertexCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_format_vertex_stride, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_format_normal_tangent_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_format_normal_tangent_stride") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3188363337)! + } + + } + + }() + + /// Returns the stride of the combined normals and tangents for a mesh with given `format`. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions. + public static func meshSurfaceGetFormatNormalTangentStride(format: RenderingServer.ArrayFormat, vertexCount: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: vertexCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_format_normal_tangent_stride, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_format_attribute_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_format_attribute_stride") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3188363337)! + } + + } + + }() + + /// Returns the stride of the attribute buffer for a mesh with given `format`. + public static func meshSurfaceGetFormatAttributeStride(format: RenderingServer.ArrayFormat, vertexCount: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: vertexCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_format_attribute_stride, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_format_skin_stride: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_format_skin_stride") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3188363337)! + } + + } + + }() + + /// Returns the stride of the skin buffer for a mesh with given `format`. + public static func meshSurfaceGetFormatSkinStride(format: RenderingServer.ArrayFormat, vertexCount: Int32) -> UInt32 { + var _result: UInt32 = 0 + withUnsafePointer(to: format.rawValue) { pArg0 in + withUnsafePointer(to: vertexCount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_format_skin_stride, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_add_surface: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_add_surface") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1217542888)! + } + + } + + }() + + /// + public static func meshAddSurface(mesh: RID, surface: GDictionary) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_add_surface, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_add_surface_from_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_add_surface_from_arrays") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2342446560)! + } + + } + + }() + + /// + public static func meshAddSurfaceFromArrays(mesh: RID, primitive: RenderingServer.PrimitiveType, arrays: GArray, blendShapes: GArray = GArray (), lods: GDictionary = GDictionary (), compressFormat: RenderingServer.ArrayFormat = []) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: primitive.rawValue) { pArg1 in + withUnsafePointer(to: arrays.content) { pArg2 in + withUnsafePointer(to: blendShapes.content) { pArg3 in + withUnsafePointer(to: lods.content) { pArg4 in + withUnsafePointer(to: compressFormat.rawValue) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_add_surface_from_arrays, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_get_blend_shape_count: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_get_blend_shape_count") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns a mesh's blend shape count. + public static func meshGetBlendShapeCount(mesh: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_get_blend_shape_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_set_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_set_blend_shape_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1294662092)! + } + + } + + }() + + /// Sets a mesh's blend shape mode. + public static func meshSetBlendShapeMode(mesh: RID, mode: RenderingServer.BlendShapeMode) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_set_blend_shape_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_get_blend_shape_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_get_blend_shape_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4282291819)! + } + + } + + }() + + /// Returns a mesh's blend shape mode. + public static func meshGetBlendShapeMode(mesh: RID) -> RenderingServer.BlendShapeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_get_blend_shape_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return RenderingServer.BlendShapeMode (rawValue: _result)! + } + + fileprivate static var method_mesh_surface_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_set_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Sets a mesh's surface's material. + public static func meshSurfaceSetMaterial(mesh: RID, surface: Int32, material: RID) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: material.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_set_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_surface_get_material: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1066463050)! + } + + } + + }() + + /// Returns a mesh's surface's material. + public static func meshSurfaceGetMaterial(mesh: RID, surface: Int32) -> RID { + let _result: RID = RID () + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_get_surface: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_get_surface") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 186674697)! + } + + } + + }() + + /// + public static func meshGetSurface(mesh: RID, surface: Int32) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_get_surface, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_arrays") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1778388067)! + } + + } + + }() + + /// Returns a mesh's surface's buffer arrays. + public static func meshSurfaceGetArrays(mesh: RID, surface: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_arrays, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_surface_get_blend_shape_arrays: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_get_blend_shape_arrays") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1778388067)! + } + + } + + }() + + /// Returns a mesh's surface's arrays for blend shapes. + public static func meshSurfaceGetBlendShapeArrays(mesh: RID, surface: Int32) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_get_blend_shape_arrays, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_mesh_get_surface_count: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_get_surface_count") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns a mesh's number of surfaces. + public static func meshGetSurfaceCount(mesh: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_get_surface_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_set_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// Sets a mesh's custom aabb. + public static func meshSetCustomAabb(mesh: RID, aabb: AABB) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: aabb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_set_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_get_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974181306)! + } + + } + + }() + + /// Returns a mesh's custom aabb. + public static func meshGetCustomAabb(mesh: RID) -> AABB { + var _result: AABB = AABB () + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_get_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_mesh_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_clear") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Removes all surfaces from a mesh. + public static func meshClear(mesh: RID) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_mesh_surface_update_vertex_region: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_update_vertex_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2900195149)! + } + + } + + }() + + /// + public static func meshSurfaceUpdateVertexRegion(mesh: RID, surface: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: data.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_update_vertex_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_surface_update_attribute_region: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_update_attribute_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2900195149)! + } + + } + + }() + + /// + public static func meshSurfaceUpdateAttributeRegion(mesh: RID, surface: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: data.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_update_attribute_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_surface_update_skin_region: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_surface_update_skin_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2900195149)! + } + + } + + }() + + /// + public static func meshSurfaceUpdateSkinRegion(mesh: RID, surface: Int32, offset: Int32, data: PackedByteArray) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: data.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_surface_update_skin_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_mesh_set_shadow_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("mesh_set_shadow_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// + public static func meshSetShadowMesh(_ mesh: RID, shadowMesh: RID) { + withUnsafePointer(to: mesh.content) { pArg0 in + withUnsafePointer(to: shadowMesh.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_mesh_set_shadow_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_create: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new multimesh on the RenderingServer and returns an ``RID`` handle. This RID will be used in all `multimesh_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this multimesh to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent resource is ``MultiMesh``. + /// + public static func multimeshCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_multimesh_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_multimesh_allocate_data: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_allocate_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 283685892)! + } + + } + + }() + + /// + public static func multimeshAllocateData(multimesh: RID, instances: Int32, transformFormat: RenderingServer.MultimeshTransformFormat, colorFormat: Bool = false, customDataFormat: Bool = false) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: instances) { pArg1 in + withUnsafePointer(to: transformFormat.rawValue) { pArg2 in + withUnsafePointer(to: colorFormat) { pArg3 in + withUnsafePointer(to: customDataFormat) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_allocate_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_get_instance_count: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_instance_count") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of instances allocated for this multimesh. + public static func multimeshGetInstanceCount(multimesh: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_instance_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_set_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the mesh to be drawn by the multimesh. Equivalent to ``MultiMesh/mesh``. + public static func multimeshSetMesh(multimesh: RID, mesh: RID) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: mesh.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_set_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_instance_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675327471)! + } + + } + + }() + + /// Sets the ``Transform3D`` for this instance. Equivalent to ``MultiMesh/setInstanceTransform(instance:transform:)``. + public static func multimeshInstanceSetTransform(multimesh: RID, index: Int32, transform: Transform3D) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_instance_set_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_set_transform_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 736082694)! + } + + } + + }() + + /// Sets the ``Transform2D`` for this instance. For use when multimesh is used in 2D. Equivalent to ``MultiMesh/setInstanceTransform2d(instance:transform:)``. + public static func multimeshInstanceSetTransform2d(multimesh: RID, index: Int32, transform: Transform2D) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_set_transform_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_instance_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_set_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 176975443)! + } + + } + + }() + + /// Sets the color by which this instance will be modulated. Equivalent to ``MultiMesh/setInstanceColor(instance:color:)``. + public static func multimeshInstanceSetColor(multimesh: RID, index: Int32, color: Color) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_set_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_instance_set_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_set_custom_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 176975443)! + } + + } + + }() + + /// Sets the custom data for this instance. Custom data is passed as a ``Color``, but is interpreted as a `vec4` in the shader. Equivalent to ``MultiMesh/setInstanceCustomData(instance:customData:)``. + public static func multimeshInstanceSetCustomData(multimesh: RID, index: Int32, customData: Color) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: customData) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_set_custom_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_get_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the RID of the mesh that will be used in drawing this multimesh. + public static func multimeshGetMesh(multimesh: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_get_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974181306)! + } + + } + + }() + + /// Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. + public static func multimeshGetAabb(multimesh: RID) -> AABB { + var _result: AABB = AABB () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_set_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// Sets the custom AABB for this MultiMesh resource. + public static func multimeshSetCustomAabb(multimesh: RID, aabb: AABB) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: aabb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_set_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_get_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 974181306)! + } + + } + + }() + + /// Returns the custom AABB defined for this MultiMesh resource. + public static func multimeshGetCustomAabb(multimesh: RID) -> AABB { + var _result: AABB = AABB () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_instance_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_get_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1050775521)! + } + + } + + }() + + /// Returns the ``Transform3D`` of the specified instance. + public static func multimeshInstanceGetTransform(multimesh: RID, index: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_instance_get_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_get_transform_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1324854622)! + } + + } + + }() + + /// Returns the ``Transform2D`` of the specified instance. For use when the multimesh is set to use 2D transforms. + public static func multimeshInstanceGetTransform2d(multimesh: RID, index: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_get_transform_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_instance_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_get_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2946315076)! + } + + } + + }() + + /// Returns the color by which the specified instance will be modulated. + public static func multimeshInstanceGetColor(multimesh: RID, index: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_get_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_instance_get_custom_data: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_instance_get_custom_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2946315076)! + } + + } + + }() + + /// Returns the custom data associated with the specified instance. + public static func multimeshInstanceGetCustomData(multimesh: RID, index: Int32) -> Color { + var _result: Color = Color () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_instance_get_custom_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_set_visible_instances: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_set_visible_instances") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to ``MultiMesh/visibleInstanceCount``. + public static func multimeshSetVisibleInstances(multimesh: RID, visible: Int32) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: visible) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_set_visible_instances, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_get_visible_instances: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_visible_instances") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of visible instances for this multimesh. + public static func multimeshGetVisibleInstances(multimesh: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_visible_instances, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_multimesh_set_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_set_buffer") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2960552364)! + } + + } + + }() + + /// Set the entire data to use for drawing the `multimesh` at once to `buffer` (such as instance transforms and colors). `buffer`'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also ``multimeshGetBuffer(multimesh:)``. + /// + /// The per-instance data size and expected data order is: + /// + public static func multimeshSetBuffer(multimesh: RID, buffer: PackedFloat32Array) { + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: buffer.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_set_buffer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_multimesh_get_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("multimesh_get_buffer") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3964669176)! + } + + } + + }() + + /// Returns the MultiMesh data (such as instance transforms, colors, etc.). See ``multimeshSetBuffer(multimesh:buffer:)`` for details on the returned data. + /// + /// > Note: If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means ``multimeshGetBuffer(multimesh:)`` is potentially a slow operation and should be avoided whenever possible. + /// + public static func multimeshGetBuffer(multimesh: RID) -> PackedFloat32Array { + let _result: PackedFloat32Array = PackedFloat32Array () + withUnsafePointer(to: multimesh.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_multimesh_get_buffer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_skeleton_create: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `skeleton_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + public static func skeletonCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_skeleton_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_skeleton_allocate_data: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_allocate_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1904426712)! + } + + } + + }() + + /// + public static func skeletonAllocateData(skeleton: RID, bones: Int32, is2dSkeleton: Bool = false) { + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: bones) { pArg1 in + withUnsafePointer(to: is2dSkeleton) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_allocate_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_skeleton_get_bone_count: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_get_bone_count") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2198884583)! + } + + } + + }() + + /// Returns the number of bones allocated for this skeleton. + public static func skeletonGetBoneCount(skeleton: RID) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_get_bone_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_skeleton_bone_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_bone_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 675327471)! + } + + } + + }() + + /// Sets the ``Transform3D`` for a specific bone of this skeleton. + public static func skeletonBoneSetTransform(skeleton: RID, bone: Int32, transform: Transform3D) { + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: bone) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_bone_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_skeleton_bone_get_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_bone_get_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1050775521)! + } + + } + + }() + + /// Returns the ``Transform3D`` set for a specific bone of this skeleton. + public static func skeletonBoneGetTransform(skeleton: RID, bone: Int32) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: bone) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_bone_get_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_skeleton_bone_set_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_bone_set_transform_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 736082694)! + } + + } + + }() + + /// Sets the ``Transform2D`` for a specific bone of this skeleton. + public static func skeletonBoneSetTransform2d(skeleton: RID, bone: Int32, transform: Transform2D) { + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: bone) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_bone_set_transform_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_skeleton_bone_get_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_bone_get_transform_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1324854622)! + } + + } + + }() + + /// Returns the ``Transform2D`` set for a specific bone of this skeleton. + public static func skeletonBoneGetTransform2d(skeleton: RID, bone: Int32) -> Transform2D { + var _result: Transform2D = Transform2D () + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: bone) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_bone_get_transform_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_skeleton_set_base_transform_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("skeleton_set_base_transform_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// + public static func skeletonSetBaseTransform2d(skeleton: RID, baseTransform: Transform2D) { + withUnsafePointer(to: skeleton.content) { pArg0 in + withUnsafePointer(to: baseTransform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_skeleton_set_base_transform_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_directional_light_create: GDExtensionMethodBindPtr = { + let methodName = StringName("directional_light_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this directional light to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent node is ``DirectionalLight3D``. + /// + public static func directionalLightCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_directional_light_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_omni_light_create: GDExtensionMethodBindPtr = { + let methodName = StringName("omni_light_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this omni light to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent node is ``OmniLight3D``. + /// + public static func omniLightCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_omni_light_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_spot_light_create: GDExtensionMethodBindPtr = { + let methodName = StringName("spot_light_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this spot light to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + public static func spotLightCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_spot_light_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_light_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Sets the color of the light. Equivalent to ``Light3D/lightColor``. + public static func lightSetColor(light: RID, color: Color) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_param: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_param") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501936875)! + } + + } + + }() + + /// Sets the specified 3D light parameter. See ``RenderingServer/LightParam`` for options. Equivalent to ``Light3D/setParam(_:value:)``. + public static func lightSetParam(light: RID, param: RenderingServer.LightParam, value: Double) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: param.rawValue) { pArg1 in + withUnsafePointer(to: value) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_param, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_shadow: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_shadow") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, light will cast shadows. Equivalent to ``Light3D/shadowEnabled``. + public static func lightSetShadow(light: RID, enabled: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_shadow, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_projector: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_projector") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the projector texture to use for the specified 3D light. Equivalent to ``Light3D/lightProjector``. + public static func lightSetProjector(light: RID, texture: RID) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: texture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_projector, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_negative: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_negative") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the 3D light will subtract light instead of adding light. Equivalent to ``Light3D/lightNegative``. + public static func lightSetNegative(light: RID, enable: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_negative, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to ``Light3D/lightCullMask``. + public static func lightSetCullMask(light: RID, mask: UInt32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_distance_fade") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1622292572)! + } + + } + + }() + + /// Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to ``Light3D/distanceFadeEnabled``, ``Light3D/distanceFadeBegin``, ``Light3D/distanceFadeShadow``, and ``Light3D/distanceFadeLength``. + public static func lightSetDistanceFade(decal: RID, enabled: Bool, begin: Double, shadow: Double, length: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: begin) { pArg2 in + withUnsafePointer(to: shadow) { pArg3 in + withUnsafePointer(to: length) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_distance_fade, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_reverse_cull_face_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_reverse_cull_face_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with ``instanceGeometrySetCastShadowsSetting(instance:shadowCastingSetting:)``. Equivalent to ``Light3D/shadowReverseCullFace``. + public static func lightSetReverseCullFaceMode(light: RID, enabled: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_reverse_cull_face_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_bake_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_bake_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1048525260)! + } + + } + + }() + + /// Sets the bake mode to use for the specified 3D light. Equivalent to ``Light3D/lightBakeMode``. + public static func lightSetBakeMode(light: RID, bakeMode: RenderingServer.LightBakeMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: bakeMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_bake_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_set_max_sdfgi_cascade: GDExtensionMethodBindPtr = { + let methodName = StringName("light_set_max_sdfgi_cascade") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera. + public static func lightSetMaxSdfgiCascade(light: RID, cascade: UInt32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: cascade) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_set_max_sdfgi_cascade, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_omni_set_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("light_omni_set_shadow_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2552677200)! + } + + } + + }() + + /// Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to ``OmniLight3D/omniShadowMode``. + public static func lightOmniSetShadowMode(light: RID, mode: RenderingServer.LightOmniShadowMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_omni_set_shadow_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_directional_set_shadow_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("light_directional_set_shadow_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 380462970)! + } + + } + + }() + + /// Sets the shadow mode for this directional light. Equivalent to ``DirectionalLight3D/directionalShadowMode``. See ``RenderingServer/LightDirectionalShadowMode`` for options. + public static func lightDirectionalSetShadowMode(light: RID, mode: RenderingServer.LightDirectionalShadowMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_directional_set_shadow_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_directional_set_blend_splits: GDExtensionMethodBindPtr = { + let methodName = StringName("light_directional_set_blend_splits") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to ``DirectionalLight3D/directionalShadowBlendSplits``. + public static func lightDirectionalSetBlendSplits(light: RID, enable: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_directional_set_blend_splits, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_directional_set_sky_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("light_directional_set_sky_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2559740754)! + } + + } + + }() + + /// If `true`, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. + public static func lightDirectionalSetSkyMode(light: RID, mode: RenderingServer.LightDirectionalSkyMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_light_directional_set_sky_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_light_projectors_set_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("light_projectors_set_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 43944325)! + } + + } + + }() + + /// Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis. + public static func lightProjectorsSetFilter(_ filter: RenderingServer.LightProjectorFilter) { + withUnsafePointer(to: filter.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_light_projectors_set_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_positional_soft_shadow_filter_set_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("positional_soft_shadow_filter_set_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3613045266)! + } + + } + + }() + + /// Sets the filter quality for omni and spot light shadows in 3D. See also ``ProjectSettings/rendering/lightsAndShadows/positionalShadow/softShadowFilterQuality``. This parameter is global and cannot be set on a per-viewport basis. + public static func positionalSoftShadowFilterSetQuality(_ quality: RenderingServer.ShadowQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_positional_soft_shadow_filter_set_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_directional_soft_shadow_filter_set_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("directional_soft_shadow_filter_set_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3613045266)! + } + + } + + }() + + /// Sets the filter `quality` for directional light shadows in 3D. See also ``ProjectSettings/rendering/lightsAndShadows/directionalShadow/softShadowFilterQuality``. This parameter is global and cannot be set on a per-viewport basis. + public static func directionalSoftShadowFilterSetQuality(_ quality: RenderingServer.ShadowQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_directional_soft_shadow_filter_set_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_directional_shadow_atlas_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("directional_shadow_atlas_set_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 300928843)! + } + + } + + }() + + /// Sets the `size` of the directional light shadows in 3D. See also ``ProjectSettings/rendering/lightsAndShadows/directionalShadow/size``. This parameter is global and cannot be set on a per-viewport basis. + public static func directionalShadowAtlasSetSize(_ size: Int32, is16bits: Bool) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: is16bits) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_directional_shadow_atlas_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_create: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `reflection_probe_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this reflection probe to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent node is ``ReflectionProbe``. + /// + public static func reflectionProbeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_reflection_probe_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_reflection_probe_set_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_update_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3853670147)! + } + + } + + }() + + /// Sets how often the reflection probe updates. Can either be once or every frame. See ``RenderingServer/ReflectionProbeUpdateMode`` for options. + public static func reflectionProbeSetUpdateMode(probe: RID, mode: RenderingServer.ReflectionProbeUpdateMode) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_update_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_intensity: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_intensity") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to ``ReflectionProbe/intensity``. + public static func reflectionProbeSetIntensity(probe: RID, intensity: Double) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: intensity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_intensity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_ambient_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_ambient_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 184163074)! + } + + } + + }() + + /// Sets the reflection probe's ambient light mode. Equivalent to ``ReflectionProbe/ambientMode``. + public static func reflectionProbeSetAmbientMode(probe: RID, mode: RenderingServer.ReflectionProbeAmbientMode) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_ambient_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_ambient_color: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_ambient_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Sets the reflection probe's custom ambient light color. Equivalent to ``ReflectionProbe/ambientColor``. + public static func reflectionProbeSetAmbientColor(probe: RID, color: Color) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_ambient_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_ambient_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_ambient_energy") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the reflection probe's custom ambient light energy. Equivalent to ``ReflectionProbe/ambientColorEnergy``. + public static func reflectionProbeSetAmbientEnergy(probe: RID, energy: Double) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: energy) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_ambient_energy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_max_distance: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_max_distance") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the max distance away from the probe an object can be before it is culled. Equivalent to ``ReflectionProbe/maxDistance``. + public static func reflectionProbeSetMaxDistance(probe: RID, distance: Double) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: distance) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_max_distance, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the size of the area that the reflection probe will capture. Equivalent to ``ReflectionProbe/size``. + public static func reflectionProbeSetSize(probe: RID, size: Vector3) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_origin_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_origin_offset") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to ``ReflectionProbe/originOffset``. + public static func reflectionProbeSetOriginOffset(probe: RID, offset: Vector3) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_origin_offset, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_as_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_as_interior") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, reflections will ignore sky contribution. Equivalent to ``ReflectionProbe/interior``. + public static func reflectionProbeSetAsInterior(probe: RID, enable: Bool) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_as_interior, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_enable_box_projection: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_enable_box_projection") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to ``ReflectionProbe/boxProjection``. + public static func reflectionProbeSetEnableBoxProjection(probe: RID, enable: Bool) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_enable_box_projection, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_enable_shadows: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_enable_shadows") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to ``ReflectionProbe/enableShadows``. + public static func reflectionProbeSetEnableShadows(probe: RID, enable: Bool) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_enable_shadows, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to ``ReflectionProbe/cullMask``. + public static func reflectionProbeSetCullMask(probe: RID, layers: UInt32) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_reflection_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_reflection_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to ``ReflectionProbe/reflectionMask``. + public static func reflectionProbeSetReflectionMask(probe: RID, layers: UInt32) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_reflection_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_resolution") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the resolution to use when rendering the specified reflection probe. The `resolution` is specified for each cubemap face: for instance, specifying `512` will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels). + public static func reflectionProbeSetResolution(probe: RID, resolution: Int32) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: resolution) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_resolution, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_reflection_probe_set_mesh_lod_threshold: GDExtensionMethodBindPtr = { + let methodName = StringName("reflection_probe_set_mesh_lod_threshold") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to ``ReflectionProbe/meshLodThreshold``. + public static func reflectionProbeSetMeshLodThreshold(probe: RID, pixels: Double) { + withUnsafePointer(to: probe.content) { pArg0 in + withUnsafePointer(to: pixels) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_reflection_probe_set_mesh_lod_threshold, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_create: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `decal_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this decal to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent node is ``Decal``. + /// + public static func decalCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_decal_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_decal_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the `size` of the decal specified by the `decal` RID. Equivalent to ``Decal/size``. + public static func decalSetSize(decal: RID, size: Vector3) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3953344054)! + } + + } + + }() + + /// Sets the `texture` in the given texture `type` slot for the specified decal. Equivalent to ``Decal/setTexture(type:texture:)``. + public static func decalSetTexture(decal: RID, type: RenderingServer.DecalTexture, texture: RID) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_emission_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_emission_energy") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the emission `energy` in the decal specified by the `decal` RID. Equivalent to ``Decal/emissionEnergy``. + public static func decalSetEmissionEnergy(decal: RID, energy: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: energy) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_emission_energy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_albedo_mix: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_albedo_mix") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `albedoMix` in the decal specified by the `decal` RID. Equivalent to ``Decal/albedoMix``. + public static func decalSetAlbedoMix(decal: RID, albedoMix: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: albedoMix) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_albedo_mix, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_modulate") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Sets the color multiplier in the decal specified by the `decal` RID to `color`. Equivalent to ``Decal/modulate``. + public static func decalSetModulate(decal: RID, color: Color) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_modulate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the cull `mask` in the decal specified by the `decal` RID. Equivalent to ``Decal/cullMask``. + public static func decalSetCullMask(decal: RID, mask: UInt32) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_distance_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_distance_fade") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2972769666)! + } + + } + + }() + + /// Sets the distance fade parameters in the decal specified by the `decal` RID. Equivalent to ``Decal/distanceFadeEnabled``, ``Decal/distanceFadeBegin`` and ``Decal/distanceFadeLength``. + public static func decalSetDistanceFade(decal: RID, enabled: Bool, begin: Double, length: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: begin) { pArg2 in + withUnsafePointer(to: length) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_distance_fade, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_fade") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2513314492)! + } + + } + + }() + + /// Sets the upper fade (`above`) and lower fade (`below`) in the decal specified by the `decal` RID. Equivalent to ``Decal/upperFade`` and ``Decal/lowerFade``. + public static func decalSetFade(decal: RID, above: Double, below: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: above) { pArg1 in + withUnsafePointer(to: below) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_fade, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_decal_set_normal_fade: GDExtensionMethodBindPtr = { + let methodName = StringName("decal_set_normal_fade") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the normal `fade` in the decal specified by the `decal` RID. Equivalent to ``Decal/normalFade``. + public static func decalSetNormalFade(decal: RID, fade: Double) { + withUnsafePointer(to: decal.content) { pArg0 in + withUnsafePointer(to: fade) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_decal_set_normal_fade, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_decals_set_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("decals_set_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3519875702)! + } + + } + + }() + + /// Sets the texture `filter` mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis. + public static func decalsSetFilter(_ filter: RenderingServer.DecalFilter) { + withUnsafePointer(to: filter.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_decals_set_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_gi_set_use_half_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("gi_set_use_half_resolution") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `halfResolution` is `true`, renders ``VoxelGI`` and SDFGI (``Environment/sdfgiEnabled``) buffers at halved resolution on each axis (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. ``LightmapGI`` rendering is not affected by this setting. Equivalent to ``ProjectSettings/rendering/globalIllumination/gi/useHalfResolution``. + public static func giSetUseHalfResolution(_ halfResolution: Bool) { + withUnsafePointer(to: halfResolution) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_gi_set_use_half_resolution, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_create: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `voxel_gi_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``VoxelGI``. + /// + public static func voxelGiCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_voxel_gi_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_voxel_gi_allocate_data: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_allocate_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4108223027)! + } + + } + + }() + + /// + public static func voxelGiAllocateData(voxelGi: RID, toCellXform: Transform3D, aabb: AABB, octreeSize: Vector3i, octreeCells: PackedByteArray, dataCells: PackedByteArray, distanceField: PackedByteArray, levelCounts: PackedInt32Array) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: toCellXform) { pArg1 in + withUnsafePointer(to: aabb) { pArg2 in + withUnsafePointer(to: octreeSize) { pArg3 in + withUnsafePointer(to: octreeCells.content) { pArg4 in + withUnsafePointer(to: dataCells.content) { pArg5 in + withUnsafePointer(to: distanceField.content) { pArg6 in + withUnsafePointer(to: levelCounts.content) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_allocate_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_get_octree_size: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_octree_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2607699645)! + } + + } + + }() + + /// + public static func voxelGiGetOctreeSize(voxelGi: RID) -> Vector3i { + var _result: Vector3i = Vector3i () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_octree_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_get_octree_cells: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_octree_cells") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3348040486)! + } + + } + + }() + + /// + public static func voxelGiGetOctreeCells(voxelGi: RID) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_octree_cells, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_get_data_cells: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_data_cells") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3348040486)! + } + + } + + }() + + /// + public static func voxelGiGetDataCells(voxelGi: RID) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_data_cells, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_get_distance_field: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_distance_field") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3348040486)! + } + + } + + }() + + /// + public static func voxelGiGetDistanceField(voxelGi: RID) -> PackedByteArray { + let _result: PackedByteArray = PackedByteArray () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_distance_field, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_get_level_counts: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_level_counts") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 788230395)! + } + + } + + }() + + /// + public static func voxelGiGetLevelCounts(voxelGi: RID) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_level_counts, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_get_to_cell_xform: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_get_to_cell_xform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1128465797)! + } + + } + + }() + + /// + public static func voxelGiGetToCellXform(voxelGi: RID) -> Transform3D { + var _result: Transform3D = Transform3D () + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_get_to_cell_xform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_voxel_gi_set_dynamic_range: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_dynamic_range") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the ``VoxelGIData/dynamicRange`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetDynamicRange(voxelGi: RID, range: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: range) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_dynamic_range, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_propagation: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_propagation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the ``VoxelGIData/propagation`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetPropagation(voxelGi: RID, amount: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_propagation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_energy") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the ``VoxelGIData/energy`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetEnergy(voxelGi: RID, energy: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: energy) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_energy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_baked_exposure_normalization: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_baked_exposure_normalization") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see ``cameraAttributesSetExposure(cameraAttributes:multiplier:normalization:)``. + public static func voxelGiSetBakedExposureNormalization(voxelGi: RID, bakedExposure: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: bakedExposure) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_baked_exposure_normalization, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_bias") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the ``VoxelGIData/bias`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetBias(voxelGi: RID, bias: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: bias) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_bias, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_normal_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_normal_bias") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the ``VoxelGIData/normalBias`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetNormalBias(voxelGi: RID, bias: Double) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: bias) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_normal_bias, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_interior") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the ``VoxelGIData/interior`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetInterior(voxelGi: RID, enable: Bool) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_interior, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_use_two_bounces: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_use_two_bounces") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the ``VoxelGIData/useTwoBounces`` value to use on the specified `voxelGi`'s ``RID``. + public static func voxelGiSetUseTwoBounces(voxelGi: RID, enable: Bool) { + withUnsafePointer(to: voxelGi.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_use_two_bounces, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_voxel_gi_set_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("voxel_gi_set_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1538689978)! + } + + } + + }() + + /// Sets the ``ProjectSettings/rendering/globalIllumination/voxelGi/quality`` value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis. + public static func voxelGiSetQuality(_ quality: RenderingServer.VoxelGIQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_voxel_gi_set_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_lightmap_create: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `lightmap_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``LightmapGI``. + /// + public static func lightmapCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_lightmap_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_lightmap_set_textures: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_textures") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2646464759)! + } + + } + + }() + + /// Set the textures on the given `lightmap` GI instance to the texture array pointed to by the `light` RID. If the lightmap texture was baked with ``LightmapGI/directional`` set to `true`, then `usesSh` must also be `true`. + public static func lightmapSetTextures(lightmap: RID, light: RID, usesSh: Bool) { + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: light.content) { pArg1 in + withUnsafePointer(to: usesSh) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_textures, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_lightmap_set_probe_bounds: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_probe_bounds") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// + public static func lightmapSetProbeBounds(lightmap: RID, bounds: AABB) { + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: bounds) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_probe_bounds, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_lightmap_set_probe_interior: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_probe_interior") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// + public static func lightmapSetProbeInterior(lightmap: RID, interior: Bool) { + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: interior) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_probe_interior, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_lightmap_set_probe_capture_data: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_probe_capture_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3217845880)! + } + + } + + }() + + /// + public static func lightmapSetProbeCaptureData(lightmap: RID, points: PackedVector3Array, pointSh: PackedColorArray, tetrahedra: PackedInt32Array, bspTree: PackedInt32Array) { + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: points.content) { pArg1 in + withUnsafePointer(to: pointSh.content) { pArg2 in + withUnsafePointer(to: tetrahedra.content) { pArg3 in + withUnsafePointer(to: bspTree.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_probe_capture_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_lightmap_get_probe_capture_points: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_get_probe_capture_points") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 808965560)! + } + + } + + }() + + /// + public static func lightmapGetProbeCapturePoints(lightmap: RID) -> PackedVector3Array { + let _result: PackedVector3Array = PackedVector3Array () + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_get_probe_capture_points, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_lightmap_get_probe_capture_sh: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_get_probe_capture_sh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1569415609)! + } + + } + + }() + + /// + public static func lightmapGetProbeCaptureSh(lightmap: RID) -> PackedColorArray { + let _result: PackedColorArray = PackedColorArray () + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_get_probe_capture_sh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_lightmap_get_probe_capture_tetrahedra: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_get_probe_capture_tetrahedra") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 788230395)! + } + + } + + }() + + /// + public static func lightmapGetProbeCaptureTetrahedra(lightmap: RID) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_get_probe_capture_tetrahedra, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_lightmap_get_probe_capture_bsp_tree: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_get_probe_capture_bsp_tree") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 788230395)! + } + + } + + }() + + /// + public static func lightmapGetProbeCaptureBspTree(lightmap: RID) -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_get_probe_capture_bsp_tree, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_lightmap_set_baked_exposure_normalization: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_baked_exposure_normalization") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see ``cameraAttributesSetExposure(cameraAttributes:multiplier:normalization:)``. + public static func lightmapSetBakedExposureNormalization(lightmap: RID, bakedExposure: Double) { + withUnsafePointer(to: lightmap.content) { pArg0 in + withUnsafePointer(to: bakedExposure) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_baked_exposure_normalization, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_lightmap_set_probe_capture_update_speed: GDExtensionMethodBindPtr = { + let methodName = StringName("lightmap_set_probe_capture_update_speed") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// + public static func lightmapSetProbeCaptureUpdateSpeed(_ speed: Double) { + withUnsafePointer(to: speed) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_lightmap_set_probe_capture_update_speed, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_particles_create: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `particles_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach these particles to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent nodes are ``GPUParticles2D`` and ``GPUParticles3D``. + /// + /// > Note: All `particles_*` methods only apply to GPU-based particles, not CPU-based particles. ``CPUParticles2D`` and ``CPUParticles3D`` do not have equivalent RenderingServer functions available, as these use ``MultiMeshInstance2D`` and ``MultiMeshInstance3D`` under the hood (see `multimesh_*` methods). + /// + public static func particlesCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_particles_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_particles_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3492270028)! + } + + } + + }() + + /// Sets whether the GPU particles specified by the `particles` RID should be rendered in 2D or 3D according to `mode`. + public static func particlesSetMode(particles: RID, mode: RenderingServer.ParticlesMode) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_emitting") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to ``GPUParticles3D/emitting``. + public static func particlesSetEmitting(particles: RID, emitting: Bool) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: emitting) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_emitting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_get_emitting: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_get_emitting") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if particles are currently set to emitting. + public static func particlesGetEmitting(particles: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_get_emitting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_particles_set_amount: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_amount") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the number of particles to be drawn and allocates the memory for them. Equivalent to ``GPUParticles3D/amount``. + public static func particlesSetAmount(particles: RID, amount: Int32) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_amount, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_amount_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_amount_ratio") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the amount ratio for particles to be emitted. Equivalent to ``GPUParticles3D/amountRatio``. + public static func particlesSetAmountRatio(particles: RID, ratio: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: ratio) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_amount_ratio, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_lifetime: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_lifetime") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the lifetime of each particle in the system. Equivalent to ``GPUParticles3D/lifetime``. + public static func particlesSetLifetime(particles: RID, lifetime: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: lifetime) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_lifetime, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_one_shot: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_one_shot") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, particles will emit once and then stop. Equivalent to ``GPUParticles3D/oneShot``. + public static func particlesSetOneShot(particles: RID, oneShot: Bool) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: oneShot) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_one_shot, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_pre_process_time: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_pre_process_time") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to ``GPUParticles3D/preprocess``. + public static func particlesSetPreProcessTime(particles: RID, time: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: time) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_pre_process_time, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_explosiveness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_explosiveness_ratio") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the explosiveness ratio. Equivalent to ``GPUParticles3D/explosiveness``. + public static func particlesSetExplosivenessRatio(particles: RID, ratio: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: ratio) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_explosiveness_ratio, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_randomness_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_randomness_ratio") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to ``GPUParticles3D/randomness``. + public static func particlesSetRandomnessRatio(particles: RID, ratio: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: ratio) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_randomness_ratio, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_interp_to_end: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_interp_to_end") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the value that informs a ``ParticleProcessMaterial`` to rush all particles towards the end of their lifetime. + public static func particlesSetInterpToEnd(particles: RID, factor: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: factor) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_interp_to_end, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_emitter_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_emitter_velocity") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the velocity of a particle node, that will be used by ``ParticleProcessMaterial/inheritVelocityRatio``. + public static func particlesSetEmitterVelocity(particles: RID, velocity: Vector3) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: velocity) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_emitter_velocity, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// Sets a custom axis-aligned bounding box for the particle system. Equivalent to ``GPUParticles3D/visibilityAabb``. + public static func particlesSetCustomAabb(particles: RID, aabb: AABB) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: aabb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_speed_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_speed_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the speed scale of the particle system. Equivalent to ``GPUParticles3D/speedScale``. + public static func particlesSetSpeedScale(particles: RID, scale: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_speed_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_use_local_coordinates: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_use_local_coordinates") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to ``GPUParticles3D/localCoords``. + public static func particlesSetUseLocalCoordinates(particles: RID, enable: Bool) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_use_local_coordinates, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_process_material: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_process_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the material for processing the particles. + /// + /// > Note: This is not the material used to draw the materials. Equivalent to ``GPUParticles3D/processMaterial``. + /// + public static func particlesSetProcessMaterial(particles: RID, material: RID) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_process_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_fixed_fps: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_fixed_fps") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the frame rate that the particle system rendering will be fixed to. Equivalent to ``GPUParticles3D/fixedFps``. + public static func particlesSetFixedFps(particles: RID, fps: Int32) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: fps) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_fixed_fps, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_interpolate: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_interpolate") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// + public static func particlesSetInterpolate(particles: RID, enable: Bool) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_interpolate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_fractional_delta: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_fractional_delta") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to ``GPUParticles3D/fractDelta``. + public static func particlesSetFractionalDelta(particles: RID, enable: Bool) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_fractional_delta, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_collision_base_size: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_collision_base_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// + public static func particlesSetCollisionBaseSize(particles: RID, size: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_collision_base_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_transform_align: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_transform_align") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3264971368)! + } + + } + + }() + + /// + public static func particlesSetTransformAlign(particles: RID, align: RenderingServer.ParticlesTransformAlign) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: align.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_transform_align, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_trails: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_trails") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2010054925)! + } + + } + + }() + + /// If `enable` is `true`, enables trails for the `particles` with the specified `lengthSec` in seconds. Equivalent to ``GPUParticles3D/trailEnabled`` and ``GPUParticles3D/trailLifetime``. + public static func particlesSetTrails(particles: RID, enable: Bool, lengthSec: Double) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: lengthSec) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_trails, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_trail_bind_poses: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_trail_bind_poses") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 684822712)! + } + + } + + }() + + /// + public static func particlesSetTrailBindPoses(particles: RID, bindPoses: VariantCollection) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: bindPoses.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_trail_bind_poses, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_is_inactive: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_is_inactive") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3521089500)! + } + + } + + }() + + /// Returns `true` if particles are not emitting and particles are set to inactive. + public static func particlesIsInactive(particles: RID) -> Bool { + var _result: Bool = false + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_is_inactive, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_particles_request_process: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_request_process") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to ``instancesCullAabb(_:scenario:)``, ``instancesCullConvex(_:scenario:)``, or ``instancesCullRay(from:to:scenario:)``. + public static func particlesRequestProcess(particles: RID) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_request_process, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_particles_restart: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_restart") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Reset the particles on the next update. Equivalent to ``GPUParticles3D/restart()``. + public static func particlesRestart(particles: RID) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_restart, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_particles_set_subemitter: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_subemitter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// + public static func particlesSetSubemitter(particles: RID, subemitterParticles: RID) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: subemitterParticles.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_subemitter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_emit: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_emit") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4043136117)! + } + + } + + }() + + /// Manually emits particles from the `particles` instance. + public static func particlesEmit(particles: RID, transform: Transform3D, velocity: Vector3, color: Color, custom: Color, emitFlags: UInt32) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: velocity) { pArg2 in + withUnsafePointer(to: color) { pArg3 in + withUnsafePointer(to: custom) { pArg4 in + withUnsafePointer(to: emitFlags) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_particles_emit, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_draw_order: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_draw_order") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 935028487)! + } + + } + + }() + + /// Sets the draw order of the particles to one of the named enums from ``RenderingServer/ParticlesDrawOrder``. See ``RenderingServer/ParticlesDrawOrder`` for options. Equivalent to ``GPUParticles3D/drawOrder``. + public static func particlesSetDrawOrder(particles: RID, order: RenderingServer.ParticlesDrawOrder) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: order.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_draw_order, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_draw_passes: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_draw_passes") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the number of draw passes to use. Equivalent to ``GPUParticles3D/drawPasses``. + public static func particlesSetDrawPasses(particles: RID, count: Int32) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: count) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_draw_passes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_set_draw_pass_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_draw_pass_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Sets the mesh to be used for the specified draw pass. Equivalent to ``GPUParticles3D/drawPass1``, ``GPUParticles3D/drawPass2``, ``GPUParticles3D/drawPass3``, and ``GPUParticles3D/drawPass4``. + public static func particlesSetDrawPassMesh(particles: RID, pass: Int32, mesh: RID) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: pass) { pArg1 in + withUnsafePointer(to: mesh.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_draw_pass_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_particles_get_current_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_get_current_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3952830260)! + } + + } + + }() + + /// Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to ``GPUParticles3D/captureAabb()``. + public static func particlesGetCurrentAabb(particles: RID) -> AABB { + var _result: AABB = AABB () + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_get_current_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_particles_set_emission_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_set_emission_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets the ``Transform3D`` that will be used by the particles when they first emit. + public static func particlesSetEmissionTransform(particles: RID, transform: Transform3D) { + withUnsafePointer(to: particles.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_set_emission_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_create: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `particles_collision_*` RenderingServer functions. + /// + /// > Note: The equivalent nodes are ``GPUParticlesCollision3D`` and ``GPUParticlesAttractor3D``. + /// + public static func particlesCollisionCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_particles_collision_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_particles_collision_set_collision_type: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_collision_type") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1497044930)! + } + + } + + }() + + /// Sets the collision or attractor shape `type` for the 3D GPU particles collision or attractor specified by the `particlesCollision` RID. + public static func particlesCollisionSetCollisionType(particlesCollision: RID, type: RenderingServer.ParticlesCollisionType) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_collision_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the cull `mask` for the 3D GPU particles collision or attractor specified by the `particlesCollision` RID. Equivalent to ``GPUParticlesCollision3D/cullMask`` or ``GPUParticlesAttractor3D/cullMask`` depending on the `particlesCollision` type. + public static func particlesCollisionSetCullMask(particlesCollision: RID, mask: UInt32) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_sphere_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_sphere_radius") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `radius` for the 3D GPU particles sphere collision or attractor specified by the `particlesCollision` RID. Equivalent to ``GPUParticlesCollisionSphere3D/radius`` or ``GPUParticlesAttractorSphere3D/radius`` depending on the `particlesCollision` type. + public static func particlesCollisionSetSphereRadius(particlesCollision: RID, radius: Double) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: radius) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_sphere_radius, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_box_extents: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_box_extents") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the `extents` for the 3D GPU particles collision by the `particlesCollision` RID. Equivalent to ``GPUParticlesCollisionBox3D/size``, ``GPUParticlesCollisionSDF3D/size``, ``GPUParticlesCollisionHeightField3D/size``, ``GPUParticlesAttractorBox3D/size`` or ``GPUParticlesAttractorVectorField3D/size`` depending on the `particlesCollision` type. + public static func particlesCollisionSetBoxExtents(particlesCollision: RID, extents: Vector3) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: extents) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_box_extents, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_attractor_strength: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_attractor_strength") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the `strength` for the 3D GPU particles attractor specified by the `particlesCollision` RID. Only used for attractors, not colliders. Equivalent to ``GPUParticlesAttractor3D/strength``. + public static func particlesCollisionSetAttractorStrength(particlesCollision: RID, strength: Double) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: strength) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_attractor_strength, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_attractor_directionality: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_attractor_directionality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the directionality `amount` for the 3D GPU particles attractor specified by the `particlesCollision` RID. Only used for attractors, not colliders. Equivalent to ``GPUParticlesAttractor3D/directionality``. + public static func particlesCollisionSetAttractorDirectionality(particlesCollision: RID, amount: Double) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_attractor_directionality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_attractor_attenuation: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_attractor_attenuation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the attenuation `curve` for the 3D GPU particles attractor specified by the `particlesCollision` RID. Only used for attractors, not colliders. Equivalent to ``GPUParticlesAttractor3D/attenuation``. + public static func particlesCollisionSetAttractorAttenuation(particlesCollision: RID, curve: Double) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: curve) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_attractor_attenuation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_field_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_field_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the signed distance field `texture` for the 3D GPU particles collision specified by the `particlesCollision` RID. Equivalent to ``GPUParticlesCollisionSDF3D/texture`` or ``GPUParticlesAttractorVectorField3D/texture`` depending on the `particlesCollision` type. + public static func particlesCollisionSetFieldTexture(particlesCollision: RID, texture: RID) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: texture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_field_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_particles_collision_height_field_update: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_height_field_update") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its ``GPUParticlesCollisionHeightField3D/updateMode``. + public static func particlesCollisionHeightFieldUpdate(particlesCollision: RID) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_height_field_update, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_particles_collision_set_height_field_resolution: GDExtensionMethodBindPtr = { + let methodName = StringName("particles_collision_set_height_field_resolution") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 962977297)! + } + + } + + }() + + /// Sets the heightmap `resolution` for the 3D GPU particles heightfield collision specified by the `particlesCollision` RID. Equivalent to ``GPUParticlesCollisionHeightField3D/resolution``. + public static func particlesCollisionSetHeightFieldResolution(particlesCollision: RID, resolution: RenderingServer.ParticlesCollisionHeightfieldResolution) { + withUnsafePointer(to: particlesCollision.content) { pArg0 in + withUnsafePointer(to: resolution.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_particles_collision_set_height_field_resolution, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_fog_volume_create: GDExtensionMethodBindPtr = { + let methodName = StringName("fog_volume_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `fog_volume_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``FogVolume``. + /// + public static func fogVolumeCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_fog_volume_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_fog_volume_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("fog_volume_set_shape") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3818703106)! + } + + } + + }() + + /// Sets the shape of the fog volume to either ``RenderingServer/FogVolumeShape/ellipsoid``, ``RenderingServer/FogVolumeShape/cone``, ``RenderingServer/FogVolumeShape/cylinder``, ``RenderingServer/FogVolumeShape/box`` or ``RenderingServer/FogVolumeShape/world``. + public static func fogVolumeSetShape(fogVolume: RID, shape: RenderingServer.FogVolumeShape) { + withUnsafePointer(to: fogVolume.content) { pArg0 in + withUnsafePointer(to: shape.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_fog_volume_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_fog_volume_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("fog_volume_set_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3227306858)! + } + + } + + }() + + /// Sets the size of the fog volume when shape is ``RenderingServer/FogVolumeShape/ellipsoid``, ``RenderingServer/FogVolumeShape/cone``, ``RenderingServer/FogVolumeShape/cylinder`` or ``RenderingServer/FogVolumeShape/box``. + public static func fogVolumeSetSize(fogVolume: RID, size: Vector3) { + withUnsafePointer(to: fogVolume.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_fog_volume_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_fog_volume_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("fog_volume_set_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the ``Material`` of the fog volume. Can be either a ``FogMaterial`` or a custom ``ShaderMaterial``. + public static func fogVolumeSetMaterial(fogVolume: RID, material: RID) { + withUnsafePointer(to: fogVolume.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_fog_volume_set_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_visibility_notifier_create: GDExtensionMethodBindPtr = { + let methodName = StringName("visibility_notifier_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `visibility_notifier_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// To place in a scene, attach this mesh to an instance using ``instanceSetBase(instance:base:)`` using the returned RID. + /// + /// > Note: The equivalent node is ``VisibleOnScreenNotifier3D``. + /// + public static func visibilityNotifierCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_visibility_notifier_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_visibility_notifier_set_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("visibility_notifier_set_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// + public static func visibilityNotifierSetAabb(notifier: RID, aabb: AABB) { + withUnsafePointer(to: notifier.content) { pArg0 in + withUnsafePointer(to: aabb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_visibility_notifier_set_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_visibility_notifier_set_callbacks: GDExtensionMethodBindPtr = { + let methodName = StringName("visibility_notifier_set_callbacks") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2689735388)! + } + + } + + }() + + /// + public static func visibilityNotifierSetCallbacks(notifier: RID, enterCallable: Callable, exitCallable: Callable) { + withUnsafePointer(to: notifier.content) { pArg0 in + withUnsafePointer(to: enterCallable.content) { pArg1 in + withUnsafePointer(to: exitCallable.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_visibility_notifier_set_callbacks, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_occluder_create: GDExtensionMethodBindPtr = { + let methodName = StringName("occluder_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `occluder_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``Occluder3D`` (not to be confused with the ``OccluderInstance3D`` node). + /// + public static func occluderCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_occluder_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_occluder_set_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("occluder_set_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3854404263)! + } + + } + + }() + + /// Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed. + public static func occluderSetMesh(occluder: RID, vertices: PackedVector3Array, indices: PackedInt32Array) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: vertices.content) { pArg1 in + withUnsafePointer(to: indices.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_occluder_set_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_create: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``Camera3D``. + /// + public static func cameraCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_camera_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_camera_set_perspective: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_perspective") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 157498339)! + } + + } + + }() + + /// Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. + public static func cameraSetPerspective(camera: RID, fovyDegrees: Double, zNear: Double, zFar: Double) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: fovyDegrees) { pArg1 in + withUnsafePointer(to: zNear) { pArg2 in + withUnsafePointer(to: zFar) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_perspective, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_orthogonal: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_orthogonal") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 157498339)! + } + + } + + }() + + /// Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. + public static func cameraSetOrthogonal(camera: RID, size: Double, zNear: Double, zFar: Double) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: zNear) { pArg2 in + withUnsafePointer(to: zFar) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_orthogonal, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_frustum: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_frustum") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1889878953)! + } + + } + + }() + + /// Sets camera to use frustum projection. This mode allows adjusting the `offset` argument to create "tilted frustum" effects. + public static func cameraSetFrustum(camera: RID, size: Double, offset: Vector2, zNear: Double, zFar: Double) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: zNear) { pArg3 in + withUnsafePointer(to: zFar) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_frustum, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets ``Transform3D`` of camera. + public static func cameraSetTransform(camera: RID, transform: Transform3D) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to ``Camera3D/cullMask``. + public static func cameraSetCullMask(camera: RID, layers: UInt32) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: layers) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_environment") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the environment used by this camera. Equivalent to ``Camera3D/environment``. + public static func cameraSetEnvironment(camera: RID, env: RID) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: env.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_camera_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_camera_attributes") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the camera_attributes created with ``cameraAttributesCreate()`` to the given camera. + public static func cameraSetCameraAttributes(camera: RID, effects: RID) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: effects.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_camera_attributes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_compositor: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_compositor") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the compositor used by this camera. Equivalent to ``Camera3D/compositor``. + public static func cameraSetCompositor(camera: RID, compositor: RID) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: compositor.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_compositor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_set_use_vertical_aspect: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_set_use_vertical_aspect") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, preserves the horizontal aspect ratio which is equivalent to ``Camera3D/KeepAspect/width``. If `false`, preserves the vertical aspect ratio which is equivalent to ``Camera3D/KeepAspect/height``. + public static func cameraSetUseVerticalAspect(camera: RID, enable: Bool) { + withUnsafePointer(to: camera.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_set_use_vertical_aspect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_create: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `viewport_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``Viewport``. + /// + public static func viewportCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_viewport_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_viewport_set_use_xr: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_use_xr") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the viewport uses augmented or virtual reality technologies. See ``XRInterface``. + public static func viewportSetUseXr(viewport: RID, useXr: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: useXr) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_use_xr, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets the viewport's width and height in pixels. + public static func viewportSetSize(viewport: RID, width: Int32, height: Int32) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_active") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, sets the viewport active, else sets it inactive. + public static func viewportSetActive(viewport: RID, active: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: active) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_parent_viewport: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_parent_viewport") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the viewport's parent to the viewport specified by the `parentViewport` RID. + public static func viewportSetParentViewport(_ viewport: RID, parentViewport: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: parentViewport.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_parent_viewport, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_attach_to_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_attach_to_screen") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1062245816)! + } + + } + + }() + + /// Copies the viewport to a region of the screen specified by `rect`. If ``viewportSetRenderDirectToScreen(viewport:enabled:)`` is `true`, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. + /// + /// For example, you can set the root viewport to not render at all with the following code: + /// + /// FIXME: The method seems to be non-existent. + /// + /// Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see ``viewportSetRenderDirectToScreen(viewport:enabled:)``. + /// + public static func viewportAttachToScreen(viewport: RID, rect: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), screen: Int32 = 0) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: screen) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_attach_to_screen, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_render_direct_to_screen: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_render_direct_to_screen") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. + public static func viewportSetRenderDirectToScreen(viewport: RID, enabled: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_render_direct_to_screen, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_canvas_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_canvas_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the rendering mask associated with this ``Viewport``. Only ``CanvasItem`` nodes with a matching rendering visibility layer will be rendered by this ``Viewport``. + public static func viewportSetCanvasCullMask(viewport: RID, canvasCullMask: UInt32) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: canvasCullMask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_canvas_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_scaling_3d_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_scaling_3d_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2386524376)! + } + + } + + }() + + /// Sets the 3D resolution scaling mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. + public static func viewportSetScaling3dMode(viewport: RID, scaling3dMode: RenderingServer.ViewportScaling3DMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: scaling3dMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_scaling_3d_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_scaling_3d_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_scaling_3d_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Scales the 3D render buffer based on the viewport size uses an image filter specified in ``RenderingServer/ViewportScaling3DMode`` to scale the output image to the full viewport size. Values lower than `1.0` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than `1.0` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also ``RenderingServer/ViewportMSAA`` for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. + /// + /// When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale. + /// + public static func viewportSetScaling3dScale(viewport: RID, scale: Double) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_scaling_3d_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_fsr_sharpness: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_fsr_sharpness") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference. + public static func viewportSetFsrSharpness(viewport: RID, sharpness: Double) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: sharpness) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_fsr_sharpness, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_texture_mipmap_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_texture_mipmap_bias") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between `-0.75` and `0.0`. Enabling temporal antialiasing (``ProjectSettings/rendering/antiAliasing/quality/useTaa``) can help reduce the graininess visible when using negative mipmap bias. + /// + /// > Note: When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is `-log2(1.0 / scale) + mipmap_bias`. + /// + public static func viewportSetTextureMipmapBias(viewport: RID, mipmapBias: Double) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: mipmapBias) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_texture_mipmap_bias, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_update_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3161116010)! + } + + } + + }() + + /// Sets when the viewport should be updated. See ``RenderingServer/ViewportUpdateMode`` constants for options. + public static func viewportSetUpdateMode(viewport: RID, updateMode: RenderingServer.ViewportUpdateMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: updateMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_update_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_get_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_update_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3803901472)! + } + + } + + }() + + /// Returns the viewport's update mode. See ``RenderingServer/ViewportUpdateMode`` constants for options. + /// + /// > Warning: Calling this from any thread other than the rendering thread will be detrimental to performance. + /// + public static func viewportGetUpdateMode(viewport: RID) -> RenderingServer.ViewportUpdateMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_update_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return RenderingServer.ViewportUpdateMode (rawValue: _result)! + } + + fileprivate static var method_viewport_set_clear_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_clear_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3628367896)! + } + + } + + }() + + /// Sets the clear mode of a viewport. See ``RenderingServer/ViewportClearMode`` for options. + public static func viewportSetClearMode(viewport: RID, clearMode: RenderingServer.ViewportClearMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: clearMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_clear_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_get_render_target: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_render_target") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the render target for the viewport. + public static func viewportGetRenderTarget(viewport: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_render_target, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_viewport_get_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3814569979)! + } + + } + + }() + + /// Returns the viewport's last rendered frame. + public static func viewportGetTexture(viewport: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_viewport_set_disable_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_disable_3d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the viewport's 3D elements are not rendered. + public static func viewportSetDisable3d(viewport: RID, disable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_disable_3d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_disable_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_disable_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the viewport's canvas (i.e. 2D and GUI elements) is not rendered. + public static func viewportSetDisable2d(viewport: RID, disable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: disable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_disable_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_environment_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_environment_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2196892182)! + } + + } + + }() + + /// Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is ``EnvironmentBG/canvas``. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to ``ViewportEnvironmentMode/inherit``, then the behavior will be the same as if it was set to ``ViewportEnvironmentMode/enabled``. + public static func viewportSetEnvironmentMode(viewport: RID, mode: RenderingServer.ViewportEnvironmentMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_environment_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_attach_camera: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_attach_camera") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a viewport's camera. + public static func viewportAttachCamera(viewport: RID, camera: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: camera.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_attach_camera, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_scenario: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_scenario") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc. + public static func viewportSetScenario(viewport: RID, scenario: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: scenario.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_scenario, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_attach_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_attach_canvas") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a viewport's canvas. + public static func viewportAttachCanvas(viewport: RID, canvas: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_attach_canvas, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_remove_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_remove_canvas") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Detaches a viewport from a canvas. + public static func viewportRemoveCanvas(viewport: RID, canvas: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_remove_canvas, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_snap_2d_transforms_to_pixel: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_snap_2d_transforms_to_pixel") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when ``Camera2D`` smoothing is enabled. Equivalent to ``ProjectSettings/rendering/2d/snap/snap2dTransformsToPixel``. + public static func viewportSetSnap2dTransformsToPixel(viewport: RID, enabled: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_snap_2d_transforms_to_pixel, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_snap_2d_vertices_to_pixel: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_snap_2d_vertices_to_pixel") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when ``Camera2D`` smoothing is enabled. Equivalent to ``ProjectSettings/rendering/2d/snap/snap2dVerticesToPixel``. + public static func viewportSetSnap2dVerticesToPixel(viewport: RID, enabled: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_snap_2d_vertices_to_pixel, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_default_canvas_item_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_default_canvas_item_texture_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1155129294)! + } + + } + + }() + + /// Sets the default texture filtering mode for the specified `viewport` RID. See ``RenderingServer/CanvasItemTextureFilter`` for options. + public static func viewportSetDefaultCanvasItemTextureFilter(viewport: RID, filter: RenderingServer.CanvasItemTextureFilter) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: filter.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_default_canvas_item_texture_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_default_canvas_item_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_default_canvas_item_texture_repeat") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1652956681)! + } + + } + + }() + + /// Sets the default texture repeat mode for the specified `viewport` RID. See ``RenderingServer/CanvasItemTextureRepeat`` for options. + public static func viewportSetDefaultCanvasItemTextureRepeat(viewport: RID, `repeat`: RenderingServer.CanvasItemTextureRepeat) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: `repeat`.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_default_canvas_item_texture_repeat, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_canvas_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_canvas_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3608606053)! + } + + } + + }() + + /// Sets the transformation of a viewport's canvas. + public static func viewportSetCanvasTransform(viewport: RID, canvas: RID, offset: Transform2D) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: offset) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_canvas_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_canvas_stacking: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_canvas_stacking") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3713930247)! + } + + } + + }() + + /// Sets the stacking order for a viewport's canvas. + /// + /// `layer` is the actual canvas layer, while `sublayer` specifies the stacking order of the canvas among those in the same layer. + /// + public static func viewportSetCanvasStacking(viewport: RID, canvas: RID, layer: Int32, sublayer: Int32) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: layer) { pArg2 in + withUnsafePointer(to: sublayer) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_canvas_stacking, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_transparent_background: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_transparent_background") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, the viewport renders its background as transparent. + public static func viewportSetTransparentBackground(viewport: RID, enabled: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_transparent_background, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_global_canvas_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_global_canvas_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets the viewport's global transformation matrix. + public static func viewportSetGlobalCanvasTransform(viewport: RID, transform: Transform2D) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_global_canvas_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_sdf_oversize_and_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_sdf_oversize_and_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1329198632)! + } + + } + + }() + + /// Sets the viewport's 2D signed distance field ``ProjectSettings/rendering/2d/sdf/oversize`` and ``ProjectSettings/rendering/2d/sdf/scale``. This is used when sampling the signed distance field in ``CanvasItem`` shaders as well as ``GPUParticles2D`` collision. This is _not_ used by SDFGI in 3D rendering. + public static func viewportSetSdfOversizeAndScale(viewport: RID, oversize: RenderingServer.ViewportSDFOversize, scale: RenderingServer.ViewportSDFScale) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: oversize.rawValue) { pArg1 in + withUnsafePointer(to: scale.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_sdf_oversize_and_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_positional_shadow_atlas_size: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_positional_shadow_atlas_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1904426712)! + } + + } + + }() + + /// Sets the `size` of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the `viewport` RID. The value is rounded up to the nearest power of 2. If `use16Bits` is `true`, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. + /// + /// > Note: If this is set to `0`, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows). + /// + public static func viewportSetPositionalShadowAtlasSize(viewport: RID, size: Int32, use16Bits: Bool = false) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: size) { pArg1 in + withUnsafePointer(to: use16Bits) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_positional_shadow_atlas_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_positional_shadow_atlas_quadrant_subdivision: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_positional_shadow_atlas_quadrant_subdivision") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets the number of subdivisions to use in the specified shadow atlas `quadrant` for omni and spot shadows. See also ``Viewport/setPositionalShadowAtlasQuadrantSubdiv(quadrant:subdiv:)``. + public static func viewportSetPositionalShadowAtlasQuadrantSubdivision(viewport: RID, quadrant: Int32, subdivision: Int32) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: quadrant) { pArg1 in + withUnsafePointer(to: subdivision) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_positional_shadow_atlas_quadrant_subdivision, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_msaa_3d: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_msaa_3d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3764433340)! + } + + } + + }() + + /// Sets the multisample anti-aliasing mode for 3D on the specified `viewport` RID. See ``RenderingServer/ViewportMSAA`` for options. + public static func viewportSetMsaa3d(viewport: RID, msaa: RenderingServer.ViewportMSAA) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: msaa.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_msaa_3d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_msaa_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_msaa_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3764433340)! + } + + } + + }() + + /// Sets the multisample anti-aliasing mode for 2D/Canvas on the specified `viewport` RID. See ``RenderingServer/ViewportMSAA`` for options. + public static func viewportSetMsaa2d(viewport: RID, msaa: RenderingServer.ViewportMSAA) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: msaa.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_msaa_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_use_hdr_2d: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_use_hdr_2d") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an `RGBA16` framebuffer, while when using the Mobile renderer it will be an `RGB10_A2` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the `0-1` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as ``Viewport/useHdr2d``. + /// + /// > Note: This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. + /// + public static func viewportSetUseHdr2d(viewport: RID, enabled: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_use_hdr_2d, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_screen_space_aa: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_screen_space_aa") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1447279591)! + } + + } + + }() + + /// Sets the viewport's screen-space antialiasing mode. + public static func viewportSetScreenSpaceAa(viewport: RID, mode: RenderingServer.ViewportScreenSpaceAA) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_screen_space_aa, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_use_taa: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_use_taa") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, use Temporal Anti-Aliasing. Equivalent to ``ProjectSettings/rendering/antiAliasing/quality/useTaa``. + public static func viewportSetUseTaa(viewport: RID, enable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_use_taa, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_use_debanding: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_use_debanding") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, enables debanding on the specified viewport. Equivalent to ``ProjectSettings/rendering/antiAliasing/quality/useDebanding``. + public static func viewportSetUseDebanding(viewport: RID, enable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_use_debanding, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_use_occlusion_culling: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_use_occlusion_culling") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, enables occlusion culling on the specified viewport. Equivalent to ``ProjectSettings/rendering/occlusionCulling/useOcclusionCulling``. + public static func viewportSetUseOcclusionCulling(viewport: RID, enable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_use_occlusion_culling, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_occlusion_rays_per_thread: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_occlusion_rays_per_thread") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the ``ProjectSettings/rendering/occlusionCulling/occlusionRaysPerThread`` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. + public static func viewportSetOcclusionRaysPerThread(_ raysPerThread: Int32) { + withUnsafePointer(to: raysPerThread) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_occlusion_rays_per_thread, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_viewport_set_occlusion_culling_build_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_occlusion_culling_build_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2069725696)! + } + + } + + }() + + /// Sets the ``ProjectSettings/rendering/occlusionCulling/bvhBuildQuality`` to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. + public static func viewportSetOcclusionCullingBuildQuality(_ quality: RenderingServer.ViewportOcclusionCullingBuildQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_occlusion_culling_build_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_viewport_get_render_info: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_render_info") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2041262392)! + } + + } + + }() + + /// Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass `type`s, each of them having the same `info`s you can query (different passes will return different values). See ``RenderingServer.ViewportRenderInfoType`` for a list of render pass types and ``RenderingServer.ViewportRenderInfo`` for a list of information that can be queried. + /// + /// See also ``getRenderingInfo(_:)``, which returns global information across all viewports. + /// + /// > Note: Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, ``viewportGetRenderInfo(viewport:type:info:)`` returns `0`. To print rendering information in `_ready()` successfully, use the following: + /// + public static func viewportGetRenderInfo(viewport: RID, type: RenderingServer.ViewportRenderInfoType, info: RenderingServer.ViewportRenderInfo) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: info.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_render_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_viewport_set_debug_draw: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_debug_draw") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2089420930)! + } + + } + + }() + + /// Sets the debug draw mode of a viewport. See ``RenderingServer/ViewportDebugDraw`` for options. + public static func viewportSetDebugDraw(viewport: RID, draw: RenderingServer.ViewportDebugDraw) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: draw.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_debug_draw, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_measure_render_time: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_measure_render_time") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the measurement for the given `viewport` RID (obtained using ``Viewport/getViewportRid()``). Once enabled, ``viewportGetMeasuredRenderTimeCpu(viewport:)`` and ``viewportGetMeasuredRenderTimeGpu(viewport:)`` will return values greater than `0.0` when queried with the given `viewport`. + public static func viewportSetMeasureRenderTime(viewport: RID, enable: Bool) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_measure_render_time, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_get_measured_render_time_cpu: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_measured_render_time_cpu") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the CPU time taken to render the last frame in milliseconds. This _only_ includes time spent in rendering-related operations; scripts' `_process` functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus ``getFrameSetupTimeCpu()``. Unlike ``Engine/getFramesPerSecond()``, this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or ``Engine/maxFps``. See also ``viewportGetMeasuredRenderTimeGpu(viewport:)``. + /// + /// > Note: Requires measurements to be enabled on the specified `viewport` using ``viewportSetMeasureRenderTime(viewport:enable:)``. Otherwise, this method returns `0.0`. + /// + public static func viewportGetMeasuredRenderTimeCpu(viewport: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_measured_render_time_cpu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_viewport_get_measured_render_time_gpu: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_get_measured_render_time_gpu") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 866169185)! + } + + } + + }() + + /// Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike ``Engine/getFramesPerSecond()``, this method accurately reflects GPU utilization even if framerate is capped via V-Sync or ``Engine/maxFps``. See also ``viewportGetMeasuredRenderTimeGpu(viewport:)``. + /// + /// > Note: Requires measurements to be enabled on the specified `viewport` using ``viewportSetMeasureRenderTime(viewport:enable:)``. Otherwise, this method returns `0.0`. + /// + /// > Note: When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using ``viewportGetMeasuredRenderTimeGpu(viewport:)``. This behavior can be overridden in the graphics driver settings at the cost of higher power usage. + /// + public static func viewportGetMeasuredRenderTimeGpu(viewport: RID) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_get_measured_render_time_gpu, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_viewport_set_vrs_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_vrs_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 398809874)! + } + + } + + }() + + /// Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to ``ProjectSettings/rendering/vrs/mode``. + public static func viewportSetVrsMode(viewport: RID, mode: RenderingServer.ViewportVRSMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_vrs_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_vrs_update_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_vrs_update_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2696154815)! + } + + } + + }() + + /// Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. + /// + /// If set to ``RenderingServer/ViewportVRSUpdateMode/once``, the input texture is copied once and the mode is changed to ``RenderingServer/ViewportVRSUpdateMode/disabled``. + /// + public static func viewportSetVrsUpdateMode(viewport: RID, mode: RenderingServer.ViewportVRSUpdateMode) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_vrs_update_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_viewport_set_vrs_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("viewport_set_vrs_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// The texture to use when the VRS mode is set to ``RenderingServer/ViewportVRSMode/texture``. Equivalent to ``ProjectSettings/rendering/vrs/texture``. + public static func viewportSetVrsTexture(viewport: RID, texture: RID) { + withUnsafePointer(to: viewport.content) { pArg0 in + withUnsafePointer(to: texture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_viewport_set_vrs_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_sky_create: GDExtensionMethodBindPtr = { + let methodName = StringName("sky_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `sky_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + public static func skyCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_sky_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_sky_set_radiance_size: GDExtensionMethodBindPtr = { + let methodName = StringName("sky_set_radiance_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the `radianceSize` of the sky specified by the `sky` RID (in pixels). Equivalent to ``Sky/radianceSize``. + public static func skySetRadianceSize(sky: RID, radianceSize: Int32) { + withUnsafePointer(to: sky.content) { pArg0 in + withUnsafePointer(to: radianceSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_sky_set_radiance_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_sky_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("sky_set_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3279019937)! + } + + } + + }() + + /// Sets the process `mode` of the sky specified by the `sky` RID. Equivalent to ``Sky/processMode``. + public static func skySetMode(sky: RID, mode: RenderingServer.SkyMode) { + withUnsafePointer(to: sky.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_sky_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_sky_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("sky_set_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the material that the sky uses to render the background, ambient and reflection maps. + public static func skySetMaterial(sky: RID, material: RID) { + withUnsafePointer(to: sky.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_sky_set_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_sky_bake_panorama: GDExtensionMethodBindPtr = { + let methodName = StringName("sky_bake_panorama") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3875285818)! + } + + } + + }() + + /// Generates and returns an ``Image`` containing the radiance map for the specified `sky` RID. This supports built-in sky material and custom sky shaders. If `bakeIrradiance` is `true`, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also ``environmentBakePanorama(environment:bakeIrradiance:size:)``. + /// + /// > Note: The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. `energy` values above `1.0` can be used to brighten the resulting image. + /// + /// > Note: `size` should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than ``Sky/radianceSize``, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. + /// + public static func skyBakePanorama(sky: RID, energy: Double, bakeIrradiance: Bool, size: Vector2i) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: sky.content) { pArg0 in + withUnsafePointer(to: energy) { pArg1 in + withUnsafePointer(to: bakeIrradiance) { pArg2 in + withUnsafePointer(to: size) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_sky_bake_panorama, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_compositor_effect_create: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_effect_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + public static func compositorEffectCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_compositor_effect_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_compositor_effect_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_effect_set_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Enables/disables this rendering effect. + public static func compositorEffectSetEnabled(effect: RID, enabled: Bool) { + withUnsafePointer(to: effect.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_compositor_effect_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_compositor_effect_set_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_effect_set_callback") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 487412485)! + } + + } + + }() + + /// Sets the callback type (`callbackType`) and callback method(`callback`) for this rendering effect. + public static func compositorEffectSetCallback(effect: RID, callbackType: RenderingServer.CompositorEffectCallbackType, callback: Callable) { + withUnsafePointer(to: effect.content) { pArg0 in + withUnsafePointer(to: callbackType.rawValue) { pArg1 in + withUnsafePointer(to: callback.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_compositor_effect_set_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compositor_effect_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_effect_set_flag") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3659527075)! + } + + } + + }() + + /// Sets the flag (`flag`) for this rendering effect to `true` or `false` (`set`). + public static func compositorEffectSetFlag(effect: RID, flag: RenderingServer.CompositorEffectFlags, set: Bool) { + withUnsafePointer(to: effect.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: set) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_compositor_effect_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_compositor_create: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + public static func compositorCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_compositor_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_compositor_set_compositor_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("compositor_set_compositor_effects") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 684822712)! + } + + } + + }() + + /// Sets the compositor effects for the specified compositor RID. `effects` should be an array containing RIDs created with ``compositorEffectCreate()``. + public static func compositorSetCompositorEffects(compositor: RID, effects: VariantCollection) { + withUnsafePointer(to: compositor.content) { pArg0 in + withUnsafePointer(to: effects.array.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_compositor_set_compositor_effects, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_create: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `environment_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``Environment``. + /// + public static func environmentCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_environment_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_environment_set_background: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_background") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937328877)! + } + + } + + }() + + /// Sets the environment's background mode. Equivalent to ``Environment/backgroundMode``. + public static func environmentSetBackground(env: RID, bg: RenderingServer.EnvironmentBG) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: bg.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_background, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_sky: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sky") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the ``Sky`` to be used as the environment's background when using _BGMode_ sky. Equivalent to ``Environment/sky``. + public static func environmentSetSky(env: RID, sky: RID) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: sky.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sky, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_sky_custom_fov: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sky_custom_fov") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets a custom field of view for the background ``Sky``. Equivalent to ``Environment/skyCustomFov``. + public static func environmentSetSkyCustomFov(env: RID, scale: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sky_custom_fov, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_sky_orientation: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sky_orientation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1735850857)! + } + + } + + }() + + /// Sets the rotation of the background ``Sky`` expressed as a ``Basis``. Equivalent to ``Environment/skyRotation``, where the rotation vector is used to construct the ``Basis``. + public static func environmentSetSkyOrientation(env: RID, orientation: Basis) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: orientation) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sky_orientation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_bg_color: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_bg_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Color displayed for clear areas of the scene. Only effective if using the ``EnvironmentBG/color`` background mode. + public static func environmentSetBgColor(env: RID, color: Color) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_bg_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_bg_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_bg_energy") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2513314492)! + } + + } + + }() + + /// Sets the intensity of the background color. + public static func environmentSetBgEnergy(env: RID, multiplier: Double, exposureValue: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: multiplier) { pArg1 in + withUnsafePointer(to: exposureValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_bg_energy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_canvas_max_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_canvas_max_layer") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the maximum layer to use if using Canvas background mode. + public static func environmentSetCanvasMaxLayer(env: RID, maxLayer: Int32) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: maxLayer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_canvas_max_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_ambient_light: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ambient_light") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1214961493)! + } + + } + + }() + + /// Sets the values to be used for ambient light rendering. See ``Environment`` for more details. + public static func environmentSetAmbientLight(env: RID, color: Color, ambient: RenderingServer.EnvironmentAmbientSource = .bg, energy: Double = 1.0, skyContibution: Double = 0.0, reflectionSource: RenderingServer.EnvironmentReflectionSource = .bg) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: ambient.rawValue) { pArg2 in + withUnsafePointer(to: energy) { pArg3 in + withUnsafePointer(to: skyContibution) { pArg4 in + withUnsafePointer(to: reflectionSource.rawValue) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ambient_light, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_glow: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_glow") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2421724940)! + } + + } + + }() + + /// Configures glow for the specified environment RID. See `glow_*` properties in ``Environment`` for more information. + public static func environmentSetGlow(env: RID, enable: Bool, levels: PackedFloat32Array, intensity: Double, strength: Double, mix: Double, bloomThreshold: Double, blendMode: RenderingServer.EnvironmentGlowBlendMode, hdrBleedThreshold: Double, hdrBleedScale: Double, hdrLuminanceCap: Double, glowMapStrength: Double, glowMap: RID) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: levels.content) { pArg2 in + withUnsafePointer(to: intensity) { pArg3 in + withUnsafePointer(to: strength) { pArg4 in + withUnsafePointer(to: mix) { pArg5 in + withUnsafePointer(to: bloomThreshold) { pArg6 in + withUnsafePointer(to: blendMode.rawValue) { pArg7 in + withUnsafePointer(to: hdrBleedThreshold) { pArg8 in + withUnsafePointer(to: hdrBleedScale) { pArg9 in + withUnsafePointer(to: hdrLuminanceCap) { pArg10 in + withUnsafePointer(to: glowMapStrength) { pArg11 in + withUnsafePointer(to: glowMap.content) { pArg12 in + withUnsafePointer(to: UnsafeRawPointersN13(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11, pArg12)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 13) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_glow, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_tonemap: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_tonemap") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2914312638)! + } + + } + + }() + + /// Sets the variables to be used with the "tonemap" post-process effect. See ``Environment`` for more details. + public static func environmentSetTonemap(env: RID, toneMapper: RenderingServer.EnvironmentToneMapper, exposure: Double, white: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: toneMapper.rawValue) { pArg1 in + withUnsafePointer(to: exposure) { pArg2 in + withUnsafePointer(to: white) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_tonemap, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_adjustment: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_adjustment") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 876799838)! + } + + } + + }() + + /// Sets the values to be used with the "adjustments" post-process effect. See ``Environment`` for more details. + public static func environmentSetAdjustment(env: RID, enable: Bool, brightness: Double, contrast: Double, saturation: Double, use1dColorCorrection: Bool, colorCorrection: RID) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: brightness) { pArg2 in + withUnsafePointer(to: contrast) { pArg3 in + withUnsafePointer(to: saturation) { pArg4 in + withUnsafePointer(to: use1dColorCorrection) { pArg5 in + withUnsafePointer(to: colorCorrection.content) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_adjustment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_ssr: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ssr") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3607294374)! + } + + } + + }() + + /// Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See ``Environment`` for more details. + public static func environmentSetSsr(env: RID, enable: Bool, maxSteps: Int32, fadeIn: Double, fadeOut: Double, depthTolerance: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: maxSteps) { pArg2 in + withUnsafePointer(to: fadeIn) { pArg3 in + withUnsafePointer(to: fadeOut) { pArg4 in + withUnsafePointer(to: depthTolerance) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ssr, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_ssao: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ssao") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3994732740)! + } + + } + + }() + + /// Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See ``Environment`` for more details. + public static func environmentSetSsao(env: RID, enable: Bool, radius: Double, intensity: Double, power: Double, detail: Double, horizon: Double, sharpness: Double, lightAffect: Double, aoChannelAffect: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: radius) { pArg2 in + withUnsafePointer(to: intensity) { pArg3 in + withUnsafePointer(to: power) { pArg4 in + withUnsafePointer(to: detail) { pArg5 in + withUnsafePointer(to: horizon) { pArg6 in + withUnsafePointer(to: sharpness) { pArg7 in + withUnsafePointer(to: lightAffect) { pArg8 in + withUnsafePointer(to: aoChannelAffect) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ssao, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_fog: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_fog") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 105051629)! + } + + } + + }() + + /// Configures fog for the specified environment RID. See `fog_*` properties in ``Environment`` for more information. + public static func environmentSetFog(env: RID, enable: Bool, lightColor: Color, lightEnergy: Double, sunScatter: Double, density: Double, height: Double, heightDensity: Double, aerialPerspective: Double, skyAffect: Double, fogMode: RenderingServer.EnvironmentFogMode = .exponential) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: lightColor) { pArg2 in + withUnsafePointer(to: lightEnergy) { pArg3 in + withUnsafePointer(to: sunScatter) { pArg4 in + withUnsafePointer(to: density) { pArg5 in + withUnsafePointer(to: height) { pArg6 in + withUnsafePointer(to: heightDensity) { pArg7 in + withUnsafePointer(to: aerialPerspective) { pArg8 in + withUnsafePointer(to: skyAffect) { pArg9 in + withUnsafePointer(to: fogMode.rawValue) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_fog, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_sdfgi: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sdfgi") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3519144388)! + } + + } + + }() + + /// Configures signed distance field global illumination for the specified environment RID. See `sdfgi_*` properties in ``Environment`` for more information. + public static func environmentSetSdfgi(env: RID, enable: Bool, cascades: Int32, minCellSize: Double, yScale: RenderingServer.EnvironmentSDFGIYScale, useOcclusion: Bool, bounceFeedback: Double, readSky: Bool, energy: Double, normalBias: Double, probeBias: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: cascades) { pArg2 in + withUnsafePointer(to: minCellSize) { pArg3 in + withUnsafePointer(to: yScale.rawValue) { pArg4 in + withUnsafePointer(to: useOcclusion) { pArg5 in + withUnsafePointer(to: bounceFeedback) { pArg6 in + withUnsafePointer(to: readSky) { pArg7 in + withUnsafePointer(to: energy) { pArg8 in + withUnsafePointer(to: normalBias) { pArg9 in + withUnsafePointer(to: probeBias) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sdfgi, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_volumetric_fog: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_volumetric_fog") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1553633833)! + } + + } + + }() + + /// Sets the variables to be used with the volumetric fog post-process effect. See ``Environment`` for more details. + public static func environmentSetVolumetricFog(env: RID, enable: Bool, density: Double, albedo: Color, emission: Color, emissionEnergy: Double, anisotropy: Double, length: Double, pDetailSpread: Double, giInject: Double, temporalReprojection: Bool, temporalReprojectionAmount: Double, ambientInject: Double, skyAffect: Double) { + withUnsafePointer(to: env.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: density) { pArg2 in + withUnsafePointer(to: albedo) { pArg3 in + withUnsafePointer(to: emission) { pArg4 in + withUnsafePointer(to: emissionEnergy) { pArg5 in + withUnsafePointer(to: anisotropy) { pArg6 in + withUnsafePointer(to: length) { pArg7 in + withUnsafePointer(to: pDetailSpread) { pArg8 in + withUnsafePointer(to: giInject) { pArg9 in + withUnsafePointer(to: temporalReprojection) { pArg10 in + withUnsafePointer(to: temporalReprojectionAmount) { pArg11 in + withUnsafePointer(to: ambientInject) { pArg12 in + withUnsafePointer(to: skyAffect) { pArg13 in + withUnsafePointer(to: UnsafeRawPointersN14(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10, pArg11, pArg12, pArg13)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 14) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_volumetric_fog, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_glow_set_use_bicubic_upscale: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_glow_set_use_bicubic_upscale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// If `enable` is `true`, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to ``ProjectSettings/rendering/environment/glow/upscaleMode``. + public static func environmentGlowSetUseBicubicUpscale(enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_glow_set_use_bicubic_upscale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_set_ssr_roughness_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ssr_roughness_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1190026788)! + } + + } + + }() + + /// + public static func environmentSetSsrRoughnessQuality(_ quality: RenderingServer.EnvironmentSSRRoughnessQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ssr_roughness_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_set_ssao_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ssao_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 189753569)! + } + + } + + }() + + /// Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See ``Environment`` for more details. + public static func environmentSetSsaoQuality(_ quality: RenderingServer.EnvironmentSSAOQuality, halfSize: Bool, adaptiveTarget: Double, blurPasses: Int32, fadeoutFrom: Double, fadeoutTo: Double) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: halfSize) { pArg1 in + withUnsafePointer(to: adaptiveTarget) { pArg2 in + withUnsafePointer(to: blurPasses) { pArg3 in + withUnsafePointer(to: fadeoutFrom) { pArg4 in + withUnsafePointer(to: fadeoutTo) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ssao_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_ssil_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_ssil_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1713836683)! + } + + } + + }() + + /// Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See ``Environment`` for more details. + public static func environmentSetSsilQuality(_ quality: RenderingServer.EnvironmentSSILQuality, halfSize: Bool, adaptiveTarget: Double, blurPasses: Int32, fadeoutFrom: Double, fadeoutTo: Double) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: halfSize) { pArg1 in + withUnsafePointer(to: adaptiveTarget) { pArg2 in + withUnsafePointer(to: blurPasses) { pArg3 in + withUnsafePointer(to: fadeoutFrom) { pArg4 in + withUnsafePointer(to: fadeoutTo) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_ssil_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_sdfgi_ray_count: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sdfgi_ray_count") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 340137951)! + } + + } + + }() + + /// Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to ``ProjectSettings/rendering/globalIllumination/sdfgi/probeRayCount``. + public static func environmentSetSdfgiRayCount(_ rayCount: RenderingServer.EnvironmentSDFGIRayCount) { + withUnsafePointer(to: rayCount.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sdfgi_ray_count, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_set_sdfgi_frames_to_converge: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sdfgi_frames_to_converge") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2182444374)! + } + + } + + }() + + /// Sets the number of frames to use for converging signed distance field global illumination. Equivalent to ``ProjectSettings/rendering/globalIllumination/sdfgi/framesToConverge``. + public static func environmentSetSdfgiFramesToConverge(frames: RenderingServer.EnvironmentSDFGIFramesToConverge) { + withUnsafePointer(to: frames.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sdfgi_frames_to_converge, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_set_sdfgi_frames_to_update_light: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_sdfgi_frames_to_update_light") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1251144068)! + } + + } + + }() + + /// Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to ``ProjectSettings/rendering/globalIllumination/sdfgi/framesToUpdateLights``. + public static func environmentSetSdfgiFramesToUpdateLight(frames: RenderingServer.EnvironmentSDFGIFramesToUpdateLight) { + withUnsafePointer(to: frames.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_sdfgi_frames_to_update_light, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_set_volumetric_fog_volume_size: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_volumetric_fog_volume_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3937882851)! + } + + } + + }() + + /// Sets the resolution of the volumetric fog's froxel buffer. `size` is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While `depth` is directly used to set the depth of the buffer. + public static func environmentSetVolumetricFogVolumeSize(_ size: Int32, depth: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: depth) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_volumetric_fog_volume_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_environment_set_volumetric_fog_filter_active: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_set_volumetric_fog_filter_active") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts. + public static func environmentSetVolumetricFogFilterActive(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_environment_set_volumetric_fog_filter_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_environment_bake_panorama: GDExtensionMethodBindPtr = { + let methodName = StringName("environment_bake_panorama") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2452908646)! + } + + } + + }() + + /// Generates and returns an ``Image`` containing the radiance map for the specified `environment` RID's sky. This supports built-in sky material and custom sky shaders. If `bakeIrradiance` is `true`, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also ``skyBakePanorama(sky:energy:bakeIrradiance:size:)``. + /// + /// > Note: The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. + /// + /// > Note: `size` should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than ``Sky/radianceSize``, as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. + /// + public static func environmentBakePanorama(environment: RID, bakeIrradiance: Bool, size: Vector2i) -> Image? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: environment.content) { pArg0 in + withUnsafePointer(to: bakeIrradiance) { pArg1 in + withUnsafePointer(to: size) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_environment_bake_panorama, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_screen_space_roughness_limiter_set_active: GDExtensionMethodBindPtr = { + let methodName = StringName("screen_space_roughness_limiter_set_active") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 916716790)! + } + + } + + }() + + /// Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to ``ProjectSettings/rendering/antiAliasing/screenSpaceRoughnessLimiter/enabled``, ``ProjectSettings/rendering/antiAliasing/screenSpaceRoughnessLimiter/amount`` and ``ProjectSettings/rendering/antiAliasing/screenSpaceRoughnessLimiter/limit``. + public static func screenSpaceRoughnessLimiterSetActive(enable: Bool, amount: Double, limit: Double) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: amount) { pArg1 in + withUnsafePointer(to: limit) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_screen_space_roughness_limiter_set_active, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_sub_surface_scattering_set_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("sub_surface_scattering_set_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 64571803)! + } + + } + + }() + + /// Sets ``ProjectSettings/rendering/environment/subsurfaceScattering/subsurfaceScatteringQuality`` to use when rendering materials that have subsurface scattering enabled. + public static func subSurfaceScatteringSetQuality(_ quality: RenderingServer.SubSurfaceScatteringQuality) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_sub_surface_scattering_set_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_sub_surface_scattering_set_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("sub_surface_scattering_set_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1017552074)! + } + + } + + }() + + /// Sets the ``ProjectSettings/rendering/environment/subsurfaceScattering/subsurfaceScatteringScale`` and ``ProjectSettings/rendering/environment/subsurfaceScattering/subsurfaceScatteringDepthScale`` to use when rendering materials that have subsurface scattering enabled. + public static func subSurfaceScatteringSetScale(_ scale: Double, depthScale: Double) { + withUnsafePointer(to: scale) { pArg0 in + withUnsafePointer(to: depthScale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_sub_surface_scattering_set_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_attributes_create: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_attributes_` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``CameraAttributes``. + /// + public static func cameraAttributesCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_camera_attributes_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_camera_attributes_set_dof_blur_quality: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_set_dof_blur_quality") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2220136795)! + } + + } + + }() + + /// Sets the quality level of the DOF blur effect to one of the options in ``RenderingServer/DOFBlurQuality``. `useJitter` can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy. + public static func cameraAttributesSetDofBlurQuality(_ quality: RenderingServer.DOFBlurQuality, useJitter: Bool) { + withUnsafePointer(to: quality.rawValue) { pArg0 in + withUnsafePointer(to: useJitter) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_camera_attributes_set_dof_blur_quality, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_camera_attributes_set_dof_blur_bokeh_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_set_dof_blur_bokeh_shape") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1205058394)! + } + + } + + }() + + /// Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve artistic effect, or to meet performance targets. For more detail on available options see ``RenderingServer/DOFBokehShape``. + public static func cameraAttributesSetDofBlurBokehShape(_ shape: RenderingServer.DOFBokehShape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_camera_attributes_set_dof_blur_bokeh_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_camera_attributes_set_dof_blur: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_set_dof_blur") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 316272616)! + } + + } + + }() + + /// Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in ``CameraAttributesPractical``. + public static func cameraAttributesSetDofBlur(cameraAttributes: RID, farEnable: Bool, farDistance: Double, farTransition: Double, nearEnable: Bool, nearDistance: Double, nearTransition: Double, amount: Double) { + withUnsafePointer(to: cameraAttributes.content) { pArg0 in + withUnsafePointer(to: farEnable) { pArg1 in + withUnsafePointer(to: farDistance) { pArg2 in + withUnsafePointer(to: farTransition) { pArg3 in + withUnsafePointer(to: nearEnable) { pArg4 in + withUnsafePointer(to: nearDistance) { pArg5 in + withUnsafePointer(to: nearTransition) { pArg6 in + withUnsafePointer(to: amount) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_camera_attributes_set_dof_blur, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_attributes_set_exposure: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_set_exposure") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2513314492)! + } + + } + + }() + + /// Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. + /// + /// The normalization factor can be calculated from exposure value (EV100) as follows: + /// + /// The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: + /// + public static func cameraAttributesSetExposure(cameraAttributes: RID, multiplier: Double, normalization: Double) { + withUnsafePointer(to: cameraAttributes.content) { pArg0 in + withUnsafePointer(to: multiplier) { pArg1 in + withUnsafePointer(to: normalization) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_camera_attributes_set_exposure, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_camera_attributes_set_auto_exposure: GDExtensionMethodBindPtr = { + let methodName = StringName("camera_attributes_set_auto_exposure") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4266986332)! + } + + } + + }() + + /// Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in ``CameraAttributes`` and ``CameraAttributesPractical``. + public static func cameraAttributesSetAutoExposure(cameraAttributes: RID, enable: Bool, minSensitivity: Double, maxSensitivity: Double, speed: Double, scale: Double) { + withUnsafePointer(to: cameraAttributes.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: minSensitivity) { pArg2 in + withUnsafePointer(to: maxSensitivity) { pArg3 in + withUnsafePointer(to: speed) { pArg4 in + withUnsafePointer(to: scale) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_camera_attributes_set_auto_exposure, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_scenario_create: GDExtensionMethodBindPtr = { + let methodName = StringName("scenario_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `scenario_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// The scenario is the 3D world that all the visual instances exist in. + /// + public static func scenarioCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_scenario_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_scenario_set_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("scenario_set_environment") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the environment that will be used with this scenario. See also ``Environment``. + public static func scenarioSetEnvironment(scenario: RID, environment: RID) { + withUnsafePointer(to: scenario.content) { pArg0 in + withUnsafePointer(to: environment.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_scenario_set_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_scenario_set_fallback_environment: GDExtensionMethodBindPtr = { + let methodName = StringName("scenario_set_fallback_environment") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. + public static func scenarioSetFallbackEnvironment(scenario: RID, environment: RID) { + withUnsafePointer(to: scenario.content) { pArg0 in + withUnsafePointer(to: environment.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_scenario_set_fallback_environment, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_scenario_set_camera_attributes: GDExtensionMethodBindPtr = { + let methodName = StringName("scenario_set_camera_attributes") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the camera attributes (`effects`) that will be used with this scenario. See also ``CameraAttributes``. + public static func scenarioSetCameraAttributes(scenario: RID, effects: RID) { + withUnsafePointer(to: scenario.content) { pArg0 in + withUnsafePointer(to: effects.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_scenario_set_camera_attributes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_scenario_set_compositor: GDExtensionMethodBindPtr = { + let methodName = StringName("scenario_set_compositor") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the compositor (`compositor`) that will be used with this scenario. See also ``Compositor``. + public static func scenarioSetCompositor(scenario: RID, compositor: RID) { + withUnsafePointer(to: scenario.content) { pArg0 in + withUnsafePointer(to: compositor.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_scenario_set_compositor, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_create2: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_create2") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 746547085)! + } + + } + + }() + + /// Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. This is a shorthand for using ``instanceCreate()`` and setting the base and scenario manually. + /// + public static func instanceCreate2(base: RID, scenario: RID) -> RID { + let _result: RID = RID () + withUnsafePointer(to: base.content) { pArg0 in + withUnsafePointer(to: scenario.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_create2, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_instance_create: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using ``instanceSetBase(instance:base:)``. + /// + /// > Note: The equivalent node is ``VisualInstance3D``. + /// + public static func instanceCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_instance_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_instance_set_base: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_base") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario. + public static func instanceSetBase(instance: RID, base: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: base.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_base, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_scenario: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_scenario") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. + public static func instanceSetScenario(instance: RID, scenario: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: scenario.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_scenario, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_layer_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_layer_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the render layers that this instance will be drawn to. Equivalent to ``VisualInstance3D/layers``. + public static func instanceSetLayerMask(instance: RID, mask: UInt32) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_layer_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_pivot_data: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_pivot_data") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1280615259)! + } + + } + + }() + + /// Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + public static func instanceSetPivotData(instance: RID, sortingOffset: Double, useAabbCenter: Bool) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: sortingOffset) { pArg1 in + withUnsafePointer(to: useAabbCenter) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_pivot_data, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3935195649)! + } + + } + + }() + + /// Sets the world space transform of the instance. Equivalent to ``Node3D/globalTransform``. + public static func instanceSetTransform(instance: RID, transform: Transform3D) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_attach_object_instance_id: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_attach_object_instance_id") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with ``instancesCullAabb(_:scenario:)``, ``instancesCullConvex(_:scenario:)``, and ``instancesCullRay(from:to:scenario:)``. + public static func instanceAttachObjectInstanceId(instance: RID, id: UInt) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_attach_object_instance_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_blend_shape_weight: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_blend_shape_weight") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1892459533)! + } + + } + + }() + + /// Sets the weight for a given blend shape associated with this instance. + public static func instanceSetBlendShapeWeight(instance: RID, shape: Int32, weight: Double) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: shape) { pArg1 in + withUnsafePointer(to: weight) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_blend_shape_weight, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_surface_override_material: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_surface_override_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2310537182)! + } + + } + + }() + + /// Sets the override material of a specific surface. Equivalent to ``MeshInstance3D/setSurfaceOverrideMaterial(surface:material:)``. + public static func instanceSetSurfaceOverrideMaterial(instance: RID, surface: Int32, material: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: surface) { pArg1 in + withUnsafePointer(to: material.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_surface_override_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_visible") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets whether an instance is drawn or not. Equivalent to ``Node3D/visible``. + public static func instanceSetVisible(instance: RID, visible: Bool) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: visible) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_visible, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_transparency: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_transparency") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the transparency for the given geometry instance. Equivalent to ``GeometryInstance3D/transparency``. + /// + /// A transparency of `0.0` is fully opaque, while `1.0` is fully transparent. Values greater than `0.0` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting `transparency` to a value greater than `0.0` (exclusive) will _not_ disable shadow rendering. + /// + /// In spatial shaders, `1.0 - transparency` is set as the default value of the `ALPHA` built-in. + /// + /// > Note: `transparency` is clamped between `0.0` and `1.0`, so this property cannot be used to make transparent materials more opaque than they originally are. + /// + public static func instanceGeometrySetTransparency(instance: RID, transparency: Double) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: transparency) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_transparency, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_custom_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_custom_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3696536120)! + } + + } + + }() + + /// Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting ``GeometryInstance3D/customAabb``. + public static func instanceSetCustomAabb(instance: RID, aabb: AABB) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: aabb) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_custom_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_attach_skeleton: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_attach_skeleton") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Attaches a skeleton to an instance. Removes the previous skeleton from the instance. + public static func instanceAttachSkeleton(instance: RID, skeleton: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: skeleton.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_attach_skeleton, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_extra_visibility_margin: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_extra_visibility_margin") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to ``GeometryInstance3D/extraCullMargin``. + public static func instanceSetExtraVisibilityMargin(instance: RID, margin: Double) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: margin) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_extra_visibility_margin, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_visibility_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_visibility_parent") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the visibility parent for the given instance. Equivalent to ``Node3D/visibilityParent``. + public static func instanceSetVisibilityParent(instance: RID, parent: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: parent.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_visibility_parent, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_set_ignore_culling: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_set_ignore_culling") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `true`, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as ``GeometryInstance3D/ignoreOcclusionCulling``, which only ignores occlusion culling and leaves frustum culling intact. + public static func instanceSetIgnoreCulling(instance: RID, enabled: Bool) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_set_ignore_culling, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_flag: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_flag") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1014989537)! + } + + } + + }() + + /// Sets the flag for a given ``RenderingServer/InstanceFlags``. See ``RenderingServer/InstanceFlags`` for more details. + public static func instanceGeometrySetFlag(instance: RID, flag: RenderingServer.InstanceFlags, enabled: Bool) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: flag.rawValue) { pArg1 in + withUnsafePointer(to: enabled) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_flag, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_cast_shadows_setting: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_cast_shadows_setting") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3768836020)! + } + + } + + }() + + /// Sets the shadow casting setting to one of ``RenderingServer/ShadowCastingSetting``. Equivalent to ``GeometryInstance3D/castShadow``. + public static func instanceGeometrySetCastShadowsSetting(instance: RID, shadowCastingSetting: RenderingServer.ShadowCastingSetting) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: shadowCastingSetting.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_cast_shadows_setting, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_material_override") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to ``GeometryInstance3D/materialOverride``. + public static func instanceGeometrySetMaterialOverride(instance: RID, material: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_material_override, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_material_overlay: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_material_overlay") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to ``GeometryInstance3D/materialOverlay``. + public static func instanceGeometrySetMaterialOverlay(instance: RID, material: RID) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_material_overlay, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_visibility_range: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_visibility_range") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4263925858)! + } + + } + + }() + + /// Sets the visibility range values for the given geometry instance. Equivalent to ``GeometryInstance3D/visibilityRangeBegin`` and related properties. + public static func instanceGeometrySetVisibilityRange(instance: RID, min: Double, max: Double, minMargin: Double, maxMargin: Double, fadeMode: RenderingServer.VisibilityRangeFadeMode) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: min) { pArg1 in + withUnsafePointer(to: max) { pArg2 in + withUnsafePointer(to: minMargin) { pArg3 in + withUnsafePointer(to: maxMargin) { pArg4 in + withUnsafePointer(to: fadeMode.rawValue) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_visibility_range, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_lightmap: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_lightmap") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 536974962)! + } + + } + + }() + + /// Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to ``GeometryInstance3D/giLightmapScale``) and lightmap atlas slice must also be specified. + public static func instanceGeometrySetLightmap(instance: RID, lightmap: RID, lightmapUvScale: Rect2, lightmapSlice: Int32) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: lightmap.content) { pArg1 in + withUnsafePointer(to: lightmapUvScale) { pArg2 in + withUnsafePointer(to: lightmapSlice) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_lightmap, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_lod_bias: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_lod_bias") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to ``GeometryInstance3D/lodBias``. + public static func instanceGeometrySetLodBias(instance: RID, lodBias: Double) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: lodBias) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_lod_bias, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_set_shader_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_set_shader_parameter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3477296213)! + } + + } + + }() + + /// Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to ``GeometryInstance3D/setInstanceShaderParameter(name:value:)``. + public static func instanceGeometrySetShaderParameter(instance: RID, parameter: StringName, value: Variant?) { + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: parameter.content) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_set_shader_parameter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_instance_geometry_get_shader_parameter: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_get_shader_parameter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2621281810)! + } + + } + + }() + + /// Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to ``GeometryInstance3D/getInstanceShaderParameter(name:)``. + /// + /// > Note: Per-instance shader parameter names are case-sensitive. + /// + public static func instanceGeometryGetShaderParameter(instance: RID, parameter: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: parameter.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_get_shader_parameter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_instance_geometry_get_shader_parameter_default_value: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_get_shader_parameter_default_value") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2621281810)! + } + + } + + }() + + /// Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to ``GeometryInstance3D/getInstanceShaderParameter(name:)``. + public static func instanceGeometryGetShaderParameterDefaultValue(instance: RID, parameter: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: parameter.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_get_shader_parameter_default_value, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_instance_geometry_get_shader_parameter_list: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_geometry_get_shader_parameter_list") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2684255073)! + } + + } + + }() + + /// Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys `name`, `class_name`, `type`, `hint`, `hint_string` and `usage`. Equivalent to ``GeometryInstance3D/getInstanceShaderParameter(name:)``. + public static func instanceGeometryGetShaderParameterList(instance: RID) -> VariantCollection { + var _result: Int64 = 0 + withUnsafePointer(to: instance.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_instance_geometry_get_shader_parameter_list, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return VariantCollection(content: _result) + } + + fileprivate static var method_instances_cull_aabb: GDExtensionMethodBindPtr = { + let methodName = StringName("instances_cull_aabb") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2570105777)! + } + + } + + }() + + /// Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from ``VisualInstance3D`` are considered, such as ``MeshInstance3D`` or ``DirectionalLight3D``. Use ``@GlobalScope.instance_from_id`` to obtain the actual nodes. A scenario RID must be provided, which is available in the ``World3D`` you want to query. This forces an update for all resources queued to update. + /// + /// > Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + /// + public static func instancesCullAabb(_ aabb: AABB, scenario: RID = RID()) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: aabb) { pArg0 in + withUnsafePointer(to: scenario.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instances_cull_aabb, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_instances_cull_ray: GDExtensionMethodBindPtr = { + let methodName = StringName("instances_cull_ray") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2208759584)! + } + + } + + }() + + /// Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from ``VisualInstance3D`` are considered, such as ``MeshInstance3D`` or ``DirectionalLight3D``. Use ``@GlobalScope.instance_from_id`` to obtain the actual nodes. A scenario RID must be provided, which is available in the ``World3D`` you want to query. This forces an update for all resources queued to update. + /// + /// > Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + /// + public static func instancesCullRay(from: Vector3, to: Vector3, scenario: RID = RID()) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: from) { pArg0 in + withUnsafePointer(to: to) { pArg1 in + withUnsafePointer(to: scenario.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_instances_cull_ray, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_instances_cull_convex: GDExtensionMethodBindPtr = { + let methodName = StringName("instances_cull_convex") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2488539944)! + } + + } + + }() + + /// Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from ``VisualInstance3D`` are considered, such as ``MeshInstance3D`` or ``DirectionalLight3D``. Use ``@GlobalScope.instance_from_id`` to obtain the actual nodes. A scenario RID must be provided, which is available in the ``World3D`` you want to query. This forces an update for all resources queued to update. + /// + /// > Warning: This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + /// + public static func instancesCullConvex(_ convex: VariantCollection, scenario: RID = RID()) -> PackedInt64Array { + let _result: PackedInt64Array = PackedInt64Array () + withUnsafePointer(to: convex.array.content) { pArg0 in + withUnsafePointer(to: scenario.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_instances_cull_convex, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_bake_render_uv2: GDExtensionMethodBindPtr = { + let methodName = StringName("bake_render_uv2") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1904608558)! + } + + } + + }() + + /// Bakes the material data of the Mesh passed in the `base` parameter with optional `materialOverrides` to a set of ``Image``s of size `imageSize`. Returns an array of ``Image``s containing material properties as specified in ``RenderingServer/BakeChannels``. + public static func bakeRenderUv2(base: RID, materialOverrides: VariantCollection, imageSize: Vector2i) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: base.content) { pArg0 in + withUnsafePointer(to: materialOverrides.array.content) { pArg1 in + withUnsafePointer(to: imageSize) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_bake_render_uv2, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_canvas_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a canvas and returns the assigned ``RID``. It can be accessed with the RID that is returned. This RID will be used in all `canvas_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// Canvas has no ``Resource`` or ``Node`` equivalent. + /// + public static func canvasCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_set_item_mirroring: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_set_item_mirroring") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2343975398)! + } + + } + + }() + + /// A copy of the canvas item will be drawn with a local offset of the mirroring ``Vector2``. + public static func canvasSetItemMirroring(canvas: RID, item: RID, mirroring: Vector2) { + withUnsafePointer(to: canvas.content) { pArg0 in + withUnsafePointer(to: item.content) { pArg1 in + withUnsafePointer(to: mirroring) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_set_item_mirroring, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_set_item_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_set_item_repeat") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1739512717)! + } + + } + + }() + + /// A copy of the canvas item will be drawn with a local offset of the `repeatSize` by the number of times of the `repeatTimes`. As the `repeatTimes` increases, the copies will spread away from the origin texture. + public static func canvasSetItemRepeat(item: RID, repeatSize: Vector2, repeatTimes: Int32) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: repeatSize) { pArg1 in + withUnsafePointer(to: repeatTimes) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_set_item_repeat, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_set_modulate") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Modulates all colors in the given canvas. + public static func canvasSetModulate(canvas: RID, color: Color) { + withUnsafePointer(to: canvas.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_set_modulate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_set_disable_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_set_disable_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// + public static func canvasSetDisableScale(disable: Bool) { + withUnsafePointer(to: disable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_set_disable_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_canvas_texture_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_texture_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_texture_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. See also ``texture2dCreate(image:)``. + /// + /// > Note: The equivalent resource is ``CanvasTexture`` and is only meant to be used in 2D rendering, not 3D. + /// + public static func canvasTextureCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_texture_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_texture_set_channel: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_texture_set_channel") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3822119138)! + } + + } + + }() + + /// Sets the `channel`'s `texture` for the canvas texture specified by the `canvasTexture` RID. Equivalent to ``CanvasTexture/diffuseTexture``, ``CanvasTexture/normalTexture`` and ``CanvasTexture/specularTexture``. + public static func canvasTextureSetChannel(canvasTexture: RID, channel: RenderingServer.CanvasTextureChannel, texture: RID) { + withUnsafePointer(to: canvasTexture.content) { pArg0 in + withUnsafePointer(to: channel.rawValue) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_texture_set_channel, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_texture_set_shading_parameters: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_texture_set_shading_parameters") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2124967469)! + } + + } + + }() + + /// Sets the `baseColor` and `shininess` to use for the canvas texture specified by the `canvasTexture` RID. Equivalent to ``CanvasTexture/specularColor`` and ``CanvasTexture/specularShininess``. + public static func canvasTextureSetShadingParameters(canvasTexture: RID, baseColor: Color, shininess: Double) { + withUnsafePointer(to: canvasTexture.content) { pArg0 in + withUnsafePointer(to: baseColor) { pArg1 in + withUnsafePointer(to: shininess) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_texture_set_shading_parameters, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_texture_set_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_texture_set_texture_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1155129294)! + } + + } + + }() + + /// Sets the texture `filter` mode to use for the canvas texture specified by the `canvasTexture` RID. + public static func canvasTextureSetTextureFilter(canvasTexture: RID, filter: RenderingServer.CanvasItemTextureFilter) { + withUnsafePointer(to: canvasTexture.content) { pArg0 in + withUnsafePointer(to: filter.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_texture_set_texture_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_texture_set_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_texture_set_texture_repeat") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1652956681)! + } + + } + + }() + + /// Sets the texture `repeat` mode to use for the canvas texture specified by the `canvasTexture` RID. + public static func canvasTextureSetTextureRepeat(canvasTexture: RID, `repeat`: RenderingServer.CanvasItemTextureRepeat) { + withUnsafePointer(to: canvasTexture.content) { pArg0 in + withUnsafePointer(to: `repeat`.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_texture_set_texture_repeat, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new CanvasItem instance and returns its ``RID``. It can be accessed with the RID that is returned. This RID will be used in all `canvas_item_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``CanvasItem``. + /// + public static func canvasItemCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_item_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_item_set_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_parent") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a parent ``CanvasItem`` to the ``CanvasItem``. The item will inherit transform, modulation and visibility from its parent, like ``CanvasItem`` nodes in the scene tree. + public static func canvasItemSetParent(item: RID, parent: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: parent.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_parent, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_default_texture_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_default_texture_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1155129294)! + } + + } + + }() + + /// Sets the default texture filter mode for the canvas item specified by the `item` RID. Equivalent to ``CanvasItem/textureFilter``. + public static func canvasItemSetDefaultTextureFilter(item: RID, filter: RenderingServer.CanvasItemTextureFilter) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: filter.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_default_texture_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_default_texture_repeat: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_default_texture_repeat") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1652956681)! + } + + } + + }() + + /// Sets the default texture repeat mode for the canvas item specified by the `item` RID. Equivalent to ``CanvasItem/textureRepeat``. + public static func canvasItemSetDefaultTextureRepeat(item: RID, `repeat`: RenderingServer.CanvasItemTextureRepeat) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: `repeat`.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_default_texture_repeat, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_visible") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets the visibility of the ``CanvasItem``. + public static func canvasItemSetVisible(item: RID, visible: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: visible) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_visible, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_light_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the light `mask` for the canvas item specified by the `item` RID. Equivalent to ``CanvasItem/lightMask``. + public static func canvasItemSetLightMask(item: RID, mask: Int32) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_light_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_visibility_layer: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_visibility_layer") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the rendering visibility layer associated with this ``CanvasItem``. Only ``Viewport`` nodes with a matching rendering mask will render this ``CanvasItem``. + public static func canvasItemSetVisibilityLayer(item: RID, visibilityLayer: UInt32) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: visibilityLayer) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_visibility_layer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets the `transform` of the canvas item specified by the `item` RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to ``Node2D/transform``. + public static func canvasItemSetTransform(item: RID, transform: Transform2D) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_clip: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_clip") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `clip` is `true`, makes the canvas item specified by the `item` RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use ``canvasItemSetCanvasGroupMode(item:mode:clearMargin:fitEmpty:fitMargin:blurMipmaps:)`` instead. + /// + /// > Note: The equivalent node functionality is found in ``Label/clipText``, ``RichTextLabel`` (always enabled) and more. + /// + public static func canvasItemSetClip(item: RID, clip: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: clip) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_clip, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_distance_field_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_distance_field_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, enables multichannel signed distance field rendering mode for the canvas item specified by the `item` RID. This is meant to be used for font rendering, or with specially generated images using msdfgen. + public static func canvasItemSetDistanceFieldMode(item: RID, enabled: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_distance_field_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_custom_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_custom_rect") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1333997032)! + } + + } + + }() + + /// If `useCustomRect` is `true`, sets the custom visibility rectangle (used for culling) to `rect` for the canvas item specified by `item`. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If `useCustomRect` is `false`, automatically computes a visibility rectangle based on the canvas item's draw commands. + public static func canvasItemSetCustomRect(item: RID, useCustomRect: Bool, rect: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0)) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: useCustomRect) { pArg1 in + withUnsafePointer(to: rect) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_custom_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_modulate") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Multiplies the color of the canvas item specified by the `item` RID, while affecting its children. See also ``canvasItemSetSelfModulate(item:color:)``. Equivalent to ``CanvasItem/modulate``. + public static func canvasItemSetModulate(item: RID, color: Color) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_modulate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_self_modulate: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_self_modulate") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Multiplies the color of the canvas item specified by the `item` RID, without affecting its children. See also ``canvasItemSetModulate(item:color:)``. Equivalent to ``CanvasItem/selfModulate``. + public static func canvasItemSetSelfModulate(item: RID, color: Color) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_self_modulate, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_draw_behind_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_draw_behind_parent") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, draws the canvas item specified by the `item` RID behind its parent. Equivalent to ``CanvasItem/showBehindParent``. + public static func canvasItemSetDrawBehindParent(item: RID, enabled: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_draw_behind_parent, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_interpolated: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_interpolated") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `interpolated` is `true`, turns on physics interpolation for the canvas item. + public static func canvasItemSetInterpolated(item: RID, interpolated: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: interpolated) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_interpolated, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_reset_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_reset_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Prevents physics interpolation for the current physics tick. + /// + /// This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + /// + public static func canvasItemResetPhysicsInterpolation(item: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_reset_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_canvas_item_transform_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_transform_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Transforms both the current and previous stored transform for a canvas item. + /// + /// This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. + /// + public static func canvasItemTransformPhysicsInterpolation(item: RID, transform: Transform2D) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_transform_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_line: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_line") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1819681853)! + } + + } + + }() + + /// Draws a line on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawLine(from:to:color:width:antialiased:)``. + public static func canvasItemAddLine(item: RID, from: Vector2, to: Vector2, color: Color, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: from) { pArg1 in + withUnsafePointer(to: to) { pArg2 in + withUnsafePointer(to: color) { pArg3 in + withUnsafePointer(to: width) { pArg4 in + withUnsafePointer(to: antialiased) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_line, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_polyline: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_polyline") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3098767073)! + } + + } + + }() + + /// Draws a 2D polyline on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawPolyline(points:color:width:antialiased:)`` and ``CanvasItem/drawPolylineColors(points:colors:width:antialiased:)``. + public static func canvasItemAddPolyline(item: RID, points: PackedVector2Array, colors: PackedColorArray, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: points.content) { pArg1 in + withUnsafePointer(to: colors.content) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: antialiased) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_polyline, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_multiline: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_multiline") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3098767073)! + } + + } + + }() + + /// Draws a 2D multiline on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawMultiline(points:color:width:antialiased:)`` and ``CanvasItem/drawMultilineColors(points:colors:width:antialiased:)``. + public static func canvasItemAddMultiline(item: RID, points: PackedVector2Array, colors: PackedColorArray, width: Double = -1.0, antialiased: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: points.content) { pArg1 in + withUnsafePointer(to: colors.content) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: antialiased) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_multiline, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_rect") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3523446176)! + } + + } + + }() + + /// Draws a rectangle on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawRect(_:color:filled:width:antialiased:)``. + public static func canvasItemAddRect(item: RID, rect: Rect2, color: Color, antialiased: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: color) { pArg2 in + withUnsafePointer(to: antialiased) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_circle: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_circle") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 333077949)! + } + + } + + }() + + /// Draws a circle on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawCircle(position:radius:color:filled:width:antialiased:)``. + public static func canvasItemAddCircle(item: RID, pos: Vector2, radius: Double, color: Color, antialiased: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: pos) { pArg1 in + withUnsafePointer(to: radius) { pArg2 in + withUnsafePointer(to: color) { pArg3 in + withUnsafePointer(to: antialiased) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_circle, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_texture_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_texture_rect") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 324864032)! + } + + } + + }() + + /// Draws a 2D textured rectangle on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawTextureRect(texture:rect:tile:modulate:transpose:)`` and ``Texture2D/drawRect(canvasItem:rect:tile:modulate:transpose:)``. + public static func canvasItemAddTextureRect(item: RID, rect: Rect2, texture: RID, tile: Bool = false, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), transpose: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: tile) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: transpose) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_texture_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_msdf_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_msdf_texture_rect_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 97408773)! + } + + } + + }() + + /// See also ``CanvasItem/drawMsdfTextureRectRegion(texture:rect:srcRect:modulate:outline:pixelRange:scale:)``. + public static func canvasItemAddMsdfTextureRectRegion(item: RID, rect: Rect2, texture: RID, srcRect: Rect2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), outlineSize: Int32 = 0, pxRange: Double = 1.0, scale: Double = 1.0) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: srcRect) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: outlineSize) { pArg5 in + withUnsafePointer(to: pxRange) { pArg6 in + withUnsafePointer(to: scale) { pArg7 in + withUnsafePointer(to: UnsafeRawPointersN8(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 8) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_msdf_texture_rect_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_lcd_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_lcd_texture_rect_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 359793297)! + } + + } + + }() + + /// See also ``CanvasItem/drawLcdTextureRectRegion(texture:rect:srcRect:modulate:)``. + public static func canvasItemAddLcdTextureRectRegion(item: RID, rect: Rect2, texture: RID, srcRect: Rect2, modulate: Color) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: srcRect) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_lcd_texture_rect_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_texture_rect_region: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_texture_rect_region") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 485157892)! + } + + } + + }() + + /// Draws the specified region of a 2D textured rectangle on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawTextureRectRegion(texture:rect:srcRect:modulate:transpose:clipUv:)`` and ``Texture2D/drawRectRegion(canvasItem:rect:srcRect:modulate:transpose:clipUv:)``. + public static func canvasItemAddTextureRectRegion(item: RID, rect: Rect2, texture: RID, srcRect: Rect2, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), transpose: Bool = false, clipUv: Bool = true) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: srcRect) { pArg3 in + withUnsafePointer(to: modulate) { pArg4 in + withUnsafePointer(to: transpose) { pArg5 in + withUnsafePointer(to: clipUv) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_texture_rect_region, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_nine_patch: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_nine_patch") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 389957886)! + } + + } + + }() + + /// Draws a nine-patch rectangle on the ``CanvasItem`` pointed to by the `item` ``RID``. + public static func canvasItemAddNinePatch(item: RID, rect: Rect2, source: Rect2, texture: RID, topleft: Vector2, bottomright: Vector2, xAxisMode: RenderingServer.NinePatchAxisMode = .stretch, yAxisMode: RenderingServer.NinePatchAxisMode = .stretch, drawCenter: Bool = true, modulate: Color = Color (r: 1, g: 1, b: 1, a: 1)) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: rect) { pArg1 in + withUnsafePointer(to: source) { pArg2 in + withUnsafePointer(to: texture.content) { pArg3 in + withUnsafePointer(to: topleft) { pArg4 in + withUnsafePointer(to: bottomright) { pArg5 in + withUnsafePointer(to: xAxisMode.rawValue) { pArg6 in + withUnsafePointer(to: yAxisMode.rawValue) { pArg7 in + withUnsafePointer(to: drawCenter) { pArg8 in + withUnsafePointer(to: modulate) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_nine_patch, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_primitive: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_primitive") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3731601077)! + } + + } + + }() + + /// Draws a 2D primitive on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawPrimitive(points:colors:uvs:texture:)``. + public static func canvasItemAddPrimitive(item: RID, points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array, texture: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: points.content) { pArg1 in + withUnsafePointer(to: colors.content) { pArg2 in + withUnsafePointer(to: uvs.content) { pArg3 in + withUnsafePointer(to: texture.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_primitive, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_polygon") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3580000528)! + } + + } + + }() + + /// Draws a 2D polygon on the ``CanvasItem`` pointed to by the `item` ``RID``. If you need more flexibility (such as being able to use bones), use ``canvasItemAddTriangleArray(item:indices:points:colors:uvs:bones:weights:texture:count:)`` instead. See also ``CanvasItem/drawPolygon(points:colors:uvs:texture:)``. + public static func canvasItemAddPolygon(item: RID, points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array = PackedVector2Array(), texture: RID = RID()) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: points.content) { pArg1 in + withUnsafePointer(to: colors.content) { pArg2 in + withUnsafePointer(to: uvs.content) { pArg3 in + withUnsafePointer(to: texture.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_triangle_array: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_triangle_array") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 660261329)! + } + + } + + }() + + /// Draws a triangle array on the ``CanvasItem`` pointed to by the `item` ``RID``. This is internally used by ``Line2D`` and ``StyleBoxFlat`` for rendering. ``canvasItemAddTriangleArray(item:indices:points:colors:uvs:bones:weights:texture:count:)`` is highly flexible, but more complex to use than ``canvasItemAddPolygon(item:points:colors:uvs:texture:)``. + /// + /// > Note: `count` is unused and can be left unspecified. + /// + public static func canvasItemAddTriangleArray(item: RID, indices: PackedInt32Array, points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array = PackedVector2Array(), bones: PackedInt32Array = PackedInt32Array(), weights: PackedFloat32Array = PackedFloat32Array(), texture: RID = RID(), count: Int32 = -1) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: indices.content) { pArg1 in + withUnsafePointer(to: points.content) { pArg2 in + withUnsafePointer(to: colors.content) { pArg3 in + withUnsafePointer(to: uvs.content) { pArg4 in + withUnsafePointer(to: bones.content) { pArg5 in + withUnsafePointer(to: weights.content) { pArg6 in + withUnsafePointer(to: texture.content) { pArg7 in + withUnsafePointer(to: count) { pArg8 in + withUnsafePointer(to: UnsafeRawPointersN9(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 9) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_triangle_array, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 316450961)! + } + + } + + }() + + /// Draws a mesh created with ``meshCreate()`` with given `transform`, `modulate` color, and `texture`. This is used internally by ``MeshInstance2D``. + public static func canvasItemAddMesh(item: RID, mesh: RID, transform: Transform2D = Transform2D (xAxis: Vector2 (x: 1, y: 0), yAxis: Vector2 (x: 0, y: 1), origin: Vector2 (x: 0, y: 0)), modulate: Color = Color (r: 1, g: 1, b: 1, a: 1), texture: RID = RID()) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: mesh.content) { pArg1 in + withUnsafePointer(to: transform) { pArg2 in + withUnsafePointer(to: modulate) { pArg3 in + withUnsafePointer(to: texture.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_multimesh: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_multimesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2131855138)! + } + + } + + }() + + /// Draws a 2D ``MultiMesh`` on the ``CanvasItem`` pointed to by the `item` ``RID``. See also ``CanvasItem/drawMultimesh(_:texture:)``. + public static func canvasItemAddMultimesh(item: RID, mesh: RID, texture: RID = RID()) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: mesh.content) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_multimesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_particles: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_particles") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2575754278)! + } + + } + + }() + + /// Draws particles on the ``CanvasItem`` pointed to by the `item` ``RID``. + public static func canvasItemAddParticles(item: RID, particles: RID, texture: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: particles.content) { pArg1 in + withUnsafePointer(to: texture.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_particles, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets a ``Transform2D`` that will be used to transform subsequent canvas item commands. + public static func canvasItemAddSetTransform(item: RID, transform: Transform2D) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_clip_ignore: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_clip_ignore") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `ignore` is `true`, ignore clipping on items drawn with this canvas item until this is called again with `ignore` set to false. + public static func canvasItemAddClipIgnore(item: RID, ignore: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: ignore) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_clip_ignore, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_add_animation_slice: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_add_animation_slice") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2646834499)! + } + + } + + }() + + /// Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. + public static func canvasItemAddAnimationSlice(item: RID, animationLength: Double, sliceBegin: Double, sliceEnd: Double, offset: Double = 0.0) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: animationLength) { pArg1 in + withUnsafePointer(to: sliceBegin) { pArg2 in + withUnsafePointer(to: sliceEnd) { pArg3 in + withUnsafePointer(to: offset) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_add_animation_slice, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_sort_children_by_y: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_sort_children_by_y") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `enabled` is `true`, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the `item` RID, not the canvas item itself. Equivalent to ``CanvasItem/ySortEnabled``. + public static func canvasItemSetSortChildrenByY(item: RID, enabled: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_sort_children_by_y, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_z_index: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_z_index") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the ``CanvasItem``'s Z index, i.e. its draw order (lower indexes are drawn first). + public static func canvasItemSetZIndex(item: RID, zIndex: Int32) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: zIndex) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_z_index, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_z_as_relative_to_parent: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_z_as_relative_to_parent") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If this is enabled, the Z index of the parent will be added to the children's Z index. + public static func canvasItemSetZAsRelativeToParent(item: RID, enabled: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_z_as_relative_to_parent, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_copy_to_backbuffer: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_copy_to_backbuffer") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2429202503)! + } + + } + + }() + + /// Sets the ``CanvasItem`` to copy a rect to the backbuffer. + public static func canvasItemSetCopyToBackbuffer(item: RID, enabled: Bool, rect: Rect2) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: rect) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_copy_to_backbuffer, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_clear") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Clears the ``CanvasItem`` and removes all commands in it. + public static func canvasItemClear(item: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_clear, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_draw_index: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_draw_index") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// Sets the index for the ``CanvasItem``. + public static func canvasItemSetDrawIndex(item: RID, index: Int32) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_draw_index, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_material: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a new `material` to the canvas item specified by the `item` RID. Equivalent to ``CanvasItem/material``. + public static func canvasItemSetMaterial(item: RID, material: RID) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: material.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_use_parent_material: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_use_parent_material") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Sets if the ``CanvasItem`` uses its parent's material. + public static func canvasItemSetUseParentMaterial(item: RID, enabled: Bool) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_use_parent_material, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_visibility_notifier: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_visibility_notifier") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3568945579)! + } + + } + + }() + + /// Sets the given ``CanvasItem`` as visibility notifier. `area` defines the area of detecting visibility. `enterCallable` is called when the ``CanvasItem`` enters the screen, `exitCallable` is called when the ``CanvasItem`` exits the screen. If `enable` is `false`, the item will no longer function as notifier. + /// + /// This method can be used to manually mimic ``VisibleOnScreenNotifier2D``. + /// + public static func canvasItemSetVisibilityNotifier(item: RID, enable: Bool, area: Rect2, enterCallable: Callable, exitCallable: Callable) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: area) { pArg2 in + withUnsafePointer(to: enterCallable.content) { pArg3 in + withUnsafePointer(to: exitCallable.content) { pArg4 in + withUnsafePointer(to: UnsafeRawPointersN5(pArg0, pArg1, pArg2, pArg3, pArg4)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 5) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_visibility_notifier, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_item_set_canvas_group_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_item_set_canvas_group_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3973586316)! + } + + } + + }() + + /// Sets the canvas group mode used during 2D rendering for the canvas item specified by the `item` RID. For faster but more limited clipping, use ``canvasItemSetClip(item:clip:)`` instead. + /// + /// > Note: The equivalent node functionality is found in ``CanvasGroup`` and ``CanvasItem/clipChildren``. + /// + public static func canvasItemSetCanvasGroupMode(item: RID, mode: RenderingServer.CanvasGroupMode, clearMargin: Double = 5.0, fitEmpty: Bool = false, fitMargin: Double = 0.0, blurMipmaps: Bool = false) { + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: clearMargin) { pArg2 in + withUnsafePointer(to: fitEmpty) { pArg3 in + withUnsafePointer(to: fitMargin) { pArg4 in + withUnsafePointer(to: blurMipmaps) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_item_set_canvas_group_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_debug_canvas_item_get_rect: GDExtensionMethodBindPtr = { + let methodName = StringName("debug_canvas_item_get_rect") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 624227424)! + } + + } + + }() + + /// Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. + /// + /// > Warning: This function is intended for debugging in the editor, and will pass through and return a zero ``Rect2`` in exported projects. + /// + public static func debugCanvasItemGetRect(item: RID) -> Rect2 { + var _result: Rect2 = Rect2 () + withUnsafePointer(to: item.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_debug_canvas_item_get_rect, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_canvas_light_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``Light2D``. + /// + public static func canvasLightCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_light_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_light_attach_to_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_attach_to_canvas") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Attaches the canvas light to the canvas. Removes it from its previous canvas. + public static func canvasLightAttachToCanvas(light: RID, canvas: RID) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_attach_to_canvas, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Enables or disables a canvas light. + public static func canvasLightSetEnabled(light: RID, enabled: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_texture_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_texture_scale") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets the scale factor of a ``PointLight2D``'s texture. Equivalent to ``PointLight2D/textureScale``. + public static func canvasLightSetTextureScale(light: RID, scale: Double) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: scale) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_texture_scale, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets the canvas light's ``Transform2D``. + public static func canvasLightSetTransform(light: RID, transform: Transform2D) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets the texture to be used by a ``PointLight2D``. Equivalent to ``PointLight2D/texture``. + public static func canvasLightSetTexture(light: RID, texture: RID) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: texture.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_texture, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_texture_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_texture_offset") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3201125042)! + } + + } + + }() + + /// Sets the offset of a ``PointLight2D``'s texture. Equivalent to ``PointLight2D/offset``. + public static func canvasLightSetTextureOffset(light: RID, offset: Vector2) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: offset) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_texture_offset, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Sets the color for a light. + public static func canvasLightSetColor(light: RID, color: Color) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_height: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_height") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets a canvas light's height. + public static func canvasLightSetHeight(light: RID, height: Double) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: height) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_height, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_energy: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_energy") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Sets a canvas light's energy. + public static func canvasLightSetEnergy(light: RID, energy: Double) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: energy) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_energy, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_z_range: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_z_range") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// Sets the Z range of objects that will be affected by this light. Equivalent to ``Light2D/rangeZMin`` and ``Light2D/rangeZMax``. + public static func canvasLightSetZRange(light: RID, minZ: Int32, maxZ: Int32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: minZ) { pArg1 in + withUnsafePointer(to: maxZ) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_z_range, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_layer_range: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_layer_range") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288446313)! + } + + } + + }() + + /// The layer range that gets rendered with this light. + public static func canvasLightSetLayerRange(light: RID, minLayer: Int32, maxLayer: Int32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: minLayer) { pArg1 in + withUnsafePointer(to: maxLayer) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_layer_range, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_item_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_item_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// The light mask. See ``LightOccluder2D`` for more information on light masks. + public static func canvasLightSetItemCullMask(light: RID, mask: Int32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_item_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_item_shadow_cull_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_item_shadow_cull_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// The binary mask used to determine which layers this canvas light's shadows affects. See ``LightOccluder2D`` for more information on light masks. + public static func canvasLightSetItemShadowCullMask(light: RID, mask: Int32) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_item_shadow_cull_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2957564891)! + } + + } + + }() + + /// The mode of the light, see ``RenderingServer/CanvasLightMode`` constants. + public static func canvasLightSetMode(light: RID, mode: RenderingServer.CanvasLightMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_shadow_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_shadow_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Enables or disables the canvas light's shadow. + public static func canvasLightSetShadowEnabled(light: RID, enabled: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_shadow_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_shadow_filter: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_shadow_filter") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 393119659)! + } + + } + + }() + + /// Sets the canvas light's shadow's filter, see ``RenderingServer/CanvasLightShadowFilter`` constants. + public static func canvasLightSetShadowFilter(light: RID, filter: RenderingServer.CanvasLightShadowFilter) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: filter.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_shadow_filter, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_shadow_color: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_shadow_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2948539648)! + } + + } + + }() + + /// Sets the color of the canvas light's shadow. + public static func canvasLightSetShadowColor(light: RID, color: Color) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_shadow_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_shadow_smooth: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_shadow_smooth") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1794382983)! + } + + } + + }() + + /// Smoothens the shadow. The lower, the smoother. + public static func canvasLightSetShadowSmooth(light: RID, smooth: Double) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: smooth) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_shadow_smooth, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_blend_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_blend_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 804895945)! + } + + } + + }() + + /// Sets the blend mode for the given canvas light. See ``RenderingServer/CanvasLightBlendMode`` for options. Equivalent to ``Light2D/blendMode``. + public static func canvasLightSetBlendMode(light: RID, mode: RenderingServer.CanvasLightBlendMode) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_blend_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_set_interpolated: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_set_interpolated") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `interpolated` is `true`, turns on physics interpolation for the canvas light. + public static func canvasLightSetInterpolated(light: RID, interpolated: Bool) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: interpolated) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_set_interpolated, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_reset_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_reset_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Prevents physics interpolation for the current physics tick. + /// + /// This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + /// + public static func canvasLightResetPhysicsInterpolation(light: RID) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_reset_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_canvas_light_transform_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_transform_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Transforms both the current and previous stored transform for a canvas light. + /// + /// This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin. + /// + public static func canvasLightTransformPhysicsInterpolation(light: RID, transform: Transform2D) { + withUnsafePointer(to: light.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_transform_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_occluder_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent node is ``LightOccluder2D``. + /// + public static func canvasLightOccluderCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_light_occluder_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_light_occluder_attach_to_canvas: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_attach_to_canvas") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Attaches a light occluder to the canvas. Removes it from its previous canvas. + public static func canvasLightOccluderAttachToCanvas(occluder: RID, canvas: RID) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: canvas.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_attach_to_canvas, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// Enables or disables light occluder. + public static func canvasLightOccluderSetEnabled(occluder: RID, enabled: Bool) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_polygon: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_polygon") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 395945892)! + } + + } + + }() + + /// Sets a light occluder's polygon. + public static func canvasLightOccluderSetPolygon(occluder: RID, polygon: RID) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: polygon.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_polygon, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_as_sdf_collision: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_as_sdf_collision") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// + public static func canvasLightOccluderSetAsSdfCollision(occluder: RID, enable: Bool) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: enable) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_as_sdf_collision, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_transform: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_transform") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Sets a light occluder's ``Transform2D``. + public static func canvasLightOccluderSetTransform(occluder: RID, transform: Transform2D) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_transform, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_light_mask: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_light_mask") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3411492887)! + } + + } + + }() + + /// The light mask. See ``LightOccluder2D`` for more information on light masks. + public static func canvasLightOccluderSetLightMask(occluder: RID, mask: Int32) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: mask) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_light_mask, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_set_interpolated: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_set_interpolated") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1265174801)! + } + + } + + }() + + /// If `interpolated` is `true`, turns on physics interpolation for the light occluder. + public static func canvasLightOccluderSetInterpolated(occluder: RID, interpolated: Bool) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: interpolated) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_set_interpolated, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_reset_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_reset_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Prevents physics interpolation for the current physics tick. + /// + /// This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location. + /// + public static func canvasLightOccluderResetPhysicsInterpolation(occluder: RID) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_reset_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_canvas_light_occluder_transform_physics_interpolation: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_light_occluder_transform_physics_interpolation") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1246044741)! + } + + } + + }() + + /// Transforms both the current and previous stored transform for a light occluder. + /// + /// This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. + /// + public static func canvasLightOccluderTransformPhysicsInterpolation(occluder: RID, transform: Transform2D) { + withUnsafePointer(to: occluder.content) { pArg0 in + withUnsafePointer(to: transform) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_light_occluder_transform_physics_interpolation, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_occluder_polygon_create: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_occluder_polygon_create") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_occluder_polygon_*` RenderingServer functions. + /// + /// Once finished with your RID, you will want to free the RID using the RenderingServer's ``freeRid(_:)`` method. + /// + /// > Note: The equivalent resource is ``OccluderPolygon2D``. + /// + public static func canvasOccluderPolygonCreate() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_canvas_occluder_polygon_create, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_canvas_occluder_polygon_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_occluder_polygon_set_shape") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2103882027)! + } + + } + + }() + + /// Sets the shape of the occluder polygon. + public static func canvasOccluderPolygonSetShape(occluderPolygon: RID, shape: PackedVector2Array, closed: Bool) { + withUnsafePointer(to: occluderPolygon.content) { pArg0 in + withUnsafePointer(to: shape.content) { pArg1 in + withUnsafePointer(to: closed) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_occluder_polygon_set_shape, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_occluder_polygon_set_cull_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_occluder_polygon_set_cull_mode") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1839404663)! + } + + } + + }() + + /// Sets an occluder polygons cull mode. See ``RenderingServer/CanvasOccluderPolygonCullMode`` constants. + public static func canvasOccluderPolygonSetCullMode(occluderPolygon: RID, mode: RenderingServer.CanvasOccluderPolygonCullMode) { + withUnsafePointer(to: occluderPolygon.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_occluder_polygon_set_cull_mode, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_canvas_set_shadow_texture_size: GDExtensionMethodBindPtr = { + let methodName = StringName("canvas_set_shadow_texture_size") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Sets the ``ProjectSettings/rendering/2d/shadowAtlas/size`` to use for ``Light2D`` shadow rendering (in pixels). The value is rounded up to the nearest power of 2. + public static func canvasSetShadowTextureSize(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_canvas_set_shadow_texture_size, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_global_shader_parameter_add: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_add") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 463390080)! + } + + } + + }() + + /// Creates a new global shader uniform. + /// + /// > Note: Global shader parameter names are case-sensitive. + /// + public static func globalShaderParameterAdd(name: StringName, type: RenderingServer.GlobalShaderParameterType, defaultValue: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: defaultValue.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_add, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_global_shader_parameter_remove: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_remove") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the global shader uniform specified by `name`. + public static func globalShaderParameterRemove(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_remove, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_global_shader_parameter_get_list: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_get_list") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns the list of global shader uniform names. + /// + /// > Note: ``globalShaderParameterGet(name:)`` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + /// + public static func globalShaderParameterGetList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(method_global_shader_parameter_get_list, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_global_shader_parameter_set: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_set") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Sets the global shader uniform `name` to `value`. + public static func globalShaderParameterSet(name: StringName, value: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_set, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_shader_parameter_set_override: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_set_override") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3776071444)! + } + + } + + }() + + /// Overrides the global shader uniform `name` with `value`. Equivalent to the ``ShaderGlobalsOverride`` node. + public static func globalShaderParameterSetOverride(name: StringName, value: Variant?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: value.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_set_override, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_global_shader_parameter_get: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_get") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2760726917)! + } + + } + + }() + + /// Returns the value of the global shader uniform specified by `name`. + /// + /// > Note: ``globalShaderParameterGet(name:)`` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + /// + public static func globalShaderParameterGet(name: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_get, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_global_shader_parameter_get_type: GDExtensionMethodBindPtr = { + let methodName = StringName("global_shader_parameter_get_type") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1601414142)! + } + + } + + }() + + /// Returns the type associated to the global shader uniform specified by `name`. + /// + /// > Note: ``globalShaderParameterGet(name:)`` has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + /// + public static func globalShaderParameterGetType(name: StringName) -> RenderingServer.GlobalShaderParameterType { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_global_shader_parameter_get_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return RenderingServer.GlobalShaderParameterType (rawValue: _result)! + } + + fileprivate static var method_free_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("free_rid") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2722037293)! + } + + } + + }() + + /// Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly. + public static func freeRid(_ rid: RID) { + withUnsafePointer(to: rid.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_free_rid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_request_frame_drawn_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("request_frame_drawn_callback") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// Schedules a callback to the given callable after a frame has been drawn. + public static func requestFrameDrawnCallback(callable: Callable) { + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_request_frame_drawn_callback, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("has_changed") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if changes have been made to the RenderingServer's data. ``forceDraw(swapBuffers:frameStep:)`` is usually called if this happens. + public static func hasChanged() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_has_changed, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_get_rendering_info: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rendering_info") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3763192241)! + } + + } + + }() + + /// Returns a statistic about the rendering engine which can be used for performance profiling. See ``RenderingServer.RenderingInfo`` for a list of values that can be queried. See also ``viewportGetRenderInfo(viewport:type:info:)``, which returns information specific to a viewport. + /// + /// > Note: Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. + /// + /// > Note: Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, ``getRenderingInfo(_:)`` returns `0`. To print rendering information in `_ready()` successfully, use the following: + /// + public static func getRenderingInfo(_ info: RenderingServer.RenderingInfo) -> UInt { + var _result: UInt = 0 + withUnsafePointer(to: info.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_rendering_info, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_video_adapter_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_video_adapter_name") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + /// + /// > Note: When running a headless or server binary, this function returns an empty string. + /// + /// > Note: On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult. + /// + public static func getVideoAdapterName() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_video_adapter_name, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_video_adapter_vendor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_video_adapter_vendor") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + /// + /// > Note: When running a headless or server binary, this function returns an empty string. + /// + public static func getVideoAdapterVendor() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_video_adapter_vendor, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_video_adapter_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_video_adapter_type") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3099547011)! + } + + } + + }() + + /// Returns the type of the video adapter. Since dedicated graphics cards from a given generation will _usually_ be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. + /// + /// > Note: When using the OpenGL backend or when running in headless mode, this function always returns ``RenderingDevice/DeviceType/other``. + /// + public static func getVideoAdapterType() -> RenderingDevice.DeviceType { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(method_get_video_adapter_type, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return RenderingDevice.DeviceType (rawValue: _result)! + } + + fileprivate static var method_get_video_adapter_api_version: GDExtensionMethodBindPtr = { + let methodName = StringName("get_video_adapter_api_version") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the version of the graphics video adapter _currently in use_ (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also ``OS/getVideoAdapterDriverInfo()``. + /// + /// > Note: When running a headless or server binary, this function returns an empty string. + /// + public static func getVideoAdapterApiVersion() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_get_video_adapter_api_version, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_make_sphere_mesh: GDExtensionMethodBindPtr = { + let methodName = StringName("make_sphere_mesh") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2251015897)! + } + + } + + }() + + /// Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also ``getTestCube()``. + public static func makeSphereMesh(latitudes: Int32, longitudes: Int32, radius: Double) -> RID { + let _result: RID = RID () + withUnsafePointer(to: latitudes) { pArg0 in + withUnsafePointer(to: longitudes) { pArg1 in + withUnsafePointer(to: radius) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_make_sphere_mesh, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_test_cube: GDExtensionMethodBindPtr = { + let methodName = StringName("get_test_cube") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Returns the RID of the test cube. This mesh will be created and returned on the first call to ``getTestCube()``, then it will be cached for subsequent calls. See also ``makeSphereMesh(latitudes:longitudes:radius:)``. + public static func getTestCube() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_get_test_cube, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_test_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_test_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Returns the RID of a 256×256 texture with a testing pattern on it (in ``Image/Format/rgb8`` format). This texture will be created and returned on the first call to ``getTestTexture()``, then it will be cached for subsequent calls. See also ``getWhiteTexture()``. + /// + /// Example of getting the test texture and applying it to a ``Sprite2D`` node: + /// + public static func getTestTexture() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_get_test_texture, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_white_texture: GDExtensionMethodBindPtr = { + let methodName = StringName("get_white_texture") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 529393457)! + } + + } + + }() + + /// Returns the ID of a 4×4 white texture (in ``Image/Format/rgb8`` format). This texture will be created and returned on the first call to ``getWhiteTexture()``, then it will be cached for subsequent calls. See also ``getTestTexture()``. + /// + /// Example of getting the white texture and applying it to a ``Sprite2D`` node: + /// + public static func getWhiteTexture() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(method_get_white_texture, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_boot_image: GDExtensionMethodBindPtr = { + let methodName = StringName("set_boot_image") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3759744527)! + } + + } + + }() + + /// Sets a boot image. The color defines the background color. If `scale` is `true`, the image will be scaled to fit the screen size. If `useFilter` is `true`, the image will be scaled with linear interpolation. If `useFilter` is `false`, the image will be scaled with nearest-neighbor interpolation. + public static func setBootImage(_ image: Image?, color: Color, scale: Bool, useFilter: Bool = true) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: color) { pArg1 in + withUnsafePointer(to: scale) { pArg2 in + withUnsafePointer(to: useFilter) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_set_boot_image, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_default_clear_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_default_clear_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200896285)! + } + + } + + }() + + /// Returns the default clear color which is used when a specific clear color has not been selected. See also ``setDefaultClearColor(_:)``. + public static func getDefaultClearColor() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(method_get_default_clear_color, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_default_clear_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_default_clear_color") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Sets the default clear color which is used when a specific clear color has not been selected. See also ``getDefaultClearColor()``. + public static func setDefaultClearColor(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_default_clear_color, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_os_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("has_os_feature") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3927539163)! + } + + } + + }() + + /// Returns `true` if the OS supports a certain `feature`. Features might be `s3tc`, `etc`, and `etc2`. + public static func hasOsFeature(_ feature: String) -> Bool { + var _result: Bool = false + let feature = GString(feature) + withUnsafePointer(to: feature.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_os_feature, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_debug_generate_wireframes: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_generate_wireframes") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// This method is currently unimplemented and does nothing if called with `generate` set to `true`. + public static func setDebugGenerateWireframes(generate: Bool) { + withUnsafePointer(to: generate) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_debug_generate_wireframes, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_render_loop_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_render_loop_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate static func is_render_loop_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_render_loop_enabled, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_set_render_loop_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_render_loop_enabled") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate static func set_render_loop_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_render_loop_enabled, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_frame_setup_time_cpu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame_setup_time_cpu") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + /// Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does _not_ require ``viewportSetMeasureRenderTime(viewport:enable:)`` to be enabled on a viewport to be queried. See also ``viewportGetMeasuredRenderTimeCpu(viewport:)``. + public static func getFrameSetupTimeCpu() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(method_get_frame_setup_time_cpu, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_force_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("force_sync") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. + public static func forceSync() { + gi.object_method_bind_ptrcall(method_force_sync, UnsafeMutableRawPointer(mutating: shared.handle), nil, nil) + + } + + fileprivate static var method_force_draw: GDExtensionMethodBindPtr = { + let methodName = StringName("force_draw") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1076185472)! + } + + } + + }() + + /// Forces redrawing of all viewports at once. Must be called from the main thread. + public static func forceDraw(swapBuffers: Bool = true, frameStep: Double = 0.0) { + withUnsafePointer(to: swapBuffers) { pArg0 in + withUnsafePointer(to: frameStep) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_force_draw, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_rendering_device: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rendering_device") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1405107940)! + } + + } + + }() + + /// Returns the global RenderingDevice. + /// + /// > Note: When using the OpenGL backend or when running in headless mode, this function always returns `null`. + /// + public static func getRenderingDevice() -> RenderingDevice { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_get_rendering_device, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + guard let _result else { fatalError ("Unexpected nil return from a method that should never return nil") } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_local_rendering_device: GDExtensionMethodBindPtr = { + let methodName = StringName("create_local_rendering_device") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1405107940)! + } + + } + + }() + + /// Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. + /// + /// > Note: When using the OpenGL backend or when running in headless mode, this function always returns `null`. + /// + public static func createLocalRenderingDevice() -> RenderingDevice? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(method_create_local_rendering_device, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_on_render_thread: GDExtensionMethodBindPtr = { + let methodName = StringName("is_on_render_thread") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + /// Returns `true` if our code is currently executing on the rendering thread. + public static func isOnRenderThread() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(method_is_on_render_thread, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_call_on_render_thread: GDExtensionMethodBindPtr = { + let methodName = StringName("call_on_render_thread") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + /// As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as ``RenderingDevice`` and similar RD classes), push a callable via this function so it will be executed on the render thread. + public static func callOnRenderThread(callable: Callable) { + withUnsafePointer(to: callable.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_call_on_render_thread, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_has_feature: GDExtensionMethodBindPtr = { + let methodName = StringName("has_feature") + return withUnsafePointer(to: &RenderingServer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 598462696)! + } + + } + + }() + + /// This method does nothing and always returns `false`. + public static func hasFeature(_ feature: RenderingServer.Features) -> Bool { + var _result: Bool = false + withUnsafePointer(to: feature.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_feature, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + // Signals + /// Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.framePreDraw.connect { + /// print ("caught signal") + /// } + /// ``` + public var framePreDraw: SimpleSignal { SimpleSignal (target: self, signalName: "frame_pre_draw") } + + /// Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.framePostDraw.connect { + /// print ("caught signal") + /// } + /// ``` + public var framePostDraw: SimpleSignal { SimpleSignal (target: self, signalName: "frame_post_draw") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Resource.swift b/Sources/SwiftGodot/Generated/Api/Resource.swift new file mode 100644 index 000000000..347f772b9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Resource.swift @@ -0,0 +1,501 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for serializable objects. +/// +/// Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from ``RefCounted``, resources are reference-counted and freed when no longer in use. They can also be nested within other resources, and saved on disk. ``PackedScene``, one of the most common ``Object``s in a Godot project, is also a resource, uniquely capable of storing and instantiating the ``Node``s it contains as many times as desired. +/// +/// In GDScript, resources can loaded from disk by their ``resourcePath`` using ``@GDScript.load`` or ``@GDScript.preload``. +/// +/// The engine keeps a global cache of all loaded resources, referenced by paths (see ``ResourceLoader/hasCached(path:)``). A resource will be cached when loaded for the first time and removed from cache once all references are released. When a resource is cached, subsequent loads using its path will return the cached reference. +/// +/// > Note: In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will remain in memory for a while before being removed. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``changed`` +/// - ``setupLocalToSceneRequested`` +open class Resource: RefCounted { + override open class var godotClassName: StringName { "Resource" } + + /* Properties */ + + /// If `true`, the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see ``PackedScene/instantiate(editState:)``). + /// + /// > Note: Changing this property at run-time has no effect on already created duplicate resources. + /// + final public var resourceLocalToScene: Bool { + get { + return is_local_to_scene () + } + + set { + set_local_to_scene (newValue) + } + + } + + /// The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the ``PackedScene``'s filepath, followed by a unique identifier. + /// + /// > Note: Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use ``takeOverPath(_:)``. + /// + final public var resourcePath: String { + get { + return get_path () + } + + set { + set_path (newValue) + } + + } + + /// An optional name for this resource. When defined, its value is displayed to represent the resource in the Inspector dock. For built-in scripts, the name is displayed as part of the tab name in the script editor. + /// + /// > Note: Some resource formats do not support resource names. You can still set the name in the editor or via code, but it will be lost when the resource is reloaded. For example, only built-in scripts can have a resource name, while scripts stored in separate files cannot. + /// + final public var resourceName: String { + get { + return get_name () + } + + set { + set_name (newValue) + } + + } + + /// An unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a ``PackedScene``. If the resource is not inside a scene, this property is empty by default. + /// + /// > Note: When the ``PackedScene`` is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from ``generateSceneUniqueId()``. + /// + /// > Note: Setting this property does not emit the [signal changed] signal. + /// + /// > Warning: When setting, the ID must only consist of letters, numbers, and underscores. Otherwise, it will fail and default to a randomly generated ID. + /// + final public var resourceSceneUniqueId: String { + get { + return get_scene_unique_id () + } + + set { + set_scene_unique_id (newValue) + } + + } + + /* Methods */ + /// Override this method to customize the newly duplicated resource created from ``PackedScene/instantiate(editState:)``, if the original's ``resourceLocalToScene`` is set to `true`. + /// + /// **Example:** Set a random `damage` value to every local resource from an instantiated scene. + /// + @_documentation(visibility: public) + open func _setupLocalToScene() { + } + + fileprivate static var method_set_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_path") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_path(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_set_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_take_over_path: GDExtensionMethodBindPtr = { + let methodName = StringName("take_over_path") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Sets the ``resourcePath`` to `path`, potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource. + public final func takeOverPath(_ path: String) { + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_take_over_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_path") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_path() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Resource.method_get_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_name: GDExtensionMethodBindPtr = { + let methodName = StringName("set_name") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_name(_ name: String) { + let name = GString(name) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_set_name, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_name") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_name() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Resource.method_get_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_get_rid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_rid") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2944877500)! + } + + } + + }() + + /// Returns the ``RID`` of this resource (or an empty RID). Many resources (such as ``Texture2D``, ``Mesh``, and so on) are high-level abstractions of resources stored in a specialized server (``DisplayServer``, ``RenderingServer``, etc.), so this function will return the original ``RID``. + public final func getRid() -> RID { + let _result: RID = RID () + gi.object_method_bind_ptrcall(Resource.method_get_rid, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_local_to_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("set_local_to_scene") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_local_to_scene(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_set_local_to_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_local_to_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("is_local_to_scene") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_local_to_scene() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Resource.method_is_local_to_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_local_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_local_scene") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + /// If ``resourceLocalToScene`` is set to `true` and the resource has been loaded from a ``PackedScene`` instantiation, returns the root ``Node`` of the scene where this resource is used. Otherwise, returns `null`. + public final func getLocalScene() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Resource.method_get_local_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_setup_local_to_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("setup_local_to_scene") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Calls ``_setupLocalToScene()``. If ``resourceLocalToScene`` is set to `true`, this method is automatically called from ``PackedScene/instantiate(editState:)`` by the newly duplicated resource within the scene instance. + public final func setupLocalToScene() { + gi.object_method_bind_ptrcall(Resource.method_setup_local_to_scene, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_generate_scene_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("generate_scene_unique_id") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2841200299)! + } + + } + + }() + + /// Generates a unique identifier for a resource to be contained inside a ``PackedScene``, based on the current date, time, and a random value. The returned string is only composed of letters (`a` to `y`) and numbers (`0` to `8`). See also ``resourceSceneUniqueId``. + public static func generateSceneUniqueId() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(method_generate_scene_unique_id, nil, nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_scene_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scene_unique_id") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scene_unique_id(_ id: String) { + let id = GString(id) + withUnsafePointer(to: id.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_set_scene_unique_id, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_scene_unique_id: GDExtensionMethodBindPtr = { + let methodName = StringName("get_scene_unique_id") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_scene_unique_id() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Resource.method_get_scene_unique_id, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_emit_changed: GDExtensionMethodBindPtr = { + let methodName = StringName("emit_changed") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Emits the [signal changed] signal. This method is called automatically for some built-in resources. + /// + /// > Note: For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom ``Object``s depending on the resource are properly updated. + /// + public final func emitChanged() { + gi.object_method_bind_ptrcall(Resource.method_emit_changed, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_duplicate: GDExtensionMethodBindPtr = { + let methodName = StringName("duplicate") + return withUnsafePointer(to: &Resource.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 482882304)! + } + + } + + }() + + /// Duplicates this resource, returning a new resource with its `export`ed or ``PropertyUsageFlags/propertyUsageStorage`` properties copied from the original. + /// + /// If `subresources` is `false`, a shallow copy is returned; nested resources within subresources are not duplicated and are shared from the original resource. If `subresources` is `true`, a deep copy is returned; nested subresources will be duplicated and are not shared. + /// + /// Subresource properties with the ``PropertyUsageFlags/propertyUsageAlwaysDuplicate`` flag are always duplicated even with `subresources` set to `false`, and properties with the ``PropertyUsageFlags/propertyUsageNeverDuplicate`` flag are never duplicated even with `subresources` set to `true`. + /// + /// > Note: For custom resources, this method will fail if ``Object/_init()`` has been defined with required parameters. + /// + public final func duplicate(subresources: Bool = false) -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: subresources) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Resource.method_duplicate, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_setup_local_to_scene": + return _Resource_proxy_setup_local_to_scene + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Emitted when the resource changes, usually when one of its properties is modified. See also ``emitChanged()``. + /// + /// > Note: This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.changed.connect { + /// print ("caught signal") + /// } + /// ``` + public var changed: SimpleSignal { SimpleSignal (target: self, signalName: "changed") } + + /// Emitted by a newly duplicated resource with ``resourceLocalToScene`` set to `true`. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.setupLocalToSceneRequested.connect { + /// print ("caught signal") + /// } + /// ``` + public var setupLocalToSceneRequested: SimpleSignal { SimpleSignal (target: self, signalName: "setup_local_to_scene_requested") } + +} + +// Support methods for proxies +func _Resource_proxy_setup_local_to_scene (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + swiftObject._setupLocalToScene () +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceFormatLoader.swift b/Sources/SwiftGodot/Generated/Api/ResourceFormatLoader.swift new file mode 100644 index 000000000..bb673531e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceFormatLoader.swift @@ -0,0 +1,267 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Loads a specific resource type from a file. +/// +/// Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the ``ResourceLoader`` singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. +/// +/// Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with `class_name` for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a ``ResourceFormatSaver``. +/// +/// > Note: You can also extend ``EditorImportPlugin`` if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends on if the format is suitable or not for the final exported game. For example, it's better to import `.png` textures as `.ctex` (``CompressedTexture2D``) first, so they can be loaded with better efficiency on the graphics card. +/// +open class ResourceFormatLoader: RefCounted { + override open class var godotClassName: StringName { "ResourceFormatLoader" } + public enum CacheMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with ``CacheMode/reuse``. + case ignore = 0 // CACHE_MODE_IGNORE + /// The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). + case reuse = 1 // CACHE_MODE_REUSE + /// Like ``CacheMode/reuse``, but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. + case replace = 2 // CACHE_MODE_REPLACE + /// Like ``CacheMode/ignore``, but propagated recursively down the tree of dependencies (external resources). + case ignoreDeep = 3 // CACHE_MODE_IGNORE_DEEP + /// Like ``CacheMode/replace``, but propagated recursively down the tree of dependencies (external resources). + case replaceDeep = 4 // CACHE_MODE_REPLACE_DEEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ignore: return ".ignore" + case .reuse: return ".reuse" + case .replace: return ".replace" + case .ignoreDeep: return ".ignoreDeep" + case .replaceDeep: return ".replaceDeep" + } + + } + + } + + /* Methods */ + /// Gets the list of extensions for files this loader is able to read. + @_documentation(visibility: public) + open func _getRecognizedExtensions() -> PackedStringArray { + return PackedStringArray () + } + + /// Tells whether or not this loader should load a resource from its resource path for a given type. + /// + /// If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by ``_getRecognizedExtensions()``, and if the type is within the ones provided by ``_getResourceType(path:)``. + /// + @_documentation(visibility: public) + open func _recognizePath(_ path: String, type: StringName) -> Bool { + return false + } + + /// Tells which resource class this loader can load. + /// + /// > Note: Custom resource types defined by scripts aren't known by the ``ClassDB``, so you might just handle `"Resource"` for them. + /// + @_documentation(visibility: public) + open func _handlesType(_ type: StringName) -> Bool { + return false + } + + /// Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return `""`. + /// + /// > Note: Custom resource types defined by scripts aren't known by the ``ClassDB``, so you might just return `"Resource"` for them. + /// + @_documentation(visibility: public) + open func _getResourceType(path: String) -> String { + return String () + } + + /// Returns the script class name associated with the ``Resource`` under the given `path`. If the resource has no script or the script isn't a named class, it should return `""`. + @_documentation(visibility: public) + open func _getResourceScriptClass(path: String) -> String { + return String () + } + + /// + @_documentation(visibility: public) + open func _getResourceUid(path: String) -> Int { + return 0 + } + + /// If implemented, gets the dependencies of a given resource. If `addTypes` is `true`, paths should be appended `::TypeName`, where `TypeName` is the class name of the dependency. + /// + /// > Note: Custom resource types defined by scripts aren't known by the ``ClassDB``, so you might just return `"Resource"` for them. + /// + @_documentation(visibility: public) + open func _getDependencies(path: String, addTypes: Bool) -> PackedStringArray { + return PackedStringArray () + } + + /// If implemented, renames dependencies within the given resource and saves it. `renames` is a dictionary `{ String => String }` mapping old dependency paths to new paths. + /// + /// Returns ``GodotError/ok`` on success, or an ``GodotError`` constant in case of failure. + /// + @_documentation(visibility: public) + open func _renameDependencies(path: String, renames: GDictionary) -> GodotError { + return .ok + } + + /// + @_documentation(visibility: public) + open func _exists(path: String) -> Bool { + return false + } + + /// + @_documentation(visibility: public) + open func _getClassesUsed(path: String) -> PackedStringArray { + return PackedStringArray () + } + + /// Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, `originalPath` will target the source file. Returns a ``Resource`` object on success, or an ``GodotError`` constant in case of failure. + /// + /// The `cacheMode` property defines whether and how the cache should be used or updated when loading the resource. See ``ResourceFormatLoader/CacheMode`` for details. + /// + @_documentation(visibility: public) + open func _load(path: String, originalPath: String, useSubThreads: Bool, cacheMode: Int32) -> Variant? { + return nil + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_exists": + return _ResourceFormatLoader_proxy_exists + case "_get_classes_used": + return _ResourceFormatLoader_proxy_get_classes_used + case "_get_dependencies": + return _ResourceFormatLoader_proxy_get_dependencies + case "_get_recognized_extensions": + return _ResourceFormatLoader_proxy_get_recognized_extensions + case "_get_resource_script_class": + return _ResourceFormatLoader_proxy_get_resource_script_class + case "_get_resource_type": + return _ResourceFormatLoader_proxy_get_resource_type + case "_get_resource_uid": + return _ResourceFormatLoader_proxy_get_resource_uid + case "_handles_type": + return _ResourceFormatLoader_proxy_handles_type + case "_load": + return _ResourceFormatLoader_proxy_load + case "_recognize_path": + return _ResourceFormatLoader_proxy_recognize_path + case "_rename_dependencies": + return _ResourceFormatLoader_proxy_rename_dependencies + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _ResourceFormatLoader_proxy_exists (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._exists (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _ResourceFormatLoader_proxy_get_classes_used (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getClassesUsed (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _ResourceFormatLoader_proxy_get_dependencies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getDependencies (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", addTypes: args [1]!.assumingMemoryBound (to: Bool.self).pointee) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _ResourceFormatLoader_proxy_get_recognized_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getRecognizedExtensions () + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _ResourceFormatLoader_proxy_get_resource_script_class (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getResourceScriptClass (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "")) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _ResourceFormatLoader_proxy_get_resource_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = GString (swiftObject._getResourceType (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "")) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // String + ret.content = GString.zero +} + +func _ResourceFormatLoader_proxy_get_resource_uid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._getResourceUid (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "") + retPtr!.storeBytes (of: ret, as: Int.self) +} + +func _ResourceFormatLoader_proxy_handles_type (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._handlesType (StringName (content: args [0]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _ResourceFormatLoader_proxy_load (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._load (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", originalPath: GString.stringFromGStringPtr (ptr: args [1]!) ?? "", useSubThreads: args [2]!.assumingMemoryBound (to: Bool.self).pointee, cacheMode: args [3]!.assumingMemoryBound (to: Int32.self).pointee) + retPtr!.storeBytes(of: ret.content, as: Variant.ContentType.self) + ret?.content = Variant.zero +} + +func _ResourceFormatLoader_proxy_recognize_path (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._recognizePath (GString.stringFromGStringPtr (ptr: args [0]!) ?? "", type: StringName (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _ResourceFormatLoader_proxy_rename_dependencies (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._renameDependencies (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", renames: GDictionary (content: args [1]!.assumingMemoryBound (to: Int64.self).pointee)) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceFormatSaver.swift b/Sources/SwiftGodot/Generated/Api/ResourceFormatSaver.swift new file mode 100644 index 000000000..d30d07339 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceFormatSaver.swift @@ -0,0 +1,136 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Saves a specific resource type to a file. +/// +/// The engine can save resources when you do it from the editor, or when you use the ``ResourceSaver`` singleton. This is accomplished thanks to multiple ``ResourceFormatSaver``s, each handling its own format and called automatically by the engine. +/// +/// By default, Godot saves resources as `.tres` (text-based), `.res` (binary) or another built-in format, but you can choose to create your own format by extending this class. Be sure to respect the documented return types and values. You should give it a global class name with `class_name` for it to be registered. Like built-in ResourceFormatSavers, it will be called automatically when saving resources of its recognized type(s). You may also implement a ``ResourceFormatLoader``. +/// +open class ResourceFormatSaver: RefCounted { + override open class var godotClassName: StringName { "ResourceFormatSaver" } + /* Methods */ + /// Saves the given resource object to a file at the target `path`. `flags` is a bitmask composed with ``ResourceSaver.SaverFlags`` constants. + /// + /// Returns ``GodotError/ok`` on success, or an ``GodotError`` constant in case of failure. + /// + @_documentation(visibility: public) + open func _save(resource: Resource?, path: String, flags: UInt32) -> GodotError { + return .ok + } + + /// Sets a new UID for the resource at the given `path`. Returns ``GodotError/ok`` on success, or an ``GodotError`` constant in case of failure. + @_documentation(visibility: public) + open func _setUid(path: String, uid: Int) -> GodotError { + return .ok + } + + /// Returns whether the given resource object can be saved by this saver. + @_documentation(visibility: public) + open func _recognize(resource: Resource?) -> Bool { + return false + } + + /// Returns the list of extensions available for saving the resource object, provided it is recognized (see ``_recognize(resource:)``). + @_documentation(visibility: public) + open func _getRecognizedExtensions(resource: Resource?) -> PackedStringArray { + return PackedStringArray () + } + + /// Returns `true` if this saver handles a given save path and `false` otherwise. + /// + /// If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by ``_getRecognizedExtensions(resource:)``. + /// + @_documentation(visibility: public) + open func _recognizePath(resource: Resource?, path: String) -> Bool { + return false + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_get_recognized_extensions": + return _ResourceFormatSaver_proxy_get_recognized_extensions + case "_recognize": + return _ResourceFormatSaver_proxy_recognize + case "_recognize_path": + return _ResourceFormatSaver_proxy_recognize_path + case "_save": + return _ResourceFormatSaver_proxy_save + case "_set_uid": + return _ResourceFormatSaver_proxy_set_uid + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _ResourceFormatSaver_proxy_get_recognized_extensions (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._getRecognizedExtensions (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret.content, as: type (of: ret.content)) // PackedStringArray + ret.content = PackedStringArray.zero +} + +func _ResourceFormatSaver_proxy_recognize (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._recognize (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _ResourceFormatSaver_proxy_recognize_path (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._recognizePath (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0), path: GString.stringFromGStringPtr (ptr: args [1]!) ?? "") + retPtr!.storeBytes (of: ret, as: Bool.self) +} + +func _ResourceFormatSaver_proxy_save (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._save (resource: lookupLiveObject (handleAddress: resolved_0) as? Resource ?? Resource (nativeHandle: resolved_0), path: GString.stringFromGStringPtr (ptr: args [1]!) ?? "", flags: args [2]!.assumingMemoryBound (to: UInt32.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + +func _ResourceFormatSaver_proxy_set_uid (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let ret = swiftObject._setUid (path: GString.stringFromGStringPtr (ptr: args [0]!) ?? "", uid: args [1]!.assumingMemoryBound (to: Int.self).pointee) + retPtr!.storeBytes (of: Int32 (ret.rawValue), as: Int32.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporter.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporter.swift new file mode 100644 index 000000000..c68b1fce5 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporter.swift @@ -0,0 +1,43 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Base class for resource importers. +/// +/// This is the base class for Godot's resource importers. To implement your own resource importers using editor plugins, see ``EditorImportPlugin``. +open class ResourceImporter: RefCounted { + override open class var godotClassName: StringName { "ResourceImporter" } + public enum ImportOrder: Int64, CaseIterable, CustomDebugStringConvertible { + /// The default import order. + case `default` = 0 // IMPORT_ORDER_DEFAULT + /// The import order for scenes, which ensures scenes are imported _after_ all other core resources such as textures. Custom importers should generally have an import order lower than `100` to avoid issues when importing scenes that rely on custom resources. + case scene = 100 // IMPORT_ORDER_SCENE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .scene: return ".scene" + } + + } + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterBMFont.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterBMFont.swift new file mode 100644 index 000000000..1d9256981 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterBMFont.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a bitmap font in the BMFont (`.fnt`) format. +/// +/// The BMFont format is a format created by the BMFont program. Many BMFont-compatible programs also exist, like BMGlyph. +/// +/// Compared to ``ResourceImporterImageFont``, ``ResourceImporterBMFont`` supports bitmap fonts with varying glyph widths/heights. +/// +/// See also ``ResourceImporterDynamicFont``. +/// +open class ResourceImporterBMFont: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterBMFont" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterBitMap.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterBitMap.swift new file mode 100644 index 000000000..e097a66fd --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterBitMap.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a ``BitMap`` resource (2D array of boolean values). +/// +/// ``BitMap`` resources are typically used as click masks in ``TextureButton`` and ``TouchScreenButton``. +open class ResourceImporterBitMap: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterBitMap" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterCSVTranslation.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterCSVTranslation.swift new file mode 100644 index 000000000..127c2450e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterCSVTranslation.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports comma-separated values +/// +/// Comma-separated values are a plain text table storage format. The format's simplicity makes it easy to edit in any text editor or spreadsheet software. This makes it a common choice for game localization. +/// +/// **Example CSV file:** +/// +open class ResourceImporterCSVTranslation: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterCSVTranslation" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterDynamicFont.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterDynamicFont.swift new file mode 100644 index 000000000..c32f0696a --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterDynamicFont.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a TTF, TTC, OTF, OTC, WOFF or WOFF2 font file for font rendering that adapts to any size. +/// +/// Unlike bitmap fonts, dynamic fonts can be resized to any size and still look crisp. Dynamic fonts also optionally support MSDF font rendering, which allows for run-time scale changes with no re-rasterization cost. +/// +/// While WOFF and especially WOFF2 tend to result in smaller file sizes, there is no universally "better" font format. In most situations, it's recommended to use the font format that was shipped on the font developer's website. +/// +/// See also ``ResourceImporterBMFont`` and ``ResourceImporterImageFont``. +/// +open class ResourceImporterDynamicFont: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterDynamicFont" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterImage.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterImage.swift new file mode 100644 index 000000000..9edfb30ca --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterImage.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a image for use in scripting, with no rendering capabilities. +/// +/// This importer imports ``Image`` resources, as opposed to ``CompressedTexture2D``. If you need to render the image in 2D or 3D, use ``ResourceImporterTexture`` instead. +open class ResourceImporterImage: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterImage" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterImageFont.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterImageFont.swift new file mode 100644 index 000000000..22a47927d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterImageFont.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a bitmap font where all glyphs have the same width and height. +/// +/// This image-based workflow can be easier to use than ``ResourceImporterBMFont``, but it requires all glyphs to have the same width and height, glyph advances and drawing offsets can be customized. This makes ``ResourceImporterImageFont`` most suited to fixed-width fonts. +/// +/// See also ``ResourceImporterDynamicFont``. +/// +open class ResourceImporterImageFont: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterImageFont" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterLayeredTexture.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterLayeredTexture.swift new file mode 100644 index 000000000..511bbce06 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterLayeredTexture.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a 3-dimensional texture (``Texture3D``), a ``Texture2DArray``, a ``Cubemap`` or a ``CubemapArray``. +/// +/// This imports a 3-dimensional texture, which can then be used in custom shaders, as a ``FogMaterial`` density map or as a ``GPUParticlesAttractorVectorField3D``. See also ``ResourceImporterTexture`` and ``ResourceImporterTextureAtlas``. +open class ResourceImporterLayeredTexture: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterLayeredTexture" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterMP3.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterMP3.swift new file mode 100644 index 000000000..3634fef96 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterMP3.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports an MP3 audio file for playback. +/// +/// MP3 is a lossy audio format, with worse audio quality compared to ``ResourceImporterOggVorbis`` at a given bitrate. +/// +/// In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +/// +/// MP3 requires more CPU to decode than ``ResourceImporterWAV``. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. +/// +open class ResourceImporterMP3: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterMP3" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterOBJ.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterOBJ.swift new file mode 100644 index 000000000..29bd0f2db --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterOBJ.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports an OBJ 3D model as an independent ``Mesh`` or scene. +/// +/// Unlike ``ResourceImporterScene``, ``ResourceImporterOBJ`` will import a single ``Mesh`` resource by default instead of importing a ``PackedScene``. This makes it easier to use the ``Mesh`` resource in nodes that expect direct ``Mesh`` resources, such as ``GridMap``, ``GPUParticles3D`` or ``CPUParticles3D``. Note that it is still possible to save mesh resources from 3D scenes using the **Advanced Import Settings** dialog, regardless of the source format. +/// +/// See also ``ResourceImporterScene``, which is used for more advanced 3D formats such as glTF. +/// +open class ResourceImporterOBJ: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterOBJ" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterOggVorbis.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterOggVorbis.swift new file mode 100644 index 000000000..502f89dc4 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterOggVorbis.swift @@ -0,0 +1,88 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports an Ogg Vorbis audio file for playback. +/// +/// Ogg Vorbis is a lossy audio format, with better audio quality compared to ``ResourceImporterMP3`` at a given bitrate. +/// +/// In most cases, it's recommended to use Ogg Vorbis over MP3. However, if you're using an MP3 sound source with no higher quality source available, then it's recommended to use the MP3 file directly to avoid double lossy compression. +/// +/// Ogg Vorbis requires more CPU to decode than ``ResourceImporterWAV``. If you need to play a lot of simultaneous sounds, it's recommended to use WAV for those sounds instead, especially if targeting low-end devices. +/// +open class ResourceImporterOggVorbis: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterOggVorbis" } + /* Methods */ + fileprivate static var method_load_from_buffer: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_buffer") + return withUnsafePointer(to: &ResourceImporterOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 354904730)! + } + + } + + }() + + /// This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object. + public static func loadFromBuffer(_ buffer: PackedByteArray) -> AudioStreamOggVorbis? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: buffer.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_from_buffer, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_load_from_file: GDExtensionMethodBindPtr = { + let methodName = StringName("load_from_file") + return withUnsafePointer(to: &ResourceImporterOggVorbis.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797568536)! + } + + } + + }() + + /// This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string. + public static func loadFromFile(path: String) -> AudioStreamOggVorbis? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_from_file, nil, pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterScene.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterScene.swift new file mode 100644 index 000000000..c8304f0aa --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterScene.swift @@ -0,0 +1,32 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a glTF, FBX, Collada or Blender 3D scene. +/// +/// See also ``ResourceImporterOBJ``, which is used for OBJ models that can be imported as an independent ``Mesh`` or a scene. +/// +/// Additional options (such as extracting individual meshes or materials to files) are available in the **Advanced Import Settings** dialog. This dialog can be accessed by double-clicking a 3D scene in the FileSystem dock or by selecting a 3D scene in the FileSystem dock, going to the Import dock and choosing **Advanced**. +/// +/// > Note: ``ResourceImporterScene`` is _not_ used for ``PackedScene``s, such as `.tscn` and `.scn` files. +/// +open class ResourceImporterScene: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterScene" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterShaderFile.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterShaderFile.swift new file mode 100644 index 000000000..fa5216885 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterShaderFile.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports native GLSL shaders (not Godot shaders) as a ``RDShaderFile``. +/// +/// This imports native GLSL shaders as ``RDShaderFile`` resources, for use with low-level ``RenderingDevice`` operations. This importer does _not_ handle `.gdshader` files. +open class ResourceImporterShaderFile: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterShaderFile" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterTexture.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterTexture.swift new file mode 100644 index 000000000..e0020d4f2 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterTexture.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports an image for use in 2D or 3D rendering. +/// +/// This importer imports ``CompressedTexture2D`` resources. If you need to process the image in scripts in a more convenient way, use ``ResourceImporterImage`` instead. See also ``ResourceImporterLayeredTexture``. +open class ResourceImporterTexture: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterTexture" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterTextureAtlas.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterTextureAtlas.swift new file mode 100644 index 000000000..c1c9d7769 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterTextureAtlas.swift @@ -0,0 +1,30 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a collection of textures from a PNG image into an optimized ``AtlasTexture`` for 2D rendering. +/// +/// This imports a collection of textures from a PNG image into an ``AtlasTexture`` or 2D ``ArrayMesh``. This can be used to save memory when importing 2D animations from spritesheets. Texture atlases are only supported in 2D rendering, not 3D. See also ``ResourceImporterTexture`` and ``ResourceImporterLayeredTexture``. +/// +/// > Note: ``ResourceImporterTextureAtlas`` does not handle importing ``TileSetAtlasSource``, which is created using the ``TileSet`` editor instead. +/// +open class ResourceImporterTextureAtlas: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterTextureAtlas" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceImporterWAV.swift b/Sources/SwiftGodot/Generated/Api/ResourceImporterWAV.swift new file mode 100644 index 000000000..3d78a9a3d --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceImporterWAV.swift @@ -0,0 +1,27 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Imports a WAV audio file for playback. +/// +/// WAV is an uncompressed format, which can provide higher quality compared to Ogg Vorbis and MP3. It also has the lowest CPU cost to decode. This means high numbers of WAV sounds can be played at the same time, even on low-end deviceS. +open class ResourceImporterWAV: ResourceImporter { + override open class var godotClassName: StringName { "ResourceImporterWAV" } +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceLoader.swift b/Sources/SwiftGodot/Generated/Api/ResourceLoader.swift new file mode 100644 index 000000000..3b727a721 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceLoader.swift @@ -0,0 +1,485 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton for loading resource files. +/// +/// A singleton used to load resource files from the filesystem. +/// +/// It uses the many ``ResourceFormatLoader`` classes registered in the engine (either built-in or from a plugin) to load files into memory and convert them to a format that can be used by the engine. +/// +/// > Note: You have to import the files into the engine first to load them using ``load(path:typeHint:cacheMode:)``. If you want to load ``Image``s at run-time, you may use ``Image/load(path:)``. If you want to import audio files, you can use the snippet described in ``AudioStreamMP3/data``. +/// +open class ResourceLoader: Object { + /// The shared instance of this class + public static var shared: ResourceLoader = { + return withUnsafePointer (to: &ResourceLoader.godotClassName.content) { ptr in + ResourceLoader (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "ResourceLoader" } + public enum ThreadLoadStatus: Int64, CaseIterable, CustomDebugStringConvertible { + /// The resource is invalid, or has not been loaded with ``loadThreadedRequest(path:typeHint:useSubThreads:cacheMode:)``. + case invalidResource = 0 // THREAD_LOAD_INVALID_RESOURCE + /// The resource is still being loaded. + case inProgress = 1 // THREAD_LOAD_IN_PROGRESS + /// Some error occurred during loading and it failed. + case failed = 2 // THREAD_LOAD_FAILED + /// The resource was loaded successfully and can be accessed via ``loadThreadedGet(path:)``. + case loaded = 3 // THREAD_LOAD_LOADED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .invalidResource: return ".invalidResource" + case .inProgress: return ".inProgress" + case .failed: return ".failed" + case .loaded: return ".loaded" + } + + } + + } + + public enum CacheMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with ``CacheMode/reuse``. + case ignore = 0 // CACHE_MODE_IGNORE + /// The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). + case reuse = 1 // CACHE_MODE_REUSE + /// Like ``CacheMode/reuse``, but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. + case replace = 2 // CACHE_MODE_REPLACE + /// Like ``CacheMode/ignore``, but propagated recursively down the tree of dependencies (external resources). + case ignoreDeep = 3 // CACHE_MODE_IGNORE_DEEP + /// Like ``CacheMode/replace``, but propagated recursively down the tree of dependencies (external resources). + case replaceDeep = 4 // CACHE_MODE_REPLACE_DEEP + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .ignore: return ".ignore" + case .reuse: return ".reuse" + case .replace: return ".replace" + case .ignoreDeep: return ".ignoreDeep" + case .replaceDeep: return ".replaceDeep" + } + + } + + } + + /* Methods */ + fileprivate static var method_load_threaded_request: GDExtensionMethodBindPtr = { + let methodName = StringName("load_threaded_request") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3614384323)! + } + + } + + }() + + /// Loads the resource using threads. If `useSubThreads` is `true`, multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). + /// + /// The `cacheMode` property defines whether and how the cache should be used or updated when loading the resource. See ``ResourceLoader/CacheMode`` for details. + /// + public static func loadThreadedRequest(path: String, typeHint: String = "", useSubThreads: Bool = false, cacheMode: ResourceLoader.CacheMode = .reuse) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + let typeHint = GString(typeHint) + withUnsafePointer(to: typeHint.content) { pArg1 in + withUnsafePointer(to: useSubThreads) { pArg2 in + withUnsafePointer(to: cacheMode.rawValue) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(method_load_threaded_request, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_load_threaded_get_status: GDExtensionMethodBindPtr = { + let methodName = StringName("load_threaded_get_status") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4137685479)! + } + + } + + }() + + /// Returns the status of a threaded loading operation started with ``loadThreadedRequest(path:typeHint:useSubThreads:cacheMode:)`` for the resource at `path`. See ``ResourceLoader/ThreadLoadStatus`` for possible return values. + /// + /// An array variable can optionally be passed via `progress`, and will return a one-element array containing the percentage of completion of the threaded loading. + /// + /// > Note: The recommended way of using this method is to call it during different frames (e.g., in ``Node/_process(delta:)``, instead of a loop). + /// + public static func loadThreadedGetStatus(path: String, progress: GArray = GArray ()) -> ResourceLoader.ThreadLoadStatus { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: progress.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_load_threaded_get_status, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return ResourceLoader.ThreadLoadStatus (rawValue: _result)! + } + + fileprivate static var method_load_threaded_get: GDExtensionMethodBindPtr = { + let methodName = StringName("load_threaded_get") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1748875256)! + } + + } + + }() + + /// Returns the resource loaded by ``loadThreadedRequest(path:typeHint:useSubThreads:cacheMode:)``. + /// + /// If this is called before the loading thread is done (i.e. ``loadThreadedGetStatus(path:progress:)`` is not ``ThreadLoadStatus/loaded``), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use ``loadThreadedGetStatus(path:progress:)`` to known when the load has actually completed. + /// + public static func loadThreadedGet(path: String) -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_load_threaded_get, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_load: GDExtensionMethodBindPtr = { + let methodName = StringName("load") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3358495409)! + } + + } + + }() + + /// Loads a resource at the given `path`, caching the result for further access. + /// + /// The registered ``ResourceFormatLoader``s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. + /// + /// An optional `typeHint` can be used to further specify the ``Resource`` type that should be handled by the ``ResourceFormatLoader``. Anything that inherits from ``Resource`` can be used as a type hint, for example ``Image``. + /// + /// The `cacheMode` property defines whether and how the cache should be used or updated when loading the resource. See ``ResourceLoader/CacheMode`` for details. + /// + /// Returns an empty resource if no ``ResourceFormatLoader`` could handle the file, and prints an error if no file is found at the specified path. + /// + /// GDScript has a simplified ``@GDScript.load`` built-in method which can be used in most situations, leaving the use of ``ResourceLoader`` for more advanced scenarios. + /// + /// > Note: If ``ProjectSettings/editor/export/convertTextResourcesToBinary`` is `true`, ``@GDScript.load`` will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set ``ProjectSettings/editor/export/convertTextResourcesToBinary`` to `false`. + /// + /// > Note: Relative paths will be prefixed with `"res://"` before loading, to avoid unexpected results make sure your paths are absolute. + /// + public static func load(path: String, typeHint: String = "", cacheMode: ResourceLoader.CacheMode = .reuse) -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + let typeHint = GString(typeHint) + withUnsafePointer(to: typeHint.content) { pArg1 in + withUnsafePointer(to: cacheMode.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_load, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_recognized_extensions_for_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_recognized_extensions_for_type") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3538744774)! + } + + } + + }() + + /// Returns the list of recognized extensions for a resource type. + public static func getRecognizedExtensionsForType(_ type: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let type = GString(type) + withUnsafePointer(to: type.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_recognized_extensions_for_type, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_add_resource_format_loader: GDExtensionMethodBindPtr = { + let methodName = StringName("add_resource_format_loader") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2896595483)! + } + + } + + }() + + /// Registers a new ``ResourceFormatLoader``. The ResourceLoader will use the ResourceFormatLoader as described in ``load(path:typeHint:cacheMode:)``. + /// + /// This method is performed implicitly for ResourceFormatLoaders written in GDScript (see ``ResourceFormatLoader`` for more information). + /// + public static func addResourceFormatLoader(_ formatLoader: ResourceFormatLoader?, atFront: Bool = false) { + withUnsafePointer(to: formatLoader?.handle) { pArg0 in + withUnsafePointer(to: atFront) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_resource_format_loader, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_resource_format_loader: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_resource_format_loader") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 405397102)! + } + + } + + }() + + /// Unregisters the given ``ResourceFormatLoader``. + public static func removeResourceFormatLoader(_ formatLoader: ResourceFormatLoader?) { + withUnsafePointer(to: formatLoader?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_resource_format_loader, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_abort_on_missing_resources: GDExtensionMethodBindPtr = { + let methodName = StringName("set_abort_on_missing_resources") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + /// Changes the behavior on missing sub-resources. The default behavior is to abort loading. + public static func setAbortOnMissingResources(abort: Bool) { + withUnsafePointer(to: abort) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_set_abort_on_missing_resources, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_dependencies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_dependencies") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3538744774)! + } + + } + + }() + + /// Returns the dependencies for the resource at the given `path`. + /// + /// > Note: The dependencies are returned with slices separated by `::`. You can use ``GString/getSlice()`` to get their components. + /// + public static func getDependencies(path: String) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_dependencies, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_has_cached: GDExtensionMethodBindPtr = { + let methodName = StringName("has_cached") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2323990056)! + } + + } + + }() + + /// Returns whether a cached resource is available for the given `path`. + /// + /// Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the ``load(path:typeHint:cacheMode:)`` method will use the cached version. The cached resource can be overridden by using ``Resource/takeOverPath(_:)`` on a new resource for that same path. + /// + public static func hasCached(path: String) -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_cached, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_exists: GDExtensionMethodBindPtr = { + let methodName = StringName("exists") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4185558881)! + } + + } + + }() + + /// Returns whether a recognized resource exists for the given `path`. + /// + /// An optional `typeHint` can be used to further specify the ``Resource`` type that should be handled by the ``ResourceFormatLoader``. Anything that inherits from ``Resource`` can be used as a type hint, for example ``Image``. + /// + /// > Note: If you use ``Resource/takeOverPath(_:)``, this method will return `true` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). + /// + public static func exists(path: String, typeHint: String = "") -> Bool { + var _result: Bool = false + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + let typeHint = GString(typeHint) + withUnsafePointer(to: typeHint.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_exists, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_resource_uid: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resource_uid") + return withUnsafePointer(to: &ResourceLoader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1597066294)! + } + + } + + }() + + /// Returns the ID associated with a given resource path, or `-1` when no such ID exists. + public static func getResourceUid(path: String) -> Int { + var _result: Int = 0 + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_resource_uid, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourcePreloader.swift b/Sources/SwiftGodot/Generated/Api/ResourcePreloader.swift new file mode 100644 index 000000000..491f25614 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourcePreloader.swift @@ -0,0 +1,190 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A node used to preload sub-resources inside a scene. +/// +/// This node is used to preload sub-resources inside a scene, so when the scene is loaded, all the resources are ready to use and can be retrieved from the preloader. You can add the resources using the ResourcePreloader tab when the node is selected. +/// +/// GDScript has a simplified ``@GDScript.preload`` built-in method which can be used in most situations, leaving the use of ``ResourcePreloader`` for more advanced scenarios. +/// +open class ResourcePreloader: Node { + override open class var godotClassName: StringName { "ResourcePreloader" } + + /* Properties */ + + /* Methods */ + fileprivate static var method_add_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("add_resource") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1168801743)! + } + + } + + }() + + /// Adds a resource to the preloader with the given `name`. If a resource with the given `name` already exists, the new resource will be renamed to "`name` N" where N is an incrementing number starting from 2. + public final func addResource(name: StringName, resource: Resource?) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: resource?.handle) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ResourcePreloader.method_add_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_resource") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3304788590)! + } + + } + + }() + + /// Removes the resource associated to `name` from the preloader. + public final func removeResource(name: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ResourcePreloader.method_remove_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_rename_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("rename_resource") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3740211285)! + } + + } + + }() + + /// Renames a resource inside the preloader from `name` to `newname`. + public final func renameResource(name: StringName, newname: StringName) { + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: newname.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(ResourcePreloader.method_rename_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("has_resource") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the preloader contains a resource associated to `name`. + public final func hasResource(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ResourcePreloader.method_has_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_resource: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resource") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3742749261)! + } + + } + + }() + + /// Returns the resource associated to `name`. + public final func getResource(name: StringName) -> Resource? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ResourcePreloader.method_get_resource, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_resource_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_resource_list") + return withUnsafePointer(to: &ResourcePreloader.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1139954409)! + } + + } + + }() + + /// Returns the list of resources inside the preloader. + public final func getResourceList() -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + gi.object_method_bind_ptrcall(ResourcePreloader.method_get_resource_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceSaver.swift b/Sources/SwiftGodot/Generated/Api/ResourceSaver.swift new file mode 100644 index 000000000..797e25013 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceSaver.swift @@ -0,0 +1,201 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton for saving ``Resource``s to the filesystem. +/// +/// A singleton for saving resource types to the filesystem. +/// +/// It uses the many ``ResourceFormatSaver`` classes registered in the engine (either built-in or from a plugin) to save resource data to text-based (e.g. `.tres` or `.tscn`) or binary files (e.g. `.res` or `.scn`). +/// +open class ResourceSaver: Object { + /// The shared instance of this class + public static var shared: ResourceSaver = { + return withUnsafePointer (to: &ResourceSaver.godotClassName.content) { ptr in + ResourceSaver (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "ResourceSaver" } + public struct SaverFlags: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// Save the resource with a path relative to the scene which uses it. + public static let relativePaths = SaverFlags (rawValue: 1) + /// Bundles external resources. + public static let bundleResources = SaverFlags (rawValue: 2) + /// Changes the ``Resource/resourcePath`` of the saved resource to match its new location. + public static let changePath = SaverFlags (rawValue: 4) + /// Do not save editor-specific metadata (identified by their `__editor` prefix). + public static let omitEditorProperties = SaverFlags (rawValue: 8) + /// Save as big endian (see ``FileAccess/bigEndian``). + public static let saveBigEndian = SaverFlags (rawValue: 16) + /// Compress the resource on save using ``FileAccess/CompressionMode/zstd``. Only available for binary resource types. + public static let compress = SaverFlags (rawValue: 32) + /// Take over the paths of the saved subresources (see ``Resource/takeOverPath(_:)``). + public static let replaceSubresourcePaths = SaverFlags (rawValue: 64) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.relativePaths) { result += "relativePaths, " } + if self.contains (.bundleResources) { result += "bundleResources, " } + if self.contains (.changePath) { result += "changePath, " } + if self.contains (.omitEditorProperties) { result += "omitEditorProperties, " } + if self.contains (.saveBigEndian) { result += "saveBigEndian, " } + if self.contains (.compress) { result += "compress, " } + if self.contains (.replaceSubresourcePaths) { result += "replaceSubresourcePaths, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + /* Methods */ + fileprivate static var method_save: GDExtensionMethodBindPtr = { + let methodName = StringName("save") + return withUnsafePointer(to: &ResourceSaver.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2983274697)! + } + + } + + }() + + /// Saves a resource to disk to the given path, using a ``ResourceFormatSaver`` that recognizes the resource object. If `path` is empty, ``ResourceSaver`` will try to use ``Resource/resourcePath``. + /// + /// The `flags` bitmask can be specified to customize the save behavior using ``ResourceSaver/SaverFlags`` flags. + /// + /// Returns ``GodotError/ok`` on success. + /// + /// > Note: When the project is running, any generated UID associated with the resource will not be saved as the required code is only executed in editor mode. + /// + public static func save(resource: Resource?, path: String = "", flags: ResourceSaver.SaverFlags = []) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: resource?.handle) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: flags.rawValue) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(method_save, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_recognized_extensions: GDExtensionMethodBindPtr = { + let methodName = StringName("get_recognized_extensions") + return withUnsafePointer(to: &ResourceSaver.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4223597960)! + } + + } + + }() + + /// Returns the list of extensions available for saving a resource of a given type. + public static func getRecognizedExtensions(type: Resource?) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: type?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_recognized_extensions, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_add_resource_format_saver: GDExtensionMethodBindPtr = { + let methodName = StringName("add_resource_format_saver") + return withUnsafePointer(to: &ResourceSaver.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 362894272)! + } + + } + + }() + + /// Registers a new ``ResourceFormatSaver``. The ResourceSaver will use the ResourceFormatSaver as described in ``save(resource:path:flags:)``. + /// + /// This method is performed implicitly for ResourceFormatSavers written in GDScript (see ``ResourceFormatSaver`` for more information). + /// + public static func addResourceFormatSaver(_ formatSaver: ResourceFormatSaver?, atFront: Bool = false) { + withUnsafePointer(to: formatSaver?.handle) { pArg0 in + withUnsafePointer(to: atFront) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_resource_format_saver, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_remove_resource_format_saver: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_resource_format_saver") + return withUnsafePointer(to: &ResourceSaver.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3373026878)! + } + + } + + }() + + /// Unregisters the given ``ResourceFormatSaver``. + public static func removeResourceFormatSaver(_ formatSaver: ResourceFormatSaver?) { + withUnsafePointer(to: formatSaver?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_resource_format_saver, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ResourceUID.swift b/Sources/SwiftGodot/Generated/Api/ResourceUID.swift new file mode 100644 index 000000000..323ea8ce3 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ResourceUID.swift @@ -0,0 +1,273 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A singleton that manages the unique identifiers of all resources within a project. +/// +/// Resource UIDs (Unique IDentifiers) allow the engine to keep references between resources intact, even if files can renamed or moved. They can be accessed with `uid://`. +/// +/// ``ResourceUID`` keeps track of all registered resource UIDs in a project, generates new UIDs, and converts between their string and integer representations. +/// +open class ResourceUID: Object { + /// The shared instance of this class + public static var shared: ResourceUID = { + return withUnsafePointer (to: &ResourceUID.godotClassName.content) { ptr in + ResourceUID (nativeHandle: gi.global_get_singleton (ptr)!) + } + + }() + + override open class var godotClassName: StringName { "ResourceUID" } + /* Constants */ + /// The value to use for an invalid UID, for example if the resource could not be loaded. + /// + /// Its text representation is `uid://`. + /// + public static let invalidId = -1 + /* Methods */ + fileprivate static var method_id_to_text: GDExtensionMethodBindPtr = { + let methodName = StringName("id_to_text") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Converts the given UID to a `uid://` string value. + public static func idToText(id: Int) -> String { + let _result = GString () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_id_to_text, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_text_to_id: GDExtensionMethodBindPtr = { + let methodName = StringName("text_to_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1321353865)! + } + + } + + }() + + /// Extracts the UID value from the given `uid://` string. + public static func textToId(textId: String) -> Int { + var _result: Int = 0 + let textId = GString(textId) + withUnsafePointer(to: textId.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_text_to_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_create_id: GDExtensionMethodBindPtr = { + let methodName = StringName("create_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2455072627)! + } + + } + + }() + + /// Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. + /// + /// In order for this UID to be registered, you must call ``addId(_:path:)`` or ``setId(_:path:)``. + /// + public static func createId() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(method_create_id, UnsafeMutableRawPointer(mutating: shared.handle), nil, &_result) + return _result + } + + fileprivate static var method_has_id: GDExtensionMethodBindPtr = { + let methodName = StringName("has_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns whether the given UID value is known to the cache. + public static func hasId(_ id: Int) -> Bool { + var _result: Bool = false + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_has_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_add_id: GDExtensionMethodBindPtr = { + let methodName = StringName("add_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Adds a new UID value which is mapped to the given resource path. + /// + /// Fails with an error if the UID already exists, so be sure to check ``hasId(_:)`` beforehand, or use ``setId(_:path:)`` instead. + /// + public static func addId(_ id: Int, path: String) { + withUnsafePointer(to: id) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_add_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_id: GDExtensionMethodBindPtr = { + let methodName = StringName("set_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 501894301)! + } + + } + + }() + + /// Updates the resource path of an existing UID. + /// + /// Fails with an error if the UID does not exist, so be sure to check ``hasId(_:)`` beforehand, or use ``addId(_:path:)`` instead. + /// + public static func setId(_ id: Int, path: String) { + withUnsafePointer(to: id) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(method_set_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_id_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_id_path") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the path that the given UID value refers to. + /// + /// Fails with an error if the UID does not exist, so be sure to check ``hasId(_:)`` beforehand. + /// + public static func getIdPath(id: Int) -> String { + let _result = GString () + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_get_id_path, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_remove_id: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_id") + return withUnsafePointer(to: &ResourceUID.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Removes a loaded UID value from the cache. + /// + /// Fails with an error if the UID does not exist, so be sure to check ``hasId(_:)`` beforehand. + /// + public static func removeId(_ id: Int) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(method_remove_id, UnsafeMutableRawPointer(mutating: shared.handle), pArgs, nil) + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RibbonTrailMesh.swift b/Sources/SwiftGodot/Generated/Api/RibbonTrailMesh.swift new file mode 100644 index 000000000..deeaf6c2e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RibbonTrailMesh.swift @@ -0,0 +1,386 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Represents a straight ribbon-shaped ``PrimitiveMesh`` with variable width. +/// +/// ``RibbonTrailMesh`` represents a straight ribbon-shaped mesh with variable width. The ribbon is composed of a number of flat or cross-shaped sections, each with the same ``sectionLength`` and number of ``sectionSegments``. A ``curve`` is sampled along the total length of the ribbon, meaning that the curve determines the size of the ribbon along its length. +/// +/// This primitive mesh is usually used for particle trails. +/// +open class RibbonTrailMesh: PrimitiveMesh { + override open class var godotClassName: StringName { "RibbonTrailMesh" } + public enum Shape: Int64, CaseIterable, CustomDebugStringConvertible { + /// Gives the mesh a single flat face. + case flat = 0 // SHAPE_FLAT + /// Gives the mesh two perpendicular flat faces, making a cross shape. + case cross = 1 // SHAPE_CROSS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .flat: return ".flat" + case .cross: return ".cross" + } + + } + + } + + + /* Properties */ + + /// Determines the shape of the ribbon. + final public var shape: RibbonTrailMesh.Shape { + get { + return get_shape () + } + + set { + set_shape (newValue) + } + + } + + /// The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the ``curve`` at the given distance. + final public var size: Double { + get { + return get_size () + } + + set { + set_size (newValue) + } + + } + + /// The total number of sections on the ribbon. + final public var sections: Int32 { + get { + return get_sections () + } + + set { + set_sections (newValue) + } + + } + + /// The length of a section of the ribbon. + final public var sectionLength: Double { + get { + return get_section_length () + } + + set { + set_section_length (newValue) + } + + } + + /// The number of segments in a section. The ``curve`` is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance. + final public var sectionSegments: Int32 { + get { + return get_section_segments () + } + + set { + set_section_segments (newValue) + } + + } + + /// Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline ``size`` by the value of this curve at the given distance. For values smaller than `0`, the faces will be inverted. + final public var curve: Curve? { + get { + return get_curve () + } + + set { + set_curve (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_size") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_size") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sections") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sections(_ sections: Int32) { + withUnsafePointer(to: sections) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_sections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_sections: GDExtensionMethodBindPtr = { + let methodName = StringName("get_sections") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_sections() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_sections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_section_length: GDExtensionMethodBindPtr = { + let methodName = StringName("set_section_length") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_section_length(_ sectionLength: Double) { + withUnsafePointer(to: sectionLength) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_section_length, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_section_length: GDExtensionMethodBindPtr = { + let methodName = StringName("get_section_length") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_section_length() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_section_length, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_section_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("set_section_segments") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_section_segments(_ sectionSegments: Int32) { + withUnsafePointer(to: sectionSegments) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_section_segments, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_section_segments: GDExtensionMethodBindPtr = { + let methodName = StringName("get_section_segments") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_section_segments() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_section_segments, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("set_curve") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 270443179)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_curve(_ curve: Curve?) { + withUnsafePointer(to: curve?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_curve, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_curve: GDExtensionMethodBindPtr = { + let methodName = StringName("get_curve") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2460114913)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_curve() -> Curve? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_curve, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shape") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1684440262)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shape(_ shape: RibbonTrailMesh.Shape) { + withUnsafePointer(to: shape.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_set_shape, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_shape: GDExtensionMethodBindPtr = { + let methodName = StringName("get_shape") + return withUnsafePointer(to: &RibbonTrailMesh.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1317484155)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_shape() -> RibbonTrailMesh.Shape { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RibbonTrailMesh.method_get_shape, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RibbonTrailMesh.Shape (rawValue: _result)! + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RichTextEffect.swift b/Sources/SwiftGodot/Generated/Api/RichTextEffect.swift new file mode 100644 index 000000000..60f5db540 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RichTextEffect.swift @@ -0,0 +1,61 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A custom effect for a ``RichTextLabel``. +/// +/// A custom effect for a ``RichTextLabel``, which can be loaded in the ``RichTextLabel`` inspector or using ``RichTextLabel/installEffect(_:)``. +/// +/// > Note: For a ``RichTextEffect`` to be usable, a BBCode tag must be defined as a member variable called `bbcode` in the script. +/// +/// > Note: As soon as a ``RichTextLabel`` contains at least one ``RichTextEffect``, it will continuously process the effect unless the project is paused. This may impact battery life negatively. +/// +open class RichTextEffect: Resource { + override open class var godotClassName: StringName { "RichTextEffect" } + /* Methods */ + /// Override this method to modify properties in `charFx`. The method must return `true` if the character could be transformed successfully. If the method returns `false`, it will skip transformation to avoid displaying broken text. + @_documentation(visibility: public) + open func _processCustomFx(charFx: CharFXTransform?) -> Bool { + return false + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_process_custom_fx": + return _RichTextEffect_proxy_process_custom_fx + default: + return super.getVirtualDispatcher (name: name) + } + + } + +} + +// Support methods for proxies +func _RichTextEffect_proxy_process_custom_fx (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + let ret = swiftObject._processCustomFx (charFx: lookupLiveObject (handleAddress: resolved_0) as? CharFXTransform ?? CharFXTransform (nativeHandle: resolved_0)) + retPtr!.storeBytes (of: ret, as: Bool.self) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RichTextLabel.swift b/Sources/SwiftGodot/Generated/Api/RichTextLabel.swift new file mode 100644 index 000000000..217edbf59 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RichTextLabel.swift @@ -0,0 +1,3519 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A control for displaying text that can contain different font styles, images, and basic formatting. +/// +/// A control for displaying text that can contain custom fonts, images, and basic formatting. ``RichTextLabel`` manages these as an internal tag stack. It also adapts itself to given width/heights. +/// +/// > Note: Assignments to ``text`` clear the tag stack and reconstruct it from the property's contents. Any edits made to ``text`` will erase previous edits made from other manual sources such as ``appendText(bbcode:)`` and the `push_*` / ``pop()`` methods. +/// +/// > Note: RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code skip-lint]**bold_bold italic**italic_`, use [code skip-lint]**bold_bold italic_**_italic_`. +/// +/// > Note: `push_*/pop_*` functions won't affect BBCode. +/// +/// > Note: Unlike ``Label``, ``RichTextLabel`` doesn't have a _property_ to horizontally align text to the center. Instead, enable ``bbcodeEnabled`` and surround the text in a [code skip-lint][center]` tag as follows: [code skip-lint][center]Example[/center]`. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the ``fitContent`` property. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``metaClicked`` +/// - ``metaHoverStarted`` +/// - ``metaHoverEnded`` +/// - ``finished`` +open class RichTextLabel: Control { + override open class var godotClassName: StringName { "RichTextLabel" } + public enum ListType: Int64, CaseIterable, CustomDebugStringConvertible { + /// Each list item has a number marker. + case numbers = 0 // LIST_NUMBERS + /// Each list item has a letter marker. + case letters = 1 // LIST_LETTERS + /// Each list item has a roman number marker. + case roman = 2 // LIST_ROMAN + /// Each list item has a filled circle marker. + case dots = 3 // LIST_DOTS + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .numbers: return ".numbers" + case .letters: return ".letters" + case .roman: return ".roman" + case .dots: return ".dots" + } + + } + + } + + public enum MenuItems: Int64, CaseIterable, CustomDebugStringConvertible { + /// Copies the selected text. + case copy = 0 // MENU_COPY + /// Selects the whole ``RichTextLabel`` text. + case selectAll = 1 // MENU_SELECT_ALL + /// Represents the size of the ``RichTextLabel/MenuItems`` enum. + case max = 2 // MENU_MAX + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .copy: return ".copy" + case .selectAll: return ".selectAll" + case .max: return ".max" + } + + } + + } + + public enum MetaUnderline: Int64, CaseIterable, CustomDebugStringConvertible { + /// Meta tag does not display an underline, even if ``metaUnderlined`` is `true`. + case never = 0 // META_UNDERLINE_NEVER + /// If ``metaUnderlined`` is `true`, meta tag always display an underline. + case always = 1 // META_UNDERLINE_ALWAYS + /// If ``metaUnderlined`` is `true`, meta tag display an underline when the mouse cursor is over it. + case onHover = 2 // META_UNDERLINE_ON_HOVER + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .never: return ".never" + case .always: return ".always" + case .onHover: return ".onHover" + } + + } + + } + + public struct ImageUpdateMask: OptionSet, CustomDebugStringConvertible { + public let rawValue: Int + public init (rawValue: Int) { + self.rawValue = rawValue + } + + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image texture. + public static let texture = ImageUpdateMask (rawValue: 1) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image size. + public static let size = ImageUpdateMask (rawValue: 2) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image color. + public static let color = ImageUpdateMask (rawValue: 4) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image inline alignment. + public static let alignment = ImageUpdateMask (rawValue: 8) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image texture region. + public static let region = ImageUpdateMask (rawValue: 16) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image padding. + public static let pad = ImageUpdateMask (rawValue: 32) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image tooltip. + public static let tooltip = ImageUpdateMask (rawValue: 64) + /// If this bit is set, ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)`` changes image width from/to percents. + public static let widthInPercent = ImageUpdateMask (rawValue: 128) + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + var result = "" + if self.contains (.texture) { result += "texture, " } + if self.contains (.size) { result += "size, " } + if self.contains (.color) { result += "color, " } + if self.contains (.alignment) { result += "alignment, " } + if self.contains (.region) { result += "region, " } + if self.contains (.pad) { result += "pad, " } + if self.contains (.tooltip) { result += "tooltip, " } + if self.contains (.widthInPercent) { result += "widthInPercent, " } + if result.hasSuffix (", ") { result.removeLast (2) } + return result + } + + } + + + /* Properties */ + + /// If `true`, the label uses BBCode formatting. + /// + /// > Note: This only affects the contents of ``text``, not the tag stack. + /// + final public var bbcodeEnabled: Bool { + get { + return is_using_bbcode () + } + + set { + set_use_bbcode (newValue) + } + + } + + /// The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + /// + /// > Note: If ``bbcodeEnabled`` is `true`, it is unadvised to use the `+=` operator with ``text`` (e.g. `text += "some string"`) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using `push_*` methods. Use ``appendText(bbcode:)`` for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. + /// + final public var text: String { + get { + return get_text () + } + + set { + set_text (newValue) + } + + } + + /// If `true`, the label's minimum size will be automatically updated to fit its content, matching the behavior of ``Label``. + final public var fitContent: Bool { + get { + return is_fit_content_enabled () + } + + set { + set_fit_content (newValue) + } + + } + + /// If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See ``scrollToLine(_:)``. + final public var scrollActive: Bool { + get { + return is_scroll_active () + } + + set { + set_scroll_active (newValue) + } + + } + + /// If `true`, the window scrolls down to display new content automatically. + final public var scrollFollowing: Bool { + get { + return is_scroll_following () + } + + set { + set_scroll_follow (newValue) + } + + } + + /// If set to something other than ``TextServer/AutowrapMode/off``, the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see ``TextServer.AutowrapMode``. + final public var autowrapMode: TextServer.AutowrapMode { + get { + return get_autowrap_mode () + } + + set { + set_autowrap_mode (newValue) + } + + } + + /// The number of spaces associated with a single tab length. Does not affect `\t` in text tags, only indent tags. + final public var tabSize: Int32 { + get { + return get_tab_size () + } + + set { + set_tab_size (newValue) + } + + } + + /// If `true`, a right-click displays the context menu. + final public var contextMenuEnabled: Bool { + get { + return is_context_menu_enabled () + } + + set { + set_context_menu_enabled (newValue) + } + + } + + /// If `true`, shortcut keys for context menu items are enabled, even if the context menu is disabled. + final public var shortcutKeysEnabled: Bool { + get { + return is_shortcut_keys_enabled () + } + + set { + set_shortcut_keys_enabled (newValue) + } + + } + + /// The currently installed custom effects. This is an array of ``RichTextEffect``s. + /// + /// To add a custom effect, it's more convenient to use ``installEffect(_:)``. + /// + final public var customEffects: GArray { + get { + return get_effects () + } + + set { + set_effects (newValue) + } + + } + + /// If `true`, the label underlines meta tags such as [code skip-lint][url]{text}`. These tags can call a function when clicked if [signal meta_clicked] is connected to a function. + final public var metaUnderlined: Bool { + get { + return is_meta_underlined () + } + + set { + set_meta_underline (newValue) + } + + } + + /// If `true`, the label underlines hint tags such as [code skip-lint][hint=description]{text}[/hint]`. + final public var hintUnderlined: Bool { + get { + return is_hint_underlined () + } + + set { + set_hint_underline (newValue) + } + + } + + /// If `true`, text processing is done in a background thread. + final public var threaded: Bool { + get { + return is_threaded () + } + + set { + set_threaded (newValue) + } + + } + + /// The delay after which the loading progress bar is displayed, in milliseconds. Set to `-1` to disable progress bar entirely. + /// + /// > Note: Progress bar is displayed only if ``threaded`` is enabled. + /// + final public var progressBarDelay: Int32 { + get { + return get_progress_bar_delay () + } + + set { + set_progress_bar_delay (newValue) + } + + } + + /// If `true`, the label allows text selection. + final public var selectionEnabled: Bool { + get { + return is_selection_enabled () + } + + set { + set_selection_enabled (newValue) + } + + } + + /// If `true`, the selected text will be deselected when focus is lost. + final public var deselectOnFocusLossEnabled: Bool { + get { + return is_deselect_on_focus_loss_enabled () + } + + set { + set_deselect_on_focus_loss_enabled (newValue) + } + + } + + /// If `true`, allow drag and drop of selected text. + final public var dragAndDropSelectionEnabled: Bool { + get { + return is_drag_and_drop_selection_enabled () + } + + set { + set_drag_and_drop_selection_enabled (newValue) + } + + } + + /// The number of characters to display. If set to `-1`, all characters are displayed. This can be useful when animating the text appearing in a dialog box. + /// + /// > Note: Setting this property updates ``visibleRatio`` accordingly. + /// + final public var visibleCharacters: Int32 { + get { + return get_visible_characters () + } + + set { + set_visible_characters (newValue) + } + + } + + /// Sets the clipping behavior when ``visibleCharacters`` or ``visibleRatio`` is set. See ``TextServer.VisibleCharactersBehavior`` for more info. + final public var visibleCharactersBehavior: TextServer.VisibleCharactersBehavior { + get { + return get_visible_characters_behavior () + } + + set { + set_visible_characters_behavior (newValue) + } + + } + + /// The fraction of characters to display, relative to the total number of characters (see ``getTotalCharacterCount()``). If set to `1.0`, all characters are displayed. If set to `0.5`, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + /// + /// > Note: Setting this property updates ``visibleCharacters`` accordingly. + /// + final public var visibleRatio: Double { + get { + return get_visible_ratio () + } + + set { + set_visible_ratio (newValue) + } + + } + + /// Base text writing direction. + final public var textDirection: Control.TextDirection { + get { + return get_text_direction () + } + + set { + set_text_direction (newValue) + } + + } + + /// Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. + final public var language: String { + get { + return get_language () + } + + set { + set_language (newValue) + } + + } + + /// Set BiDi algorithm override for the structured text. + final public var structuredTextBidiOverride: TextServer.StructuredTextParser { + get { + return get_structured_text_bidi_override () + } + + set { + set_structured_text_bidi_override (newValue) + } + + } + + /// Set additional options for BiDi override. + final public var structuredTextBidiOverrideOptions: GArray { + get { + return get_structured_text_bidi_override_options () + } + + set { + set_structured_text_bidi_override_options (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_parsed_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_parsed_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the text without BBCode mark-up. + public final func getParsedText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_parsed_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_add_text: GDExtensionMethodBindPtr = { + let methodName = StringName("add_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds raw non-BBCode-parsed text to the tag stack. + public final func addText(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_add_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_text: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text(_ text: String) { + let text = GString(text) + withUnsafePointer(to: text.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_image: GDExtensionMethodBindPtr = { + let methodName = StringName("add_image") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3017663154)! + } + + } + + }() + + /// Adds an image's opening and closing tags to the tag stack, optionally providing a `width` and `height` to resize the image, a `color` to tint the image and a `region` to only use parts of the image. + /// + /// If `width` or `height` is set to 0, the image size will be adjusted in order to keep the original aspect ratio. + /// + /// If `width` and `height` are not set, but `region` is, the region's rect will be used. + /// + /// `key` is an optional identifier, that can be used to modify the image via ``updateImage(key:mask:image:width:height:color:inlineAlign:region:pad:tooltip:sizeInPercent:)``. + /// + /// If `pad` is set, and the image is smaller than the size specified by `width` and `height`, the image padding is added to match the size instead of upscaling. + /// + /// If `sizeInPercent` is set, `width` and `height` values are percentages of the control width instead of pixels. + /// + public final func addImage(_ image: Texture2D?, width: Int32 = 0, height: Int32 = 0, color: Color = Color (r: 1, g: 1, b: 1, a: 1), inlineAlign: InlineAlignment = .center, region: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), key: Variant?, pad: Bool = false, tooltip: String = "", sizeInPercent: Bool = false) { + withUnsafePointer(to: image?.handle) { pArg0 in + withUnsafePointer(to: width) { pArg1 in + withUnsafePointer(to: height) { pArg2 in + withUnsafePointer(to: color) { pArg3 in + withUnsafePointer(to: inlineAlign.rawValue) { pArg4 in + withUnsafePointer(to: region) { pArg5 in + withUnsafePointer(to: key.content) { pArg6 in + withUnsafePointer(to: pad) { pArg7 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg8 in + withUnsafePointer(to: sizeInPercent) { pArg9 in + withUnsafePointer(to: UnsafeRawPointersN10(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 10) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_add_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_update_image: GDExtensionMethodBindPtr = { + let methodName = StringName("update_image") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 815048486)! + } + + } + + }() + + /// Updates the existing images with the key `key`. Only properties specified by `mask` bits are updated. See ``addImage(_:width:height:color:inlineAlign:region:key:pad:tooltip:sizeInPercent:)``. + public final func updateImage(key: Variant?, mask: RichTextLabel.ImageUpdateMask, image: Texture2D?, width: Int32 = 0, height: Int32 = 0, color: Color = Color (r: 1, g: 1, b: 1, a: 1), inlineAlign: InlineAlignment = .center, region: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), pad: Bool = false, tooltip: String = "", sizeInPercent: Bool = false) { + withUnsafePointer(to: key.content) { pArg0 in + withUnsafePointer(to: mask.rawValue) { pArg1 in + withUnsafePointer(to: image?.handle) { pArg2 in + withUnsafePointer(to: width) { pArg3 in + withUnsafePointer(to: height) { pArg4 in + withUnsafePointer(to: color) { pArg5 in + withUnsafePointer(to: inlineAlign.rawValue) { pArg6 in + withUnsafePointer(to: region) { pArg7 in + withUnsafePointer(to: pad) { pArg8 in + let tooltip = GString(tooltip) + withUnsafePointer(to: tooltip.content) { pArg9 in + withUnsafePointer(to: sizeInPercent) { pArg10 in + withUnsafePointer(to: UnsafeRawPointersN11(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6, pArg7, pArg8, pArg9, pArg10)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 11) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_update_image, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_newline: GDExtensionMethodBindPtr = { + let methodName = StringName("newline") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a newline tag to the tag stack. + public final func newline() { + gi.object_method_bind_ptrcall(RichTextLabel.method_newline, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_remove_paragraph: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_paragraph") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3262369265)! + } + + } + + }() + + /// Removes a paragraph of content from the label. Returns `true` if the paragraph exists. + /// + /// The `paragraph` argument is the index of the paragraph to remove, it can take values in the interval `[0, get_paragraph_count() - 1]`. + /// + /// If `noInvalidate` is set to `true`, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and ``invalidateParagraph(_:)`` will be called at the end of operation. + /// + public final func removeParagraph(_ paragraph: Int32, noInvalidate: Bool = false) -> Bool { + var _result: Bool = false + withUnsafePointer(to: paragraph) { pArg0 in + withUnsafePointer(to: noInvalidate) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_remove_paragraph, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_invalidate_paragraph: GDExtensionMethodBindPtr = { + let methodName = StringName("invalidate_paragraph") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3067735520)! + } + + } + + }() + + /// Invalidates `paragraph` and all subsequent paragraphs cache. + public final func invalidateParagraph(_ paragraph: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: paragraph) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_invalidate_paragraph, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_push_font: GDExtensionMethodBindPtr = { + let methodName = StringName("push_font") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2347424842)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag to the tag stack. Overrides default fonts for its duration. + /// + /// Passing `0` to `fontSize` will use the existing default font size. + /// + public final func pushFont(_ font: Font?, fontSize: Int32 = 0) { + withUnsafePointer(to: font?.handle) { pArg0 in + withUnsafePointer(to: fontSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_font, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_push_font_size: GDExtensionMethodBindPtr = { + let methodName = StringName("push_font_size") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Adds a [code skip-lint][font_size]` tag to the tag stack. Overrides default font size for its duration. + public final func pushFontSize(_ fontSize: Int32) { + withUnsafePointer(to: fontSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_font_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_normal: GDExtensionMethodBindPtr = { + let methodName = StringName("push_normal") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag with a normal font to the tag stack. + public final func pushNormal() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_normal, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_bold: GDExtensionMethodBindPtr = { + let methodName = StringName("push_bold") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag with a bold font to the tag stack. This is the same as adding a [code skip-lint]**` tag if not currently in a [code skip-lint]_` tag. + public final func pushBold() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_bold, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_bold_italics: GDExtensionMethodBindPtr = { + let methodName = StringName("push_bold_italics") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag with a bold italics font to the tag stack. + public final func pushBoldItalics() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_bold_italics, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_italics: GDExtensionMethodBindPtr = { + let methodName = StringName("push_italics") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag with an italics font to the tag stack. This is the same as adding an [code skip-lint]_` tag if not currently in a [code skip-lint]**` tag. + public final func pushItalics() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_italics, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_mono: GDExtensionMethodBindPtr = { + let methodName = StringName("push_mono") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][font]` tag with a monospace font to the tag stack. + public final func pushMono() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_mono, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_color: GDExtensionMethodBindPtr = { + let methodName = StringName("push_color") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds a [code skip-lint][color]` tag to the tag stack. + public final func pushColor(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_outline_size: GDExtensionMethodBindPtr = { + let methodName = StringName("push_outline_size") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Adds a [code skip-lint][outline_size]` tag to the tag stack. Overrides default text outline size for its duration. + public final func pushOutlineSize(_ outlineSize: Int32) { + withUnsafePointer(to: outlineSize) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_outline_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_outline_color: GDExtensionMethodBindPtr = { + let methodName = StringName("push_outline_color") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds a [code skip-lint][outline_color]` tag to the tag stack. Adds text outline for its duration. + public final func pushOutlineColor(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_outline_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_paragraph: GDExtensionMethodBindPtr = { + let methodName = StringName("push_paragraph") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3089306873)! + } + + } + + }() + + /// Adds a [code skip-lint][p]` tag to the tag stack. + public final func pushParagraph(alignment: HorizontalAlignment, baseDirection: Control.TextDirection = .auto, language: String = "", stParser: TextServer.StructuredTextParser = .`default`, justificationFlags: TextServer.JustificationFlag = [.kashida, .wordBound, .skipLastLine, .doNotSkipSingleLine], tabStops: PackedFloat32Array = PackedFloat32Array()) { + withUnsafePointer(to: alignment.rawValue) { pArg0 in + withUnsafePointer(to: baseDirection.rawValue) { pArg1 in + let language = GString(language) + withUnsafePointer(to: language.content) { pArg2 in + withUnsafePointer(to: stParser.rawValue) { pArg3 in + withUnsafePointer(to: justificationFlags.rawValue) { pArg4 in + withUnsafePointer(to: tabStops.content) { pArg5 in + withUnsafePointer(to: UnsafeRawPointersN6(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 6) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_paragraph, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_push_indent: GDExtensionMethodBindPtr = { + let methodName = StringName("push_indent") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Adds an [code skip-lint][indent]` tag to the tag stack. Multiplies `level` by current ``tabSize`` to determine new margin length. + public final func pushIndent(level: Int32) { + withUnsafePointer(to: level) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_indent, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_list: GDExtensionMethodBindPtr = { + let methodName = StringName("push_list") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3017143144)! + } + + } + + }() + + /// Adds [code skip-lint][ol]` or [code skip-lint][ul]` tag to the tag stack. Multiplies `level` by current ``tabSize`` to determine new margin length. + public final func pushList(level: Int32, type: RichTextLabel.ListType, capitalize: Bool, bullet: String = "•") { + withUnsafePointer(to: level) { pArg0 in + withUnsafePointer(to: type.rawValue) { pArg1 in + withUnsafePointer(to: capitalize) { pArg2 in + let bullet = GString(bullet) + withUnsafePointer(to: bullet.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_list, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_push_meta: GDExtensionMethodBindPtr = { + let methodName = StringName("push_meta") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2206155733)! + } + + } + + }() + + /// Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint]{text}`, but supports non-``String`` metadata types. + /// + /// If ``metaUnderlined`` is `true`, meta tags display an underline. This behavior can be customized with `underlineMode`. + /// + /// > Note: Meta tags do nothing by default when clicked. To assign behavior when clicked, connect [signal meta_clicked] to a function that is called when the meta tag is clicked. + /// + public final func pushMeta(data: Variant?, underlineMode: RichTextLabel.MetaUnderline = .always) { + withUnsafePointer(to: data.content) { pArg0 in + withUnsafePointer(to: underlineMode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_meta, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_push_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("push_hint") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds a [code skip-lint][hint]` tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint]`. + public final func pushHint(description: String) { + let description = GString(description) + withUnsafePointer(to: description.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_language: GDExtensionMethodBindPtr = { + let methodName = StringName("push_language") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Adds language code used for text shaping algorithm and Open-Type font features. + public final func pushLanguage(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_underline: GDExtensionMethodBindPtr = { + let methodName = StringName("push_underline") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][u]` tag to the tag stack. + public final func pushUnderline() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_underline, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_strikethrough: GDExtensionMethodBindPtr = { + let methodName = StringName("push_strikethrough") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][s]` tag to the tag stack. + public final func pushStrikethrough() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_strikethrough, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_table: GDExtensionMethodBindPtr = { + let methodName = StringName("push_table") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2623499273)! + } + + } + + }() + + /// Adds a [code skip-lint][table=columns,inline_align]` tag to the tag stack. Use ``setTableColumnExpand(column:expand:ratio:)`` to set column expansion ratio. Use ``pushCell()`` to add cells. + public final func pushTable(columns: Int32, inlineAlign: InlineAlignment = .top, alignToRow: Int32 = -1) { + withUnsafePointer(to: columns) { pArg0 in + withUnsafePointer(to: inlineAlign.rawValue) { pArg1 in + withUnsafePointer(to: alignToRow) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_table, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_push_dropcap: GDExtensionMethodBindPtr = { + let methodName = StringName("push_dropcap") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4061635501)! + } + + } + + }() + + /// Adds a [code skip-lint][dropcap]` tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. + public final func pushDropcap(string: String, font: Font?, size: Int32, dropcapMargins: Rect2 = Rect2 (x: 0, y: 0, width: 0, height: 0), color: Color = Color (r: 1, g: 1, b: 1, a: 1), outlineSize: Int32 = 0, outlineColor: Color = Color (r: 0, g: 0, b: 0, a: 0)) { + let string = GString(string) + withUnsafePointer(to: string.content) { pArg0 in + withUnsafePointer(to: font?.handle) { pArg1 in + withUnsafePointer(to: size) { pArg2 in + withUnsafePointer(to: dropcapMargins) { pArg3 in + withUnsafePointer(to: color) { pArg4 in + withUnsafePointer(to: outlineSize) { pArg5 in + withUnsafePointer(to: outlineColor) { pArg6 in + withUnsafePointer(to: UnsafeRawPointersN7(pArg0, pArg1, pArg2, pArg3, pArg4, pArg5, pArg6)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 7) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_dropcap, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_table_column_expand: GDExtensionMethodBindPtr = { + let methodName = StringName("set_table_column_expand") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2185176273)! + } + + } + + }() + + /// Edits the selected column's expansion options. If `expand` is `true`, the column expands in proportion to its expansion ratio versus the other columns' ratios. + /// + /// For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. + /// + /// If `expand` is `false`, the column will not contribute to the total ratio. + /// + public final func setTableColumnExpand(column: Int32, expand: Bool, ratio: Int32 = 1) { + withUnsafePointer(to: column) { pArg0 in + withUnsafePointer(to: expand) { pArg1 in + withUnsafePointer(to: ratio) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_table_column_expand, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_set_cell_row_background_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_row_background_color") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3465483165)! + } + + } + + }() + + /// Sets color of a table cell. Separate colors for alternating rows can be specified. + public final func setCellRowBackgroundColor(oddRowBg: Color, evenRowBg: Color) { + withUnsafePointer(to: oddRowBg) { pArg0 in + withUnsafePointer(to: evenRowBg) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_cell_row_background_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_cell_border_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_border_color") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Sets color of a table cell border. + public final func setCellBorderColor(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_cell_border_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_cell_size_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size_override") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3108078480)! + } + + } + + }() + + /// Sets minimum and maximum size overrides for a table cell. + public final func setCellSizeOverride(minSize: Vector2, maxSize: Vector2) { + withUnsafePointer(to: minSize) { pArg0 in + withUnsafePointer(to: maxSize) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_cell_size_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_cell_padding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_padding") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2046264180)! + } + + } + + }() + + /// Sets inner padding of a table cell. + public final func setCellPadding(_ padding: Rect2) { + withUnsafePointer(to: padding) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_cell_padding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_cell: GDExtensionMethodBindPtr = { + let methodName = StringName("push_cell") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a [code skip-lint][cell]` tag to the tag stack. Must be inside a [code skip-lint][table]` tag. See ``pushTable(columns:inlineAlign:alignToRow:)`` for details. Use ``setTableColumnExpand(column:expand:ratio:)`` to set column expansion ratio, ``setCellBorderColor(_:)`` to set cell border, ``setCellRowBackgroundColor(oddRowBg:evenRowBg:)`` to set cell background, ``setCellSizeOverride(minSize:maxSize:)`` to override cell size, and ``setCellPadding(_:)`` to set padding. + public final func pushCell() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_cell, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_push_fgcolor: GDExtensionMethodBindPtr = { + let methodName = StringName("push_fgcolor") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds a [code skip-lint][fgcolor]` tag to the tag stack. + public final func pushFgcolor(_ fgcolor: Color) { + withUnsafePointer(to: fgcolor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_fgcolor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_bgcolor: GDExtensionMethodBindPtr = { + let methodName = StringName("push_bgcolor") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + /// Adds a [code skip-lint][bgcolor]` tag to the tag stack. + public final func pushBgcolor(_ bgcolor: Color) { + withUnsafePointer(to: bgcolor) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_bgcolor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_push_customfx: GDExtensionMethodBindPtr = { + let methodName = StringName("push_customfx") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2337942958)! + } + + } + + }() + + /// Adds a custom effect tag to the tag stack. The effect does not need to be in ``customEffects``. The environment is directly passed to the effect. + public final func pushCustomfx(effect: RichTextEffect?, env: GDictionary) { + withUnsafePointer(to: effect?.handle) { pArg0 in + withUnsafePointer(to: env.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_push_customfx, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_push_context: GDExtensionMethodBindPtr = { + let methodName = StringName("push_context") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Adds a context marker to the tag stack. See ``popContext()``. + public final func pushContext() { + gi.object_method_bind_ptrcall(RichTextLabel.method_push_context, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_pop_context: GDExtensionMethodBindPtr = { + let methodName = StringName("pop_context") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Terminates tags opened after the last ``pushContext()`` call (including context marker), or all tags if there's no context marker on the stack. + public final func popContext() { + gi.object_method_bind_ptrcall(RichTextLabel.method_pop_context, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_pop: GDExtensionMethodBindPtr = { + let methodName = StringName("pop") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Terminates the current tag. Use after `push_*` methods to close BBCodes manually. Does not need to follow `add_*` methods. + public final func pop() { + gi.object_method_bind_ptrcall(RichTextLabel.method_pop, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_pop_all: GDExtensionMethodBindPtr = { + let methodName = StringName("pop_all") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Terminates all tags opened by `push_*` methods. + public final func popAll() { + gi.object_method_bind_ptrcall(RichTextLabel.method_pop_all, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the tag stack, causing the label to display nothing. + /// + /// > Note: This method does not affect ``text``, and its contents will show again if the label is redrawn. However, setting ``text`` to an empty ``String`` also clears the stack. + /// + public final func clear() { + gi.object_method_bind_ptrcall(RichTextLabel.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 55961453)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override(_ parser: TextServer.StructuredTextParser) { + withUnsafePointer(to: parser.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3385126229)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override() -> TextServer.StructuredTextParser { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RichTextLabel.method_get_structured_text_bidi_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.StructuredTextParser (rawValue: _result)! + } + + fileprivate static var method_set_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("set_structured_text_bidi_override_options") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_structured_text_bidi_override_options(_ args: GArray) { + withUnsafePointer(to: args.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_structured_text_bidi_override_options: GDExtensionMethodBindPtr = { + let methodName = StringName("get_structured_text_bidi_override_options") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_structured_text_bidi_override_options() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_structured_text_bidi_override_options, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("set_text_direction") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 119160795)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_text_direction(_ direction: Control.TextDirection) { + withUnsafePointer(to: direction.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_text_direction, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text_direction: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text_direction") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 797257663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text_direction() -> Control.TextDirection { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RichTextLabel.method_get_text_direction, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return Control.TextDirection (rawValue: _result)! + } + + fileprivate static var method_set_language: GDExtensionMethodBindPtr = { + let methodName = StringName("set_language") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_language(_ language: String) { + let language = GString(language) + withUnsafePointer(to: language.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_language, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_language: GDExtensionMethodBindPtr = { + let methodName = StringName("get_language") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_language() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_language, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_autowrap_mode") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3289138044)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_autowrap_mode(_ autowrapMode: TextServer.AutowrapMode) { + withUnsafePointer(to: autowrapMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_autowrap_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_autowrap_mode") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1549071663)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_autowrap_mode() -> TextServer.AutowrapMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RichTextLabel.method_get_autowrap_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.AutowrapMode (rawValue: _result)! + } + + fileprivate static var method_set_meta_underline: GDExtensionMethodBindPtr = { + let methodName = StringName("set_meta_underline") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_meta_underline(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_meta_underline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_meta_underlined: GDExtensionMethodBindPtr = { + let methodName = StringName("is_meta_underlined") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_meta_underlined() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_meta_underlined, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_hint_underline: GDExtensionMethodBindPtr = { + let methodName = StringName("set_hint_underline") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_hint_underline(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_hint_underline, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_hint_underlined: GDExtensionMethodBindPtr = { + let methodName = StringName("is_hint_underlined") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_hint_underlined() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_hint_underlined, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_active: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_active") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_active(_ active: Bool) { + withUnsafePointer(to: active) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_scroll_active, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_scroll_active: GDExtensionMethodBindPtr = { + let methodName = StringName("is_scroll_active") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_scroll_active() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_scroll_active, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_scroll_follow: GDExtensionMethodBindPtr = { + let methodName = StringName("set_scroll_follow") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_scroll_follow(_ follow: Bool) { + withUnsafePointer(to: follow) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_scroll_follow, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_scroll_following: GDExtensionMethodBindPtr = { + let methodName = StringName("is_scroll_following") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_scroll_following() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_scroll_following, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_v_scroll_bar: GDExtensionMethodBindPtr = { + let methodName = StringName("get_v_scroll_bar") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2630340773)! + } + + } + + }() + + /// Returns the vertical scrollbar. + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``CanvasItem/visible`` property. + /// + public final func getVScrollBar() -> VScrollBar? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RichTextLabel.method_get_v_scroll_bar, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_scroll_to_line: GDExtensionMethodBindPtr = { + let methodName = StringName("scroll_to_line") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Scrolls the window's top line to match `line`. + public final func scrollToLine(_ line: Int32) { + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_scroll_to_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_scroll_to_paragraph: GDExtensionMethodBindPtr = { + let methodName = StringName("scroll_to_paragraph") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Scrolls the window's top line to match first line of the `paragraph`. + public final func scrollToParagraph(_ paragraph: Int32) { + withUnsafePointer(to: paragraph) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_scroll_to_paragraph, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_scroll_to_selection: GDExtensionMethodBindPtr = { + let methodName = StringName("scroll_to_selection") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Scrolls to the beginning of the current selection. + public final func scrollToSelection() { + gi.object_method_bind_ptrcall(RichTextLabel.method_scroll_to_selection, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_tab_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_tab_size") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_tab_size(_ spaces: Int32) { + withUnsafePointer(to: spaces) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_tab_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_tab_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_tab_size") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_tab_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_tab_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_fit_content: GDExtensionMethodBindPtr = { + let methodName = StringName("set_fit_content") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_fit_content(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_fit_content, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_fit_content_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_fit_content_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_fit_content_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_fit_content_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_selection_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_selection_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_selection_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_selection_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_selection_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_selection_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_context_menu_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_context_menu_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_context_menu_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_context_menu_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_context_menu_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_context_menu_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_context_menu_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_context_menu_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_shortcut_keys_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_shortcut_keys_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_shortcut_keys_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_shortcut_keys_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_shortcut_keys_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_shortcut_keys_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_shortcut_keys_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_shortcut_keys_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_deselect_on_focus_loss_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_deselect_on_focus_loss_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_deselect_on_focus_loss_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_deselect_on_focus_loss_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_deselect_on_focus_loss_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_deselect_on_focus_loss_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_deselect_on_focus_loss_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_deselect_on_focus_loss_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_drag_and_drop_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_drag_and_drop_selection_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_drag_and_drop_selection_enabled(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_drag_and_drop_selection_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_drag_and_drop_selection_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_drag_and_drop_selection_enabled") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_drag_and_drop_selection_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_drag_and_drop_selection_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selection_from: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selection_from") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the current selection first character index if a selection is active, `-1` otherwise. Does not include BBCodes. + public final func getSelectionFrom() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_selection_from, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_selection_to: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selection_to") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the current selection last character index if a selection is active, `-1` otherwise. Does not include BBCodes. + public final func getSelectionTo() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_selection_to, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_select_all: GDExtensionMethodBindPtr = { + let methodName = StringName("select_all") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Select all the text. + /// + /// If ``selectionEnabled`` is `false`, no selection will occur. + /// + public final func selectAll() { + gi.object_method_bind_ptrcall(RichTextLabel.method_select_all, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_get_selected_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_selected_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + /// Returns the current selection text. Does not include BBCodes. + public final func getSelectedText() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_selected_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_deselect: GDExtensionMethodBindPtr = { + let methodName = StringName("deselect") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the current selection. + public final func deselect() { + gi.object_method_bind_ptrcall(RichTextLabel.method_deselect, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_parse_bbcode: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_bbcode") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// The assignment version of ``appendText(bbcode:)``. Clears the tag stack and inserts the new content. + public final func parseBbcode(_ bbcode: String) { + let bbcode = GString(bbcode) + withUnsafePointer(to: bbcode.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_parse_bbcode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_append_text: GDExtensionMethodBindPtr = { + let methodName = StringName("append_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + /// Parses `bbcode` and adds tags to the tag stack as needed. + /// + /// > Note: Using this method, you can't close a tag that was opened in a previous ``appendText(bbcode:)`` call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the ``text`` instead of using ``appendText(bbcode:)``. + /// + public final func appendText(bbcode: String) { + let bbcode = GString(bbcode) + withUnsafePointer(to: bbcode.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_append_text, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_text: GDExtensionMethodBindPtr = { + let methodName = StringName("get_text") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_text() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_text, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_is_ready: GDExtensionMethodBindPtr = { + let methodName = StringName("is_ready") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// If ``threaded`` is enabled, returns `true` if the background thread has finished text processing, otherwise always return `true`. + public final func isReady() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_ready, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_threaded: GDExtensionMethodBindPtr = { + let methodName = StringName("set_threaded") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_threaded(_ threaded: Bool) { + withUnsafePointer(to: threaded) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_threaded, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_threaded: GDExtensionMethodBindPtr = { + let methodName = StringName("is_threaded") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_threaded() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_threaded, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_progress_bar_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("set_progress_bar_delay") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_progress_bar_delay(_ delayMs: Int32) { + withUnsafePointer(to: delayMs) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_progress_bar_delay, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_progress_bar_delay: GDExtensionMethodBindPtr = { + let methodName = StringName("get_progress_bar_delay") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_progress_bar_delay() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_progress_bar_delay, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_visible_characters: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_characters") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_characters(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_visible_characters, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visible_characters: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_characters") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_characters() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_visible_characters, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visible_characters_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_characters_behavior") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 258789322)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_characters_behavior() -> TextServer.VisibleCharactersBehavior { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RichTextLabel.method_get_visible_characters_behavior, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return TextServer.VisibleCharactersBehavior (rawValue: _result)! + } + + fileprivate static var method_set_visible_characters_behavior: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_characters_behavior") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3383839701)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_characters_behavior(_ behavior: TextServer.VisibleCharactersBehavior) { + withUnsafePointer(to: behavior.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_visible_characters_behavior, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_visible_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("set_visible_ratio") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_visible_ratio(_ ratio: Double) { + withUnsafePointer(to: ratio) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_visible_ratio, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_visible_ratio: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_ratio") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_visible_ratio() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_visible_ratio, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_character_line: GDExtensionMethodBindPtr = { + let methodName = StringName("get_character_line") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the line number of the character position provided. Line and character numbers are both zero-indexed. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getCharacterLine(character: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: character) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_get_character_line, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_character_paragraph: GDExtensionMethodBindPtr = { + let methodName = StringName("get_character_paragraph") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3744713108)! + } + + } + + }() + + /// Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getCharacterParagraph(character: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: character) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_get_character_paragraph, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_total_character_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_total_character_count") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of characters from text tags. Does not include BBCodes. + public final func getTotalCharacterCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_total_character_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_bbcode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_bbcode") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_bbcode(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_use_bbcode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_bbcode: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_bbcode") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_bbcode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_using_bbcode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_line_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_count") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of lines in the text. Wrapped text is counted as multiple lines. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getLineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_line_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visible_line_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_line_count") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of visible lines. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getVisibleLineCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_visible_line_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_paragraph_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_paragraph_count") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the total number of paragraphs (newlines or `p` tags in the tag stack's text tags). Considers wrapped text as one paragraph. + public final func getParagraphCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_paragraph_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_visible_paragraph_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_visible_paragraph_count") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getVisibleParagraphCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_visible_paragraph_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_content_height: GDExtensionMethodBindPtr = { + let methodName = StringName("get_content_height") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the height of the content. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getContentHeight() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_content_height, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_content_width: GDExtensionMethodBindPtr = { + let methodName = StringName("get_content_width") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the width of the content. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getContentWidth() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RichTextLabel.method_get_content_width, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_line_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_line_offset") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4025615559)! + } + + } + + }() + + /// Returns the vertical offset of the line found at the provided index. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getLineOffset(line: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: line) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_get_line_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_paragraph_offset: GDExtensionMethodBindPtr = { + let methodName = StringName("get_paragraph_offset") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4025615559)! + } + + } + + }() + + /// Returns the vertical offset of the paragraph found at the provided index. + /// + /// > Note: If ``threaded`` is enabled, this method returns a value for the loaded part of the document. Use ``isReady()`` or [signal finished] to determine whether document is fully loaded. + /// + public final func getParagraphOffset(paragraph: Int32) -> Double { + var _result: Double = 0.0 + withUnsafePointer(to: paragraph) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_get_paragraph_offset, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_parse_expressions_for_values: GDExtensionMethodBindPtr = { + let methodName = StringName("parse_expressions_for_values") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1522900837)! + } + + } + + }() + + /// Parses BBCode parameter `expressions` into a dictionary. + public final func parseExpressionsForValues(expressions: PackedStringArray) -> GDictionary { + let _result: GDictionary = GDictionary () + withUnsafePointer(to: expressions.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_parse_expressions_for_values, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_set_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("set_effects") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 381264803)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_effects(_ effects: GArray) { + withUnsafePointer(to: effects.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_set_effects, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_effects: GDExtensionMethodBindPtr = { + let methodName = StringName("get_effects") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_effects() -> GArray { + let _result: GArray = GArray () + gi.object_method_bind_ptrcall(RichTextLabel.method_get_effects, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_install_effect: GDExtensionMethodBindPtr = { + let methodName = StringName("install_effect") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1114965689)! + } + + } + + }() + + /// Installs a custom effect. This can also be done in the RichTextLabel inspector using the ``customEffects`` property. `effect` should be a valid ``RichTextEffect``. + /// + /// Example RichTextEffect: + /// + /// Registering the above effect in RichTextLabel from script: + /// + public final func installEffect(_ effect: Variant?) { + withUnsafePointer(to: effect.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_install_effect, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_menu: GDExtensionMethodBindPtr = { + let methodName = StringName("get_menu") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 229722558)! + } + + } + + }() + + /// Returns the ``PopupMenu`` of this ``RichTextLabel``. By default, this menu is displayed when right-clicking on the ``RichTextLabel``. + /// + /// You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see ``RichTextLabel/MenuItems``). For example: + /// + /// > Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their ``Window/visible`` property. + /// + public final func getMenu() -> PopupMenu? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RichTextLabel.method_get_menu, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_is_menu_visible: GDExtensionMethodBindPtr = { + let methodName = StringName("is_menu_visible") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns whether the menu is visible. Use this instead of `get_menu().visible` to improve performance (so the creation of the menu is avoided). + public final func isMenuVisible() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RichTextLabel.method_is_menu_visible, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_menu_option: GDExtensionMethodBindPtr = { + let methodName = StringName("menu_option") + return withUnsafePointer(to: &RichTextLabel.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Executes a given action as defined in the ``RichTextLabel/MenuItems`` enum. + public final func menuOption(_ option: Int32) { + withUnsafePointer(to: option) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RichTextLabel.method_menu_option, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ meta: Variant?) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = args [0] + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. [code skip-lint]Text`, then the parameter for this signal will always be a ``String`` type. If a particular type or an object is desired, the ``pushMeta(data:underlineMode:)`` method must be used to manually insert the data into the tag stack. Alternatively, you can convert the ``String`` input to the desired type based on its contents (such as calling ``JSON/parse(jsonText:keepText:)`` on it). + /// + /// For example, the following method can be connected to [signal meta_clicked] to open clicked URLs using the user's default web browser: + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.metaClicked.connect { meta in + /// print ("caught signal") + /// } + /// ``` + public var metaClicked: Signal1 { Signal1 (target: self, signalName: "meta_clicked") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ meta: Variant?) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = args [0] + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Triggers when the mouse enters a meta tag. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.metaHoverStarted.connect { meta in + /// print ("caught signal") + /// } + /// ``` + public var metaHoverStarted: Signal2 { Signal2 (target: self, signalName: "meta_hover_started") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ meta: Variant?) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = args [0] + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Triggers when the mouse exits a meta tag. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.metaHoverEnded.connect { meta in + /// print ("caught signal") + /// } + /// ``` + public var metaHoverEnded: Signal3 { Signal3 (target: self, signalName: "meta_hover_ended") } + + /// Triggered when the document is fully loaded. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.finished.connect { + /// print ("caught signal") + /// } + /// ``` + public var finished: SimpleSignal { SimpleSignal (target: self, signalName: "finished") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/RigidBody2D.swift b/Sources/SwiftGodot/Generated/Api/RigidBody2D.swift new file mode 100644 index 000000000..1d87d4dbb --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RigidBody2D.swift @@ -0,0 +1,2196 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 2D physics body that is moved by a physics simulation. +/// +/// ``RigidBody2D`` implements full 2D physics. It cannot be controlled directly, instead, you must apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, rotation, react to collisions, and affect other physics bodies in its path. +/// +/// The body's behavior can be adjusted via ``lockRotation``, ``freeze``, and ``freezeMode``. By changing various properties of the object, such as ``mass``, you can control how the physics simulation acts on it. +/// +/// A rigid body will always maintain its shape and size, even when forces are applied to it. It is useful for objects that can be interacted with in an environment, such as a tree that can be knocked over or a stack of crates that can be pushed around. +/// +/// If you need to override the default physics behavior, you can write a custom force integration function. See ``customIntegrator``. +/// +/// > Note: Changing the 2D transform or ``linearVelocity`` of a ``RigidBody2D`` very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer ``_integrateForces(state:)`` as it allows you to directly access the physics state. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``bodyShapeEntered`` +/// - ``bodyShapeExited`` +/// - ``bodyEntered`` +/// - ``bodyExited`` +/// - ``sleepingStateChanged`` +open class RigidBody2D: PhysicsBody2D { + override open class var godotClassName: StringName { "RigidBody2D" } + public enum FreezeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + case `static` = 0 // FREEZE_MODE_STATIC + /// Kinematic body freeze mode. Similar to ``FreezeMode/`static```, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + case kinematic = 1 // FREEZE_MODE_KINEMATIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`static`: return ".`static`" + case .kinematic: return ".kinematic" + } + + } + + } + + public enum CenterOfMassMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. + case auto = 0 // CENTER_OF_MASS_MODE_AUTO + /// In this mode, the body's center of mass is set through ``centerOfMass``. Defaults to the body's origin position. + case custom = 1 // CENTER_OF_MASS_MODE_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .auto: return ".auto" + case .custom: return ".custom" + } + + } + + } + + public enum DampMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// In this mode, the body's damping value is added to any value set in areas or the default value. + case combine = 0 // DAMP_MODE_COMBINE + /// In this mode, the body's damping value replaces any value set in areas or the default value. + case replace = 1 // DAMP_MODE_REPLACE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .combine: return ".combine" + case .replace: return ".replace" + } + + } + + } + + public enum CCDMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. + case disabled = 0 // CCD_MODE_DISABLED + /// Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. + case castRay = 1 // CCD_MODE_CAST_RAY + /// Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. + case castShape = 2 // CCD_MODE_CAST_SHAPE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .castRay: return ".castRay" + case .castShape: return ".castShape" + } + + } + + } + + + /* Properties */ + + /// The body's mass. + final public var mass: Double { + get { + return get_mass () + } + + set { + set_mass (newValue) + } + + } + + /// The physics material override for the body. + /// + /// If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + /// + final public var physicsMaterialOverride: PhysicsMaterial? { + get { + return get_physics_material_override () + } + + set { + set_physics_material_override (newValue) + } + + } + + /// Multiplies the gravity applied to the body. The body's gravity is calculated from the **Default Gravity** value in **Project > Project Settings > Physics > 2d** and/or any additional gravity vector applied by ``Area2D``s. + final public var gravityScale: Double { + get { + return get_gravity_scale () + } + + set { + set_gravity_scale (newValue) + } + + } + + /// Defines the way the body's center of mass is set. See ``RigidBody2D/CenterOfMassMode`` for possible values. + final public var centerOfMassMode: RigidBody2D.CenterOfMassMode { + get { + return get_center_of_mass_mode () + } + + set { + set_center_of_mass_mode (newValue) + } + + } + + /// The body's custom center of mass, relative to the body's origin position, when ``centerOfMassMode`` is set to ``CenterOfMassMode/custom``. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + /// + /// When ``centerOfMassMode`` is set to ``CenterOfMassMode/auto`` (default value), the center of mass is automatically computed. + /// + final public var centerOfMass: Vector2 { + get { + return get_center_of_mass () + } + + set { + set_center_of_mass (newValue) + } + + } + + /// The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + /// + /// If set to `0`, inertia is automatically computed (default value). + /// + /// > Note: This value does not change when inertia is automatically computed. Use ``PhysicsServer2D`` to get the computed inertia. + /// + final public var inertia: Double { + get { + return get_inertia () + } + + set { + set_inertia (newValue) + } + + } + + /// If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the ``applyImpulse(_:position:)`` or ``applyForce(_:position:)`` methods. + final public var sleeping: Bool { + get { + return is_sleeping () + } + + set { + set_sleeping (newValue) + } + + } + + /// If `true`, the body can enter sleep mode when there is no movement. See ``sleeping``. + final public var canSleep: Bool { + get { + return is_able_to_sleep () + } + + set { + set_can_sleep (newValue) + } + + } + + /// If `true`, the body cannot rotate. Gravity and forces only apply linear movement. + final public var lockRotation: Bool { + get { + return is_lock_rotation_enabled () + } + + set { + set_lock_rotation_enabled (newValue) + } + + } + + /// If `true`, the body is frozen. Gravity and forces are not applied anymore. + /// + /// See ``freezeMode`` to set the body's behavior when frozen. + /// + /// For a body that is always frozen, use ``StaticBody2D`` or ``AnimatableBody2D`` instead. + /// + final public var freeze: Bool { + get { + return is_freeze_enabled () + } + + set { + set_freeze_enabled (newValue) + } + + } + + /// The body's freeze mode. Can be used to set the body's behavior when ``freeze`` is enabled. See ``RigidBody2D/FreezeMode`` for possible values. + /// + /// For a body that is always frozen, use ``StaticBody2D`` or ``AnimatableBody2D`` instead. + /// + final public var freezeMode: RigidBody2D.FreezeMode { + get { + return get_freeze_mode () + } + + set { + set_freeze_mode (newValue) + } + + } + + /// If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the ``_integrateForces(state:)`` method, if that virtual method is overridden. + /// + /// Setting this property will call the method ``PhysicsServer2D/bodySetOmitForceIntegration(body:enable:)`` internally. + /// + final public var customIntegrator: Bool { + get { + return is_using_custom_integrator () + } + + set { + set_use_custom_integrator (newValue) + } + + } + + /// Continuous collision detection mode. + /// + /// Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See ``RigidBody2D/CCDMode`` for details. + /// + final public var continuousCd: RigidBody2D.CCDMode { + get { + return get_continuous_collision_detection_mode () + } + + set { + set_continuous_collision_detection_mode (newValue) + } + + } + + /// If `true`, the RigidBody2D will emit signals when it collides with another body. + /// + /// > Note: By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see ``maxContactsReported``. + /// + final public var contactMonitor: Bool { + get { + return is_contact_monitor_enabled () + } + + set { + set_contact_monitor (newValue) + } + + } + + /// The maximum number of contacts that will be recorded. Requires a value greater than 0 and ``contactMonitor`` to be set to `true` to start to register contacts. Use ``getContactCount()`` to retrieve the count or ``getCollidingBodies()`` to retrieve bodies that have been collided with. + /// + /// > Note: The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + /// + final public var maxContactsReported: Int32 { + get { + return get_max_contacts_reported () + } + + set { + set_max_contacts_reported (newValue) + } + + } + + /// The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use ``_integrateForces(state:)`` as your process loop for precise control of the body state. + final public var linearVelocity: Vector2 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// Defines how ``linearDamp`` is applied. See ``RigidBody2D/DampMode`` for possible values. + final public var linearDampMode: RigidBody2D.DampMode { + get { + return get_linear_damp_mode () + } + + set { + set_linear_damp_mode (newValue) + } + + } + + /// Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an ``Area2D`` the body is in. Depending on ``linearDampMode``, you can set ``linearDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/2d/defaultLinearDamp`` for more details about damping. + /// + final public var linearDamp: Double { + get { + return get_linear_damp () + } + + set { + set_linear_damp (newValue) + } + + } + + /// The body's rotational velocity in _radians_ per second. + final public var angularVelocity: Double { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// Defines how ``angularDamp`` is applied. See ``RigidBody2D/DampMode`` for possible values. + final public var angularDampMode: RigidBody2D.DampMode { + get { + return get_angular_damp_mode () + } + + set { + set_angular_damp_mode (newValue) + } + + } + + /// Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an ``Area2D`` the body is in. Depending on ``angularDampMode``, you can set ``angularDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/2d/defaultAngularDamp`` for more details about damping. + /// + final public var angularDamp: Double { + get { + return get_angular_damp () + } + + set { + set_angular_damp (newValue) + } + + } + + /// The body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + final public var constantForce: Vector2 { + get { + return get_constant_force () + } + + set { + set_constant_force (newValue) + } + + } + + /// The body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + final public var constantTorque: Double { + get { + return get_constant_torque () + } + + set { + set_constant_torque (newValue) + } + + } + + /* Methods */ + /// Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the ``customIntegrator`` property allows you to disable the standard force integration and do fully custom force integration for a body. + @_documentation(visibility: public) + open func _integrateForces(state: PhysicsDirectBodyState2D?) { + } + + fileprivate static var method_set_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mass") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mass(_ mass: Double) { + withUnsafePointer(to: mass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mass") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inertia") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inertia() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_inertia, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inertia") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inertia(_ inertia: Double) { + withUnsafePointer(to: inertia) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_inertia, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_center_of_mass_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_of_mass_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1757235706)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_of_mass_mode(_ mode: RigidBody2D.CenterOfMassMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_center_of_mass_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_of_mass_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3277132817)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass_mode() -> RigidBody2D.CenterOfMassMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody2D.method_get_center_of_mass_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody2D.CenterOfMassMode (rawValue: _result)! + } + + fileprivate static var method_set_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_of_mass") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_of_mass(_ centerOfMass: Vector2) { + withUnsafePointer(to: centerOfMass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_center_of_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RigidBody2D.method_get_center_of_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_material_override") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1784508650)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_material_override(_ physicsMaterialOverride: PhysicsMaterial?) { + withUnsafePointer(to: physicsMaterialOverride?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_physics_material_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_material_override") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2521850424)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physics_material_override() -> PhysicsMaterial? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RigidBody2D.method_get_physics_material_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_scale") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_scale(_ gravityScale: Double) { + withUnsafePointer(to: gravityScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_gravity_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_scale") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_gravity_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3406533708)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp_mode(_ linearDampMode: RigidBody2D.DampMode) { + withUnsafePointer(to: linearDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2970511462)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp_mode() -> RigidBody2D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody2D.method_get_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody2D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3406533708)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp_mode(_ angularDampMode: RigidBody2D.DampMode) { + withUnsafePointer(to: angularDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2970511462)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp_mode() -> RigidBody2D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody2D.method_get_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody2D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp(_ linearDamp: Double) { + withUnsafePointer(to: linearDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_linear_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp(_ angularDamp: Double) { + withUnsafePointer(to: angularDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_angular_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ linearVelocity: Vector2) { + withUnsafePointer(to: linearVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RigidBody2D.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ angularVelocity: Double) { + withUnsafePointer(to: angularVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_contacts_reported") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_contacts_reported(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_max_contacts_reported, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_contacts_reported") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_contacts_reported() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_max_contacts_reported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_count") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see ``contactMonitor``). + /// + /// > Note: To retrieve the colliding bodies, use ``getCollidingBodies()``. + /// + public final func getContactCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_contact_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_custom_integrator") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_custom_integrator(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_use_custom_integrator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_custom_integrator") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_custom_integrator() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_using_custom_integrator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_contact_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_contact_monitor") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_contact_monitor(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_contact_monitor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_contact_monitor_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_contact_monitor_enabled") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_contact_monitor_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_contact_monitor_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_continuous_collision_detection_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_continuous_collision_detection_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1000241384)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_continuous_collision_detection_mode(_ mode: RigidBody2D.CCDMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_continuous_collision_detection_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_continuous_collision_detection_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_continuous_collision_detection_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 815214376)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_continuous_collision_detection_mode() -> RigidBody2D.CCDMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody2D.method_get_continuous_collision_detection_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody2D.CCDMode (rawValue: _result)! + } + + fileprivate static var method_set_axis_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_axis_velocity") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + public final func setAxisVelocity(_ axisVelocity: Vector2) { + withUnsafePointer(to: axisVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_axis_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_impulse") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3862383994)! + } + + } + + }() + + /// Applies a directional impulse without affecting rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``applyImpulse(_:position:)`` at the body's center of mass. + /// + public final func applyCentralImpulse(_ impulse: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_central_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_impulse") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Applies a positioned impulse to the body. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyImpulse(_ impulse: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque_impulse") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Applies a rotational impulse to the body without affecting the position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// > Note: ``inertia`` is required for this to work. To have ``inertia``, an active ``CollisionShape2D`` must be a child of the node, or you can manually set ``inertia``. + /// + public final func applyTorqueImpulse(torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_torque_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``applyForce(_:position:)`` at the body's center of mass. + /// + public final func applyCentralForce(_ force: Vector2) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyForce(_ force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + /// + /// > Note: ``inertia`` is required for this to work. To have ``inertia``, an active ``CollisionShape2D`` must be a child of the node, or you can manually set ``inertia``. + /// + public final func applyTorque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_apply_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_central_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + /// Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + /// + /// This is equivalent to using ``addConstantForce(_:position:)`` at the body's center of mass. + /// + public final func addConstantCentralForce(_ force: Vector2) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_add_constant_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4288681949)! + } + + } + + }() + + /// Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func addConstantForce(_ force: Vector2, position: Vector2 = Vector2 (x: 0, y: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_add_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_torque") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + /// Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = 0`. + public final func addConstantTorque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_add_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 743155724)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_constant_force(_ force: Vector2) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_force") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3341600327)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_constant_force() -> Vector2 { + var _result: Vector2 = Vector2 () + gi.object_method_bind_ptrcall(RigidBody2D.method_get_constant_force, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_torque") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_constant_torque(_ torque: Double) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_torque") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_constant_torque() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_constant_torque, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sleeping") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sleeping(_ sleeping: Bool) { + withUnsafePointer(to: sleeping) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_sleeping, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sleeping") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sleeping() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_sleeping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_can_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("set_can_sleep") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_can_sleep(_ ableToSleep: Bool) { + withUnsafePointer(to: ableToSleep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_can_sleep, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_able_to_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("is_able_to_sleep") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_able_to_sleep() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_able_to_sleep, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lock_rotation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lock_rotation_enabled") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lock_rotation_enabled(_ lockRotation: Bool) { + withUnsafePointer(to: lockRotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_lock_rotation_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_lock_rotation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_lock_rotation_enabled") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_lock_rotation_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_lock_rotation_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_freeze_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_freeze_enabled") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_freeze_enabled(_ freezeMode: Bool) { + withUnsafePointer(to: freezeMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_freeze_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_freeze_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_freeze_enabled") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_freeze_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody2D.method_is_freeze_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_freeze_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_freeze_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1705112154)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_freeze_mode(_ freezeMode: RigidBody2D.FreezeMode) { + withUnsafePointer(to: freezeMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody2D.method_set_freeze_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_freeze_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_freeze_mode") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2016872314)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_freeze_mode() -> RigidBody2D.FreezeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody2D.method_get_freeze_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody2D.FreezeMode (rawValue: _result)! + } + + fileprivate static var method_get_colliding_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_colliding_bodies") + return withUnsafePointer(to: &RigidBody2D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of the bodies colliding with this one. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + /// + public final func getCollidingBodies() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RigidBody2D.method_get_colliding_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_integrate_forces": + return _RigidBody2D_proxy_integrate_forces + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node ?? lookupObject (nativeHandle: ptr_1!) ?? Node (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when one of this RigidBody2D's ``Shape2D``s collides with another ``PhysicsBody2D`` or ``TileMap``'s ``Shape2D``s. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``TileMap``s are detected if the ``TileSet`` has Collision ``Shape2D``s. + /// + /// `bodyRid` the ``RID`` of the other ``PhysicsBody2D`` or ``TileSet``'s ``CollisionObject2D`` used by the ``PhysicsServer2D``. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody2D`` or ``TileMap``. + /// + /// `bodyShapeIndex` the index of the ``Shape2D`` of the other ``PhysicsBody2D`` or ``TileMap`` used by the ``PhysicsServer2D``. Get the ``CollisionShape2D`` node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + /// + /// `localShapeIndex` the index of the ``Shape2D`` of this RigidBody2D used by the ``PhysicsServer2D``. Get the ``CollisionShape2D`` node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeEntered.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeEntered: Signal1 { Signal1 (target: self, signalName: "body_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node ?? lookupObject (nativeHandle: ptr_1!) ?? Node (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the collision between one of this RigidBody2D's ``Shape2D``s and another ``PhysicsBody2D`` or ``TileMap``'s ``Shape2D``s ends. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``TileMap``s are detected if the ``TileSet`` has Collision ``Shape2D``s. + /// + /// `bodyRid` the ``RID`` of the other ``PhysicsBody2D`` or ``TileSet``'s ``CollisionObject2D`` used by the ``PhysicsServer2D``. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody2D`` or ``TileMap``. + /// + /// `bodyShapeIndex` the index of the ``Shape2D`` of the other ``PhysicsBody2D`` or ``TileMap`` used by the ``PhysicsServer2D``. Get the ``CollisionShape2D`` node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + /// + /// `localShapeIndex` the index of the ``Shape2D`` of this RigidBody2D used by the ``PhysicsServer2D``. Get the ``CollisionShape2D`` node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeExited.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeExited: Signal2 { Signal2 (target: self, signalName: "body_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a collision with another ``PhysicsBody2D`` or ``TileMap`` occurs. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``TileMap``s are detected if the ``TileSet`` has Collision ``Shape2D``s. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody2D`` or ``TileMap``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyEntered.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyEntered: Signal3 { Signal3 (target: self, signalName: "body_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the collision with another ``PhysicsBody2D`` or ``TileMap`` ends. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``TileMap``s are detected if the ``TileSet`` has Collision ``Shape2D``s. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody2D`` or ``TileMap``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyExited.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyExited: Signal4 { Signal4 (target: self, signalName: "body_exited") } + + /// Emitted when the physics engine changes the body's sleeping state. + /// + /// > Note: Changing the value ``sleeping`` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sleepingStateChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var sleepingStateChanged: SimpleSignal { SimpleSignal (target: self, signalName: "sleeping_state_changed") } + +} + +// Support methods for proxies +func _RigidBody2D_proxy_integrate_forces (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._integrateForces (state: lookupLiveObject (handleAddress: resolved_0) as? PhysicsDirectBodyState2D ?? lookupObject (nativeHandle: resolved_0)!) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RigidBody3D.swift b/Sources/SwiftGodot/Generated/Api/RigidBody3D.swift new file mode 100644 index 000000000..e0401bc8b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RigidBody3D.swift @@ -0,0 +1,2195 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A 3D physics body that is moved by a physics simulation. +/// +/// ``RigidBody3D`` implements full 3D physics. It cannot be controlled directly, instead, you must apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, rotation, react to collisions, and affect other physics bodies in its path. +/// +/// The body's behavior can be adjusted via ``lockRotation``, ``freeze``, and ``freezeMode``. By changing various properties of the object, such as ``mass``, you can control how the physics simulation acts on it. +/// +/// A rigid body will always maintain its shape and size, even when forces are applied to it. It is useful for objects that can be interacted with in an environment, such as a tree that can be knocked over or a stack of crates that can be pushed around. +/// +/// If you need to override the default physics behavior, you can write a custom force integration function. See ``customIntegrator``. +/// +/// > Note: Changing the 3D transform or ``linearVelocity`` of a ``RigidBody3D`` very often may lead to some unpredictable behaviors. If you need to directly affect the body, prefer ``_integrateForces(state:)`` as it allows you to directly access the physics state. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``bodyShapeEntered`` +/// - ``bodyShapeExited`` +/// - ``bodyEntered`` +/// - ``bodyExited`` +/// - ``sleepingStateChanged`` +open class RigidBody3D: PhysicsBody3D { + override open class var godotClassName: StringName { "RigidBody3D" } + public enum FreezeMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. + case `static` = 0 // FREEZE_MODE_STATIC + /// Kinematic body freeze mode. Similar to ``FreezeMode/`static```, but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. + case kinematic = 1 // FREEZE_MODE_KINEMATIC + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`static`: return ".`static`" + case .kinematic: return ".kinematic" + } + + } + + } + + public enum CenterOfMassMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. + case auto = 0 // CENTER_OF_MASS_MODE_AUTO + /// In this mode, the body's center of mass is set through ``centerOfMass``. Defaults to the body's origin position. + case custom = 1 // CENTER_OF_MASS_MODE_CUSTOM + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .auto: return ".auto" + case .custom: return ".custom" + } + + } + + } + + public enum DampMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// In this mode, the body's damping value is added to any value set in areas or the default value. + case combine = 0 // DAMP_MODE_COMBINE + /// In this mode, the body's damping value replaces any value set in areas or the default value. + case replace = 1 // DAMP_MODE_REPLACE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .combine: return ".combine" + case .replace: return ".replace" + } + + } + + } + + + /* Properties */ + + /// The body's mass. + final public var mass: Double { + get { + return get_mass () + } + + set { + set_mass (newValue) + } + + } + + /// The physics material override for the body. + /// + /// If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + /// + final public var physicsMaterialOverride: PhysicsMaterial? { + get { + return get_physics_material_override () + } + + set { + set_physics_material_override (newValue) + } + + } + + /// This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + final public var gravityScale: Double { + get { + return get_gravity_scale () + } + + set { + set_gravity_scale (newValue) + } + + } + + /// Defines the way the body's center of mass is set. See ``RigidBody3D/CenterOfMassMode`` for possible values. + final public var centerOfMassMode: RigidBody3D.CenterOfMassMode { + get { + return get_center_of_mass_mode () + } + + set { + set_center_of_mass_mode (newValue) + } + + } + + /// The body's custom center of mass, relative to the body's origin position, when ``centerOfMassMode`` is set to ``CenterOfMassMode/custom``. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + /// + /// When ``centerOfMassMode`` is set to ``CenterOfMassMode/auto`` (default value), the center of mass is automatically computed. + /// + final public var centerOfMass: Vector3 { + get { + return get_center_of_mass () + } + + set { + set_center_of_mass (newValue) + } + + } + + /// The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + /// + /// If set to ``Vector3/zero``, inertia is automatically computed (default value). + /// + /// > Note: This value does not change when inertia is automatically computed. Use ``PhysicsServer3D`` to get the computed inertia. + /// + final public var inertia: Vector3 { + get { + return get_inertia () + } + + set { + set_inertia (newValue) + } + + } + + /// If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the ``applyImpulse(_:position:)`` or ``applyForce(_:position:)`` methods. + final public var sleeping: Bool { + get { + return is_sleeping () + } + + set { + set_sleeping (newValue) + } + + } + + /// If `true`, the body can enter sleep mode when there is no movement. See ``sleeping``. + final public var canSleep: Bool { + get { + return is_able_to_sleep () + } + + set { + set_can_sleep (newValue) + } + + } + + /// If `true`, the body cannot rotate. Gravity and forces only apply linear movement. + final public var lockRotation: Bool { + get { + return is_lock_rotation_enabled () + } + + set { + set_lock_rotation_enabled (newValue) + } + + } + + /// If `true`, the body is frozen. Gravity and forces are not applied anymore. + /// + /// See ``freezeMode`` to set the body's behavior when frozen. + /// + /// For a body that is always frozen, use ``StaticBody3D`` or ``AnimatableBody3D`` instead. + /// + final public var freeze: Bool { + get { + return is_freeze_enabled () + } + + set { + set_freeze_enabled (newValue) + } + + } + + /// The body's freeze mode. Can be used to set the body's behavior when ``freeze`` is enabled. See ``RigidBody3D/FreezeMode`` for possible values. + /// + /// For a body that is always frozen, use ``StaticBody3D`` or ``AnimatableBody3D`` instead. + /// + final public var freezeMode: RigidBody3D.FreezeMode { + get { + return get_freeze_mode () + } + + set { + set_freeze_mode (newValue) + } + + } + + /// If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the ``_integrateForces(state:)`` method, if that virtual method is overridden. + /// + /// Setting this property will call the method ``PhysicsServer3D/bodySetOmitForceIntegration(body:enable:)`` internally. + /// + final public var customIntegrator: Bool { + get { + return is_using_custom_integrator () + } + + set { + set_use_custom_integrator (newValue) + } + + } + + /// If `true`, continuous collision detection is used. + /// + /// Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. + /// + final public var continuousCd: Bool { + get { + return is_using_continuous_collision_detection () + } + + set { + set_use_continuous_collision_detection (newValue) + } + + } + + /// If `true`, the RigidBody3D will emit signals when it collides with another body. + /// + /// > Note: By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see ``maxContactsReported``. + /// + final public var contactMonitor: Bool { + get { + return is_contact_monitor_enabled () + } + + set { + set_contact_monitor (newValue) + } + + } + + /// The maximum number of contacts that will be recorded. Requires a value greater than 0 and ``contactMonitor`` to be set to `true` to start to register contacts. Use ``getContactCount()`` to retrieve the count or ``getCollidingBodies()`` to retrieve bodies that have been collided with. + /// + /// > Note: The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + /// + final public var maxContactsReported: Int32 { + get { + return get_max_contacts_reported () + } + + set { + set_max_contacts_reported (newValue) + } + + } + + /// The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, because physics may run in another thread and runs at a different granularity. Use ``_integrateForces(state:)`` as your process loop for precise control of the body state. + final public var linearVelocity: Vector3 { + get { + return get_linear_velocity () + } + + set { + set_linear_velocity (newValue) + } + + } + + /// Defines how ``linearDamp`` is applied. See ``RigidBody3D/DampMode`` for possible values. + final public var linearDampMode: RigidBody3D.DampMode { + get { + return get_linear_damp_mode () + } + + set { + set_linear_damp_mode (newValue) + } + + } + + /// Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an ``Area3D`` the body is in. Depending on ``linearDampMode``, you can set ``linearDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/3d/defaultLinearDamp`` for more details about damping. + /// + final public var linearDamp: Double { + get { + return get_linear_damp () + } + + set { + set_linear_damp (newValue) + } + + } + + /// The RigidBody3D's rotational velocity in _radians_ per second. + final public var angularVelocity: Vector3 { + get { + return get_angular_velocity () + } + + set { + set_angular_velocity (newValue) + } + + } + + /// Defines how ``angularDamp`` is applied. See ``RigidBody3D/DampMode`` for possible values. + final public var angularDampMode: RigidBody3D.DampMode { + get { + return get_angular_damp_mode () + } + + set { + set_angular_damp_mode (newValue) + } + + } + + /// Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an ``Area3D`` the body is in. Depending on ``angularDampMode``, you can set ``angularDamp`` to be added to or to replace the body's damping value. + /// + /// See ``ProjectSettings/physics/3d/defaultAngularDamp`` for more details about damping. + /// + final public var angularDamp: Double { + get { + return get_angular_damp () + } + + set { + set_angular_damp (newValue) + } + + } + + /// The body's total constant positional forces applied during each physics update. + /// + /// See ``addConstantForce(_:position:)`` and ``addConstantCentralForce(_:)``. + /// + final public var constantForce: Vector3 { + get { + return get_constant_force () + } + + set { + set_constant_force (newValue) + } + + } + + /// The body's total constant rotational forces applied during each physics update. + /// + /// See ``addConstantTorque(_:)``. + /// + final public var constantTorque: Vector3 { + get { + return get_constant_torque () + } + + set { + set_constant_torque (newValue) + } + + } + + /* Methods */ + /// Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the ``customIntegrator`` property allows you to disable the standard force integration and do fully custom force integration for a body. + @_documentation(visibility: public) + open func _integrateForces(state: PhysicsDirectBodyState3D?) { + } + + fileprivate static var method_set_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_mass") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_mass(_ mass: Double) { + withUnsafePointer(to: mass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_mass") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_mass() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("set_inertia") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_inertia(_ inertia: Vector3) { + withUnsafePointer(to: inertia) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_inertia, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_inertia: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inertia") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_inertia() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_inertia, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_center_of_mass_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_of_mass_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3625866032)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_of_mass_mode(_ mode: RigidBody3D.CenterOfMassMode) { + withUnsafePointer(to: mode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_center_of_mass_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_of_mass_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 237405040)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass_mode() -> RigidBody3D.CenterOfMassMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody3D.method_get_center_of_mass_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody3D.CenterOfMassMode (rawValue: _result)! + } + + fileprivate static var method_set_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("set_center_of_mass") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_center_of_mass(_ centerOfMass: Vector3) { + withUnsafePointer(to: centerOfMass) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_center_of_mass, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_center_of_mass: GDExtensionMethodBindPtr = { + let methodName = StringName("get_center_of_mass") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_center_of_mass() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_center_of_mass, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_physics_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_material_override") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1784508650)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_material_override(_ physicsMaterialOverride: PhysicsMaterial?) { + withUnsafePointer(to: physicsMaterialOverride?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_physics_material_override, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_physics_material_override: GDExtensionMethodBindPtr = { + let methodName = StringName("get_physics_material_override") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2521850424)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_physics_material_override() -> PhysicsMaterial? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(RigidBody3D.method_get_physics_material_override, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_velocity") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_velocity(_ linearVelocity: Vector3) { + withUnsafePointer(to: linearVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_linear_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_velocity") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_linear_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_velocity") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_velocity(_ angularVelocity: Vector3) { + withUnsafePointer(to: angularVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_angular_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_velocity") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_velocity() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_angular_velocity, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_inverse_inertia_tensor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_inverse_inertia_tensor") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2716978435)! + } + + } + + }() + + /// Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the ``RigidBody3D``. + public final func getInverseInertiaTensor() -> Basis { + var _result: Basis = Basis () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_inverse_inertia_tensor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("set_gravity_scale") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_gravity_scale(_ gravityScale: Double) { + withUnsafePointer(to: gravityScale) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_gravity_scale, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_gravity_scale: GDExtensionMethodBindPtr = { + let methodName = StringName("get_gravity_scale") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_gravity_scale() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_gravity_scale, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1802035050)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp_mode(_ linearDampMode: RigidBody3D.DampMode) { + withUnsafePointer(to: linearDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1366206940)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp_mode() -> RigidBody3D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody3D.method_get_linear_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody3D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1802035050)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp_mode(_ angularDampMode: RigidBody3D.DampMode) { + withUnsafePointer(to: angularDampMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1366206940)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp_mode() -> RigidBody3D.DampMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody3D.method_get_angular_damp_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody3D.DampMode (rawValue: _result)! + } + + fileprivate static var method_set_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_linear_damp") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_linear_damp(_ linearDamp: Double) { + withUnsafePointer(to: linearDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_linear_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_linear_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_linear_damp") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_linear_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_linear_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("set_angular_damp") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_angular_damp(_ angularDamp: Double) { + withUnsafePointer(to: angularDamp) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_angular_damp, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_angular_damp: GDExtensionMethodBindPtr = { + let methodName = StringName("get_angular_damp") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_angular_damp() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_angular_damp, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_contacts_reported") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_contacts_reported(_ amount: Int32) { + withUnsafePointer(to: amount) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_max_contacts_reported, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_contacts_reported: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_contacts_reported") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_contacts_reported() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_max_contacts_reported, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_contact_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_contact_count") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see ``contactMonitor``). + /// + /// > Note: To retrieve the colliding bodies, use ``getCollidingBodies()``. + /// + public final func getContactCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_contact_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_custom_integrator") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_custom_integrator(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_use_custom_integrator, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_custom_integrator: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_custom_integrator") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2240911060)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_custom_integrator() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_using_custom_integrator, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_contact_monitor: GDExtensionMethodBindPtr = { + let methodName = StringName("set_contact_monitor") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_contact_monitor(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_contact_monitor, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_contact_monitor_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_contact_monitor_enabled") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_contact_monitor_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_contact_monitor_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_use_continuous_collision_detection: GDExtensionMethodBindPtr = { + let methodName = StringName("set_use_continuous_collision_detection") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_use_continuous_collision_detection(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_use_continuous_collision_detection, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_using_continuous_collision_detection: GDExtensionMethodBindPtr = { + let methodName = StringName("is_using_continuous_collision_detection") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_using_continuous_collision_detection() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_using_continuous_collision_detection, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_axis_velocity: GDExtensionMethodBindPtr = { + let methodName = StringName("set_axis_velocity") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + public final func setAxisVelocity(_ axisVelocity: Vector3) { + withUnsafePointer(to: axisVelocity) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_axis_velocity, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_central_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_impulse") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a directional impulse without affecting rotation. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// This is equivalent to using ``applyImpulse(_:position:)`` at the body's center of mass. + /// + public final func applyCentralImpulse(_ impulse: Vector3) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_central_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_impulse") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Applies a positioned impulse to the body. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyImpulse(_ impulse: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque_impulse: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque_impulse") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a rotational impulse to the body without affecting the position. + /// + /// An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + /// + /// > Note: ``inertia`` is required for this to work. To have ``inertia``, an active ``CollisionShape3D`` must be a child of the node, or you can manually set ``inertia``. + /// + public final func applyTorqueImpulse(_ impulse: Vector3) { + withUnsafePointer(to: impulse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_torque_impulse, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_central_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + /// + /// This is equivalent to using ``applyForce(_:position:)`` at the body's center of mass. + /// + public final func applyCentralForce(_ force: Vector3) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_apply_force: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func applyForce(_ force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_apply_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("apply_torque") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + /// + /// > Note: ``inertia`` is required for this to work. To have ``inertia``, an active ``CollisionShape3D`` must be a child of the node, or you can manually set ``inertia``. + /// + public final func applyTorque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_apply_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_central_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_central_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + /// + /// This is equivalent to using ``addConstantForce(_:position:)`` at the body's center of mass. + /// + public final func addConstantCentralForce(_ force: Vector3) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_add_constant_central_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_add_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2754756483)! + } + + } + + }() + + /// Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + /// + /// `position` is the offset from the body origin in global coordinates. + /// + public final func addConstantForce(_ force: Vector3, position: Vector3 = Vector3 (x: 0, y: 0, z: 0)) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: position) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_add_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_add_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("add_constant_torque") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + /// Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = Vector3(0, 0, 0)`. + public final func addConstantTorque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_add_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_constant_force(_ force: Vector3) { + withUnsafePointer(to: force) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_constant_force, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_force: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_force") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_constant_force() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_constant_force, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("set_constant_torque") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3460891852)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_constant_torque(_ torque: Vector3) { + withUnsafePointer(to: torque) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_constant_torque, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_constant_torque: GDExtensionMethodBindPtr = { + let methodName = StringName("get_constant_torque") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3360562783)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_constant_torque() -> Vector3 { + var _result: Vector3 = Vector3 () + gi.object_method_bind_ptrcall(RigidBody3D.method_get_constant_torque, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("set_sleeping") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_sleeping(_ sleeping: Bool) { + withUnsafePointer(to: sleeping) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_sleeping, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_sleeping: GDExtensionMethodBindPtr = { + let methodName = StringName("is_sleeping") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_sleeping() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_sleeping, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_can_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("set_can_sleep") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_can_sleep(_ ableToSleep: Bool) { + withUnsafePointer(to: ableToSleep) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_can_sleep, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_able_to_sleep: GDExtensionMethodBindPtr = { + let methodName = StringName("is_able_to_sleep") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_able_to_sleep() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_able_to_sleep, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_lock_rotation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_lock_rotation_enabled") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_lock_rotation_enabled(_ lockRotation: Bool) { + withUnsafePointer(to: lockRotation) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_lock_rotation_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_lock_rotation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_lock_rotation_enabled") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_lock_rotation_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_lock_rotation_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_freeze_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_freeze_enabled") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_freeze_enabled(_ freezeMode: Bool) { + withUnsafePointer(to: freezeMode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_freeze_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_freeze_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_freeze_enabled") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_freeze_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RigidBody3D.method_is_freeze_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_freeze_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("set_freeze_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1319914653)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_freeze_mode(_ freezeMode: RigidBody3D.FreezeMode) { + withUnsafePointer(to: freezeMode.rawValue) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RigidBody3D.method_set_freeze_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_freeze_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("get_freeze_mode") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2008423905)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_freeze_mode() -> RigidBody3D.FreezeMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(RigidBody3D.method_get_freeze_mode, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return RigidBody3D.FreezeMode (rawValue: _result)! + } + + fileprivate static var method_get_colliding_bodies: GDExtensionMethodBindPtr = { + let methodName = StringName("get_colliding_bodies") + return withUnsafePointer(to: &RigidBody3D.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of the bodies colliding with this one. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. + /// + /// > Note: The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + /// + public final func getCollidingBodies() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(RigidBody3D.method_get_colliding_bodies, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + override class func getVirtualDispatcher (name: StringName) -> GDExtensionClassCallVirtual? { + guard implementedOverrides().contains(name) else { return nil } + switch name.description { + case "_integrate_forces": + return _RigidBody3D_proxy_integrate_forces + default: + return super.getVirtualDispatcher (name: name) + } + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node ?? lookupObject (nativeHandle: ptr_1!) ?? Node (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when one of this RigidBody3D's ``Shape3D``s collides with another ``PhysicsBody3D`` or ``GridMap``'s ``Shape3D``s. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``GridMap``s are detected if the ``MeshLibrary`` has Collision ``Shape3D``s. + /// + /// `bodyRid` the ``RID`` of the other ``PhysicsBody3D`` or ``MeshLibrary``'s ``CollisionObject3D`` used by the ``PhysicsServer3D``. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody3D`` or ``GridMap``. + /// + /// `bodyShapeIndex` the index of the ``Shape3D`` of the other ``PhysicsBody3D`` or ``GridMap`` used by the ``PhysicsServer3D``. Get the ``CollisionShape3D`` node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + /// + /// `localShapeIndex` the index of the ``Shape3D`` of this RigidBody3D used by the ``PhysicsServer3D``. Get the ``CollisionShape3D`` node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeEntered.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeEntered: Signal1 { Signal1 (target: self, signalName: "body_shape_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ bodyRid: RID, _ body: Node, _ bodyShapeIndex: Int64, _ localShapeIndex: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = RID (args [0]!)! + var ptr_1: UnsafeMutableRawPointer? + args [1]!.toType (Variant.GType.object, dest: &ptr_1) + let arg_1 = lookupLiveObject (handleAddress: ptr_1!) as? Node ?? lookupObject (nativeHandle: ptr_1!) ?? Node (nativeHandle: ptr_1!) + let arg_2 = Int64 (args [2]!)! + let arg_3 = Int64 (args [3]!)! + + callback (arg_0, arg_1, arg_2, arg_3) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _, _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the collision between one of this RigidBody3D's ``Shape3D``s and another ``PhysicsBody3D`` or ``GridMap``'s ``Shape3D``s ends. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``GridMap``s are detected if the ``MeshLibrary`` has Collision ``Shape3D``s. + /// + /// `bodyRid` the ``RID`` of the other ``PhysicsBody3D`` or ``MeshLibrary``'s ``CollisionObject3D`` used by the ``PhysicsServer3D``. ``GridMap``s are detected if the Meshes have ``Shape3D``s. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody3D`` or ``GridMap``. + /// + /// `bodyShapeIndex` the index of the ``Shape3D`` of the other ``PhysicsBody3D`` or ``GridMap`` used by the ``PhysicsServer3D``. Get the ``CollisionShape3D`` node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + /// + /// `localShapeIndex` the index of the ``Shape3D`` of this RigidBody3D used by the ``PhysicsServer3D``. Get the ``CollisionShape3D`` node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyShapeExited.connect { bodyRid, body, bodyShapeIndex, localShapeIndex in + /// print ("caught signal") + /// } + /// ``` + public var bodyShapeExited: Signal2 { Signal2 (target: self, signalName: "body_shape_exited") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when a collision with another ``PhysicsBody3D`` or ``GridMap`` occurs. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``GridMap``s are detected if the ``MeshLibrary`` has Collision ``Shape3D``s. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody3D`` or ``GridMap``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyEntered.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyEntered: Signal3 { Signal3 (target: self, signalName: "body_entered") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ body: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? lookupObject (nativeHandle: ptr_0!) ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the collision with another ``PhysicsBody3D`` or ``GridMap`` ends. Requires ``contactMonitor`` to be set to `true` and ``maxContactsReported`` to be set high enough to detect all the collisions. ``GridMap``s are detected if the ``MeshLibrary`` has Collision ``Shape3D``s. + /// + /// `body` the ``Node``, if it exists in the tree, of the other ``PhysicsBody3D`` or ``GridMap``. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.bodyExited.connect { body in + /// print ("caught signal") + /// } + /// ``` + public var bodyExited: Signal4 { Signal4 (target: self, signalName: "body_exited") } + + /// Emitted when the physics engine changes the body's sleeping state. + /// + /// > Note: Changing the value ``sleeping`` will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. + /// + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.sleepingStateChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var sleepingStateChanged: SimpleSignal { SimpleSignal (target: self, signalName: "sleeping_state_changed") } + +} + +// Support methods for proxies +func _RigidBody3D_proxy_integrate_forces (instance: UnsafeMutableRawPointer?, args: UnsafePointer?, retPtr: UnsafeMutableRawPointer?) { + guard let instance else { return } + guard let args else { return } + let swiftObject = Unmanaged.fromOpaque(instance).takeUnretainedValue() + let resolved_0 = args [0]!.load (as: UnsafeRawPointer.self) + + swiftObject._integrateForces (state: lookupLiveObject (handleAddress: resolved_0) as? PhysicsDirectBodyState3D ?? lookupObject (nativeHandle: resolved_0)!) +} + diff --git a/Sources/SwiftGodot/Generated/Api/RootMotionView.swift b/Sources/SwiftGodot/Generated/Api/RootMotionView.swift new file mode 100644 index 000000000..1f40e4841 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/RootMotionView.swift @@ -0,0 +1,314 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Editor-only helper for setting up root motion in ``AnimationMixer``. +/// +/// _Root motion_ refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also ``AnimationMixer``. +/// +/// > Note: ``RootMotionView`` is only visible in the editor. It will be hidden automatically in the running project. +/// +open class RootMotionView: VisualInstance3D { + override open class var godotClassName: StringName { "RootMotionView" } + + /* Properties */ + + /// Path to an ``AnimationMixer`` node to use as a basis for root motion. + final public var animationPath: NodePath { + get { + return get_animation_path () + } + + set { + set_animation_path (newValue) + } + + } + + /// The grid's color. + final public var color: Color { + get { + return get_color () + } + + set { + set_color (newValue) + } + + } + + /// The grid's cell size in 3D units. + final public var cellSize: Double { + get { + return get_cell_size () + } + + set { + set_cell_size (newValue) + } + + } + + /// The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this ``radius`` is reached. + final public var radius: Double { + get { + return get_radius () + } + + set { + set_radius (newValue) + } + + } + + /// If `true`, the grid's points will all be on the same Y coordinate (_local_ Y = 0). If `false`, the points' original Y coordinate is preserved. + final public var zeroY: Bool { + get { + return get_zero_y () + } + + set { + set_zero_y (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_animation_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_animation_path") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_animation_path(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RootMotionView.method_set_animation_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_animation_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_animation_path") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_animation_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(RootMotionView.method_get_animation_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_color: GDExtensionMethodBindPtr = { + let methodName = StringName("set_color") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2920490490)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_color(_ color: Color) { + withUnsafePointer(to: color) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RootMotionView.method_set_color, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_color: GDExtensionMethodBindPtr = { + let methodName = StringName("get_color") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3444240500)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_color() -> Color { + var _result: Color = Color () + gi.object_method_bind_ptrcall(RootMotionView.method_get_color, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_cell_size") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_cell_size(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RootMotionView.method_set_cell_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_cell_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_cell_size") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_cell_size() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RootMotionView.method_get_cell_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("set_radius") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_radius(_ size: Double) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RootMotionView.method_set_radius, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_radius: GDExtensionMethodBindPtr = { + let methodName = StringName("get_radius") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_radius() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(RootMotionView.method_get_radius, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_zero_y: GDExtensionMethodBindPtr = { + let methodName = StringName("set_zero_y") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_zero_y(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(RootMotionView.method_set_zero_y, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_zero_y: GDExtensionMethodBindPtr = { + let methodName = StringName("get_zero_y") + return withUnsafePointer(to: &RootMotionView.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_zero_y() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(RootMotionView.method_get_zero_y, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/SceneMultiplayer.swift b/Sources/SwiftGodot/Generated/Api/SceneMultiplayer.swift new file mode 100644 index 000000000..7446be12e --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/SceneMultiplayer.swift @@ -0,0 +1,908 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// High-level multiplayer API implementation. +/// +/// This class is the default implementation of ``MultiplayerAPI``, used to provide multiplayer functionalities in Godot Engine. +/// +/// This implementation supports RPCs via ``Node/rpc(method:)`` and ``Node/rpcId(peerId:method:)`` and requires ``MultiplayerAPI/rpc(peer:object:method:arguments:)`` to be passed a ``Node`` (it will fail for other object types). +/// +/// This implementation additionally provide ``SceneTree`` replication via the ``MultiplayerSpawner`` and ``MultiplayerSynchronizer`` nodes, and the ``SceneReplicationConfig`` resource. +/// +/// > Note: The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. +/// +/// > Note: When exporting to Android, make sure to enable the `INTERNET` permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``peerAuthenticating`` +/// - ``peerAuthenticationFailed`` +/// - ``peerPacket`` +open class SceneMultiplayer: MultiplayerAPI { + override open class var godotClassName: StringName { "SceneMultiplayer" } + + /* Properties */ + + /// The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. + /// + /// This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. + /// + final public var rootPath: NodePath { + get { + return get_root_path () + } + + set { + set_root_path (newValue) + } + + } + + /// The callback to execute when when receiving authentication data sent via ``sendAuth(id:data:)``. If the ``Callable`` is empty (default), peers will be automatically accepted as soon as they connect. + final public var authCallback: Callable { + get { + return get_auth_callback () + } + + set { + set_auth_callback (newValue) + } + + } + + /// If set to a value greater than `0.0`, the maximum amount of time peers can stay in the authenticating state, after which the authentication will automatically fail. See the [signal peer_authenticating] and [signal peer_authentication_failed] signals. + final public var authTimeout: Double { + get { + return get_auth_timeout () + } + + set { + set_auth_timeout (newValue) + } + + } + + /// If `true`, the MultiplayerAPI will allow encoding and decoding of object during RPCs. + /// + /// > Warning: Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution. + /// + final public var allowObjectDecoding: Bool { + get { + return is_object_decoding_allowed () + } + + set { + set_allow_object_decoding (newValue) + } + + } + + /// If `true`, the MultiplayerAPI's ``MultiplayerAPI/multiplayerPeer`` refuses new incoming connections. + final public var refuseNewConnections: Bool { + get { + return is_refusing_new_connections () + } + + set { + set_refuse_new_connections (newValue) + } + + } + + /// Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is `false`, clients won't be automatically notified of other peers and won't be able to send them packets through the server. + /// + /// > Note: Changing this option while other peers are connected may lead to unexpected behaviors. + /// + /// > Note: Support for this feature may depend on the current ``MultiplayerPeer`` configuration. See ``MultiplayerPeer/isServerRelaySupported()``. + /// + final public var serverRelay: Bool { + get { + return is_server_relay_enabled () + } + + set { + set_server_relay_enabled (newValue) + } + + } + + /// Maximum size of each synchronization packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of packet loss. See ``MultiplayerSynchronizer``. + final public var maxSyncPacketSize: Int32 { + get { + return get_max_sync_packet_size () + } + + set { + set_max_sync_packet_size (newValue) + } + + } + + /// Maximum size of each delta packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of causing networking congestion (higher latency, disconnections). See ``MultiplayerSynchronizer``. + final public var maxDeltaPacketSize: Int32 { + get { + return get_max_delta_packet_size () + } + + set { + set_max_delta_packet_size (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_root_path: GDExtensionMethodBindPtr = { + let methodName = StringName("set_root_path") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_root_path(_ path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_root_path, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_root_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root_path") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4075236667)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root_path() -> NodePath { + let _result: NodePath = NodePath () + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_root_path, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_clear: GDExtensionMethodBindPtr = { + let methodName = StringName("clear") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). + public final func clear() { + gi.object_method_bind_ptrcall(SceneMultiplayer.method_clear, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_disconnect_peer: GDExtensionMethodBindPtr = { + let methodName = StringName("disconnect_peer") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Disconnects the peer identified by `id`, removing it from the list of connected peers, and closing the underlying connection with it. + public final func disconnectPeer(id: Int32) { + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_disconnect_peer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_authenticating_peers: GDExtensionMethodBindPtr = { + let methodName = StringName("get_authenticating_peers") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 969006518)! + } + + } + + }() + + /// Returns the IDs of the peers currently trying to authenticate with this ``MultiplayerAPI``. + public final func getAuthenticatingPeers() -> PackedInt32Array { + let _result: PackedInt32Array = PackedInt32Array () + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_authenticating_peers, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_send_auth: GDExtensionMethodBindPtr = { + let methodName = StringName("send_auth") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 506032537)! + } + + } + + }() + + /// Sends the specified `data` to the remote peer identified by `id` as part of an authentication message. This can be used to authenticate peers, and control when [signal MultiplayerAPI.peer_connected] is emitted (and the remote peer accepted as one of the connected peers). + public final func sendAuth(id: Int32, data: PackedByteArray) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: data.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_send_auth, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_complete_auth: GDExtensionMethodBindPtr = { + let methodName = StringName("complete_auth") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844576869)! + } + + } + + }() + + /// Mark the authentication step as completed for the remote peer identified by `id`. The [signal MultiplayerAPI.peer_connected] signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. + /// + /// If a peer disconnects before completing authentication, either due to a network issue, the ``authTimeout`` expiring, or manually calling ``disconnectPeer(id:)``, the [signal peer_authentication_failed] signal will be emitted instead of [signal MultiplayerAPI.peer_disconnected]. + /// + public final func completeAuth(id: Int32) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: id) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_complete_auth, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_set_auth_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auth_callback") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1611583062)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auth_callback(_ callback: Callable) { + withUnsafePointer(to: callback.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_auth_callback, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auth_callback: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auth_callback") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1307783378)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auth_callback() -> Callable { + let _result: Callable = Callable () + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_auth_callback, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_set_auth_timeout: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auth_timeout") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auth_timeout(_ timeout: Double) { + withUnsafePointer(to: timeout) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_auth_timeout, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_auth_timeout: GDExtensionMethodBindPtr = { + let methodName = StringName("get_auth_timeout") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_auth_timeout() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_auth_timeout, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_refuse_new_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("set_refuse_new_connections") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_refuse_new_connections(_ refuse: Bool) { + withUnsafePointer(to: refuse) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_refuse_new_connections, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_refusing_new_connections: GDExtensionMethodBindPtr = { + let methodName = StringName("is_refusing_new_connections") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_refusing_new_connections() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneMultiplayer.method_is_refusing_new_connections, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_allow_object_decoding: GDExtensionMethodBindPtr = { + let methodName = StringName("set_allow_object_decoding") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_allow_object_decoding(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_allow_object_decoding, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_object_decoding_allowed: GDExtensionMethodBindPtr = { + let methodName = StringName("is_object_decoding_allowed") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_object_decoding_allowed() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneMultiplayer.method_is_object_decoding_allowed, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_server_relay_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_server_relay_enabled") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_server_relay_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_server_relay_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_server_relay_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_server_relay_enabled") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_server_relay_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneMultiplayer.method_is_server_relay_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_send_bytes: GDExtensionMethodBindPtr = { + let methodName = StringName("send_bytes") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1307428718)! + } + + } + + }() + + /// Sends the given raw `bytes` to a specific peer identified by `id` (see ``MultiplayerPeer/setTargetPeer(id:)``). Default ID is `0`, i.e. broadcast to all peers. + public final func sendBytes(_ bytes: PackedByteArray, id: Int32 = 0, mode: MultiplayerPeer.TransferMode = .reliable, channel: Int32 = 0) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: bytes.content) { pArg0 in + withUnsafePointer(to: id) { pArg1 in + withUnsafePointer(to: mode.rawValue) { pArg2 in + withUnsafePointer(to: channel) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_send_bytes, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_max_sync_packet_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_sync_packet_size") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_sync_packet_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_max_sync_packet_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_sync_packet_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_sync_packet_size") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_sync_packet_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_max_sync_packet_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_max_delta_packet_size: GDExtensionMethodBindPtr = { + let methodName = StringName("get_max_delta_packet_size") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_max_delta_packet_size() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(SceneMultiplayer.method_get_max_delta_packet_size, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_max_delta_packet_size: GDExtensionMethodBindPtr = { + let methodName = StringName("set_max_delta_packet_size") + return withUnsafePointer(to: &SceneMultiplayer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_max_delta_packet_size(_ size: Int32) { + withUnsafePointer(to: size) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneMultiplayer.method_set_max_delta_packet_size, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this MultiplayerAPI's ``MultiplayerAPI/multiplayerPeer`` connects to a new peer and a valid ``authCallback`` is set. In this case, the [signal MultiplayerAPI.peer_connected] will not be emitted until ``completeAuth(id:)`` is called with given peer `id`. While in this state, the peer will not be included in the list returned by ``MultiplayerAPI/getPeers()`` (but in the one returned by ``getAuthenticatingPeers()``), and only authentication data will be sent or received. See ``sendAuth(id:data:)`` for sending authentication data. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerAuthenticating.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerAuthenticating: Signal1 { Signal1 (target: self, signalName: "peer_authenticating") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this MultiplayerAPI's ``MultiplayerAPI/multiplayerPeer`` disconnects from a peer for which authentication had not yet completed. See [signal peer_authenticating]. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerAuthenticationFailed.connect { id in + /// print ("caught signal") + /// } + /// ``` + public var peerAuthenticationFailed: Signal2 { Signal2 (target: self, signalName: "peer_authentication_failed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ id: Int64, _ packet: PackedByteArray) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + let arg_0 = Int64 (args [0]!)! + let arg_1 = PackedByteArray (args [1]!)! + + callback (arg_0, arg_1) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _, _ in c.resume () } + } + + } + + } + + } + + /// Emitted when this MultiplayerAPI's ``MultiplayerAPI/multiplayerPeer`` receives a `packet` with custom data (see ``sendBytes(_:id:mode:channel:)``). ID is the peer ID of the peer that sent the packet. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.peerPacket.connect { id, packet in + /// print ("caught signal") + /// } + /// ``` + public var peerPacket: Signal3 { Signal3 (target: self, signalName: "peer_packet") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/SceneReplicationConfig.swift b/Sources/SwiftGodot/Generated/Api/SceneReplicationConfig.swift new file mode 100644 index 000000000..ec8c671ed --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/SceneReplicationConfig.swift @@ -0,0 +1,399 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Configuration for properties to synchronize with a ``MultiplayerSynchronizer``. +open class SceneReplicationConfig: Resource { + override open class var godotClassName: StringName { "SceneReplicationConfig" } + public enum ReplicationMode: Int64, CaseIterable, CustomDebugStringConvertible { + /// Do not keep the given property synchronized. + case never = 0 // REPLICATION_MODE_NEVER + /// Replicate the given property on process by constantly sending updates using unreliable transfer mode. + case always = 1 // REPLICATION_MODE_ALWAYS + /// Replicate the given property on process by sending updates using reliable transfer mode when its value changes. + case onChange = 2 // REPLICATION_MODE_ON_CHANGE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .never: return ".never" + case .always: return ".always" + case .onChange: return ".onChange" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_properties: GDExtensionMethodBindPtr = { + let methodName = StringName("get_properties") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns a list of synchronized property ``NodePath``s. + public final func getProperties() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_get_properties, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_add_property: GDExtensionMethodBindPtr = { + let methodName = StringName("add_property") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4094619021)! + } + + } + + }() + + /// Adds the property identified by the given `path` to the list of the properties being synchronized, optionally passing an `index`. + /// + /// > Note: For details on restrictions and limitations on property synchronization, see ``MultiplayerSynchronizer``. + /// + public final func addProperty(path: NodePath, index: Int32 = -1) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: index) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_add_property, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_has_property: GDExtensionMethodBindPtr = { + let methodName = StringName("has_property") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 861721659)! + } + + } + + }() + + /// Returns `true` if the given `path` is configured for synchronization. + public final func hasProperty(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_has_property, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_remove_property: GDExtensionMethodBindPtr = { + let methodName = StringName("remove_property") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1348162250)! + } + + } + + }() + + /// Removes the property identified by the given `path` from the configuration. + public final func removeProperty(path: NodePath) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_remove_property, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_property_get_index: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_index") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1382022557)! + } + + } + + }() + + /// Finds the index of the given `path`. + public final func propertyGetIndex(path: NodePath) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_get_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_property_get_spawn: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_spawn") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3456846888)! + } + + } + + }() + + /// Returns `true` if the property identified by the given `path` is configured to be synchronized on spawn. + public final func propertyGetSpawn(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_get_spawn, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_property_set_spawn: GDExtensionMethodBindPtr = { + let methodName = StringName("property_set_spawn") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3868023870)! + } + + } + + }() + + /// Sets whether the property identified by the given `path` is configured to be synchronized on spawn. + public final func propertySetSpawn(path: NodePath, enabled: Bool) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_set_spawn, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_property_get_replication_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_replication_mode") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2870606336)! + } + + } + + }() + + /// Returns the replication mode for the property identified by the given `path`. See ``SceneReplicationConfig/ReplicationMode``. + public final func propertyGetReplicationMode(path: NodePath) -> SceneReplicationConfig.ReplicationMode { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_get_replication_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return SceneReplicationConfig.ReplicationMode (rawValue: _result)! + } + + fileprivate static var method_property_set_replication_mode: GDExtensionMethodBindPtr = { + let methodName = StringName("property_set_replication_mode") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3200083865)! + } + + } + + }() + + /// Sets the synchronization mode for the property identified by the given `path`. See ``SceneReplicationConfig/ReplicationMode``. + public final func propertySetReplicationMode(path: NodePath, mode: SceneReplicationConfig.ReplicationMode) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: mode.rawValue) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_set_replication_mode, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_property_get_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_sync") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3456846888)! + } + + } + + }() + + /// Returns `true` if the property identified by the given `path` is configured to be synchronized on process. + public final func propertyGetSync(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_get_sync, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_property_set_sync: GDExtensionMethodBindPtr = { + let methodName = StringName("property_set_sync") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3868023870)! + } + + } + + }() + + /// Sets whether the property identified by the given `path` is configured to be synchronized on process. + public final func propertySetSync(path: NodePath, enabled: Bool) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_set_sync, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_property_get_watch: GDExtensionMethodBindPtr = { + let methodName = StringName("property_get_watch") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3456846888)! + } + + } + + }() + + /// Returns `true` if the property identified by the given `path` is configured to be reliably synchronized when changes are detected on process. + public final func propertyGetWatch(path: NodePath) -> Bool { + var _result: Bool = false + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_get_watch, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_property_set_watch: GDExtensionMethodBindPtr = { + let methodName = StringName("property_set_watch") + return withUnsafePointer(to: &SceneReplicationConfig.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3868023870)! + } + + } + + }() + + /// Sets whether the property identified by the given `path` is configured to be reliably synchronized when changes are detected on process. + public final func propertySetWatch(path: NodePath, enabled: Bool) { + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: enabled) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneReplicationConfig.method_property_set_watch, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/SceneState.swift b/Sources/SwiftGodot/Generated/Api/SceneState.swift new file mode 100644 index 000000000..bed15b142 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/SceneState.swift @@ -0,0 +1,632 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Provides access to a scene file's information. +/// +/// Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene. They cannot be modified from a ``SceneState``, only accessed. Useful for peeking into what a ``PackedScene`` contains without instantiating it. +/// +/// This class cannot be instantiated directly, it is retrieved for a given scene as the result of ``PackedScene/getState()``. +/// +open class SceneState: RefCounted { + override open class var godotClassName: StringName { "SceneState" } + public enum GenEditState: Int64, CaseIterable, CustomDebugStringConvertible { + /// If passed to ``PackedScene/instantiate(editState:)``, blocks edits to the scene state. + case disabled = 0 // GEN_EDIT_STATE_DISABLED + /// If passed to ``PackedScene/instantiate(editState:)``, provides inherited scene resources to the local scene. + /// + /// > Note: Only available in editor builds. + /// + case instance = 1 // GEN_EDIT_STATE_INSTANCE + /// If passed to ``PackedScene/instantiate(editState:)``, provides local scene resources to the local scene. Only the main scene should receive the main edit state. + /// + /// > Note: Only available in editor builds. + /// + case main = 2 // GEN_EDIT_STATE_MAIN + /// If passed to ``PackedScene/instantiate(editState:)``, it's similar to ``GenEditState/main``, but for the case where the scene is being instantiated to be the base of another one. + /// + /// > Note: Only available in editor builds. + /// + case mainInherited = 3 // GEN_EDIT_STATE_MAIN_INHERITED + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .disabled: return ".disabled" + case .instance: return ".instance" + case .main: return ".main" + case .mainInherited: return ".mainInherited" + } + + } + + } + + /* Methods */ + fileprivate static var method_get_node_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_count") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of nodes in the scene. + /// + /// The `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`. + /// + public final func getNodeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(SceneState.method_get_node_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_node_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_type") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the type of the node at `idx`. + public final func getNodeType(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_type, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_name") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the name of the node at `idx`. + public final func getNodeName(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_path") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2272487792)! + } + + } + + }() + + /// Returns the path to the node at `idx`. + /// + /// If `forParent` is `true`, returns the path of the `idx` node's parent instead. + /// + public final func getNodePath(idx: Int32, forParent: Bool = false) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: forParent) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_owner_path: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_owner_path") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Returns the path to the owner of the node at `idx`, relative to the root node. + public final func getNodeOwnerPath(idx: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_owner_path, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_is_node_instance_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("is_node_instance_placeholder") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1116898809)! + } + + } + + }() + + /// Returns `true` if the node at `idx` is an ``InstancePlaceholder``. + public final func isNodeInstancePlaceholder(idx: Int32) -> Bool { + var _result: Bool = false + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_is_node_instance_placeholder, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_instance_placeholder: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_instance_placeholder") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 844755477)! + } + + } + + }() + + /// Returns the path to the represented scene file if the node at `idx` is an ``InstancePlaceholder``. + public final func getNodeInstancePlaceholder(idx: Int32) -> String { + let _result = GString () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_instance_placeholder, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result.description + } + + fileprivate static var method_get_node_instance: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_instance") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 511017218)! + } + + } + + }() + + /// Returns a ``PackedScene`` for the node at `idx` (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance. + public final func getNodeInstance(idx: Int32) -> PackedScene? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_instance, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_node_groups: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_groups") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 647634434)! + } + + } + + }() + + /// Returns the list of group names associated with the node at `idx`. + public final func getNodeGroups(idx: Int32) -> PackedStringArray { + let _result: PackedStringArray = PackedStringArray () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_groups, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_index: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_index") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the `idx` argument used here and in other methods. + public final func getNodeIndex(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_index, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_property_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_property_count") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of exported or overridden properties for the node at `idx`. + /// + /// The `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`. + /// + public final func getNodePropertyCount(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_property_count, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_property_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_property_name") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 351665558)! + } + + } + + }() + + /// Returns the name of the property at `propIdx` for the node at `idx`. + public final func getNodePropertyName(idx: Int32, propIdx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: propIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_property_name, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + } + + return _result + } + + fileprivate static var method_get_node_property_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_property_value") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 678354945)! + } + + } + + }() + + /// Returns the value of the property at `propIdx` for the node at `idx`. + public final func getNodePropertyValue(idx: Int32, propIdx: Int32) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: propIdx) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_node_property_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_get_connection_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_count") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of signal connections in the scene. + /// + /// The `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`. + /// + public final func getConnectionCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(SceneState.method_get_connection_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_connection_source: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_source") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Returns the path to the node that owns the signal at `idx`, relative to the root node. + public final func getConnectionSource(idx: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_source, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_signal") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the name of the signal at `idx`. + public final func getConnectionSignal(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_target: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_target") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 408788394)! + } + + } + + }() + + /// Returns the path to the node that owns the method connected to the signal at `idx`, relative to the root node. + public final func getConnectionTarget(idx: Int32) -> NodePath { + let _result: NodePath = NodePath () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_target, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_method: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_method") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 659327637)! + } + + } + + }() + + /// Returns the method connected to the signal at `idx`. + public final func getConnectionMethod(idx: Int32) -> StringName { + let _result: StringName = StringName () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_method, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_flags") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the connection flags for the signal at `idx`. See ``Object.ConnectFlags`` constants. + public final func getConnectionFlags(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_binds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_binds") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 663333327)! + } + + } + + }() + + /// Returns the list of bound parameters for the signal at `idx`. + public final func getConnectionBinds(idx: Int32) -> GArray { + let _result: GArray = GArray () + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_binds, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result.content) + } + + } + + } + + return _result + } + + fileprivate static var method_get_connection_unbinds: GDExtensionMethodBindPtr = { + let methodName = StringName("get_connection_unbinds") + return withUnsafePointer(to: &SceneState.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 923996154)! + } + + } + + }() + + /// Returns the number of unbound parameters for the signal at `idx`. + public final func getConnectionUnbinds(idx: Int32) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: idx) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneState.method_get_connection_unbinds, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/SceneTree.swift b/Sources/SwiftGodot/Generated/Api/SceneTree.swift new file mode 100644 index 000000000..608cb178b --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/SceneTree.swift @@ -0,0 +1,1822 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Manages the game loop via a hierarchy of nodes. +/// +/// As one of the most important classes, the ``SceneTree`` manages the hierarchy of nodes in a scene, as well as scenes themselves. Nodes can be added, fetched and removed. The whole scene tree (and thus the current scene) can be paused. Scenes can be loaded, switched and reloaded. +/// +/// You can also use the ``SceneTree`` to organize your nodes into **groups**: every node can be added to as many groups as you want to create, e.g. an "enemy" group. You can then iterate these groups or even call methods and set properties on all the nodes belonging to any given group. +/// +/// ``SceneTree`` is the default ``MainLoop`` implementation used by the engine, and is thus in charge of the game loop. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``treeChanged`` +/// - ``treeProcessModeChanged`` +/// - ``nodeAdded`` +/// - ``nodeRemoved`` +/// - ``nodeRenamed`` +/// - ``nodeConfigurationWarningChanged`` +/// - ``processFrame`` +/// - ``physicsFrame`` +open class SceneTree: MainLoop { + override open class var godotClassName: StringName { "SceneTree" } + public enum GroupCallFlags: Int64, CaseIterable, CustomDebugStringConvertible { + /// Call nodes within a group with no special behavior (default). + case `default` = 0 // GROUP_CALL_DEFAULT + /// Call nodes within a group in reverse tree hierarchy order (all nested children are called before their respective parent nodes). + case reverse = 1 // GROUP_CALL_REVERSE + /// Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to ``Object/callDeferred(method:)``. + case deferred = 2 // GROUP_CALL_DEFERRED + /// Call nodes within a group only once, even if the call is executed many times in the same frame. Must be combined with ``GroupCallFlags/deferred`` to work. + /// + /// > Note: Different arguments are not taken into account. Therefore, when the same call is executed with different arguments, only the first call will be performed. + /// + case unique = 4 // GROUP_CALL_UNIQUE + /// A textual representation of this instance, suitable for debugging + public var debugDescription: String { + switch self { + case .`default`: return ".`default`" + case .reverse: return ".reverse" + case .deferred: return ".deferred" + case .unique: return ".unique" + } + + } + + } + + + /* Properties */ + + /// If `true`, the application automatically accepts quitting requests. + /// + /// For mobile platforms, see ``quitOnGoBack``. + /// + final public var autoAcceptQuit: Bool { + get { + return is_auto_accept_quit () + } + + set { + set_auto_accept_quit (newValue) + } + + } + + /// If `true`, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). + /// + /// To handle 'Go Back' button when this option is disabled, use ``DisplayServer/WindowEvent/goBackRequest``. + /// + final public var quitOnGoBack: Bool { + get { + return is_quit_on_go_back () + } + + set { + set_quit_on_go_back (newValue) + } + + } + + /// If `true`, collision shapes will be visible when running the game from the editor for debugging purposes. + /// + /// > Note: This property is not designed to be changed at run-time. Changing the value of ``debugCollisionsHint`` while the project is running will not have the desired effect. + /// + final public var debugCollisionsHint: Bool { + get { + return is_debugging_collisions_hint () + } + + set { + set_debug_collisions_hint (newValue) + } + + } + + /// If `true`, curves from ``Path2D`` and ``Path3D`` nodes will be visible when running the game from the editor for debugging purposes. + /// + /// > Note: This property is not designed to be changed at run-time. Changing the value of ``debugPathsHint`` while the project is running will not have the desired effect. + /// + final public var debugPathsHint: Bool { + get { + return is_debugging_paths_hint () + } + + set { + set_debug_paths_hint (newValue) + } + + } + + /// If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes. + /// + /// > Note: This property is not designed to be changed at run-time. Changing the value of ``debugNavigationHint`` while the project is running will not have the desired effect. + /// + final public var debugNavigationHint: Bool { + get { + return is_debugging_navigation_hint () + } + + set { + set_debug_navigation_hint (newValue) + } + + } + + /// If `true`, the scene tree is considered paused. This causes the following behavior: + /// + /// - 2D and 3D physics will be stopped, as well as collision detection and related signals. + /// + /// - Depending on each node's ``Node/processMode``, their ``Node/_process(delta:)``, ``Node/_physicsProcess(delta:)`` and ``Node/_input(event:)`` callback methods may not called anymore. + /// + final public var paused: Bool { + get { + return is_paused () + } + + set { + set_pause (newValue) + } + + } + + /// The root of the scene currently being edited in the editor. This is usually a direct child of ``root``. + /// + /// > Note: This property does nothing in release builds. + /// + final public var editedSceneRoot: Node? { + get { + return get_edited_scene_root () + } + + set { + set_edited_scene_root (newValue) + } + + } + + /// The root node of the currently loaded main scene, usually as a direct child of ``root``. See also ``changeSceneToFile(path:)``, ``changeSceneToPacked(packedScene:)``, and ``reloadCurrentScene()``. + /// + /// > Warning: Setting this property directly may not work as expected, as it does _not_ add or remove any nodes from this tree. + /// + final public var currentScene: Node? { + get { + return get_current_scene () + } + + set { + set_current_scene (newValue) + } + + } + + /// The tree's root ``Window``. This is top-most ``Node`` of the scene tree, and is always present. An absolute ``NodePath`` always starts from this node. Children of the root node may include the loaded ``currentScene``, as well as any AutoLoad configured in the Project Settings. + /// + /// > Warning: Do not delete this node. This will result in unstable behavior, followed by a crash. + /// + final public var root: Window? { + get { + return get_root () + } + + } + + /// If `true` (default value), enables automatic polling of the ``MultiplayerAPI`` for this SceneTree during [signal process_frame]. + /// + /// If `false`, you need to manually call ``MultiplayerAPI/poll()`` to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual ``Mutex`` protection when accessing the ``MultiplayerAPI`` from threads. + /// + final public var multiplayerPoll: Bool { + get { + return is_multiplayer_poll_enabled () + } + + set { + set_multiplayer_poll_enabled (newValue) + } + + } + + /// If `true`, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. + /// + /// The default value of this property is controlled by ``ProjectSettings/physics/common/physicsInterpolation``. + /// + final public var physicsInterpolation: Bool { + get { + return is_physics_interpolation_enabled () + } + + set { + set_physics_interpolation_enabled (newValue) + } + + } + + /* Methods */ + fileprivate static var method_get_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_root") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1757182445)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_root() -> Window? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(SceneTree.method_get_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_has_group: GDExtensionMethodBindPtr = { + let methodName = StringName("has_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if a node added to the given group `name` exists in the tree. + public final func hasGroup(name: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: name.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_has_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_is_auto_accept_quit: GDExtensionMethodBindPtr = { + let methodName = StringName("is_auto_accept_quit") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_auto_accept_quit() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_auto_accept_quit, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_auto_accept_quit: GDExtensionMethodBindPtr = { + let methodName = StringName("set_auto_accept_quit") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_auto_accept_quit(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_auto_accept_quit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_quit_on_go_back: GDExtensionMethodBindPtr = { + let methodName = StringName("is_quit_on_go_back") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_quit_on_go_back() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_quit_on_go_back, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_quit_on_go_back: GDExtensionMethodBindPtr = { + let methodName = StringName("set_quit_on_go_back") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_quit_on_go_back(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_quit_on_go_back, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_debug_collisions_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_collisions_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_collisions_hint(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_debug_collisions_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_debugging_collisions_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("is_debugging_collisions_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_debugging_collisions_hint() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_debugging_collisions_hint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_paths_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_paths_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_paths_hint(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_debug_paths_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_debugging_paths_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("is_debugging_paths_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_debugging_paths_hint() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_debugging_paths_hint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_debug_navigation_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("set_debug_navigation_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_debug_navigation_hint(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_debug_navigation_hint, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_debugging_navigation_hint: GDExtensionMethodBindPtr = { + let methodName = StringName("is_debugging_navigation_hint") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_debugging_navigation_hint() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_debugging_navigation_hint, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_set_edited_scene_root: GDExtensionMethodBindPtr = { + let methodName = StringName("set_edited_scene_root") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_edited_scene_root(_ scene: Node?) { + withUnsafePointer(to: scene?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_edited_scene_root, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_edited_scene_root: GDExtensionMethodBindPtr = { + let methodName = StringName("get_edited_scene_root") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_edited_scene_root() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(SceneTree.method_get_edited_scene_root, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_pause: GDExtensionMethodBindPtr = { + let methodName = StringName("set_pause") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_pause(_ enable: Bool) { + withUnsafePointer(to: enable) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_pause, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_paused: GDExtensionMethodBindPtr = { + let methodName = StringName("is_paused") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_paused() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_paused, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_create_timer: GDExtensionMethodBindPtr = { + let methodName = StringName("create_timer") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2709170273)! + } + + } + + }() + + /// Returns a new ``SceneTreeTimer``. After `timeSec` in seconds have passed, the timer will emit [signal SceneTreeTimer.timeout] and will be automatically freed. + /// + /// If `processAlways` is `false`, the timer will be paused when setting ``SceneTree/paused`` to `true`. + /// + /// If `processInPhysics` is `true`, the timer will update at the end of the physics frame, instead of the process frame. + /// + /// If `ignoreTimeScale` is `true`, the timer will ignore ``Engine/timeScale`` and update with the real, elapsed time. + /// + /// This method is commonly used to create a one-shot delay timer, as in the following example: + /// + /// > Note: The timer is always updated _after_ all of the nodes in the tree. A node's ``Node/_process(delta:)`` method would be called before the timer updates (or ``Node/_physicsProcess(delta:)`` if `processInPhysics` is set to `true`). + /// + public final func createTimer(timeSec: Double, processAlways: Bool = true, processInPhysics: Bool = false, ignoreTimeScale: Bool = false) -> SceneTreeTimer? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: timeSec) { pArg0 in + withUnsafePointer(to: processAlways) { pArg1 in + withUnsafePointer(to: processInPhysics) { pArg2 in + withUnsafePointer(to: ignoreTimeScale) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_create_timer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_create_tween: GDExtensionMethodBindPtr = { + let methodName = StringName("create_tween") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3426978995)! + } + + } + + }() + + /// Creates and returns a new ``Tween`` processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its ``Tween.TweenProcessMode``). + /// + /// > Note: A ``Tween`` created using this method is not bound to any ``Node``. It may keep working until there is nothing left to animate. If you want the ``Tween`` to be automatically killed when the ``Node`` is freed, use ``Node/createTween()`` or ``Tween/bindNode(_:)``. + /// + public final func createTween() -> Tween? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(SceneTree.method_create_tween, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_processed_tweens: GDExtensionMethodBindPtr = { + let methodName = StringName("get_processed_tweens") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns an ``GArray`` of currently existing ``Tween``s in the tree, including paused tweens. + public final func getProcessedTweens() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(SceneTree.method_get_processed_tweens, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_node_count: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_count") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns the number of nodes inside this tree. + public final func getNodeCount() -> Int32 { + var _result: Int32 = 0 + gi.object_method_bind_ptrcall(SceneTree.method_get_node_count, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_frame: GDExtensionMethodBindPtr = { + let methodName = StringName("get_frame") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3905245786)! + } + + } + + }() + + /// Returns how many frames have been processed, since the application started. This is _not_ a measurement of elapsed time. + public final func getFrame() -> Int { + var _result: Int = 0 + gi.object_method_bind_ptrcall(SceneTree.method_get_frame, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_quit: GDExtensionMethodBindPtr = { + let methodName = StringName("quit") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1995695955)! + } + + } + + }() + + /// Quits the application at the end of the current iteration, with the given `exitCode`. + /// + /// By convention, an exit code of `0` indicates success, whereas any other exit code indicates an error. For portability reasons, it should be between `0` and `125` (inclusive). + /// + /// > Note: On iOS this method doesn't work. Instead, as recommended by the iOS Human Interface Guidelines, the user is expected to close apps via the Home button. + /// + public final func quit(exitCode: Int32 = 0) { + withUnsafePointer(to: exitCode) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_quit, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_set_physics_interpolation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_physics_interpolation_enabled") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_physics_interpolation_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_physics_interpolation_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_physics_interpolation_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_physics_interpolation_enabled") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_physics_interpolation_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_physics_interpolation_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_queue_delete: GDExtensionMethodBindPtr = { + let methodName = StringName("queue_delete") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3975164845)! + } + + } + + }() + + /// Queues the given `obj` to be deleted, calling its ``Object/free()`` at the end of the current frame. This method is similar to ``Node/queueFree()``. + public final func queueDelete(obj: Object?) { + withUnsafePointer(to: obj?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_queue_delete, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_call_group_flags: GDExtensionMethodBindPtr = { + let methodName = StringName("call_group_flags") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1527739229)! + } + + } + + }() + + /// Calls the given `method` on each node inside this tree added to the given `group`. Use `flags` to customize this method's behavior (see ``SceneTree/GroupCallFlags``). Additional arguments for `method` can be passed at the end of this method. Nodes that cannot call `method` (either because the method doesn't exist or the arguments do not match) are ignored. + /// + /// > Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func callGroupFlags(_ flags: Int64, group: StringName, method: StringName, _ arguments: Variant?...) { + var _result: Variant.ContentType = Variant.zero + let flags = Variant(flags) + withUnsafePointer(to: flags.content) { pArg0 in + let group = Variant(group) + withUnsafePointer(to: group.content) { pArg1 in + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg2 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_call(SceneTree.method_call_group_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, 3, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 3 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + pArgsBuffer.initializeElement(at: 1, to: pArg1) + pArgsBuffer.initializeElement(at: 2, to: pArg2) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func setGroupFlags(callFlags: UInt32, group: StringName, property: String, value: Variant?) { + withUnsafePointer(to: callFlags) { pArg0 in + withUnsafePointer(to: group.content) { pArg1 in + let property = GString(property) + withUnsafePointer(to: property.content) { pArg2 in + withUnsafePointer(to: value.content) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_group_flags, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + fileprivate static var method_call_group: GDExtensionMethodBindPtr = { + let methodName = StringName("call_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1257962832)! + } + + } + + }() + + /// Calls `method` on each node inside this tree added to the given `group`. You can pass arguments to `method` by specifying them at the end of this method call. Nodes that cannot call `method` (either because the method doesn't exist or the arguments do not match) are ignored. See also ``setGroup(_:property:value:)`` and ``notifyGroup(_:notification:)``. + /// + /// > Note: This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + /// + /// > Note: In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func callGroup(_ group: StringName, method: StringName, _ arguments: Variant?...) { + var _result: Variant.ContentType = Variant.zero + let group = Variant(group) + withUnsafePointer(to: group.content) { pArg0 in + let method = Variant(method) + withUnsafePointer(to: method.content) { pArg1 in + if arguments.isEmpty { + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_call(SceneTree.method_call_group, UnsafeMutableRawPointer(mutating: handle), pArgs, 2, &_result, nil) + } + + } + + } else { + // A temporary allocation containing pointers to `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: UnsafeRawPointer?.self, capacity: 2 + arguments.count) { pArgsBuffer in + defer { pArgsBuffer.deinitialize() } + guard let pArgs = pArgsBuffer.baseAddress else { + fatalError("pArgsBuffer.baseAddress is nil") + } + pArgsBuffer.initializeElement(at: 0, to: pArg0) + pArgsBuffer.initializeElement(at: 1, to: pArg1) + // A temporary allocation containing `Variant.ContentType` of marshaled arguments + withUnsafeTemporaryAllocation(of: Variant.ContentType.self, capacity: arguments.count) { contentsBuffer in + defer { contentsBuffer.deinitialize() } + guard let contentsPtr = contentsBuffer.baseAddress else { + fatalError("contentsBuffer.baseAddress is nil") + } + + for i in 0.. Note: This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + /// + public final func notifyGroup(_ group: StringName, notification: Int32) { + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: notification) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_notify_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_set_group: GDExtensionMethodBindPtr = { + let methodName = StringName("set_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1279312029)! + } + + } + + }() + + /// Sets the given `property` to `value` on all nodes inside this tree added to the given `group`. Nodes that do not have the `property` are ignored. See also ``callGroup(_:method:)`` and ``notifyGroup(_:notification:)``. + /// + /// > Note: This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + /// + /// > Note: In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new ``StringName`` on each call. + /// + public final func setGroup(_ group: StringName, property: String, value: Variant?) { + withUnsafePointer(to: group.content) { pArg0 in + let property = GString(property) + withUnsafePointer(to: property.content) { pArg1 in + withUnsafePointer(to: value.content) { pArg2 in + withUnsafePointer(to: UnsafeRawPointersN3(pArg0, pArg1, pArg2)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 3) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_group, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + + } + + fileprivate static var method_get_nodes_in_group: GDExtensionMethodBindPtr = { + let methodName = StringName("get_nodes_in_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 689397652)! + } + + } + + }() + + /// Returns an ``GArray`` containing all nodes inside this tree, that have been added to the given `group`, in scene hierarchy order. + public final func getNodesInGroup(_ group: StringName) -> ObjectCollection { + var _result: Int64 = 0 + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_get_nodes_in_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return ObjectCollection(content: _result) + } + + fileprivate static var method_get_first_node_in_group: GDExtensionMethodBindPtr = { + let methodName = StringName("get_first_node_in_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 4071044623)! + } + + } + + }() + + /// Returns the first ``Node`` found inside the tree, that has been added to the given `group`, in scene hierarchy order. Returns `null` if no match is found. See also ``getNodesInGroup(_:)``. + public final func getFirstNodeInGroup(_ group: StringName) -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_get_first_node_in_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_node_count_in_group: GDExtensionMethodBindPtr = { + let methodName = StringName("get_node_count_in_group") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2458036349)! + } + + } + + }() + + /// Returns the number of nodes assigned to the given group. + public final func getNodeCountInGroup(_ group: StringName) -> Int32 { + var _result: Int32 = 0 + withUnsafePointer(to: group.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_get_node_count_in_group, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_set_current_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("set_current_scene") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1078189570)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_current_scene(_ childNode: Node?) { + withUnsafePointer(to: childNode?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_current_scene, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_current_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_scene") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3160264692)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_current_scene() -> Node? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(SceneTree.method_get_current_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_change_scene_to_file: GDExtensionMethodBindPtr = { + let methodName = StringName("change_scene_to_file") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166001499)! + } + + } + + }() + + /// Changes the running scene to the one at the given `path`, after loading it into a ``PackedScene`` and creating a new instance. + /// + /// Returns ``GodotError/ok`` on success, ``GodotError/errCantOpen`` if the `path` cannot be loaded into a ``PackedScene``, or ``GodotError/errCantCreate`` if that scene cannot be instantiated. + /// + /// > Note: See ``changeSceneToPacked(packedScene:)`` for details on the order of operations. + /// + public final func changeSceneToFile(path: String) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + let path = GString(path) + withUnsafePointer(to: path.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_change_scene_to_file, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_change_scene_to_packed: GDExtensionMethodBindPtr = { + let methodName = StringName("change_scene_to_packed") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 107349098)! + } + + } + + }() + + /// Changes the running scene to a new instance of the given ``PackedScene`` (which must be valid). + /// + /// Returns ``GodotError/ok`` on success, ``GodotError/errCantCreate`` if the scene cannot be instantiated, or ``GodotError/errInvalidParameter`` if the scene is invalid. + /// + /// > Note: Operations happen in the following order when ``changeSceneToPacked(packedScene:)`` is called: + /// + /// 1. The current scene node is immediately removed from the tree. From that point, ``Node/getTree()`` called on the current (outgoing) scene will return `null`. ``currentScene`` will be `null`, too, because the new scene is not available yet. + /// + /// 2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. ``Node/getTree()`` and ``currentScene`` will be back to working as usual. + /// + /// This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to ``Node/queueFree()``. + /// + public final func changeSceneToPacked(packedScene: PackedScene?) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: packedScene?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_change_scene_to_packed, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_reload_current_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("reload_current_scene") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 166280745)! + } + + } + + }() + + /// Reloads the currently active scene, replacing ``currentScene`` with a new instance of its original ``PackedScene``. + /// + /// Returns ``GodotError/ok`` on success, ``GodotError/errUnconfigured`` if no ``currentScene`` is defined, ``GodotError/errCantOpen`` if ``currentScene`` cannot be loaded into a ``PackedScene``, or ``GodotError/errCantCreate`` if the scene cannot be instantiated. + /// + public final func reloadCurrentScene() -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + gi.object_method_bind_ptrcall(SceneTree.method_reload_current_scene, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return GodotError (rawValue: _result)! + } + + fileprivate static var method_unload_current_scene: GDExtensionMethodBindPtr = { + let methodName = StringName("unload_current_scene") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3218959716)! + } + + } + + }() + + /// If a current scene is loaded, calling this method will unload it. + public final func unloadCurrentScene() { + gi.object_method_bind_ptrcall(SceneTree.method_unload_current_scene, UnsafeMutableRawPointer(mutating: handle), nil, nil) + + } + + fileprivate static var method_set_multiplayer: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multiplayer") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2385607013)! + } + + } + + }() + + /// Sets a custom ``MultiplayerAPI`` with the given `rootPath` (controlling also the relative subpaths), or override the default one if `rootPath` is empty. + /// + /// > Note: No ``MultiplayerAPI`` must be configured for the subpath containing `rootPath`, nested custom multiplayers are not allowed. I.e. if one is configured for `"/root/Foo"` setting one for `"/root/Foo/Bar"` will cause an error. + /// + public final func setMultiplayer(_ multiplayer: MultiplayerAPI?, rootPath: NodePath = NodePath("")) { + withUnsafePointer(to: multiplayer?.handle) { pArg0 in + withUnsafePointer(to: rootPath.content) { pArg1 in + withUnsafePointer(to: UnsafeRawPointersN2(pArg0, pArg1)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 2) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_multiplayer, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + + } + + fileprivate static var method_get_multiplayer: GDExtensionMethodBindPtr = { + let methodName = StringName("get_multiplayer") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3453401404)! + } + + } + + }() + + /// Searches for the ``MultiplayerAPI`` configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See ``setMultiplayer(_:rootPath:)``. + public final func getMultiplayer(forPath: NodePath = NodePath("")) -> MultiplayerAPI? { + var _result = UnsafeRawPointer (bitPattern: 0) + withUnsafePointer(to: forPath.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_get_multiplayer, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_set_multiplayer_poll_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("set_multiplayer_poll_enabled") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2586408642)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_multiplayer_poll_enabled(_ enabled: Bool) { + withUnsafePointer(to: enabled) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTree.method_set_multiplayer_poll_enabled, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_is_multiplayer_poll_enabled: GDExtensionMethodBindPtr = { + let methodName = StringName("is_multiplayer_poll_enabled") + return withUnsafePointer(to: &SceneTree.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + @inline(__always) + fileprivate final func is_multiplayer_poll_enabled() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(SceneTree.method_is_multiplayer_poll_enabled, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted any time the tree's hierarchy changes (nodes being moved, renamed, etc.). + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "tree_changed") } + + /// Emitted when the ``Node/processMode`` of any node inside the tree is changed. Only emitted in the editor, to update the visibility of disabled nodes. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.treeProcessModeChanged.connect { + /// print ("caught signal") + /// } + /// ``` + public var treeProcessModeChanged: SimpleSignal { SimpleSignal (target: self, signalName: "tree_process_mode_changed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the `node` enters this tree. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeAdded.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeAdded: Signal1 { Signal1 (target: self, signalName: "node_added") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal2/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal2/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal2/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal2 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal2 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the `node` exits this tree. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeRemoved.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeRemoved: Signal2 { Signal2 (target: self, signalName: "node_removed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal3/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal3/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal3/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal3 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal3 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the `node`'s ``Node/name`` is changed. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeRenamed.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeRenamed: Signal3 { Signal3 (target: self, signalName: "node_renamed") } + + /// Signal support. + /// + /// + /// + /// Use the ``Signal4/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal4/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal4/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal4 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal4 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ node: Node) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Node ?? Node (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the `node`'s ``Node/updateConfigurationWarnings()`` is called. Only emitted in the editor. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.nodeConfigurationWarningChanged.connect { node in + /// print ("caught signal") + /// } + /// ``` + public var nodeConfigurationWarningChanged: Signal4 { Signal4 (target: self, signalName: "node_configuration_warning_changed") } + + /// Emitted immediately before ``Node/_process(delta:)`` is called on every node in this tree. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.processFrame.connect { + /// print ("caught signal") + /// } + /// ``` + public var processFrame: SimpleSignal { SimpleSignal (target: self, signalName: "process_frame") } + + /// Emitted immediately before ``Node/_physicsProcess(delta:)`` is called on every node in this tree. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.physicsFrame.connect { + /// print ("caught signal") + /// } + /// ``` + public var physicsFrame: SimpleSignal { SimpleSignal (target: self, signalName: "physics_frame") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/SceneTreeTimer.swift b/Sources/SwiftGodot/Generated/Api/SceneTreeTimer.swift new file mode 100644 index 000000000..280c31fe9 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/SceneTreeTimer.swift @@ -0,0 +1,116 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// One-shot timer. +/// +/// A one-shot timer managed by the scene tree, which emits [signal timeout] on completion. See also ``SceneTree/createTimer(timeSec:processAlways:processInPhysics:ignoreTimeScale:)``. +/// +/// As opposed to ``Timer``, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example: +/// +/// The timer will be dereferenced after its time elapses. To preserve the timer, you can keep a reference to it. See ``RefCounted``. +/// +/// > Note: The timer is processed after all of the nodes in the current frame, i.e. node's ``Node/_process(delta:)`` method would be called before the timer (or ``Node/_physicsProcess(delta:)`` if `process_in_physics` in ``SceneTree/createTimer(timeSec:processAlways:processInPhysics:ignoreTimeScale:)`` has been set to `true`). +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``timeout`` +open class SceneTreeTimer: RefCounted { + override open class var godotClassName: StringName { "SceneTreeTimer" } + + /* Properties */ + + /// The time remaining (in seconds). + final public var timeLeft: Double { + get { + return get_time_left () + } + + set { + set_time_left (newValue) + } + + } + + /* Methods */ + fileprivate static var method_set_time_left: GDExtensionMethodBindPtr = { + let methodName = StringName("set_time_left") + return withUnsafePointer(to: &SceneTreeTimer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 373806689)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_time_left(_ time: Double) { + withUnsafePointer(to: time) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(SceneTreeTimer.method_set_time_left, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_time_left: GDExtensionMethodBindPtr = { + let methodName = StringName("get_time_left") + return withUnsafePointer(to: &SceneTreeTimer.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1740695150)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_time_left() -> Double { + var _result: Double = 0.0 + gi.object_method_bind_ptrcall(SceneTreeTimer.method_get_time_left, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + // Signals + /// Emitted when the timer reaches 0. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.timeout.connect { + /// print ("caught signal") + /// } + /// ``` + public var timeout: SimpleSignal { SimpleSignal (target: self, signalName: "timeout") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/Script.swift b/Sources/SwiftGodot/Generated/Api/Script.swift new file mode 100644 index 000000000..ca98ad2fe --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/Script.swift @@ -0,0 +1,402 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// A class stored as a resource. +/// +/// A class stored as a resource. A script extends the functionality of all objects that instantiate it. +/// +/// This is the base class for all scripts and should not be used directly. Trying to create a new script with this class will result in an error. +/// +/// The `new` method of a script subclass creates a new instance. ``Object/setScript(_:)`` extends an existing object, if that object's class matches one of the script's base classes. +/// +open class Script: Resource { + override open class var godotClassName: StringName { "Script" } + + /* Properties */ + + /// The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically. + final public var sourceCode: String { + get { + return get_source_code () + } + + set { + set_source_code (newValue) + } + + } + + /* Methods */ + fileprivate static var method_can_instantiate: GDExtensionMethodBindPtr = { + let methodName = StringName("can_instantiate") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the script can be instantiated. + public final func canInstantiate() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Script.method_can_instantiate, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_instance_has: GDExtensionMethodBindPtr = { + let methodName = StringName("instance_has") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 397768994)! + } + + } + + }() + + /// Returns `true` if `baseObject` is an instance of this script. + public final func instanceHas(baseObject: Object?) -> Bool { + var _result: Bool = false + withUnsafePointer(to: baseObject?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Script.method_instance_has, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_has_source_code: GDExtensionMethodBindPtr = { + let methodName = StringName("has_source_code") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the script contains non-empty source code. + public final func hasSourceCode() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Script.method_has_source_code, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_get_source_code: GDExtensionMethodBindPtr = { + let methodName = StringName("get_source_code") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 201670096)! + } + + } + + }() + + @inline(__always) + fileprivate final func get_source_code() -> String { + let _result = GString () + gi.object_method_bind_ptrcall(Script.method_get_source_code, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result.description + } + + fileprivate static var method_set_source_code: GDExtensionMethodBindPtr = { + let methodName = StringName("set_source_code") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 83702148)! + } + + } + + }() + + @inline(__always) + fileprivate final func set_source_code(_ source: String) { + let source = GString(source) + withUnsafePointer(to: source.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Script.method_set_source_code, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_reload: GDExtensionMethodBindPtr = { + let methodName = StringName("reload") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1633102583)! + } + + } + + }() + + /// Reloads the script's class implementation. Returns an error code. + public final func reload(keepState: Bool = false) -> GodotError { + var _result: Int64 = 0 // to avoid packed enums on the stack + withUnsafePointer(to: keepState) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Script.method_reload, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return GodotError (rawValue: _result)! + } + + fileprivate static var method_get_base_script: GDExtensionMethodBindPtr = { + let methodName = StringName("get_base_script") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 278624046)! + } + + } + + }() + + /// Returns the script directly inherited by this script. + public final func getBaseScript() -> Script? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(Script.method_get_base_script, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_instance_base_type: GDExtensionMethodBindPtr = { + let methodName = StringName("get_instance_base_type") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + /// Returns the script's base type. + public final func getInstanceBaseType() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Script.method_get_instance_base_type, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_global_name: GDExtensionMethodBindPtr = { + let methodName = StringName("get_global_name") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2002593661)! + } + + } + + }() + + /// Returns the class name associated with the script, if there is one. Returns an empty string otherwise. + /// + /// To give the script a global name, you can use the `class_name` keyword in GDScript and the ```GlobalClass``` attribute in C#. + /// + public final func getGlobalName() -> StringName { + let _result: StringName = StringName () + gi.object_method_bind_ptrcall(Script.method_get_global_name, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_has_script_signal: GDExtensionMethodBindPtr = { + let methodName = StringName("has_script_signal") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2619796661)! + } + + } + + }() + + /// Returns `true` if the script, or a base class, defines a signal with the given name. + public final func hasScriptSignal(signalName: StringName) -> Bool { + var _result: Bool = false + withUnsafePointer(to: signalName.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Script.method_has_script_signal, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return _result + } + + fileprivate static var method_get_script_property_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_property_list") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of properties in this ``Script``. + public final func getScriptPropertyList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Script.method_get_script_property_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_script_method_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_method_list") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of methods in this ``Script``. + public final func getScriptMethodList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Script.method_get_script_method_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_script_signal_list: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_signal_list") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2915620761)! + } + + } + + }() + + /// Returns the list of user signals defined in this ``Script``. + public final func getScriptSignalList() -> VariantCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(Script.method_get_script_signal_list, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return VariantCollection(content: _result) + } + + fileprivate static var method_get_script_constant_map: GDExtensionMethodBindPtr = { + let methodName = StringName("get_script_constant_map") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2382534195)! + } + + } + + }() + + /// Returns a dictionary containing constant names and their values. + public final func getScriptConstantMap() -> GDictionary { + let _result: GDictionary = GDictionary () + gi.object_method_bind_ptrcall(Script.method_get_script_constant_map, UnsafeMutableRawPointer(mutating: handle), nil, &_result.content) + return _result + } + + fileprivate static var method_get_property_default_value: GDExtensionMethodBindPtr = { + let methodName = StringName("get_property_default_value") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2138907829)! + } + + } + + }() + + /// Returns the default value of the specified property. + public final func getPropertyDefaultValue(property: StringName) -> Variant? { + var _result: Variant.ContentType = Variant.zero + withUnsafePointer(to: property.content) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(Script.method_get_property_default_value, UnsafeMutableRawPointer(mutating: handle), pArgs, &_result) + } + + } + + } + + return Variant(takingOver: _result) + } + + fileprivate static var method_is_tool: GDExtensionMethodBindPtr = { + let methodName = StringName("is_tool") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the script is a tool script. A tool script can run in the editor. + public final func isTool() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Script.method_is_tool, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + + fileprivate static var method_is_abstract: GDExtensionMethodBindPtr = { + let methodName = StringName("is_abstract") + return withUnsafePointer(to: &Script.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 36873697)! + } + + } + + }() + + /// Returns `true` if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated. + public final func isAbstract() -> Bool { + var _result: Bool = false + gi.object_method_bind_ptrcall(Script.method_is_abstract, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return _result + } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ScriptCreateDialog.swift b/Sources/SwiftGodot/Generated/Api/ScriptCreateDialog.swift new file mode 100644 index 000000000..c388c4b46 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ScriptCreateDialog.swift @@ -0,0 +1,155 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's popup dialog for creating new ``Script`` files. +/// +/// The ``ScriptCreateDialog`` creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the ``Window/popup(rect:)`` methods. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``scriptCreated`` +open class ScriptCreateDialog: ConfirmationDialog { + override open class var godotClassName: StringName { "ScriptCreateDialog" } + /* Methods */ + fileprivate static var method_config: GDExtensionMethodBindPtr = { + let methodName = StringName("config") + return withUnsafePointer(to: &ScriptCreateDialog.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 869314288)! + } + + } + + }() + + /// Prefills required fields to configure the ScriptCreateDialog for use. + public final func config(inherits: String, path: String, builtInEnabled: Bool = true, loadEnabled: Bool = true) { + let inherits = GString(inherits) + withUnsafePointer(to: inherits.content) { pArg0 in + let path = GString(path) + withUnsafePointer(to: path.content) { pArg1 in + withUnsafePointer(to: builtInEnabled) { pArg2 in + withUnsafePointer(to: loadEnabled) { pArg3 in + withUnsafePointer(to: UnsafeRawPointersN4(pArg0, pArg1, pArg2, pArg3)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 4) { pArgs in + gi.object_method_bind_ptrcall(ScriptCreateDialog.method_config, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + } + + } + + } + + + } + + // Signals + /// Signal support. + /// + /// + /// + /// Use the ``Signal1/connect(flags:_:)`` method to connect to the signal on the container object, and ``Signal1/disconnect(_:)`` to drop the connection. + /// + /// You can also await the ``Signal1/emitted`` property for waiting for a single emission of the signal. + /// + public class Signal1 { + var target: Object + var signalName: StringName + init (target: Object, signalName: StringName) { + self.target = target + self.signalName = signalName + } + + /// Connects the signal to the specified callback + /// + /// + /// + /// To disconnect, call the disconnect method, with the returned token on success + /// + /// - Parameters: + /// + /// - callback: the method to invoke when this signal is raised + /// + /// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants). + /// + /// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot. + /// + @discardableResult /* Signal1 */ + public func connect (flags: Object.ConnectFlags = [], _ callback: @escaping (_ script: Script) -> ()) -> Object { + let signalProxy = SignalProxy() + signalProxy.proxy = { + args in + var ptr_0: UnsafeMutableRawPointer? + args [0]!.toType (Variant.GType.object, dest: &ptr_0) + let arg_0 = lookupLiveObject (handleAddress: ptr_0!) as? Script ?? Script (nativeHandle: ptr_0!) + + callback (arg_0) + } + + let callable = Callable(object: signalProxy, method: SignalProxy.proxyName) + let r = target.connect(signal: signalName, callable: callable, flags: UInt32 (flags.rawValue)) + if r != .ok { print ("Warning, error connecting to signal, code: \(r)") } + return signalProxy + } + + /// Disconnects a signal that was previously connected, the return value from calling ``connect(flags:_:)`` + public func disconnect (_ token: Object) { + target.disconnect(signal: signalName, callable: Callable (object: token, method: SignalProxy.proxyName)) + } + + /// You can await this property to wait for the signal to be emitted once + public var emitted: Void { + get async { + await withCheckedContinuation { + c in + connect (flags: .oneShot) { _ in c.resume () } + } + + } + + } + + } + + /// Emitted when the user clicks the OK button. + /// + /// To connect to this signal, reference this property and call the + /// + /// `connect` method with the method you want to invoke + /// + /// + /// + /// Example: + /// ```swift + /// obj.scriptCreated.connect { script in + /// print ("caught signal") + /// } + /// ``` + public var scriptCreated: Signal1 { Signal1 (target: self, signalName: "script_created") } + +} + diff --git a/Sources/SwiftGodot/Generated/Api/ScriptEditor.swift b/Sources/SwiftGodot/Generated/Api/ScriptEditor.swift new file mode 100644 index 000000000..9799347a7 --- /dev/null +++ b/Sources/SwiftGodot/Generated/Api/ScriptEditor.swift @@ -0,0 +1,423 @@ +// This file is autogenerated, do not edit +@_implementationOnly import GDExtension + +#if CUSTOM_BUILTIN_IMPLEMENTATIONS +#if canImport(Darwin) +import Darwin +#elseif os(Windows) +import ucrt +import WinSDK +#elseif canImport(Glibc) +import Glibc +#elseif canImport(Musl) +import Musl +#else +#error("Unable to identify your C library.") +#endif +#endif +// Generated by Swift code generator - do not edit +@_implementationOnly import GDExtension + +/// Godot editor's script editor. +/// +/// Godot editor's script editor. +/// +/// > Note: This class shouldn't be instantiated directly. Instead, access the singleton using ``EditorInterface/getScriptEditor()``. +/// +/// +/// +/// This object emits the following signals: +/// +/// - ``editorScriptChanged`` +/// - ``scriptClose`` +open class ScriptEditor: PanelContainer { + override open class var godotClassName: StringName { "ScriptEditor" } + /* Methods */ + fileprivate static var method_get_current_editor: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_editor") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1906266726)! + } + + } + + }() + + /// Returns the ``ScriptEditorBase`` object that the user is currently editing. + public final func getCurrentEditor() -> ScriptEditorBase? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ScriptEditor.method_get_current_editor, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_open_script_editors: GDExtensionMethodBindPtr = { + let methodName = StringName("get_open_script_editors") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an array with all ``ScriptEditorBase`` objects which are currently open in editor. + public final func getOpenScriptEditors() -> ObjectCollection { + var _result: Int64 = 0 + gi.object_method_bind_ptrcall(ScriptEditor.method_get_open_script_editors, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + return ObjectCollection(content: _result) + } + + fileprivate static var method_register_syntax_highlighter: GDExtensionMethodBindPtr = { + let methodName = StringName("register_syntax_highlighter") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1092774468)! + } + + } + + }() + + /// Registers the ``EditorSyntaxHighlighter`` to the editor, the ``EditorSyntaxHighlighter`` will be available on all open scripts. + /// + /// > Note: Does not apply to scripts that are already opened. + /// + public final func registerSyntaxHighlighter(_ syntaxHighlighter: EditorSyntaxHighlighter?) { + withUnsafePointer(to: syntaxHighlighter?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ScriptEditor.method_register_syntax_highlighter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_unregister_syntax_highlighter: GDExtensionMethodBindPtr = { + let methodName = StringName("unregister_syntax_highlighter") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1092774468)! + } + + } + + }() + + /// Unregisters the ``EditorSyntaxHighlighter`` from the editor. + /// + /// > Note: The ``EditorSyntaxHighlighter`` will still be applied to scripts that are already opened. + /// + public final func unregisterSyntaxHighlighter(_ syntaxHighlighter: EditorSyntaxHighlighter?) { + withUnsafePointer(to: syntaxHighlighter?.handle) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ScriptEditor.method_unregister_syntax_highlighter, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_goto_line: GDExtensionMethodBindPtr = { + let methodName = StringName("goto_line") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 1286410249)! + } + + } + + }() + + /// Goes to the specified line in the current script. + public final func gotoLine(lineNumber: Int32) { + withUnsafePointer(to: lineNumber) { pArg0 in + withUnsafePointer(to: UnsafeRawPointersN1(pArg0)) { pArgs in + pArgs.withMemoryRebound(to: UnsafeRawPointer?.self, capacity: 1) { pArgs in + gi.object_method_bind_ptrcall(ScriptEditor.method_goto_line, UnsafeMutableRawPointer(mutating: handle), pArgs, nil) + } + + } + + } + + + } + + fileprivate static var method_get_current_script: GDExtensionMethodBindPtr = { + let methodName = StringName("get_current_script") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 2146468882)! + } + + } + + }() + + /// Returns a ``Script`` that is currently active in editor. + public final func getCurrentScript() -> Script? { + var _result = UnsafeRawPointer (bitPattern: 0) + gi.object_method_bind_ptrcall(ScriptEditor.method_get_current_script, UnsafeMutableRawPointer(mutating: handle), nil, &_result) + guard let _result else { return nil } ; return lookupObject (nativeHandle: _result)! + } + + fileprivate static var method_get_open_scripts: GDExtensionMethodBindPtr = { + let methodName = StringName("get_open_scripts") + return withUnsafePointer(to: &ScriptEditor.godotClassName.content) { classPtr in + withUnsafePointer(to: &methodName.content) { mnamePtr in + gi.classdb_get_method_bind(classPtr, mnamePtr, 3995934104)! + } + + } + + }() + + /// Returns an array with all ``Script`` objects which are currently open in editor. + public final func getOpenScripts() -> ObjectCollection